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

package ec2

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

type awsEc2query_serializeOpAcceptAddressTransfer struct {
}

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

func (m *awsEc2query_serializeOpAcceptAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptAddressTransferInput)
	_ = 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("AcceptAddressTransfer")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptAddressTransferInput(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 awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote struct {
}

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

func (m *awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptReservedInstancesExchangeQuoteInput)
	_ = 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("AcceptReservedInstancesExchangeQuote")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(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 awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations struct {
}

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

func (m *awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptTransitGatewayMulticastDomainAssociationsInput)
	_ = 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("AcceptTransitGatewayMulticastDomainAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(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 awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment struct {
}

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

func (m *awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptTransitGatewayPeeringAttachmentInput)
	_ = 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("AcceptTransitGatewayPeeringAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(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 awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment struct {
}

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

func (m *awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptTransitGatewayVpcAttachmentInput)
	_ = 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("AcceptTransitGatewayVpcAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(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 awsEc2query_serializeOpAcceptVpcEndpointConnections struct {
}

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

func (m *awsEc2query_serializeOpAcceptVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptVpcEndpointConnectionsInput)
	_ = 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("AcceptVpcEndpointConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(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 awsEc2query_serializeOpAcceptVpcPeeringConnection struct {
}

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

func (m *awsEc2query_serializeOpAcceptVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AcceptVpcPeeringConnectionInput)
	_ = 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("AcceptVpcPeeringConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(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 awsEc2query_serializeOpAdvertiseByoipCidr struct {
}

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

func (m *awsEc2query_serializeOpAdvertiseByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AdvertiseByoipCidrInput)
	_ = 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("AdvertiseByoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(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 awsEc2query_serializeOpAllocateAddress struct {
}

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

func (m *awsEc2query_serializeOpAllocateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AllocateAddressInput)
	_ = 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("AllocateAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAllocateAddressInput(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 awsEc2query_serializeOpAllocateHosts struct {
}

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

func (m *awsEc2query_serializeOpAllocateHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AllocateHostsInput)
	_ = 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("AllocateHosts")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAllocateHostsInput(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 awsEc2query_serializeOpAllocateIpamPoolCidr struct {
}

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

func (m *awsEc2query_serializeOpAllocateIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AllocateIpamPoolCidrInput)
	_ = 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("AllocateIpamPoolCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAllocateIpamPoolCidrInput(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 awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork struct {
}

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

func (m *awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ApplySecurityGroupsToClientVpnTargetNetworkInput)
	_ = 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("ApplySecurityGroupsToClientVpnTargetNetwork")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(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 awsEc2query_serializeOpAssignIpv6Addresses struct {
}

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

func (m *awsEc2query_serializeOpAssignIpv6Addresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssignIpv6AddressesInput)
	_ = 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("AssignIpv6Addresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(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 awsEc2query_serializeOpAssignPrivateIpAddresses struct {
}

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

func (m *awsEc2query_serializeOpAssignPrivateIpAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssignPrivateIpAddressesInput)
	_ = 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("AssignPrivateIpAddresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(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 awsEc2query_serializeOpAssignPrivateNatGatewayAddress struct {
}

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

func (m *awsEc2query_serializeOpAssignPrivateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssignPrivateNatGatewayAddressInput)
	_ = 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("AssignPrivateNatGatewayAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssignPrivateNatGatewayAddressInput(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 awsEc2query_serializeOpAssociateAddress struct {
}

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

func (m *awsEc2query_serializeOpAssociateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateAddressInput)
	_ = 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("AssociateAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateAddressInput(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 awsEc2query_serializeOpAssociateClientVpnTargetNetwork struct {
}

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

func (m *awsEc2query_serializeOpAssociateClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateClientVpnTargetNetworkInput)
	_ = 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("AssociateClientVpnTargetNetwork")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(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 awsEc2query_serializeOpAssociateDhcpOptions struct {
}

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

func (m *awsEc2query_serializeOpAssociateDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateDhcpOptionsInput)
	_ = 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("AssociateDhcpOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(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 awsEc2query_serializeOpAssociateEnclaveCertificateIamRole struct {
}

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

func (m *awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateEnclaveCertificateIamRoleInput)
	_ = 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("AssociateEnclaveCertificateIamRole")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(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 awsEc2query_serializeOpAssociateIamInstanceProfile struct {
}

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

func (m *awsEc2query_serializeOpAssociateIamInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateIamInstanceProfileInput)
	_ = 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("AssociateIamInstanceProfile")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(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 awsEc2query_serializeOpAssociateInstanceEventWindow struct {
}

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

func (m *awsEc2query_serializeOpAssociateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateInstanceEventWindowInput)
	_ = 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("AssociateInstanceEventWindow")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(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 awsEc2query_serializeOpAssociateIpamByoasn struct {
}

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

func (m *awsEc2query_serializeOpAssociateIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateIpamByoasnInput)
	_ = 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("AssociateIpamByoasn")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateIpamByoasnInput(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 awsEc2query_serializeOpAssociateIpamResourceDiscovery struct {
}

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

func (m *awsEc2query_serializeOpAssociateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateIpamResourceDiscoveryInput)
	_ = 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("AssociateIpamResourceDiscovery")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateIpamResourceDiscoveryInput(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 awsEc2query_serializeOpAssociateNatGatewayAddress struct {
}

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

func (m *awsEc2query_serializeOpAssociateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateNatGatewayAddressInput)
	_ = 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("AssociateNatGatewayAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateNatGatewayAddressInput(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 awsEc2query_serializeOpAssociateRouteTable struct {
}

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

func (m *awsEc2query_serializeOpAssociateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateRouteTableInput)
	_ = 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("AssociateRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateRouteTableInput(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 awsEc2query_serializeOpAssociateSubnetCidrBlock struct {
}

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

func (m *awsEc2query_serializeOpAssociateSubnetCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateSubnetCidrBlockInput)
	_ = 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("AssociateSubnetCidrBlock")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(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 awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain struct {
}

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

func (m *awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateTransitGatewayMulticastDomainInput)
	_ = 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("AssociateTransitGatewayMulticastDomain")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(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 awsEc2query_serializeOpAssociateTransitGatewayPolicyTable struct {
}

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

func (m *awsEc2query_serializeOpAssociateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateTransitGatewayPolicyTableInput)
	_ = 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("AssociateTransitGatewayPolicyTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayPolicyTableInput(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 awsEc2query_serializeOpAssociateTransitGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpAssociateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateTransitGatewayRouteTableInput)
	_ = 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("AssociateTransitGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(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 awsEc2query_serializeOpAssociateTrunkInterface struct {
}

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

func (m *awsEc2query_serializeOpAssociateTrunkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateTrunkInterfaceInput)
	_ = 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("AssociateTrunkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(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 awsEc2query_serializeOpAssociateVpcCidrBlock struct {
}

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

func (m *awsEc2query_serializeOpAssociateVpcCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AssociateVpcCidrBlockInput)
	_ = 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("AssociateVpcCidrBlock")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(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 awsEc2query_serializeOpAttachClassicLinkVpc struct {
}

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

func (m *awsEc2query_serializeOpAttachClassicLinkVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachClassicLinkVpcInput)
	_ = 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("AttachClassicLinkVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(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 awsEc2query_serializeOpAttachInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpAttachInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachInternetGatewayInput)
	_ = 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("AttachInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachInternetGatewayInput(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 awsEc2query_serializeOpAttachNetworkInterface struct {
}

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

func (m *awsEc2query_serializeOpAttachNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachNetworkInterfaceInput)
	_ = 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("AttachNetworkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(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 awsEc2query_serializeOpAttachVerifiedAccessTrustProvider struct {
}

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

func (m *awsEc2query_serializeOpAttachVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachVerifiedAccessTrustProviderInput)
	_ = 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("AttachVerifiedAccessTrustProvider")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachVerifiedAccessTrustProviderInput(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 awsEc2query_serializeOpAttachVolume struct {
}

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

func (m *awsEc2query_serializeOpAttachVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachVolumeInput)
	_ = 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("AttachVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachVolumeInput(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 awsEc2query_serializeOpAttachVpnGateway struct {
}

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

func (m *awsEc2query_serializeOpAttachVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AttachVpnGatewayInput)
	_ = 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("AttachVpnGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAttachVpnGatewayInput(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 awsEc2query_serializeOpAuthorizeClientVpnIngress struct {
}

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

func (m *awsEc2query_serializeOpAuthorizeClientVpnIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AuthorizeClientVpnIngressInput)
	_ = 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("AuthorizeClientVpnIngress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(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 awsEc2query_serializeOpAuthorizeSecurityGroupEgress struct {
}

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

func (m *awsEc2query_serializeOpAuthorizeSecurityGroupEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AuthorizeSecurityGroupEgressInput)
	_ = 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("AuthorizeSecurityGroupEgress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(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 awsEc2query_serializeOpAuthorizeSecurityGroupIngress struct {
}

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

func (m *awsEc2query_serializeOpAuthorizeSecurityGroupIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*AuthorizeSecurityGroupIngressInput)
	_ = 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("AuthorizeSecurityGroupIngress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(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 awsEc2query_serializeOpBundleInstance struct {
}

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

func (m *awsEc2query_serializeOpBundleInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*BundleInstanceInput)
	_ = 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("BundleInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentBundleInstanceInput(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 awsEc2query_serializeOpCancelBundleTask struct {
}

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

func (m *awsEc2query_serializeOpCancelBundleTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelBundleTaskInput)
	_ = 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("CancelBundleTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelBundleTaskInput(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 awsEc2query_serializeOpCancelCapacityReservation struct {
}

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

func (m *awsEc2query_serializeOpCancelCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelCapacityReservationInput)
	_ = 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("CancelCapacityReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelCapacityReservationInput(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 awsEc2query_serializeOpCancelCapacityReservationFleets struct {
}

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

func (m *awsEc2query_serializeOpCancelCapacityReservationFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelCapacityReservationFleetsInput)
	_ = 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("CancelCapacityReservationFleets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelCapacityReservationFleetsInput(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 awsEc2query_serializeOpCancelConversionTask struct {
}

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

func (m *awsEc2query_serializeOpCancelConversionTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelConversionTaskInput)
	_ = 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("CancelConversionTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelConversionTaskInput(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 awsEc2query_serializeOpCancelExportTask struct {
}

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

func (m *awsEc2query_serializeOpCancelExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelExportTaskInput)
	_ = 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("CancelExportTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelExportTaskInput(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 awsEc2query_serializeOpCancelImageLaunchPermission struct {
}

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

func (m *awsEc2query_serializeOpCancelImageLaunchPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelImageLaunchPermissionInput)
	_ = 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("CancelImageLaunchPermission")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelImageLaunchPermissionInput(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 awsEc2query_serializeOpCancelImportTask struct {
}

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

func (m *awsEc2query_serializeOpCancelImportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelImportTaskInput)
	_ = 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("CancelImportTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelImportTaskInput(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 awsEc2query_serializeOpCancelReservedInstancesListing struct {
}

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

func (m *awsEc2query_serializeOpCancelReservedInstancesListing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelReservedInstancesListingInput)
	_ = 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("CancelReservedInstancesListing")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(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 awsEc2query_serializeOpCancelSpotFleetRequests struct {
}

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

func (m *awsEc2query_serializeOpCancelSpotFleetRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelSpotFleetRequestsInput)
	_ = 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("CancelSpotFleetRequests")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(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 awsEc2query_serializeOpCancelSpotInstanceRequests struct {
}

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

func (m *awsEc2query_serializeOpCancelSpotInstanceRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CancelSpotInstanceRequestsInput)
	_ = 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("CancelSpotInstanceRequests")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(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 awsEc2query_serializeOpConfirmProductInstance struct {
}

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

func (m *awsEc2query_serializeOpConfirmProductInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ConfirmProductInstanceInput)
	_ = 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("ConfirmProductInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentConfirmProductInstanceInput(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 awsEc2query_serializeOpCopyFpgaImage struct {
}

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

func (m *awsEc2query_serializeOpCopyFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CopyFpgaImageInput)
	_ = 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("CopyFpgaImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCopyFpgaImageInput(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 awsEc2query_serializeOpCopyImage struct {
}

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

func (m *awsEc2query_serializeOpCopyImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CopyImageInput)
	_ = 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("CopyImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCopyImageInput(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 awsEc2query_serializeOpCopySnapshot struct {
}

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

func (m *awsEc2query_serializeOpCopySnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CopySnapshotInput)
	_ = 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("CopySnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCopySnapshotInput(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 awsEc2query_serializeOpCreateCapacityReservation struct {
}

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

func (m *awsEc2query_serializeOpCreateCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCapacityReservationInput)
	_ = 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("CreateCapacityReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCapacityReservationInput(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 awsEc2query_serializeOpCreateCapacityReservationFleet struct {
}

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

func (m *awsEc2query_serializeOpCreateCapacityReservationFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCapacityReservationFleetInput)
	_ = 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("CreateCapacityReservationFleet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCapacityReservationFleetInput(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 awsEc2query_serializeOpCreateCarrierGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateCarrierGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCarrierGatewayInput)
	_ = 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("CreateCarrierGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(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 awsEc2query_serializeOpCreateClientVpnEndpoint struct {
}

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

func (m *awsEc2query_serializeOpCreateClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateClientVpnEndpointInput)
	_ = 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("CreateClientVpnEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(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 awsEc2query_serializeOpCreateClientVpnRoute struct {
}

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

func (m *awsEc2query_serializeOpCreateClientVpnRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateClientVpnRouteInput)
	_ = 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("CreateClientVpnRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(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 awsEc2query_serializeOpCreateCoipCidr struct {
}

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

func (m *awsEc2query_serializeOpCreateCoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCoipCidrInput)
	_ = 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("CreateCoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCoipCidrInput(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 awsEc2query_serializeOpCreateCoipPool struct {
}

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

func (m *awsEc2query_serializeOpCreateCoipPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCoipPoolInput)
	_ = 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("CreateCoipPool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCoipPoolInput(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 awsEc2query_serializeOpCreateCustomerGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateCustomerGatewayInput)
	_ = 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("CreateCustomerGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(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 awsEc2query_serializeOpCreateDefaultSubnet struct {
}

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

func (m *awsEc2query_serializeOpCreateDefaultSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateDefaultSubnetInput)
	_ = 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("CreateDefaultSubnet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(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 awsEc2query_serializeOpCreateDefaultVpc struct {
}

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

func (m *awsEc2query_serializeOpCreateDefaultVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateDefaultVpcInput)
	_ = 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("CreateDefaultVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateDefaultVpcInput(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 awsEc2query_serializeOpCreateDhcpOptions struct {
}

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

func (m *awsEc2query_serializeOpCreateDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateDhcpOptionsInput)
	_ = 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("CreateDhcpOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(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 awsEc2query_serializeOpCreateEgressOnlyInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateEgressOnlyInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateEgressOnlyInternetGatewayInput)
	_ = 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("CreateEgressOnlyInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(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 awsEc2query_serializeOpCreateFleet struct {
}

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

func (m *awsEc2query_serializeOpCreateFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateFleetInput)
	_ = 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("CreateFleet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateFleetInput(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 awsEc2query_serializeOpCreateFlowLogs struct {
}

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

func (m *awsEc2query_serializeOpCreateFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateFlowLogsInput)
	_ = 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("CreateFlowLogs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateFlowLogsInput(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 awsEc2query_serializeOpCreateFpgaImage struct {
}

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

func (m *awsEc2query_serializeOpCreateFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateFpgaImageInput)
	_ = 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("CreateFpgaImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateFpgaImageInput(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 awsEc2query_serializeOpCreateImage struct {
}

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

func (m *awsEc2query_serializeOpCreateImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateImageInput)
	_ = 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("CreateImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateImageInput(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 awsEc2query_serializeOpCreateInstanceConnectEndpoint struct {
}

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

func (m *awsEc2query_serializeOpCreateInstanceConnectEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateInstanceConnectEndpointInput)
	_ = 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("CreateInstanceConnectEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateInstanceConnectEndpointInput(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 awsEc2query_serializeOpCreateInstanceEventWindow struct {
}

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

func (m *awsEc2query_serializeOpCreateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateInstanceEventWindowInput)
	_ = 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("CreateInstanceEventWindow")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(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 awsEc2query_serializeOpCreateInstanceExportTask struct {
}

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

func (m *awsEc2query_serializeOpCreateInstanceExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateInstanceExportTaskInput)
	_ = 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("CreateInstanceExportTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(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 awsEc2query_serializeOpCreateInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateInternetGatewayInput)
	_ = 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("CreateInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateInternetGatewayInput(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 awsEc2query_serializeOpCreateIpam struct {
}

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

func (m *awsEc2query_serializeOpCreateIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateIpamInput)
	_ = 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("CreateIpam")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateIpamInput(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 awsEc2query_serializeOpCreateIpamPool struct {
}

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

func (m *awsEc2query_serializeOpCreateIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateIpamPoolInput)
	_ = 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("CreateIpamPool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateIpamPoolInput(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 awsEc2query_serializeOpCreateIpamResourceDiscovery struct {
}

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

func (m *awsEc2query_serializeOpCreateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateIpamResourceDiscoveryInput)
	_ = 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("CreateIpamResourceDiscovery")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateIpamResourceDiscoveryInput(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 awsEc2query_serializeOpCreateIpamScope struct {
}

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

func (m *awsEc2query_serializeOpCreateIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateIpamScopeInput)
	_ = 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("CreateIpamScope")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateIpamScopeInput(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 awsEc2query_serializeOpCreateKeyPair struct {
}

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

func (m *awsEc2query_serializeOpCreateKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateKeyPairInput)
	_ = 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("CreateKeyPair")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateKeyPairInput(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 awsEc2query_serializeOpCreateLaunchTemplate struct {
}

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

func (m *awsEc2query_serializeOpCreateLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLaunchTemplateInput)
	_ = 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("CreateLaunchTemplate")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(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 awsEc2query_serializeOpCreateLaunchTemplateVersion struct {
}

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

func (m *awsEc2query_serializeOpCreateLaunchTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLaunchTemplateVersionInput)
	_ = 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("CreateLaunchTemplateVersion")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(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 awsEc2query_serializeOpCreateLocalGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpCreateLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLocalGatewayRouteInput)
	_ = 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("CreateLocalGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(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 awsEc2query_serializeOpCreateLocalGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLocalGatewayRouteTableInput)
	_ = 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("CreateLocalGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableInput(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 awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct {
}

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

func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput)
	_ = 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("CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(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 awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation struct {
}

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

func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVpcAssociationInput)
	_ = 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("CreateLocalGatewayRouteTableVpcAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(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 awsEc2query_serializeOpCreateManagedPrefixList struct {
}

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

func (m *awsEc2query_serializeOpCreateManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateManagedPrefixListInput)
	_ = 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("CreateManagedPrefixList")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(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 awsEc2query_serializeOpCreateNatGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateNatGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNatGatewayInput)
	_ = 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("CreateNatGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNatGatewayInput(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 awsEc2query_serializeOpCreateNetworkAcl struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkAclInput)
	_ = 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("CreateNetworkAcl")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkAclInput(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 awsEc2query_serializeOpCreateNetworkAclEntry struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkAclEntryInput)
	_ = 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("CreateNetworkAclEntry")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(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 awsEc2query_serializeOpCreateNetworkInsightsAccessScope struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkInsightsAccessScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkInsightsAccessScopeInput)
	_ = 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("CreateNetworkInsightsAccessScope")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkInsightsAccessScopeInput(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 awsEc2query_serializeOpCreateNetworkInsightsPath struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkInsightsPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkInsightsPathInput)
	_ = 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("CreateNetworkInsightsPath")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(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 awsEc2query_serializeOpCreateNetworkInterface struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkInterfaceInput)
	_ = 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("CreateNetworkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(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 awsEc2query_serializeOpCreateNetworkInterfacePermission struct {
}

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

func (m *awsEc2query_serializeOpCreateNetworkInterfacePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateNetworkInterfacePermissionInput)
	_ = 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("CreateNetworkInterfacePermission")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(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 awsEc2query_serializeOpCreatePlacementGroup struct {
}

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

func (m *awsEc2query_serializeOpCreatePlacementGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreatePlacementGroupInput)
	_ = 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("CreatePlacementGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreatePlacementGroupInput(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 awsEc2query_serializeOpCreatePublicIpv4Pool struct {
}

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

func (m *awsEc2query_serializeOpCreatePublicIpv4Pool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreatePublicIpv4PoolInput)
	_ = 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("CreatePublicIpv4Pool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreatePublicIpv4PoolInput(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 awsEc2query_serializeOpCreateReplaceRootVolumeTask struct {
}

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

func (m *awsEc2query_serializeOpCreateReplaceRootVolumeTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateReplaceRootVolumeTaskInput)
	_ = 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("CreateReplaceRootVolumeTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(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 awsEc2query_serializeOpCreateReservedInstancesListing struct {
}

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

func (m *awsEc2query_serializeOpCreateReservedInstancesListing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateReservedInstancesListingInput)
	_ = 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("CreateReservedInstancesListing")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(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 awsEc2query_serializeOpCreateRestoreImageTask struct {
}

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

func (m *awsEc2query_serializeOpCreateRestoreImageTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateRestoreImageTaskInput)
	_ = 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("CreateRestoreImageTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(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 awsEc2query_serializeOpCreateRoute struct {
}

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

func (m *awsEc2query_serializeOpCreateRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateRouteInput)
	_ = 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("CreateRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateRouteInput(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 awsEc2query_serializeOpCreateRouteTable struct {
}

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

func (m *awsEc2query_serializeOpCreateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateRouteTableInput)
	_ = 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("CreateRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateRouteTableInput(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 awsEc2query_serializeOpCreateSecurityGroup struct {
}

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

func (m *awsEc2query_serializeOpCreateSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSecurityGroupInput)
	_ = 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("CreateSecurityGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSecurityGroupInput(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 awsEc2query_serializeOpCreateSnapshot struct {
}

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

func (m *awsEc2query_serializeOpCreateSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSnapshotInput)
	_ = 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("CreateSnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSnapshotInput(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 awsEc2query_serializeOpCreateSnapshots struct {
}

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

func (m *awsEc2query_serializeOpCreateSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSnapshotsInput)
	_ = 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("CreateSnapshots")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSnapshotsInput(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 awsEc2query_serializeOpCreateSpotDatafeedSubscription struct {
}

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

func (m *awsEc2query_serializeOpCreateSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSpotDatafeedSubscriptionInput)
	_ = 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("CreateSpotDatafeedSubscription")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(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 awsEc2query_serializeOpCreateStoreImageTask struct {
}

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

func (m *awsEc2query_serializeOpCreateStoreImageTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateStoreImageTaskInput)
	_ = 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("CreateStoreImageTask")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(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 awsEc2query_serializeOpCreateSubnet struct {
}

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

func (m *awsEc2query_serializeOpCreateSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSubnetInput)
	_ = 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("CreateSubnet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSubnetInput(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 awsEc2query_serializeOpCreateSubnetCidrReservation struct {
}

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

func (m *awsEc2query_serializeOpCreateSubnetCidrReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateSubnetCidrReservationInput)
	_ = 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("CreateSubnetCidrReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(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 awsEc2query_serializeOpCreateTags struct {
}

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

func (m *awsEc2query_serializeOpCreateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTagsInput)
	_ = 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("CreateTags")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTagsInput(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 awsEc2query_serializeOpCreateTrafficMirrorFilter struct {
}

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

func (m *awsEc2query_serializeOpCreateTrafficMirrorFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTrafficMirrorFilterInput)
	_ = 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("CreateTrafficMirrorFilter")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(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 awsEc2query_serializeOpCreateTrafficMirrorFilterRule struct {
}

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

func (m *awsEc2query_serializeOpCreateTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTrafficMirrorFilterRuleInput)
	_ = 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("CreateTrafficMirrorFilterRule")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(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 awsEc2query_serializeOpCreateTrafficMirrorSession struct {
}

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

func (m *awsEc2query_serializeOpCreateTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTrafficMirrorSessionInput)
	_ = 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("CreateTrafficMirrorSession")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(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 awsEc2query_serializeOpCreateTrafficMirrorTarget struct {
}

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

func (m *awsEc2query_serializeOpCreateTrafficMirrorTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTrafficMirrorTargetInput)
	_ = 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("CreateTrafficMirrorTarget")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(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 awsEc2query_serializeOpCreateTransitGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayInput)
	_ = 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("CreateTransitGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayInput(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 awsEc2query_serializeOpCreateTransitGatewayConnect struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayConnect) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayConnectInput)
	_ = 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("CreateTransitGatewayConnect")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(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 awsEc2query_serializeOpCreateTransitGatewayConnectPeer struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayConnectPeerInput)
	_ = 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("CreateTransitGatewayConnectPeer")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(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 awsEc2query_serializeOpCreateTransitGatewayMulticastDomain struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayMulticastDomainInput)
	_ = 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("CreateTransitGatewayMulticastDomain")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(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 awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayPeeringAttachmentInput)
	_ = 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("CreateTransitGatewayPeeringAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(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 awsEc2query_serializeOpCreateTransitGatewayPolicyTable struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayPolicyTableInput)
	_ = 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("CreateTransitGatewayPolicyTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPolicyTableInput(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 awsEc2query_serializeOpCreateTransitGatewayPrefixListReference struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayPrefixListReferenceInput)
	_ = 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("CreateTransitGatewayPrefixListReference")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(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 awsEc2query_serializeOpCreateTransitGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayRouteInput)
	_ = 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("CreateTransitGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(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 awsEc2query_serializeOpCreateTransitGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayRouteTableInput)
	_ = 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("CreateTransitGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(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 awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayRouteTableAnnouncementInput)
	_ = 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("CreateTransitGatewayRouteTableAnnouncement")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableAnnouncementInput(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 awsEc2query_serializeOpCreateTransitGatewayVpcAttachment struct {
}

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

func (m *awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateTransitGatewayVpcAttachmentInput)
	_ = 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("CreateTransitGatewayVpcAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(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 awsEc2query_serializeOpCreateVerifiedAccessEndpoint struct {
}

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

func (m *awsEc2query_serializeOpCreateVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVerifiedAccessEndpointInput)
	_ = 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("CreateVerifiedAccessEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessEndpointInput(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 awsEc2query_serializeOpCreateVerifiedAccessGroup struct {
}

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

func (m *awsEc2query_serializeOpCreateVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVerifiedAccessGroupInput)
	_ = 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("CreateVerifiedAccessGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessGroupInput(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 awsEc2query_serializeOpCreateVerifiedAccessInstance struct {
}

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

func (m *awsEc2query_serializeOpCreateVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVerifiedAccessInstanceInput)
	_ = 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("CreateVerifiedAccessInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessInstanceInput(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 awsEc2query_serializeOpCreateVerifiedAccessTrustProvider struct {
}

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

func (m *awsEc2query_serializeOpCreateVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVerifiedAccessTrustProviderInput)
	_ = 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("CreateVerifiedAccessTrustProvider")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessTrustProviderInput(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 awsEc2query_serializeOpCreateVolume struct {
}

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

func (m *awsEc2query_serializeOpCreateVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVolumeInput)
	_ = 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("CreateVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVolumeInput(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 awsEc2query_serializeOpCreateVpc struct {
}

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

func (m *awsEc2query_serializeOpCreateVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpcInput)
	_ = 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("CreateVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpcInput(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 awsEc2query_serializeOpCreateVpcEndpoint struct {
}

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

func (m *awsEc2query_serializeOpCreateVpcEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpcEndpointInput)
	_ = 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("CreateVpcEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpcEndpointInput(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 awsEc2query_serializeOpCreateVpcEndpointConnectionNotification struct {
}

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

func (m *awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpcEndpointConnectionNotificationInput)
	_ = 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("CreateVpcEndpointConnectionNotification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(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 awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration struct {
}

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

func (m *awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpcEndpointServiceConfigurationInput)
	_ = 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("CreateVpcEndpointServiceConfiguration")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(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 awsEc2query_serializeOpCreateVpcPeeringConnection struct {
}

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

func (m *awsEc2query_serializeOpCreateVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpcPeeringConnectionInput)
	_ = 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("CreateVpcPeeringConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(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 awsEc2query_serializeOpCreateVpnConnection struct {
}

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

func (m *awsEc2query_serializeOpCreateVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpnConnectionInput)
	_ = 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("CreateVpnConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpnConnectionInput(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 awsEc2query_serializeOpCreateVpnConnectionRoute struct {
}

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

func (m *awsEc2query_serializeOpCreateVpnConnectionRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpnConnectionRouteInput)
	_ = 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("CreateVpnConnectionRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(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 awsEc2query_serializeOpCreateVpnGateway struct {
}

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

func (m *awsEc2query_serializeOpCreateVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*CreateVpnGatewayInput)
	_ = 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("CreateVpnGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentCreateVpnGatewayInput(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 awsEc2query_serializeOpDeleteCarrierGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteCarrierGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteCarrierGatewayInput)
	_ = 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("DeleteCarrierGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(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 awsEc2query_serializeOpDeleteClientVpnEndpoint struct {
}

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

func (m *awsEc2query_serializeOpDeleteClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteClientVpnEndpointInput)
	_ = 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("DeleteClientVpnEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(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 awsEc2query_serializeOpDeleteClientVpnRoute struct {
}

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

func (m *awsEc2query_serializeOpDeleteClientVpnRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteClientVpnRouteInput)
	_ = 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("DeleteClientVpnRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(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 awsEc2query_serializeOpDeleteCoipCidr struct {
}

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

func (m *awsEc2query_serializeOpDeleteCoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteCoipCidrInput)
	_ = 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("DeleteCoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteCoipCidrInput(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 awsEc2query_serializeOpDeleteCoipPool struct {
}

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

func (m *awsEc2query_serializeOpDeleteCoipPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteCoipPoolInput)
	_ = 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("DeleteCoipPool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteCoipPoolInput(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 awsEc2query_serializeOpDeleteCustomerGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteCustomerGatewayInput)
	_ = 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("DeleteCustomerGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(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 awsEc2query_serializeOpDeleteDhcpOptions struct {
}

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

func (m *awsEc2query_serializeOpDeleteDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteDhcpOptionsInput)
	_ = 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("DeleteDhcpOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(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 awsEc2query_serializeOpDeleteEgressOnlyInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteEgressOnlyInternetGatewayInput)
	_ = 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("DeleteEgressOnlyInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(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 awsEc2query_serializeOpDeleteFleets struct {
}

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

func (m *awsEc2query_serializeOpDeleteFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteFleetsInput)
	_ = 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("DeleteFleets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteFleetsInput(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 awsEc2query_serializeOpDeleteFlowLogs struct {
}

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

func (m *awsEc2query_serializeOpDeleteFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteFlowLogsInput)
	_ = 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("DeleteFlowLogs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteFlowLogsInput(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 awsEc2query_serializeOpDeleteFpgaImage struct {
}

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

func (m *awsEc2query_serializeOpDeleteFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteFpgaImageInput)
	_ = 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("DeleteFpgaImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteFpgaImageInput(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 awsEc2query_serializeOpDeleteInstanceConnectEndpoint struct {
}

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

func (m *awsEc2query_serializeOpDeleteInstanceConnectEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteInstanceConnectEndpointInput)
	_ = 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("DeleteInstanceConnectEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteInstanceConnectEndpointInput(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 awsEc2query_serializeOpDeleteInstanceEventWindow struct {
}

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

func (m *awsEc2query_serializeOpDeleteInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteInstanceEventWindowInput)
	_ = 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("DeleteInstanceEventWindow")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(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 awsEc2query_serializeOpDeleteInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteInternetGatewayInput)
	_ = 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("DeleteInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(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 awsEc2query_serializeOpDeleteIpam struct {
}

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

func (m *awsEc2query_serializeOpDeleteIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteIpamInput)
	_ = 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("DeleteIpam")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteIpamInput(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 awsEc2query_serializeOpDeleteIpamPool struct {
}

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

func (m *awsEc2query_serializeOpDeleteIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteIpamPoolInput)
	_ = 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("DeleteIpamPool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteIpamPoolInput(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 awsEc2query_serializeOpDeleteIpamResourceDiscovery struct {
}

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

func (m *awsEc2query_serializeOpDeleteIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteIpamResourceDiscoveryInput)
	_ = 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("DeleteIpamResourceDiscovery")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteIpamResourceDiscoveryInput(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 awsEc2query_serializeOpDeleteIpamScope struct {
}

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

func (m *awsEc2query_serializeOpDeleteIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteIpamScopeInput)
	_ = 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("DeleteIpamScope")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteIpamScopeInput(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 awsEc2query_serializeOpDeleteKeyPair struct {
}

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

func (m *awsEc2query_serializeOpDeleteKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteKeyPairInput)
	_ = 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("DeleteKeyPair")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteKeyPairInput(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 awsEc2query_serializeOpDeleteLaunchTemplate struct {
}

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

func (m *awsEc2query_serializeOpDeleteLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLaunchTemplateInput)
	_ = 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("DeleteLaunchTemplate")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(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 awsEc2query_serializeOpDeleteLaunchTemplateVersions struct {
}

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

func (m *awsEc2query_serializeOpDeleteLaunchTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLaunchTemplateVersionsInput)
	_ = 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("DeleteLaunchTemplateVersions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(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 awsEc2query_serializeOpDeleteLocalGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpDeleteLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLocalGatewayRouteInput)
	_ = 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("DeleteLocalGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(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 awsEc2query_serializeOpDeleteLocalGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableInput)
	_ = 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("DeleteLocalGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableInput(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 awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct {
}

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

func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput)
	_ = 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("DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(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 awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation struct {
}

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

func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVpcAssociationInput)
	_ = 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("DeleteLocalGatewayRouteTableVpcAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(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 awsEc2query_serializeOpDeleteManagedPrefixList struct {
}

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

func (m *awsEc2query_serializeOpDeleteManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteManagedPrefixListInput)
	_ = 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("DeleteManagedPrefixList")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(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 awsEc2query_serializeOpDeleteNatGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteNatGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNatGatewayInput)
	_ = 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("DeleteNatGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNatGatewayInput(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 awsEc2query_serializeOpDeleteNetworkAcl struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkAclInput)
	_ = 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("DeleteNetworkAcl")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkAclInput(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 awsEc2query_serializeOpDeleteNetworkAclEntry struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkAclEntryInput)
	_ = 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("DeleteNetworkAclEntry")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(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 awsEc2query_serializeOpDeleteNetworkInsightsAccessScope struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInsightsAccessScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeInput)
	_ = 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("DeleteNetworkInsightsAccessScope")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeInput(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 awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeAnalysisInput)
	_ = 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("DeleteNetworkInsightsAccessScopeAnalysis")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisInput(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 awsEc2query_serializeOpDeleteNetworkInsightsAnalysis struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInsightsAnalysisInput)
	_ = 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("DeleteNetworkInsightsAnalysis")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(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 awsEc2query_serializeOpDeleteNetworkInsightsPath struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInsightsPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInsightsPathInput)
	_ = 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("DeleteNetworkInsightsPath")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(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 awsEc2query_serializeOpDeleteNetworkInterface struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInterfaceInput)
	_ = 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("DeleteNetworkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(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 awsEc2query_serializeOpDeleteNetworkInterfacePermission struct {
}

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

func (m *awsEc2query_serializeOpDeleteNetworkInterfacePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteNetworkInterfacePermissionInput)
	_ = 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("DeleteNetworkInterfacePermission")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(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 awsEc2query_serializeOpDeletePlacementGroup struct {
}

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

func (m *awsEc2query_serializeOpDeletePlacementGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeletePlacementGroupInput)
	_ = 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("DeletePlacementGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeletePlacementGroupInput(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 awsEc2query_serializeOpDeletePublicIpv4Pool struct {
}

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

func (m *awsEc2query_serializeOpDeletePublicIpv4Pool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeletePublicIpv4PoolInput)
	_ = 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("DeletePublicIpv4Pool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeletePublicIpv4PoolInput(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 awsEc2query_serializeOpDeleteQueuedReservedInstances struct {
}

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

func (m *awsEc2query_serializeOpDeleteQueuedReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteQueuedReservedInstancesInput)
	_ = 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("DeleteQueuedReservedInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(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 awsEc2query_serializeOpDeleteRoute struct {
}

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

func (m *awsEc2query_serializeOpDeleteRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteRouteInput)
	_ = 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("DeleteRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteRouteInput(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 awsEc2query_serializeOpDeleteRouteTable struct {
}

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

func (m *awsEc2query_serializeOpDeleteRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteRouteTableInput)
	_ = 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("DeleteRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteRouteTableInput(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 awsEc2query_serializeOpDeleteSecurityGroup struct {
}

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

func (m *awsEc2query_serializeOpDeleteSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteSecurityGroupInput)
	_ = 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("DeleteSecurityGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(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 awsEc2query_serializeOpDeleteSnapshot struct {
}

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

func (m *awsEc2query_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteSnapshotInput)
	_ = 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("DeleteSnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteSnapshotInput(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 awsEc2query_serializeOpDeleteSpotDatafeedSubscription struct {
}

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

func (m *awsEc2query_serializeOpDeleteSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteSpotDatafeedSubscriptionInput)
	_ = 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("DeleteSpotDatafeedSubscription")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(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 awsEc2query_serializeOpDeleteSubnet struct {
}

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

func (m *awsEc2query_serializeOpDeleteSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteSubnetInput)
	_ = 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("DeleteSubnet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteSubnetInput(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 awsEc2query_serializeOpDeleteSubnetCidrReservation struct {
}

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

func (m *awsEc2query_serializeOpDeleteSubnetCidrReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteSubnetCidrReservationInput)
	_ = 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("DeleteSubnetCidrReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(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 awsEc2query_serializeOpDeleteTags struct {
}

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

func (m *awsEc2query_serializeOpDeleteTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTagsInput)
	_ = 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("DeleteTags")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTagsInput(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 awsEc2query_serializeOpDeleteTrafficMirrorFilter struct {
}

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

func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTrafficMirrorFilterInput)
	_ = 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("DeleteTrafficMirrorFilter")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(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 awsEc2query_serializeOpDeleteTrafficMirrorFilterRule struct {
}

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

func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTrafficMirrorFilterRuleInput)
	_ = 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("DeleteTrafficMirrorFilterRule")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(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 awsEc2query_serializeOpDeleteTrafficMirrorSession struct {
}

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

func (m *awsEc2query_serializeOpDeleteTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTrafficMirrorSessionInput)
	_ = 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("DeleteTrafficMirrorSession")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(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 awsEc2query_serializeOpDeleteTrafficMirrorTarget struct {
}

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

func (m *awsEc2query_serializeOpDeleteTrafficMirrorTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTrafficMirrorTargetInput)
	_ = 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("DeleteTrafficMirrorTarget")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(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 awsEc2query_serializeOpDeleteTransitGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayInput)
	_ = 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("DeleteTransitGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(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 awsEc2query_serializeOpDeleteTransitGatewayConnect struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayConnect) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayConnectInput)
	_ = 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("DeleteTransitGatewayConnect")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(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 awsEc2query_serializeOpDeleteTransitGatewayConnectPeer struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayConnectPeerInput)
	_ = 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("DeleteTransitGatewayConnectPeer")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(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 awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayMulticastDomainInput)
	_ = 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("DeleteTransitGatewayMulticastDomain")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(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 awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayPeeringAttachmentInput)
	_ = 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("DeleteTransitGatewayPeeringAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(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 awsEc2query_serializeOpDeleteTransitGatewayPolicyTable struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayPolicyTableInput)
	_ = 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("DeleteTransitGatewayPolicyTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPolicyTableInput(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 awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayPrefixListReferenceInput)
	_ = 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("DeleteTransitGatewayPrefixListReference")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(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 awsEc2query_serializeOpDeleteTransitGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayRouteInput)
	_ = 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("DeleteTransitGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(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 awsEc2query_serializeOpDeleteTransitGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableInput)
	_ = 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("DeleteTransitGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(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 awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableAnnouncementInput)
	_ = 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("DeleteTransitGatewayRouteTableAnnouncement")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementInput(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 awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment struct {
}

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

func (m *awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteTransitGatewayVpcAttachmentInput)
	_ = 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("DeleteTransitGatewayVpcAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(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 awsEc2query_serializeOpDeleteVerifiedAccessEndpoint struct {
}

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

func (m *awsEc2query_serializeOpDeleteVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVerifiedAccessEndpointInput)
	_ = 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("DeleteVerifiedAccessEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessEndpointInput(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 awsEc2query_serializeOpDeleteVerifiedAccessGroup struct {
}

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

func (m *awsEc2query_serializeOpDeleteVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVerifiedAccessGroupInput)
	_ = 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("DeleteVerifiedAccessGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessGroupInput(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 awsEc2query_serializeOpDeleteVerifiedAccessInstance struct {
}

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

func (m *awsEc2query_serializeOpDeleteVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVerifiedAccessInstanceInput)
	_ = 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("DeleteVerifiedAccessInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessInstanceInput(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 awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider struct {
}

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

func (m *awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVerifiedAccessTrustProviderInput)
	_ = 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("DeleteVerifiedAccessTrustProvider")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessTrustProviderInput(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 awsEc2query_serializeOpDeleteVolume struct {
}

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

func (m *awsEc2query_serializeOpDeleteVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVolumeInput)
	_ = 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("DeleteVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVolumeInput(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 awsEc2query_serializeOpDeleteVpc struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpcInput)
	_ = 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("DeleteVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpcInput(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 awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpcEndpointConnectionNotificationsInput)
	_ = 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("DeleteVpcEndpointConnectionNotifications")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(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 awsEc2query_serializeOpDeleteVpcEndpoints struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpcEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpcEndpointsInput)
	_ = 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("DeleteVpcEndpoints")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(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 awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpcEndpointServiceConfigurationsInput)
	_ = 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("DeleteVpcEndpointServiceConfigurations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(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 awsEc2query_serializeOpDeleteVpcPeeringConnection struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpcPeeringConnectionInput)
	_ = 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("DeleteVpcPeeringConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(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 awsEc2query_serializeOpDeleteVpnConnection struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpnConnectionInput)
	_ = 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("DeleteVpnConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(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 awsEc2query_serializeOpDeleteVpnConnectionRoute struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpnConnectionRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpnConnectionRouteInput)
	_ = 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("DeleteVpnConnectionRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(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 awsEc2query_serializeOpDeleteVpnGateway struct {
}

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

func (m *awsEc2query_serializeOpDeleteVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeleteVpnGatewayInput)
	_ = 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("DeleteVpnGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(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 awsEc2query_serializeOpDeprovisionByoipCidr struct {
}

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

func (m *awsEc2query_serializeOpDeprovisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeprovisionByoipCidrInput)
	_ = 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("DeprovisionByoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(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 awsEc2query_serializeOpDeprovisionIpamByoasn struct {
}

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

func (m *awsEc2query_serializeOpDeprovisionIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeprovisionIpamByoasnInput)
	_ = 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("DeprovisionIpamByoasn")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeprovisionIpamByoasnInput(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 awsEc2query_serializeOpDeprovisionIpamPoolCidr struct {
}

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

func (m *awsEc2query_serializeOpDeprovisionIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeprovisionIpamPoolCidrInput)
	_ = 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("DeprovisionIpamPoolCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeprovisionIpamPoolCidrInput(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 awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr struct {
}

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

func (m *awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeprovisionPublicIpv4PoolCidrInput)
	_ = 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("DeprovisionPublicIpv4PoolCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeprovisionPublicIpv4PoolCidrInput(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 awsEc2query_serializeOpDeregisterImage struct {
}

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

func (m *awsEc2query_serializeOpDeregisterImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeregisterImageInput)
	_ = 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("DeregisterImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeregisterImageInput(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 awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes struct {
}

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

func (m *awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeregisterInstanceEventNotificationAttributesInput)
	_ = 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("DeregisterInstanceEventNotificationAttributes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(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 awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers struct {
}

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

func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeregisterTransitGatewayMulticastGroupMembersInput)
	_ = 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("DeregisterTransitGatewayMulticastGroupMembers")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(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 awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources struct {
}

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

func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DeregisterTransitGatewayMulticastGroupSourcesInput)
	_ = 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("DeregisterTransitGatewayMulticastGroupSources")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(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 awsEc2query_serializeOpDescribeAccountAttributes struct {
}

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

func (m *awsEc2query_serializeOpDescribeAccountAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAccountAttributesInput)
	_ = 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("DescribeAccountAttributes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(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 awsEc2query_serializeOpDescribeAddresses struct {
}

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

func (m *awsEc2query_serializeOpDescribeAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAddressesInput)
	_ = 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("DescribeAddresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAddressesInput(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 awsEc2query_serializeOpDescribeAddressesAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeAddressesAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAddressesAttributeInput)
	_ = 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("DescribeAddressesAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(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 awsEc2query_serializeOpDescribeAddressTransfers struct {
}

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

func (m *awsEc2query_serializeOpDescribeAddressTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAddressTransfersInput)
	_ = 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("DescribeAddressTransfers")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAddressTransfersInput(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 awsEc2query_serializeOpDescribeAggregateIdFormat struct {
}

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

func (m *awsEc2query_serializeOpDescribeAggregateIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAggregateIdFormatInput)
	_ = 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("DescribeAggregateIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(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 awsEc2query_serializeOpDescribeAvailabilityZones struct {
}

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

func (m *awsEc2query_serializeOpDescribeAvailabilityZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAvailabilityZonesInput)
	_ = 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("DescribeAvailabilityZones")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(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 awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions struct {
}

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

func (m *awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeAwsNetworkPerformanceMetricSubscriptionsInput)
	_ = 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("DescribeAwsNetworkPerformanceMetricSubscriptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsInput(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 awsEc2query_serializeOpDescribeBundleTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeBundleTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeBundleTasksInput)
	_ = 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("DescribeBundleTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeBundleTasksInput(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 awsEc2query_serializeOpDescribeByoipCidrs struct {
}

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

func (m *awsEc2query_serializeOpDescribeByoipCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeByoipCidrsInput)
	_ = 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("DescribeByoipCidrs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(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 awsEc2query_serializeOpDescribeCapacityBlockOfferings struct {
}

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

func (m *awsEc2query_serializeOpDescribeCapacityBlockOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCapacityBlockOfferingsInput)
	_ = 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("DescribeCapacityBlockOfferings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCapacityBlockOfferingsInput(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 awsEc2query_serializeOpDescribeCapacityReservationFleets struct {
}

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

func (m *awsEc2query_serializeOpDescribeCapacityReservationFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCapacityReservationFleetsInput)
	_ = 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("DescribeCapacityReservationFleets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCapacityReservationFleetsInput(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 awsEc2query_serializeOpDescribeCapacityReservations struct {
}

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

func (m *awsEc2query_serializeOpDescribeCapacityReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCapacityReservationsInput)
	_ = 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("DescribeCapacityReservations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(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 awsEc2query_serializeOpDescribeCarrierGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeCarrierGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCarrierGatewaysInput)
	_ = 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("DescribeCarrierGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(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 awsEc2query_serializeOpDescribeClassicLinkInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeClassicLinkInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClassicLinkInstancesInput)
	_ = 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("DescribeClassicLinkInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(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 awsEc2query_serializeOpDescribeClientVpnAuthorizationRules struct {
}

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

func (m *awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClientVpnAuthorizationRulesInput)
	_ = 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("DescribeClientVpnAuthorizationRules")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(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 awsEc2query_serializeOpDescribeClientVpnConnections struct {
}

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

func (m *awsEc2query_serializeOpDescribeClientVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClientVpnConnectionsInput)
	_ = 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("DescribeClientVpnConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(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 awsEc2query_serializeOpDescribeClientVpnEndpoints struct {
}

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

func (m *awsEc2query_serializeOpDescribeClientVpnEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClientVpnEndpointsInput)
	_ = 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("DescribeClientVpnEndpoints")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(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 awsEc2query_serializeOpDescribeClientVpnRoutes struct {
}

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

func (m *awsEc2query_serializeOpDescribeClientVpnRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClientVpnRoutesInput)
	_ = 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("DescribeClientVpnRoutes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(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 awsEc2query_serializeOpDescribeClientVpnTargetNetworks struct {
}

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

func (m *awsEc2query_serializeOpDescribeClientVpnTargetNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeClientVpnTargetNetworksInput)
	_ = 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("DescribeClientVpnTargetNetworks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(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 awsEc2query_serializeOpDescribeCoipPools struct {
}

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

func (m *awsEc2query_serializeOpDescribeCoipPools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCoipPoolsInput)
	_ = 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("DescribeCoipPools")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(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 awsEc2query_serializeOpDescribeConversionTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeConversionTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeConversionTasksInput)
	_ = 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("DescribeConversionTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeConversionTasksInput(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 awsEc2query_serializeOpDescribeCustomerGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeCustomerGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeCustomerGatewaysInput)
	_ = 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("DescribeCustomerGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(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 awsEc2query_serializeOpDescribeDhcpOptions struct {
}

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

func (m *awsEc2query_serializeOpDescribeDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeDhcpOptionsInput)
	_ = 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("DescribeDhcpOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(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 awsEc2query_serializeOpDescribeEgressOnlyInternetGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeEgressOnlyInternetGatewaysInput)
	_ = 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("DescribeEgressOnlyInternetGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(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 awsEc2query_serializeOpDescribeElasticGpus struct {
}

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

func (m *awsEc2query_serializeOpDescribeElasticGpus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeElasticGpusInput)
	_ = 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("DescribeElasticGpus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeElasticGpusInput(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 awsEc2query_serializeOpDescribeExportImageTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeExportImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeExportImageTasksInput)
	_ = 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("DescribeExportImageTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(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 awsEc2query_serializeOpDescribeExportTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeExportTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeExportTasksInput)
	_ = 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("DescribeExportTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeExportTasksInput(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 awsEc2query_serializeOpDescribeFastLaunchImages struct {
}

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

func (m *awsEc2query_serializeOpDescribeFastLaunchImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFastLaunchImagesInput)
	_ = 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("DescribeFastLaunchImages")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFastLaunchImagesInput(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 awsEc2query_serializeOpDescribeFastSnapshotRestores struct {
}

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

func (m *awsEc2query_serializeOpDescribeFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFastSnapshotRestoresInput)
	_ = 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("DescribeFastSnapshotRestores")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(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 awsEc2query_serializeOpDescribeFleetHistory struct {
}

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

func (m *awsEc2query_serializeOpDescribeFleetHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFleetHistoryInput)
	_ = 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("DescribeFleetHistory")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(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 awsEc2query_serializeOpDescribeFleetInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeFleetInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFleetInstancesInput)
	_ = 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("DescribeFleetInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(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 awsEc2query_serializeOpDescribeFleets struct {
}

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

func (m *awsEc2query_serializeOpDescribeFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFleetsInput)
	_ = 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("DescribeFleets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFleetsInput(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 awsEc2query_serializeOpDescribeFlowLogs struct {
}

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

func (m *awsEc2query_serializeOpDescribeFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFlowLogsInput)
	_ = 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("DescribeFlowLogs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFlowLogsInput(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 awsEc2query_serializeOpDescribeFpgaImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFpgaImageAttributeInput)
	_ = 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("DescribeFpgaImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(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 awsEc2query_serializeOpDescribeFpgaImages struct {
}

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

func (m *awsEc2query_serializeOpDescribeFpgaImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeFpgaImagesInput)
	_ = 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("DescribeFpgaImages")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(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 awsEc2query_serializeOpDescribeHostReservationOfferings struct {
}

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

func (m *awsEc2query_serializeOpDescribeHostReservationOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeHostReservationOfferingsInput)
	_ = 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("DescribeHostReservationOfferings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(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 awsEc2query_serializeOpDescribeHostReservations struct {
}

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

func (m *awsEc2query_serializeOpDescribeHostReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeHostReservationsInput)
	_ = 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("DescribeHostReservations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeHostReservationsInput(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 awsEc2query_serializeOpDescribeHosts struct {
}

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

func (m *awsEc2query_serializeOpDescribeHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeHostsInput)
	_ = 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("DescribeHosts")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeHostsInput(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 awsEc2query_serializeOpDescribeIamInstanceProfileAssociations struct {
}

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

func (m *awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIamInstanceProfileAssociationsInput)
	_ = 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("DescribeIamInstanceProfileAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(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 awsEc2query_serializeOpDescribeIdentityIdFormat struct {
}

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

func (m *awsEc2query_serializeOpDescribeIdentityIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIdentityIdFormatInput)
	_ = 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("DescribeIdentityIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(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 awsEc2query_serializeOpDescribeIdFormat struct {
}

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

func (m *awsEc2query_serializeOpDescribeIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIdFormatInput)
	_ = 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("DescribeIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIdFormatInput(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 awsEc2query_serializeOpDescribeImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeImageAttributeInput)
	_ = 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("DescribeImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeImageAttributeInput(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 awsEc2query_serializeOpDescribeImages struct {
}

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

func (m *awsEc2query_serializeOpDescribeImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeImagesInput)
	_ = 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("DescribeImages")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeImagesInput(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 awsEc2query_serializeOpDescribeImportImageTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeImportImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeImportImageTasksInput)
	_ = 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("DescribeImportImageTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(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 awsEc2query_serializeOpDescribeImportSnapshotTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeImportSnapshotTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeImportSnapshotTasksInput)
	_ = 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("DescribeImportSnapshotTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(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 awsEc2query_serializeOpDescribeInstanceAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceAttributeInput)
	_ = 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("DescribeInstanceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(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 awsEc2query_serializeOpDescribeInstanceConnectEndpoints struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceConnectEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceConnectEndpointsInput)
	_ = 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("DescribeInstanceConnectEndpoints")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceConnectEndpointsInput(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 awsEc2query_serializeOpDescribeInstanceCreditSpecifications struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceCreditSpecifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceCreditSpecificationsInput)
	_ = 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("DescribeInstanceCreditSpecifications")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(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 awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceEventNotificationAttributesInput)
	_ = 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("DescribeInstanceEventNotificationAttributes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(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 awsEc2query_serializeOpDescribeInstanceEventWindows struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceEventWindows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceEventWindowsInput)
	_ = 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("DescribeInstanceEventWindows")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(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 awsEc2query_serializeOpDescribeInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstancesInput)
	_ = 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("DescribeInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstancesInput(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 awsEc2query_serializeOpDescribeInstanceStatus struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceStatusInput)
	_ = 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("DescribeInstanceStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(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 awsEc2query_serializeOpDescribeInstanceTopology struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceTopology) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceTopologyInput)
	_ = 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("DescribeInstanceTopology")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(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 awsEc2query_serializeOpDescribeInstanceTypeOfferings struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceTypeOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceTypeOfferingsInput)
	_ = 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("DescribeInstanceTypeOfferings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(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 awsEc2query_serializeOpDescribeInstanceTypes struct {
}

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

func (m *awsEc2query_serializeOpDescribeInstanceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInstanceTypesInput)
	_ = 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("DescribeInstanceTypes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(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 awsEc2query_serializeOpDescribeInternetGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeInternetGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeInternetGatewaysInput)
	_ = 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("DescribeInternetGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(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 awsEc2query_serializeOpDescribeIpamByoasn struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamByoasnInput)
	_ = 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("DescribeIpamByoasn")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamByoasnInput(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 awsEc2query_serializeOpDescribeIpamPools struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpamPools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamPoolsInput)
	_ = 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("DescribeIpamPools")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamPoolsInput(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 awsEc2query_serializeOpDescribeIpamResourceDiscoveries struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpamResourceDiscoveries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamResourceDiscoveriesInput)
	_ = 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("DescribeIpamResourceDiscoveries")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveriesInput(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 awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamResourceDiscoveryAssociationsInput)
	_ = 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("DescribeIpamResourceDiscoveryAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveryAssociationsInput(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 awsEc2query_serializeOpDescribeIpams struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpams) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamsInput)
	_ = 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("DescribeIpams")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamsInput(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 awsEc2query_serializeOpDescribeIpamScopes struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpamScopes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpamScopesInput)
	_ = 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("DescribeIpamScopes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpamScopesInput(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 awsEc2query_serializeOpDescribeIpv6Pools struct {
}

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

func (m *awsEc2query_serializeOpDescribeIpv6Pools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeIpv6PoolsInput)
	_ = 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("DescribeIpv6Pools")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(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 awsEc2query_serializeOpDescribeKeyPairs struct {
}

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

func (m *awsEc2query_serializeOpDescribeKeyPairs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeKeyPairsInput)
	_ = 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("DescribeKeyPairs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeKeyPairsInput(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 awsEc2query_serializeOpDescribeLaunchTemplates struct {
}

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

func (m *awsEc2query_serializeOpDescribeLaunchTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLaunchTemplatesInput)
	_ = 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("DescribeLaunchTemplates")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(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 awsEc2query_serializeOpDescribeLaunchTemplateVersions struct {
}

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

func (m *awsEc2query_serializeOpDescribeLaunchTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLaunchTemplateVersionsInput)
	_ = 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("DescribeLaunchTemplateVersions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(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 awsEc2query_serializeOpDescribeLocalGatewayRouteTables struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewayRouteTablesInput)
	_ = 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("DescribeLocalGatewayRouteTables")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(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 awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput)
	_ = 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("DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(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 awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewayRouteTableVpcAssociationsInput)
	_ = 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("DescribeLocalGatewayRouteTableVpcAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(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 awsEc2query_serializeOpDescribeLocalGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewaysInput)
	_ = 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("DescribeLocalGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(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 awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewayVirtualInterfaceGroupsInput)
	_ = 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("DescribeLocalGatewayVirtualInterfaceGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(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 awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces struct {
}

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

func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLocalGatewayVirtualInterfacesInput)
	_ = 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("DescribeLocalGatewayVirtualInterfaces")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(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 awsEc2query_serializeOpDescribeLockedSnapshots struct {
}

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

func (m *awsEc2query_serializeOpDescribeLockedSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeLockedSnapshotsInput)
	_ = 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("DescribeLockedSnapshots")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeLockedSnapshotsInput(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 awsEc2query_serializeOpDescribeManagedPrefixLists struct {
}

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

func (m *awsEc2query_serializeOpDescribeManagedPrefixLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeManagedPrefixListsInput)
	_ = 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("DescribeManagedPrefixLists")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(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 awsEc2query_serializeOpDescribeMovingAddresses struct {
}

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

func (m *awsEc2query_serializeOpDescribeMovingAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeMovingAddressesInput)
	_ = 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("DescribeMovingAddresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(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 awsEc2query_serializeOpDescribeNatGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeNatGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNatGatewaysInput)
	_ = 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("DescribeNatGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(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 awsEc2query_serializeOpDescribeNetworkAcls struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkAcls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkAclsInput)
	_ = 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("DescribeNetworkAcls")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(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 awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInsightsAccessScopeAnalysesInput)
	_ = 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("DescribeNetworkInsightsAccessScopeAnalyses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesInput(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 awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInsightsAccessScopesInput)
	_ = 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("DescribeNetworkInsightsAccessScopes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopesInput(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 awsEc2query_serializeOpDescribeNetworkInsightsAnalyses struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInsightsAnalysesInput)
	_ = 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("DescribeNetworkInsightsAnalyses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(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 awsEc2query_serializeOpDescribeNetworkInsightsPaths struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInsightsPaths) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInsightsPathsInput)
	_ = 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("DescribeNetworkInsightsPaths")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(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 awsEc2query_serializeOpDescribeNetworkInterfaceAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInterfaceAttributeInput)
	_ = 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("DescribeNetworkInterfaceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(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 awsEc2query_serializeOpDescribeNetworkInterfacePermissions struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInterfacePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInterfacePermissionsInput)
	_ = 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("DescribeNetworkInterfacePermissions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(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 awsEc2query_serializeOpDescribeNetworkInterfaces struct {
}

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

func (m *awsEc2query_serializeOpDescribeNetworkInterfaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeNetworkInterfacesInput)
	_ = 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("DescribeNetworkInterfaces")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(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 awsEc2query_serializeOpDescribePlacementGroups struct {
}

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

func (m *awsEc2query_serializeOpDescribePlacementGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribePlacementGroupsInput)
	_ = 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("DescribePlacementGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(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 awsEc2query_serializeOpDescribePrefixLists struct {
}

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

func (m *awsEc2query_serializeOpDescribePrefixLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribePrefixListsInput)
	_ = 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("DescribePrefixLists")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribePrefixListsInput(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 awsEc2query_serializeOpDescribePrincipalIdFormat struct {
}

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

func (m *awsEc2query_serializeOpDescribePrincipalIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribePrincipalIdFormatInput)
	_ = 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("DescribePrincipalIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(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 awsEc2query_serializeOpDescribePublicIpv4Pools struct {
}

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

func (m *awsEc2query_serializeOpDescribePublicIpv4Pools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribePublicIpv4PoolsInput)
	_ = 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("DescribePublicIpv4Pools")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(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 awsEc2query_serializeOpDescribeRegions struct {
}

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

func (m *awsEc2query_serializeOpDescribeRegions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeRegionsInput)
	_ = 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("DescribeRegions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeRegionsInput(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 awsEc2query_serializeOpDescribeReplaceRootVolumeTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeReplaceRootVolumeTasksInput)
	_ = 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("DescribeReplaceRootVolumeTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(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 awsEc2query_serializeOpDescribeReservedInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeReservedInstancesInput)
	_ = 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("DescribeReservedInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(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 awsEc2query_serializeOpDescribeReservedInstancesListings struct {
}

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

func (m *awsEc2query_serializeOpDescribeReservedInstancesListings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeReservedInstancesListingsInput)
	_ = 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("DescribeReservedInstancesListings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(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 awsEc2query_serializeOpDescribeReservedInstancesModifications struct {
}

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

func (m *awsEc2query_serializeOpDescribeReservedInstancesModifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeReservedInstancesModificationsInput)
	_ = 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("DescribeReservedInstancesModifications")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(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 awsEc2query_serializeOpDescribeReservedInstancesOfferings struct {
}

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

func (m *awsEc2query_serializeOpDescribeReservedInstancesOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeReservedInstancesOfferingsInput)
	_ = 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("DescribeReservedInstancesOfferings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(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 awsEc2query_serializeOpDescribeRouteTables struct {
}

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

func (m *awsEc2query_serializeOpDescribeRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeRouteTablesInput)
	_ = 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("DescribeRouteTables")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeRouteTablesInput(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 awsEc2query_serializeOpDescribeScheduledInstanceAvailability struct {
}

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

func (m *awsEc2query_serializeOpDescribeScheduledInstanceAvailability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeScheduledInstanceAvailabilityInput)
	_ = 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("DescribeScheduledInstanceAvailability")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(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 awsEc2query_serializeOpDescribeScheduledInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeScheduledInstancesInput)
	_ = 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("DescribeScheduledInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(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 awsEc2query_serializeOpDescribeSecurityGroupReferences struct {
}

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

func (m *awsEc2query_serializeOpDescribeSecurityGroupReferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSecurityGroupReferencesInput)
	_ = 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("DescribeSecurityGroupReferences")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(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 awsEc2query_serializeOpDescribeSecurityGroupRules struct {
}

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

func (m *awsEc2query_serializeOpDescribeSecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSecurityGroupRulesInput)
	_ = 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("DescribeSecurityGroupRules")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(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 awsEc2query_serializeOpDescribeSecurityGroups struct {
}

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

func (m *awsEc2query_serializeOpDescribeSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSecurityGroupsInput)
	_ = 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("DescribeSecurityGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(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 awsEc2query_serializeOpDescribeSnapshotAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeSnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSnapshotAttributeInput)
	_ = 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("DescribeSnapshotAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(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 awsEc2query_serializeOpDescribeSnapshots struct {
}

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

func (m *awsEc2query_serializeOpDescribeSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSnapshotsInput)
	_ = 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("DescribeSnapshots")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSnapshotsInput(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 awsEc2query_serializeOpDescribeSnapshotTierStatus struct {
}

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

func (m *awsEc2query_serializeOpDescribeSnapshotTierStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSnapshotTierStatusInput)
	_ = 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("DescribeSnapshotTierStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(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 awsEc2query_serializeOpDescribeSpotDatafeedSubscription struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotDatafeedSubscriptionInput)
	_ = 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("DescribeSpotDatafeedSubscription")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(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 awsEc2query_serializeOpDescribeSpotFleetInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotFleetInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotFleetInstancesInput)
	_ = 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("DescribeSpotFleetInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(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 awsEc2query_serializeOpDescribeSpotFleetRequestHistory struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotFleetRequestHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotFleetRequestHistoryInput)
	_ = 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("DescribeSpotFleetRequestHistory")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(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 awsEc2query_serializeOpDescribeSpotFleetRequests struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotFleetRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotFleetRequestsInput)
	_ = 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("DescribeSpotFleetRequests")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(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 awsEc2query_serializeOpDescribeSpotInstanceRequests struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotInstanceRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotInstanceRequestsInput)
	_ = 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("DescribeSpotInstanceRequests")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(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 awsEc2query_serializeOpDescribeSpotPriceHistory struct {
}

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

func (m *awsEc2query_serializeOpDescribeSpotPriceHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSpotPriceHistoryInput)
	_ = 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("DescribeSpotPriceHistory")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(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 awsEc2query_serializeOpDescribeStaleSecurityGroups struct {
}

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

func (m *awsEc2query_serializeOpDescribeStaleSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeStaleSecurityGroupsInput)
	_ = 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("DescribeStaleSecurityGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(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 awsEc2query_serializeOpDescribeStoreImageTasks struct {
}

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

func (m *awsEc2query_serializeOpDescribeStoreImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeStoreImageTasksInput)
	_ = 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("DescribeStoreImageTasks")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(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 awsEc2query_serializeOpDescribeSubnets struct {
}

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

func (m *awsEc2query_serializeOpDescribeSubnets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeSubnetsInput)
	_ = 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("DescribeSubnets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeSubnetsInput(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 awsEc2query_serializeOpDescribeTags struct {
}

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

func (m *awsEc2query_serializeOpDescribeTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTagsInput)
	_ = 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("DescribeTags")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTagsInput(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 awsEc2query_serializeOpDescribeTrafficMirrorFilters struct {
}

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

func (m *awsEc2query_serializeOpDescribeTrafficMirrorFilters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTrafficMirrorFiltersInput)
	_ = 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("DescribeTrafficMirrorFilters")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(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 awsEc2query_serializeOpDescribeTrafficMirrorSessions struct {
}

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

func (m *awsEc2query_serializeOpDescribeTrafficMirrorSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTrafficMirrorSessionsInput)
	_ = 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("DescribeTrafficMirrorSessions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(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 awsEc2query_serializeOpDescribeTrafficMirrorTargets struct {
}

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

func (m *awsEc2query_serializeOpDescribeTrafficMirrorTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTrafficMirrorTargetsInput)
	_ = 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("DescribeTrafficMirrorTargets")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(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 awsEc2query_serializeOpDescribeTransitGatewayAttachments struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayAttachmentsInput)
	_ = 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("DescribeTransitGatewayAttachments")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(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 awsEc2query_serializeOpDescribeTransitGatewayConnectPeers struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayConnectPeersInput)
	_ = 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("DescribeTransitGatewayConnectPeers")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(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 awsEc2query_serializeOpDescribeTransitGatewayConnects struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayConnects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayConnectsInput)
	_ = 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("DescribeTransitGatewayConnects")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(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 awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayMulticastDomainsInput)
	_ = 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("DescribeTransitGatewayMulticastDomains")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(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 awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayPeeringAttachmentsInput)
	_ = 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("DescribeTransitGatewayPeeringAttachments")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(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 awsEc2query_serializeOpDescribeTransitGatewayPolicyTables struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayPolicyTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayPolicyTablesInput)
	_ = 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("DescribeTransitGatewayPolicyTables")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayPolicyTablesInput(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 awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayRouteTableAnnouncementsInput)
	_ = 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("DescribeTransitGatewayRouteTableAnnouncements")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsInput(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 awsEc2query_serializeOpDescribeTransitGatewayRouteTables struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayRouteTablesInput)
	_ = 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("DescribeTransitGatewayRouteTables")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(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 awsEc2query_serializeOpDescribeTransitGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewaysInput)
	_ = 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("DescribeTransitGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(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 awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments struct {
}

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

func (m *awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTransitGatewayVpcAttachmentsInput)
	_ = 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("DescribeTransitGatewayVpcAttachments")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(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 awsEc2query_serializeOpDescribeTrunkInterfaceAssociations struct {
}

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

func (m *awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeTrunkInterfaceAssociationsInput)
	_ = 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("DescribeTrunkInterfaceAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(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 awsEc2query_serializeOpDescribeVerifiedAccessEndpoints struct {
}

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

func (m *awsEc2query_serializeOpDescribeVerifiedAccessEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVerifiedAccessEndpointsInput)
	_ = 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("DescribeVerifiedAccessEndpoints")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessEndpointsInput(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 awsEc2query_serializeOpDescribeVerifiedAccessGroups struct {
}

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

func (m *awsEc2query_serializeOpDescribeVerifiedAccessGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVerifiedAccessGroupsInput)
	_ = 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("DescribeVerifiedAccessGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessGroupsInput(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 awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations struct {
}

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

func (m *awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVerifiedAccessInstanceLoggingConfigurationsInput)
	_ = 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("DescribeVerifiedAccessInstanceLoggingConfigurations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsInput(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 awsEc2query_serializeOpDescribeVerifiedAccessInstances struct {
}

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

func (m *awsEc2query_serializeOpDescribeVerifiedAccessInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVerifiedAccessInstancesInput)
	_ = 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("DescribeVerifiedAccessInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstancesInput(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 awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders struct {
}

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

func (m *awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVerifiedAccessTrustProvidersInput)
	_ = 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("DescribeVerifiedAccessTrustProviders")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessTrustProvidersInput(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 awsEc2query_serializeOpDescribeVolumeAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVolumeAttributeInput)
	_ = 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("DescribeVolumeAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(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 awsEc2query_serializeOpDescribeVolumes struct {
}

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

func (m *awsEc2query_serializeOpDescribeVolumes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVolumesInput)
	_ = 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("DescribeVolumes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVolumesInput(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 awsEc2query_serializeOpDescribeVolumesModifications struct {
}

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

func (m *awsEc2query_serializeOpDescribeVolumesModifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVolumesModificationsInput)
	_ = 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("DescribeVolumesModifications")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(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 awsEc2query_serializeOpDescribeVolumeStatus struct {
}

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

func (m *awsEc2query_serializeOpDescribeVolumeStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVolumeStatusInput)
	_ = 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("DescribeVolumeStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(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 awsEc2query_serializeOpDescribeVpcAttribute struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcAttributeInput)
	_ = 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("DescribeVpcAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(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 awsEc2query_serializeOpDescribeVpcClassicLink struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcClassicLinkInput)
	_ = 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("DescribeVpcClassicLink")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(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 awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcClassicLinkDnsSupportInput)
	_ = 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("DescribeVpcClassicLinkDnsSupport")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(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 awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointConnectionNotificationsInput)
	_ = 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("DescribeVpcEndpointConnectionNotifications")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(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 awsEc2query_serializeOpDescribeVpcEndpointConnections struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointConnectionsInput)
	_ = 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("DescribeVpcEndpointConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(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 awsEc2query_serializeOpDescribeVpcEndpoints struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointsInput)
	_ = 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("DescribeVpcEndpoints")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(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 awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointServiceConfigurationsInput)
	_ = 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("DescribeVpcEndpointServiceConfigurations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(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 awsEc2query_serializeOpDescribeVpcEndpointServicePermissions struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointServicePermissionsInput)
	_ = 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("DescribeVpcEndpointServicePermissions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(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 awsEc2query_serializeOpDescribeVpcEndpointServices struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcEndpointServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcEndpointServicesInput)
	_ = 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("DescribeVpcEndpointServices")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(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 awsEc2query_serializeOpDescribeVpcPeeringConnections struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcPeeringConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcPeeringConnectionsInput)
	_ = 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("DescribeVpcPeeringConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(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 awsEc2query_serializeOpDescribeVpcs struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpcs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpcsInput)
	_ = 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("DescribeVpcs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpcsInput(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 awsEc2query_serializeOpDescribeVpnConnections struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpnConnectionsInput)
	_ = 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("DescribeVpnConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(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 awsEc2query_serializeOpDescribeVpnGateways struct {
}

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

func (m *awsEc2query_serializeOpDescribeVpnGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DescribeVpnGatewaysInput)
	_ = 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("DescribeVpnGateways")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(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 awsEc2query_serializeOpDetachClassicLinkVpc struct {
}

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

func (m *awsEc2query_serializeOpDetachClassicLinkVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachClassicLinkVpcInput)
	_ = 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("DetachClassicLinkVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(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 awsEc2query_serializeOpDetachInternetGateway struct {
}

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

func (m *awsEc2query_serializeOpDetachInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachInternetGatewayInput)
	_ = 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("DetachInternetGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachInternetGatewayInput(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 awsEc2query_serializeOpDetachNetworkInterface struct {
}

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

func (m *awsEc2query_serializeOpDetachNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachNetworkInterfaceInput)
	_ = 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("DetachNetworkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(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 awsEc2query_serializeOpDetachVerifiedAccessTrustProvider struct {
}

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

func (m *awsEc2query_serializeOpDetachVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachVerifiedAccessTrustProviderInput)
	_ = 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("DetachVerifiedAccessTrustProvider")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachVerifiedAccessTrustProviderInput(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 awsEc2query_serializeOpDetachVolume struct {
}

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

func (m *awsEc2query_serializeOpDetachVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachVolumeInput)
	_ = 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("DetachVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachVolumeInput(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 awsEc2query_serializeOpDetachVpnGateway struct {
}

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

func (m *awsEc2query_serializeOpDetachVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DetachVpnGatewayInput)
	_ = 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("DetachVpnGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDetachVpnGatewayInput(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 awsEc2query_serializeOpDisableAddressTransfer struct {
}

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

func (m *awsEc2query_serializeOpDisableAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableAddressTransferInput)
	_ = 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("DisableAddressTransfer")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableAddressTransferInput(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 awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription struct {
}

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

func (m *awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableAwsNetworkPerformanceMetricSubscriptionInput)
	_ = 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("DisableAwsNetworkPerformanceMetricSubscription")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionInput(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 awsEc2query_serializeOpDisableEbsEncryptionByDefault struct {
}

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

func (m *awsEc2query_serializeOpDisableEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableEbsEncryptionByDefaultInput)
	_ = 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("DisableEbsEncryptionByDefault")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(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 awsEc2query_serializeOpDisableFastLaunch struct {
}

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

func (m *awsEc2query_serializeOpDisableFastLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableFastLaunchInput)
	_ = 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("DisableFastLaunch")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableFastLaunchInput(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 awsEc2query_serializeOpDisableFastSnapshotRestores struct {
}

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

func (m *awsEc2query_serializeOpDisableFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableFastSnapshotRestoresInput)
	_ = 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("DisableFastSnapshotRestores")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(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 awsEc2query_serializeOpDisableImage struct {
}

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

func (m *awsEc2query_serializeOpDisableImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableImageInput)
	_ = 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("DisableImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableImageInput(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 awsEc2query_serializeOpDisableImageBlockPublicAccess struct {
}

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

func (m *awsEc2query_serializeOpDisableImageBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableImageBlockPublicAccessInput)
	_ = 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("DisableImageBlockPublicAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(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 awsEc2query_serializeOpDisableImageDeprecation struct {
}

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

func (m *awsEc2query_serializeOpDisableImageDeprecation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableImageDeprecationInput)
	_ = 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("DisableImageDeprecation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableImageDeprecationInput(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 awsEc2query_serializeOpDisableIpamOrganizationAdminAccount struct {
}

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

func (m *awsEc2query_serializeOpDisableIpamOrganizationAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableIpamOrganizationAdminAccountInput)
	_ = 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("DisableIpamOrganizationAdminAccount")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableIpamOrganizationAdminAccountInput(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 awsEc2query_serializeOpDisableSerialConsoleAccess struct {
}

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

func (m *awsEc2query_serializeOpDisableSerialConsoleAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableSerialConsoleAccessInput)
	_ = 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("DisableSerialConsoleAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(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 awsEc2query_serializeOpDisableSnapshotBlockPublicAccess struct {
}

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

func (m *awsEc2query_serializeOpDisableSnapshotBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableSnapshotBlockPublicAccessInput)
	_ = 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("DisableSnapshotBlockPublicAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableSnapshotBlockPublicAccessInput(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 awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation struct {
}

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

func (m *awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableTransitGatewayRouteTablePropagationInput)
	_ = 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("DisableTransitGatewayRouteTablePropagation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(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 awsEc2query_serializeOpDisableVgwRoutePropagation struct {
}

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

func (m *awsEc2query_serializeOpDisableVgwRoutePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableVgwRoutePropagationInput)
	_ = 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("DisableVgwRoutePropagation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(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 awsEc2query_serializeOpDisableVpcClassicLink struct {
}

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

func (m *awsEc2query_serializeOpDisableVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableVpcClassicLinkInput)
	_ = 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("DisableVpcClassicLink")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(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 awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport struct {
}

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

func (m *awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisableVpcClassicLinkDnsSupportInput)
	_ = 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("DisableVpcClassicLinkDnsSupport")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(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 awsEc2query_serializeOpDisassociateAddress struct {
}

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

func (m *awsEc2query_serializeOpDisassociateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateAddressInput)
	_ = 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("DisassociateAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateAddressInput(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 awsEc2query_serializeOpDisassociateClientVpnTargetNetwork struct {
}

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

func (m *awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateClientVpnTargetNetworkInput)
	_ = 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("DisassociateClientVpnTargetNetwork")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(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 awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole struct {
}

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

func (m *awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateEnclaveCertificateIamRoleInput)
	_ = 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("DisassociateEnclaveCertificateIamRole")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(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 awsEc2query_serializeOpDisassociateIamInstanceProfile struct {
}

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

func (m *awsEc2query_serializeOpDisassociateIamInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateIamInstanceProfileInput)
	_ = 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("DisassociateIamInstanceProfile")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(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 awsEc2query_serializeOpDisassociateInstanceEventWindow struct {
}

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

func (m *awsEc2query_serializeOpDisassociateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateInstanceEventWindowInput)
	_ = 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("DisassociateInstanceEventWindow")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(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 awsEc2query_serializeOpDisassociateIpamByoasn struct {
}

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

func (m *awsEc2query_serializeOpDisassociateIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateIpamByoasnInput)
	_ = 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("DisassociateIpamByoasn")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateIpamByoasnInput(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 awsEc2query_serializeOpDisassociateIpamResourceDiscovery struct {
}

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

func (m *awsEc2query_serializeOpDisassociateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateIpamResourceDiscoveryInput)
	_ = 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("DisassociateIpamResourceDiscovery")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateIpamResourceDiscoveryInput(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 awsEc2query_serializeOpDisassociateNatGatewayAddress struct {
}

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

func (m *awsEc2query_serializeOpDisassociateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateNatGatewayAddressInput)
	_ = 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("DisassociateNatGatewayAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateNatGatewayAddressInput(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 awsEc2query_serializeOpDisassociateRouteTable struct {
}

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

func (m *awsEc2query_serializeOpDisassociateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateRouteTableInput)
	_ = 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("DisassociateRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateRouteTableInput(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 awsEc2query_serializeOpDisassociateSubnetCidrBlock struct {
}

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

func (m *awsEc2query_serializeOpDisassociateSubnetCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateSubnetCidrBlockInput)
	_ = 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("DisassociateSubnetCidrBlock")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(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 awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain struct {
}

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

func (m *awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateTransitGatewayMulticastDomainInput)
	_ = 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("DisassociateTransitGatewayMulticastDomain")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(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 awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable struct {
}

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

func (m *awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateTransitGatewayPolicyTableInput)
	_ = 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("DisassociateTransitGatewayPolicyTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayPolicyTableInput(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 awsEc2query_serializeOpDisassociateTransitGatewayRouteTable struct {
}

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

func (m *awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateTransitGatewayRouteTableInput)
	_ = 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("DisassociateTransitGatewayRouteTable")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(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 awsEc2query_serializeOpDisassociateTrunkInterface struct {
}

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

func (m *awsEc2query_serializeOpDisassociateTrunkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateTrunkInterfaceInput)
	_ = 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("DisassociateTrunkInterface")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(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 awsEc2query_serializeOpDisassociateVpcCidrBlock struct {
}

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

func (m *awsEc2query_serializeOpDisassociateVpcCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*DisassociateVpcCidrBlockInput)
	_ = 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("DisassociateVpcCidrBlock")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(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 awsEc2query_serializeOpEnableAddressTransfer struct {
}

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

func (m *awsEc2query_serializeOpEnableAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableAddressTransferInput)
	_ = 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("EnableAddressTransfer")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableAddressTransferInput(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 awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription struct {
}

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

func (m *awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableAwsNetworkPerformanceMetricSubscriptionInput)
	_ = 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("EnableAwsNetworkPerformanceMetricSubscription")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionInput(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 awsEc2query_serializeOpEnableEbsEncryptionByDefault struct {
}

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

func (m *awsEc2query_serializeOpEnableEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableEbsEncryptionByDefaultInput)
	_ = 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("EnableEbsEncryptionByDefault")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(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 awsEc2query_serializeOpEnableFastLaunch struct {
}

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

func (m *awsEc2query_serializeOpEnableFastLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableFastLaunchInput)
	_ = 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("EnableFastLaunch")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableFastLaunchInput(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 awsEc2query_serializeOpEnableFastSnapshotRestores struct {
}

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

func (m *awsEc2query_serializeOpEnableFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableFastSnapshotRestoresInput)
	_ = 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("EnableFastSnapshotRestores")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(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 awsEc2query_serializeOpEnableImage struct {
}

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

func (m *awsEc2query_serializeOpEnableImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableImageInput)
	_ = 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("EnableImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableImageInput(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 awsEc2query_serializeOpEnableImageBlockPublicAccess struct {
}

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

func (m *awsEc2query_serializeOpEnableImageBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableImageBlockPublicAccessInput)
	_ = 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("EnableImageBlockPublicAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(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 awsEc2query_serializeOpEnableImageDeprecation struct {
}

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

func (m *awsEc2query_serializeOpEnableImageDeprecation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableImageDeprecationInput)
	_ = 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("EnableImageDeprecation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableImageDeprecationInput(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 awsEc2query_serializeOpEnableIpamOrganizationAdminAccount struct {
}

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

func (m *awsEc2query_serializeOpEnableIpamOrganizationAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableIpamOrganizationAdminAccountInput)
	_ = 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("EnableIpamOrganizationAdminAccount")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableIpamOrganizationAdminAccountInput(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 awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing struct {
}

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

func (m *awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableReachabilityAnalyzerOrganizationSharingInput)
	_ = 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("EnableReachabilityAnalyzerOrganizationSharing")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingInput(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 awsEc2query_serializeOpEnableSerialConsoleAccess struct {
}

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

func (m *awsEc2query_serializeOpEnableSerialConsoleAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableSerialConsoleAccessInput)
	_ = 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("EnableSerialConsoleAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(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 awsEc2query_serializeOpEnableSnapshotBlockPublicAccess struct {
}

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

func (m *awsEc2query_serializeOpEnableSnapshotBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableSnapshotBlockPublicAccessInput)
	_ = 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("EnableSnapshotBlockPublicAccess")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableSnapshotBlockPublicAccessInput(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 awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation struct {
}

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

func (m *awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableTransitGatewayRouteTablePropagationInput)
	_ = 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("EnableTransitGatewayRouteTablePropagation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(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 awsEc2query_serializeOpEnableVgwRoutePropagation struct {
}

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

func (m *awsEc2query_serializeOpEnableVgwRoutePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableVgwRoutePropagationInput)
	_ = 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("EnableVgwRoutePropagation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(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 awsEc2query_serializeOpEnableVolumeIO struct {
}

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

func (m *awsEc2query_serializeOpEnableVolumeIO) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableVolumeIOInput)
	_ = 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("EnableVolumeIO")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableVolumeIOInput(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 awsEc2query_serializeOpEnableVpcClassicLink struct {
}

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

func (m *awsEc2query_serializeOpEnableVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableVpcClassicLinkInput)
	_ = 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("EnableVpcClassicLink")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(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 awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport struct {
}

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

func (m *awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*EnableVpcClassicLinkDnsSupportInput)
	_ = 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("EnableVpcClassicLinkDnsSupport")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(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 awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList struct {
}

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

func (m *awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ExportClientVpnClientCertificateRevocationListInput)
	_ = 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("ExportClientVpnClientCertificateRevocationList")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(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 awsEc2query_serializeOpExportClientVpnClientConfiguration struct {
}

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

func (m *awsEc2query_serializeOpExportClientVpnClientConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ExportClientVpnClientConfigurationInput)
	_ = 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("ExportClientVpnClientConfiguration")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(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 awsEc2query_serializeOpExportImage struct {
}

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

func (m *awsEc2query_serializeOpExportImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ExportImageInput)
	_ = 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("ExportImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentExportImageInput(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 awsEc2query_serializeOpExportTransitGatewayRoutes struct {
}

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

func (m *awsEc2query_serializeOpExportTransitGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ExportTransitGatewayRoutesInput)
	_ = 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("ExportTransitGatewayRoutes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(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 awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles struct {
}

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

func (m *awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetAssociatedEnclaveCertificateIamRolesInput)
	_ = 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("GetAssociatedEnclaveCertificateIamRoles")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(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 awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs struct {
}

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

func (m *awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetAssociatedIpv6PoolCidrsInput)
	_ = 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("GetAssociatedIpv6PoolCidrs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(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 awsEc2query_serializeOpGetAwsNetworkPerformanceData struct {
}

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

func (m *awsEc2query_serializeOpGetAwsNetworkPerformanceData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetAwsNetworkPerformanceDataInput)
	_ = 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("GetAwsNetworkPerformanceData")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetAwsNetworkPerformanceDataInput(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 awsEc2query_serializeOpGetCapacityReservationUsage struct {
}

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

func (m *awsEc2query_serializeOpGetCapacityReservationUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetCapacityReservationUsageInput)
	_ = 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("GetCapacityReservationUsage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(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 awsEc2query_serializeOpGetCoipPoolUsage struct {
}

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

func (m *awsEc2query_serializeOpGetCoipPoolUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetCoipPoolUsageInput)
	_ = 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("GetCoipPoolUsage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(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 awsEc2query_serializeOpGetConsoleOutput struct {
}

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

func (m *awsEc2query_serializeOpGetConsoleOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetConsoleOutputInput)
	_ = 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("GetConsoleOutput")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetConsoleOutputInput(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 awsEc2query_serializeOpGetConsoleScreenshot struct {
}

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

func (m *awsEc2query_serializeOpGetConsoleScreenshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetConsoleScreenshotInput)
	_ = 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("GetConsoleScreenshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(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 awsEc2query_serializeOpGetDefaultCreditSpecification struct {
}

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

func (m *awsEc2query_serializeOpGetDefaultCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetDefaultCreditSpecificationInput)
	_ = 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("GetDefaultCreditSpecification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(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 awsEc2query_serializeOpGetEbsDefaultKmsKeyId struct {
}

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

func (m *awsEc2query_serializeOpGetEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetEbsDefaultKmsKeyIdInput)
	_ = 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("GetEbsDefaultKmsKeyId")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(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 awsEc2query_serializeOpGetEbsEncryptionByDefault struct {
}

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

func (m *awsEc2query_serializeOpGetEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetEbsEncryptionByDefaultInput)
	_ = 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("GetEbsEncryptionByDefault")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(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 awsEc2query_serializeOpGetFlowLogsIntegrationTemplate struct {
}

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

func (m *awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetFlowLogsIntegrationTemplateInput)
	_ = 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("GetFlowLogsIntegrationTemplate")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(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 awsEc2query_serializeOpGetGroupsForCapacityReservation struct {
}

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

func (m *awsEc2query_serializeOpGetGroupsForCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetGroupsForCapacityReservationInput)
	_ = 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("GetGroupsForCapacityReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(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 awsEc2query_serializeOpGetHostReservationPurchasePreview struct {
}

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

func (m *awsEc2query_serializeOpGetHostReservationPurchasePreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetHostReservationPurchasePreviewInput)
	_ = 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("GetHostReservationPurchasePreview")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(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 awsEc2query_serializeOpGetImageBlockPublicAccessState struct {
}

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

func (m *awsEc2query_serializeOpGetImageBlockPublicAccessState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetImageBlockPublicAccessStateInput)
	_ = 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("GetImageBlockPublicAccessState")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(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 awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements struct {
}

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

func (m *awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetInstanceTypesFromInstanceRequirementsInput)
	_ = 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("GetInstanceTypesFromInstanceRequirements")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetInstanceTypesFromInstanceRequirementsInput(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 awsEc2query_serializeOpGetInstanceUefiData struct {
}

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

func (m *awsEc2query_serializeOpGetInstanceUefiData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetInstanceUefiDataInput)
	_ = 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("GetInstanceUefiData")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetInstanceUefiDataInput(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 awsEc2query_serializeOpGetIpamAddressHistory struct {
}

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

func (m *awsEc2query_serializeOpGetIpamAddressHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamAddressHistoryInput)
	_ = 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("GetIpamAddressHistory")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamAddressHistoryInput(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 awsEc2query_serializeOpGetIpamDiscoveredAccounts struct {
}

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

func (m *awsEc2query_serializeOpGetIpamDiscoveredAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamDiscoveredAccountsInput)
	_ = 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("GetIpamDiscoveredAccounts")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredAccountsInput(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 awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses struct {
}

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

func (m *awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamDiscoveredPublicAddressesInput)
	_ = 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("GetIpamDiscoveredPublicAddresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredPublicAddressesInput(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 awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs struct {
}

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

func (m *awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamDiscoveredResourceCidrsInput)
	_ = 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("GetIpamDiscoveredResourceCidrs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredResourceCidrsInput(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 awsEc2query_serializeOpGetIpamPoolAllocations struct {
}

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

func (m *awsEc2query_serializeOpGetIpamPoolAllocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamPoolAllocationsInput)
	_ = 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("GetIpamPoolAllocations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamPoolAllocationsInput(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 awsEc2query_serializeOpGetIpamPoolCidrs struct {
}

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

func (m *awsEc2query_serializeOpGetIpamPoolCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamPoolCidrsInput)
	_ = 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("GetIpamPoolCidrs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamPoolCidrsInput(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 awsEc2query_serializeOpGetIpamResourceCidrs struct {
}

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

func (m *awsEc2query_serializeOpGetIpamResourceCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetIpamResourceCidrsInput)
	_ = 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("GetIpamResourceCidrs")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetIpamResourceCidrsInput(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 awsEc2query_serializeOpGetLaunchTemplateData struct {
}

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

func (m *awsEc2query_serializeOpGetLaunchTemplateData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetLaunchTemplateDataInput)
	_ = 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("GetLaunchTemplateData")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(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 awsEc2query_serializeOpGetManagedPrefixListAssociations struct {
}

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

func (m *awsEc2query_serializeOpGetManagedPrefixListAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetManagedPrefixListAssociationsInput)
	_ = 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("GetManagedPrefixListAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(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 awsEc2query_serializeOpGetManagedPrefixListEntries struct {
}

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

func (m *awsEc2query_serializeOpGetManagedPrefixListEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetManagedPrefixListEntriesInput)
	_ = 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("GetManagedPrefixListEntries")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(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 awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings struct {
}

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

func (m *awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeAnalysisFindingsInput)
	_ = 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("GetNetworkInsightsAccessScopeAnalysisFindings")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsInput(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 awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent struct {
}

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

func (m *awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeContentInput)
	_ = 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("GetNetworkInsightsAccessScopeContent")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeContentInput(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 awsEc2query_serializeOpGetPasswordData struct {
}

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

func (m *awsEc2query_serializeOpGetPasswordData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetPasswordDataInput)
	_ = 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("GetPasswordData")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetPasswordDataInput(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 awsEc2query_serializeOpGetReservedInstancesExchangeQuote struct {
}

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

func (m *awsEc2query_serializeOpGetReservedInstancesExchangeQuote) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetReservedInstancesExchangeQuoteInput)
	_ = 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("GetReservedInstancesExchangeQuote")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(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 awsEc2query_serializeOpGetSecurityGroupsForVpc struct {
}

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

func (m *awsEc2query_serializeOpGetSecurityGroupsForVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetSecurityGroupsForVpcInput)
	_ = 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("GetSecurityGroupsForVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(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 awsEc2query_serializeOpGetSerialConsoleAccessStatus struct {
}

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

func (m *awsEc2query_serializeOpGetSerialConsoleAccessStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetSerialConsoleAccessStatusInput)
	_ = 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("GetSerialConsoleAccessStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(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 awsEc2query_serializeOpGetSnapshotBlockPublicAccessState struct {
}

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

func (m *awsEc2query_serializeOpGetSnapshotBlockPublicAccessState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetSnapshotBlockPublicAccessStateInput)
	_ = 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("GetSnapshotBlockPublicAccessState")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetSnapshotBlockPublicAccessStateInput(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 awsEc2query_serializeOpGetSpotPlacementScores struct {
}

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

func (m *awsEc2query_serializeOpGetSpotPlacementScores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetSpotPlacementScoresInput)
	_ = 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("GetSpotPlacementScores")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetSpotPlacementScoresInput(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 awsEc2query_serializeOpGetSubnetCidrReservations struct {
}

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

func (m *awsEc2query_serializeOpGetSubnetCidrReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetSubnetCidrReservationsInput)
	_ = 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("GetSubnetCidrReservations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(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 awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayAttachmentPropagationsInput)
	_ = 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("GetTransitGatewayAttachmentPropagations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(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 awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayMulticastDomainAssociationsInput)
	_ = 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("GetTransitGatewayMulticastDomainAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(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 awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayPolicyTableAssociationsInput)
	_ = 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("GetTransitGatewayPolicyTableAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableAssociationsInput(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 awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayPolicyTableEntriesInput)
	_ = 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("GetTransitGatewayPolicyTableEntries")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableEntriesInput(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 awsEc2query_serializeOpGetTransitGatewayPrefixListReferences struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayPrefixListReferencesInput)
	_ = 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("GetTransitGatewayPrefixListReferences")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(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 awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayRouteTableAssociationsInput)
	_ = 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("GetTransitGatewayRouteTableAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(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 awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations struct {
}

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

func (m *awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetTransitGatewayRouteTablePropagationsInput)
	_ = 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("GetTransitGatewayRouteTablePropagations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(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 awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy struct {
}

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

func (m *awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetVerifiedAccessEndpointPolicyInput)
	_ = 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("GetVerifiedAccessEndpointPolicy")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetVerifiedAccessEndpointPolicyInput(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 awsEc2query_serializeOpGetVerifiedAccessGroupPolicy struct {
}

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

func (m *awsEc2query_serializeOpGetVerifiedAccessGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetVerifiedAccessGroupPolicyInput)
	_ = 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("GetVerifiedAccessGroupPolicy")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetVerifiedAccessGroupPolicyInput(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 awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration struct {
}

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

func (m *awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetVpnConnectionDeviceSampleConfigurationInput)
	_ = 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("GetVpnConnectionDeviceSampleConfiguration")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(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 awsEc2query_serializeOpGetVpnConnectionDeviceTypes struct {
}

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

func (m *awsEc2query_serializeOpGetVpnConnectionDeviceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetVpnConnectionDeviceTypesInput)
	_ = 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("GetVpnConnectionDeviceTypes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(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 awsEc2query_serializeOpGetVpnTunnelReplacementStatus struct {
}

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

func (m *awsEc2query_serializeOpGetVpnTunnelReplacementStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*GetVpnTunnelReplacementStatusInput)
	_ = 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("GetVpnTunnelReplacementStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentGetVpnTunnelReplacementStatusInput(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 awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList struct {
}

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

func (m *awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportClientVpnClientCertificateRevocationListInput)
	_ = 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("ImportClientVpnClientCertificateRevocationList")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(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 awsEc2query_serializeOpImportImage struct {
}

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

func (m *awsEc2query_serializeOpImportImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportImageInput)
	_ = 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("ImportImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportImageInput(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 awsEc2query_serializeOpImportInstance struct {
}

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

func (m *awsEc2query_serializeOpImportInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportInstanceInput)
	_ = 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("ImportInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportInstanceInput(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 awsEc2query_serializeOpImportKeyPair struct {
}

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

func (m *awsEc2query_serializeOpImportKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportKeyPairInput)
	_ = 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("ImportKeyPair")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportKeyPairInput(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 awsEc2query_serializeOpImportSnapshot struct {
}

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

func (m *awsEc2query_serializeOpImportSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportSnapshotInput)
	_ = 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("ImportSnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportSnapshotInput(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 awsEc2query_serializeOpImportVolume struct {
}

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

func (m *awsEc2query_serializeOpImportVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ImportVolumeInput)
	_ = 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("ImportVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentImportVolumeInput(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 awsEc2query_serializeOpListImagesInRecycleBin struct {
}

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

func (m *awsEc2query_serializeOpListImagesInRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ListImagesInRecycleBinInput)
	_ = 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("ListImagesInRecycleBin")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentListImagesInRecycleBinInput(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 awsEc2query_serializeOpListSnapshotsInRecycleBin struct {
}

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

func (m *awsEc2query_serializeOpListSnapshotsInRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ListSnapshotsInRecycleBinInput)
	_ = 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("ListSnapshotsInRecycleBin")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(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 awsEc2query_serializeOpLockSnapshot struct {
}

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

func (m *awsEc2query_serializeOpLockSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*LockSnapshotInput)
	_ = 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("LockSnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentLockSnapshotInput(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 awsEc2query_serializeOpModifyAddressAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyAddressAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyAddressAttributeInput)
	_ = 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("ModifyAddressAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyAddressAttributeInput(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 awsEc2query_serializeOpModifyAvailabilityZoneGroup struct {
}

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

func (m *awsEc2query_serializeOpModifyAvailabilityZoneGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyAvailabilityZoneGroupInput)
	_ = 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("ModifyAvailabilityZoneGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(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 awsEc2query_serializeOpModifyCapacityReservation struct {
}

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

func (m *awsEc2query_serializeOpModifyCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyCapacityReservationInput)
	_ = 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("ModifyCapacityReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyCapacityReservationInput(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 awsEc2query_serializeOpModifyCapacityReservationFleet struct {
}

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

func (m *awsEc2query_serializeOpModifyCapacityReservationFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyCapacityReservationFleetInput)
	_ = 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("ModifyCapacityReservationFleet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyCapacityReservationFleetInput(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 awsEc2query_serializeOpModifyClientVpnEndpoint struct {
}

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

func (m *awsEc2query_serializeOpModifyClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyClientVpnEndpointInput)
	_ = 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("ModifyClientVpnEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(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 awsEc2query_serializeOpModifyDefaultCreditSpecification struct {
}

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

func (m *awsEc2query_serializeOpModifyDefaultCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyDefaultCreditSpecificationInput)
	_ = 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("ModifyDefaultCreditSpecification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(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 awsEc2query_serializeOpModifyEbsDefaultKmsKeyId struct {
}

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

func (m *awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyEbsDefaultKmsKeyIdInput)
	_ = 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("ModifyEbsDefaultKmsKeyId")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(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 awsEc2query_serializeOpModifyFleet struct {
}

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

func (m *awsEc2query_serializeOpModifyFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyFleetInput)
	_ = 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("ModifyFleet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyFleetInput(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 awsEc2query_serializeOpModifyFpgaImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyFpgaImageAttributeInput)
	_ = 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("ModifyFpgaImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(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 awsEc2query_serializeOpModifyHosts struct {
}

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

func (m *awsEc2query_serializeOpModifyHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyHostsInput)
	_ = 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("ModifyHosts")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyHostsInput(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 awsEc2query_serializeOpModifyIdentityIdFormat struct {
}

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

func (m *awsEc2query_serializeOpModifyIdentityIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIdentityIdFormatInput)
	_ = 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("ModifyIdentityIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(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 awsEc2query_serializeOpModifyIdFormat struct {
}

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

func (m *awsEc2query_serializeOpModifyIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIdFormatInput)
	_ = 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("ModifyIdFormat")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIdFormatInput(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 awsEc2query_serializeOpModifyImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyImageAttributeInput)
	_ = 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("ModifyImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyImageAttributeInput(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 awsEc2query_serializeOpModifyInstanceAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceAttributeInput)
	_ = 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("ModifyInstanceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(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 awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceCapacityReservationAttributesInput)
	_ = 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("ModifyInstanceCapacityReservationAttributes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(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 awsEc2query_serializeOpModifyInstanceCreditSpecification struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceCreditSpecificationInput)
	_ = 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("ModifyInstanceCreditSpecification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(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 awsEc2query_serializeOpModifyInstanceEventStartTime struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceEventStartTime) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceEventStartTimeInput)
	_ = 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("ModifyInstanceEventStartTime")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(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 awsEc2query_serializeOpModifyInstanceEventWindow struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceEventWindowInput)
	_ = 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("ModifyInstanceEventWindow")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(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 awsEc2query_serializeOpModifyInstanceMaintenanceOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceMaintenanceOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceMaintenanceOptionsInput)
	_ = 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("ModifyInstanceMaintenanceOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceMaintenanceOptionsInput(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 awsEc2query_serializeOpModifyInstanceMetadataOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyInstanceMetadataOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstanceMetadataOptionsInput)
	_ = 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("ModifyInstanceMetadataOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(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 awsEc2query_serializeOpModifyInstancePlacement struct {
}

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

func (m *awsEc2query_serializeOpModifyInstancePlacement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyInstancePlacementInput)
	_ = 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("ModifyInstancePlacement")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyInstancePlacementInput(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 awsEc2query_serializeOpModifyIpam struct {
}

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

func (m *awsEc2query_serializeOpModifyIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIpamInput)
	_ = 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("ModifyIpam")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIpamInput(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 awsEc2query_serializeOpModifyIpamPool struct {
}

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

func (m *awsEc2query_serializeOpModifyIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIpamPoolInput)
	_ = 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("ModifyIpamPool")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIpamPoolInput(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 awsEc2query_serializeOpModifyIpamResourceCidr struct {
}

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

func (m *awsEc2query_serializeOpModifyIpamResourceCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIpamResourceCidrInput)
	_ = 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("ModifyIpamResourceCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIpamResourceCidrInput(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 awsEc2query_serializeOpModifyIpamResourceDiscovery struct {
}

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

func (m *awsEc2query_serializeOpModifyIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIpamResourceDiscoveryInput)
	_ = 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("ModifyIpamResourceDiscovery")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIpamResourceDiscoveryInput(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 awsEc2query_serializeOpModifyIpamScope struct {
}

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

func (m *awsEc2query_serializeOpModifyIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyIpamScopeInput)
	_ = 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("ModifyIpamScope")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyIpamScopeInput(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 awsEc2query_serializeOpModifyLaunchTemplate struct {
}

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

func (m *awsEc2query_serializeOpModifyLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyLaunchTemplateInput)
	_ = 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("ModifyLaunchTemplate")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(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 awsEc2query_serializeOpModifyLocalGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpModifyLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyLocalGatewayRouteInput)
	_ = 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("ModifyLocalGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyLocalGatewayRouteInput(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 awsEc2query_serializeOpModifyManagedPrefixList struct {
}

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

func (m *awsEc2query_serializeOpModifyManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyManagedPrefixListInput)
	_ = 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("ModifyManagedPrefixList")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(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 awsEc2query_serializeOpModifyNetworkInterfaceAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyNetworkInterfaceAttributeInput)
	_ = 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("ModifyNetworkInterfaceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(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 awsEc2query_serializeOpModifyPrivateDnsNameOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyPrivateDnsNameOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyPrivateDnsNameOptionsInput)
	_ = 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("ModifyPrivateDnsNameOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(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 awsEc2query_serializeOpModifyReservedInstances struct {
}

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

func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyReservedInstancesInput)
	_ = 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("ModifyReservedInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyReservedInstancesInput(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 awsEc2query_serializeOpModifySecurityGroupRules struct {
}

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

func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifySecurityGroupRulesInput)
	_ = 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("ModifySecurityGroupRules")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(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 awsEc2query_serializeOpModifySnapshotAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifySnapshotAttributeInput)
	_ = 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("ModifySnapshotAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(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 awsEc2query_serializeOpModifySnapshotTier struct {
}

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

func (m *awsEc2query_serializeOpModifySnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifySnapshotTierInput)
	_ = 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("ModifySnapshotTier")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifySnapshotTierInput(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 awsEc2query_serializeOpModifySpotFleetRequest struct {
}

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

func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifySpotFleetRequestInput)
	_ = 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("ModifySpotFleetRequest")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(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 awsEc2query_serializeOpModifySubnetAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifySubnetAttributeInput)
	_ = 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("ModifySubnetAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifySubnetAttributeInput(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 awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices struct {
}

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

func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTrafficMirrorFilterNetworkServicesInput)
	_ = 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("ModifyTrafficMirrorFilterNetworkServices")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(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 awsEc2query_serializeOpModifyTrafficMirrorFilterRule struct {
}

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

func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTrafficMirrorFilterRuleInput)
	_ = 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("ModifyTrafficMirrorFilterRule")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(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 awsEc2query_serializeOpModifyTrafficMirrorSession struct {
}

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

func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTrafficMirrorSessionInput)
	_ = 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("ModifyTrafficMirrorSession")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(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 awsEc2query_serializeOpModifyTransitGateway struct {
}

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

func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTransitGatewayInput)
	_ = 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("ModifyTransitGateway")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTransitGatewayInput(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 awsEc2query_serializeOpModifyTransitGatewayPrefixListReference struct {
}

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

func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTransitGatewayPrefixListReferenceInput)
	_ = 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("ModifyTransitGatewayPrefixListReference")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(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 awsEc2query_serializeOpModifyTransitGatewayVpcAttachment struct {
}

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

func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyTransitGatewayVpcAttachmentInput)
	_ = 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("ModifyTransitGatewayVpcAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(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 awsEc2query_serializeOpModifyVerifiedAccessEndpoint struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointInput)
	_ = 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("ModifyVerifiedAccessEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointInput(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 awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointPolicyInput)
	_ = 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("ModifyVerifiedAccessEndpointPolicy")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointPolicyInput(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 awsEc2query_serializeOpModifyVerifiedAccessGroup struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessGroupInput)
	_ = 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("ModifyVerifiedAccessGroup")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupInput(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 awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessGroupPolicyInput)
	_ = 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("ModifyVerifiedAccessGroupPolicy")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupPolicyInput(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 awsEc2query_serializeOpModifyVerifiedAccessInstance struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceInput)
	_ = 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("ModifyVerifiedAccessInstance")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceInput(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 awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceLoggingConfigurationInput)
	_ = 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("ModifyVerifiedAccessInstanceLoggingConfiguration")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationInput(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 awsEc2query_serializeOpModifyVerifiedAccessTrustProvider struct {
}

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

func (m *awsEc2query_serializeOpModifyVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVerifiedAccessTrustProviderInput)
	_ = 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("ModifyVerifiedAccessTrustProvider")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessTrustProviderInput(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 awsEc2query_serializeOpModifyVolume struct {
}

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

func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVolumeInput)
	_ = 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("ModifyVolume")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVolumeInput(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 awsEc2query_serializeOpModifyVolumeAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVolumeAttributeInput)
	_ = 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("ModifyVolumeAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(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 awsEc2query_serializeOpModifyVpcAttribute struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcAttributeInput)
	_ = 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("ModifyVpcAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcAttributeInput(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 awsEc2query_serializeOpModifyVpcEndpoint struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcEndpointInput)
	_ = 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("ModifyVpcEndpoint")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcEndpointInput(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 awsEc2query_serializeOpModifyVpcEndpointConnectionNotification struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcEndpointConnectionNotificationInput)
	_ = 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("ModifyVpcEndpointConnectionNotification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(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 awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcEndpointServiceConfigurationInput)
	_ = 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("ModifyVpcEndpointServiceConfiguration")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(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 awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcEndpointServicePayerResponsibilityInput)
	_ = 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("ModifyVpcEndpointServicePayerResponsibility")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServicePayerResponsibilityInput(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 awsEc2query_serializeOpModifyVpcEndpointServicePermissions struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcEndpointServicePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcEndpointServicePermissionsInput)
	_ = 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("ModifyVpcEndpointServicePermissions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(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 awsEc2query_serializeOpModifyVpcPeeringConnectionOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcPeeringConnectionOptionsInput)
	_ = 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("ModifyVpcPeeringConnectionOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(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 awsEc2query_serializeOpModifyVpcTenancy struct {
}

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

func (m *awsEc2query_serializeOpModifyVpcTenancy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpcTenancyInput)
	_ = 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("ModifyVpcTenancy")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpcTenancyInput(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 awsEc2query_serializeOpModifyVpnConnection struct {
}

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

func (m *awsEc2query_serializeOpModifyVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpnConnectionInput)
	_ = 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("ModifyVpnConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpnConnectionInput(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 awsEc2query_serializeOpModifyVpnConnectionOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyVpnConnectionOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpnConnectionOptionsInput)
	_ = 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("ModifyVpnConnectionOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(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 awsEc2query_serializeOpModifyVpnTunnelCertificate struct {
}

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

func (m *awsEc2query_serializeOpModifyVpnTunnelCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpnTunnelCertificateInput)
	_ = 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("ModifyVpnTunnelCertificate")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(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 awsEc2query_serializeOpModifyVpnTunnelOptions struct {
}

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

func (m *awsEc2query_serializeOpModifyVpnTunnelOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ModifyVpnTunnelOptionsInput)
	_ = 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("ModifyVpnTunnelOptions")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(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 awsEc2query_serializeOpMonitorInstances struct {
}

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

func (m *awsEc2query_serializeOpMonitorInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*MonitorInstancesInput)
	_ = 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("MonitorInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentMonitorInstancesInput(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 awsEc2query_serializeOpMoveAddressToVpc struct {
}

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

func (m *awsEc2query_serializeOpMoveAddressToVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*MoveAddressToVpcInput)
	_ = 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("MoveAddressToVpc")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentMoveAddressToVpcInput(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 awsEc2query_serializeOpMoveByoipCidrToIpam struct {
}

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

func (m *awsEc2query_serializeOpMoveByoipCidrToIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*MoveByoipCidrToIpamInput)
	_ = 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("MoveByoipCidrToIpam")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentMoveByoipCidrToIpamInput(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 awsEc2query_serializeOpProvisionByoipCidr struct {
}

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

func (m *awsEc2query_serializeOpProvisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ProvisionByoipCidrInput)
	_ = 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("ProvisionByoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentProvisionByoipCidrInput(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 awsEc2query_serializeOpProvisionIpamByoasn struct {
}

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

func (m *awsEc2query_serializeOpProvisionIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ProvisionIpamByoasnInput)
	_ = 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("ProvisionIpamByoasn")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentProvisionIpamByoasnInput(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 awsEc2query_serializeOpProvisionIpamPoolCidr struct {
}

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

func (m *awsEc2query_serializeOpProvisionIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ProvisionIpamPoolCidrInput)
	_ = 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("ProvisionIpamPoolCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(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 awsEc2query_serializeOpProvisionPublicIpv4PoolCidr struct {
}

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

func (m *awsEc2query_serializeOpProvisionPublicIpv4PoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ProvisionPublicIpv4PoolCidrInput)
	_ = 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("ProvisionPublicIpv4PoolCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentProvisionPublicIpv4PoolCidrInput(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 awsEc2query_serializeOpPurchaseCapacityBlock struct {
}

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

func (m *awsEc2query_serializeOpPurchaseCapacityBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*PurchaseCapacityBlockInput)
	_ = 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("PurchaseCapacityBlock")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentPurchaseCapacityBlockInput(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 awsEc2query_serializeOpPurchaseHostReservation struct {
}

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

func (m *awsEc2query_serializeOpPurchaseHostReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*PurchaseHostReservationInput)
	_ = 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("PurchaseHostReservation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentPurchaseHostReservationInput(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 awsEc2query_serializeOpPurchaseReservedInstancesOffering struct {
}

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

func (m *awsEc2query_serializeOpPurchaseReservedInstancesOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*PurchaseReservedInstancesOfferingInput)
	_ = 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("PurchaseReservedInstancesOffering")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(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 awsEc2query_serializeOpPurchaseScheduledInstances struct {
}

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

func (m *awsEc2query_serializeOpPurchaseScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*PurchaseScheduledInstancesInput)
	_ = 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("PurchaseScheduledInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(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 awsEc2query_serializeOpRebootInstances struct {
}

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

func (m *awsEc2query_serializeOpRebootInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RebootInstancesInput)
	_ = 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("RebootInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRebootInstancesInput(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 awsEc2query_serializeOpRegisterImage struct {
}

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

func (m *awsEc2query_serializeOpRegisterImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RegisterImageInput)
	_ = 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("RegisterImage")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRegisterImageInput(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 awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes struct {
}

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

func (m *awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RegisterInstanceEventNotificationAttributesInput)
	_ = 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("RegisterInstanceEventNotificationAttributes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(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 awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers struct {
}

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

func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupMembersInput)
	_ = 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("RegisterTransitGatewayMulticastGroupMembers")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(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 awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources struct {
}

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

func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupSourcesInput)
	_ = 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("RegisterTransitGatewayMulticastGroupSources")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(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 awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations struct {
}

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

func (m *awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RejectTransitGatewayMulticastDomainAssociationsInput)
	_ = 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("RejectTransitGatewayMulticastDomainAssociations")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(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 awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment struct {
}

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

func (m *awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RejectTransitGatewayPeeringAttachmentInput)
	_ = 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("RejectTransitGatewayPeeringAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(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 awsEc2query_serializeOpRejectTransitGatewayVpcAttachment struct {
}

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

func (m *awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RejectTransitGatewayVpcAttachmentInput)
	_ = 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("RejectTransitGatewayVpcAttachment")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(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 awsEc2query_serializeOpRejectVpcEndpointConnections struct {
}

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

func (m *awsEc2query_serializeOpRejectVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RejectVpcEndpointConnectionsInput)
	_ = 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("RejectVpcEndpointConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(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 awsEc2query_serializeOpRejectVpcPeeringConnection struct {
}

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

func (m *awsEc2query_serializeOpRejectVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RejectVpcPeeringConnectionInput)
	_ = 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("RejectVpcPeeringConnection")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(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 awsEc2query_serializeOpReleaseAddress struct {
}

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

func (m *awsEc2query_serializeOpReleaseAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReleaseAddressInput)
	_ = 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("ReleaseAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReleaseAddressInput(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 awsEc2query_serializeOpReleaseHosts struct {
}

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

func (m *awsEc2query_serializeOpReleaseHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReleaseHostsInput)
	_ = 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("ReleaseHosts")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReleaseHostsInput(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 awsEc2query_serializeOpReleaseIpamPoolAllocation struct {
}

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

func (m *awsEc2query_serializeOpReleaseIpamPoolAllocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReleaseIpamPoolAllocationInput)
	_ = 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("ReleaseIpamPoolAllocation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReleaseIpamPoolAllocationInput(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 awsEc2query_serializeOpReplaceIamInstanceProfileAssociation struct {
}

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

func (m *awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceIamInstanceProfileAssociationInput)
	_ = 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("ReplaceIamInstanceProfileAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(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 awsEc2query_serializeOpReplaceNetworkAclAssociation struct {
}

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

func (m *awsEc2query_serializeOpReplaceNetworkAclAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceNetworkAclAssociationInput)
	_ = 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("ReplaceNetworkAclAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(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 awsEc2query_serializeOpReplaceNetworkAclEntry struct {
}

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

func (m *awsEc2query_serializeOpReplaceNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceNetworkAclEntryInput)
	_ = 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("ReplaceNetworkAclEntry")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(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 awsEc2query_serializeOpReplaceRoute struct {
}

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

func (m *awsEc2query_serializeOpReplaceRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceRouteInput)
	_ = 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("ReplaceRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceRouteInput(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 awsEc2query_serializeOpReplaceRouteTableAssociation struct {
}

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

func (m *awsEc2query_serializeOpReplaceRouteTableAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceRouteTableAssociationInput)
	_ = 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("ReplaceRouteTableAssociation")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(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 awsEc2query_serializeOpReplaceTransitGatewayRoute struct {
}

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

func (m *awsEc2query_serializeOpReplaceTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceTransitGatewayRouteInput)
	_ = 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("ReplaceTransitGatewayRoute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(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 awsEc2query_serializeOpReplaceVpnTunnel struct {
}

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

func (m *awsEc2query_serializeOpReplaceVpnTunnel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReplaceVpnTunnelInput)
	_ = 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("ReplaceVpnTunnel")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReplaceVpnTunnelInput(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 awsEc2query_serializeOpReportInstanceStatus struct {
}

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

func (m *awsEc2query_serializeOpReportInstanceStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ReportInstanceStatusInput)
	_ = 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("ReportInstanceStatus")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentReportInstanceStatusInput(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 awsEc2query_serializeOpRequestSpotFleet struct {
}

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

func (m *awsEc2query_serializeOpRequestSpotFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RequestSpotFleetInput)
	_ = 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("RequestSpotFleet")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRequestSpotFleetInput(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 awsEc2query_serializeOpRequestSpotInstances struct {
}

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

func (m *awsEc2query_serializeOpRequestSpotInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RequestSpotInstancesInput)
	_ = 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("RequestSpotInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRequestSpotInstancesInput(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 awsEc2query_serializeOpResetAddressAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetAddressAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetAddressAttributeInput)
	_ = 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("ResetAddressAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetAddressAttributeInput(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 awsEc2query_serializeOpResetEbsDefaultKmsKeyId struct {
}

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

func (m *awsEc2query_serializeOpResetEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetEbsDefaultKmsKeyIdInput)
	_ = 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("ResetEbsDefaultKmsKeyId")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(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 awsEc2query_serializeOpResetFpgaImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetFpgaImageAttributeInput)
	_ = 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("ResetFpgaImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(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 awsEc2query_serializeOpResetImageAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetImageAttributeInput)
	_ = 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("ResetImageAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetImageAttributeInput(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 awsEc2query_serializeOpResetInstanceAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetInstanceAttributeInput)
	_ = 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("ResetInstanceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetInstanceAttributeInput(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 awsEc2query_serializeOpResetNetworkInterfaceAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetNetworkInterfaceAttributeInput)
	_ = 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("ResetNetworkInterfaceAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(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 awsEc2query_serializeOpResetSnapshotAttribute struct {
}

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

func (m *awsEc2query_serializeOpResetSnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*ResetSnapshotAttributeInput)
	_ = 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("ResetSnapshotAttribute")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(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 awsEc2query_serializeOpRestoreAddressToClassic struct {
}

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

func (m *awsEc2query_serializeOpRestoreAddressToClassic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RestoreAddressToClassicInput)
	_ = 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("RestoreAddressToClassic")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(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 awsEc2query_serializeOpRestoreImageFromRecycleBin struct {
}

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

func (m *awsEc2query_serializeOpRestoreImageFromRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RestoreImageFromRecycleBinInput)
	_ = 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("RestoreImageFromRecycleBin")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRestoreImageFromRecycleBinInput(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 awsEc2query_serializeOpRestoreManagedPrefixListVersion struct {
}

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

func (m *awsEc2query_serializeOpRestoreManagedPrefixListVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RestoreManagedPrefixListVersionInput)
	_ = 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("RestoreManagedPrefixListVersion")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(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 awsEc2query_serializeOpRestoreSnapshotFromRecycleBin struct {
}

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

func (m *awsEc2query_serializeOpRestoreSnapshotFromRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RestoreSnapshotFromRecycleBinInput)
	_ = 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("RestoreSnapshotFromRecycleBin")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(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 awsEc2query_serializeOpRestoreSnapshotTier struct {
}

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

func (m *awsEc2query_serializeOpRestoreSnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RestoreSnapshotTierInput)
	_ = 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("RestoreSnapshotTier")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(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 awsEc2query_serializeOpRevokeClientVpnIngress struct {
}

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

func (m *awsEc2query_serializeOpRevokeClientVpnIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RevokeClientVpnIngressInput)
	_ = 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("RevokeClientVpnIngress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(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 awsEc2query_serializeOpRevokeSecurityGroupEgress struct {
}

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

func (m *awsEc2query_serializeOpRevokeSecurityGroupEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RevokeSecurityGroupEgressInput)
	_ = 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("RevokeSecurityGroupEgress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(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 awsEc2query_serializeOpRevokeSecurityGroupIngress struct {
}

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

func (m *awsEc2query_serializeOpRevokeSecurityGroupIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RevokeSecurityGroupIngressInput)
	_ = 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("RevokeSecurityGroupIngress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(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 awsEc2query_serializeOpRunInstances struct {
}

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

func (m *awsEc2query_serializeOpRunInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RunInstancesInput)
	_ = 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("RunInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRunInstancesInput(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 awsEc2query_serializeOpRunScheduledInstances struct {
}

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

func (m *awsEc2query_serializeOpRunScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*RunScheduledInstancesInput)
	_ = 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("RunScheduledInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentRunScheduledInstancesInput(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 awsEc2query_serializeOpSearchLocalGatewayRoutes struct {
}

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

func (m *awsEc2query_serializeOpSearchLocalGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*SearchLocalGatewayRoutesInput)
	_ = 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("SearchLocalGatewayRoutes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(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 awsEc2query_serializeOpSearchTransitGatewayMulticastGroups struct {
}

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

func (m *awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*SearchTransitGatewayMulticastGroupsInput)
	_ = 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("SearchTransitGatewayMulticastGroups")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(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 awsEc2query_serializeOpSearchTransitGatewayRoutes struct {
}

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

func (m *awsEc2query_serializeOpSearchTransitGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*SearchTransitGatewayRoutesInput)
	_ = 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("SearchTransitGatewayRoutes")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(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 awsEc2query_serializeOpSendDiagnosticInterrupt struct {
}

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

func (m *awsEc2query_serializeOpSendDiagnosticInterrupt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*SendDiagnosticInterruptInput)
	_ = 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("SendDiagnosticInterrupt")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(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 awsEc2query_serializeOpStartInstances struct {
}

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

func (m *awsEc2query_serializeOpStartInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*StartInstancesInput)
	_ = 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("StartInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentStartInstancesInput(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 awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis struct {
}

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

func (m *awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*StartNetworkInsightsAccessScopeAnalysisInput)
	_ = 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("StartNetworkInsightsAccessScopeAnalysis")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentStartNetworkInsightsAccessScopeAnalysisInput(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 awsEc2query_serializeOpStartNetworkInsightsAnalysis struct {
}

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

func (m *awsEc2query_serializeOpStartNetworkInsightsAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*StartNetworkInsightsAnalysisInput)
	_ = 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("StartNetworkInsightsAnalysis")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(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 awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification struct {
}

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

func (m *awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*StartVpcEndpointServicePrivateDnsVerificationInput)
	_ = 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("StartVpcEndpointServicePrivateDnsVerification")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(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 awsEc2query_serializeOpStopInstances struct {
}

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

func (m *awsEc2query_serializeOpStopInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*StopInstancesInput)
	_ = 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("StopInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentStopInstancesInput(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 awsEc2query_serializeOpTerminateClientVpnConnections struct {
}

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

func (m *awsEc2query_serializeOpTerminateClientVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*TerminateClientVpnConnectionsInput)
	_ = 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("TerminateClientVpnConnections")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(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 awsEc2query_serializeOpTerminateInstances struct {
}

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

func (m *awsEc2query_serializeOpTerminateInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*TerminateInstancesInput)
	_ = 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("TerminateInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentTerminateInstancesInput(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 awsEc2query_serializeOpUnassignIpv6Addresses struct {
}

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

func (m *awsEc2query_serializeOpUnassignIpv6Addresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UnassignIpv6AddressesInput)
	_ = 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("UnassignIpv6Addresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(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 awsEc2query_serializeOpUnassignPrivateIpAddresses struct {
}

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

func (m *awsEc2query_serializeOpUnassignPrivateIpAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UnassignPrivateIpAddressesInput)
	_ = 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("UnassignPrivateIpAddresses")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(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 awsEc2query_serializeOpUnassignPrivateNatGatewayAddress struct {
}

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

func (m *awsEc2query_serializeOpUnassignPrivateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UnassignPrivateNatGatewayAddressInput)
	_ = 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("UnassignPrivateNatGatewayAddress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUnassignPrivateNatGatewayAddressInput(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 awsEc2query_serializeOpUnlockSnapshot struct {
}

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

func (m *awsEc2query_serializeOpUnlockSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UnlockSnapshotInput)
	_ = 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("UnlockSnapshot")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUnlockSnapshotInput(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 awsEc2query_serializeOpUnmonitorInstances struct {
}

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

func (m *awsEc2query_serializeOpUnmonitorInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UnmonitorInstancesInput)
	_ = 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("UnmonitorInstances")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUnmonitorInstancesInput(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 awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress struct {
}

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

func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UpdateSecurityGroupRuleDescriptionsEgressInput)
	_ = 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("UpdateSecurityGroupRuleDescriptionsEgress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(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 awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress struct {
}

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

func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*UpdateSecurityGroupRuleDescriptionsIngressInput)
	_ = 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("UpdateSecurityGroupRuleDescriptionsIngress")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(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 awsEc2query_serializeOpWithdrawByoipCidr struct {
}

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

func (m *awsEc2query_serializeOpWithdrawByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
	request, ok := in.Request.(*smithyhttp.Request)
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
	}

	input, ok := in.Parameters.(*WithdrawByoipCidrInput)
	_ = 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("WithdrawByoipCidr")
	body.Key("Version").String("2016-11-15")

	if err := awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(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 awsEc2query_serializeDocumentAcceleratorCount(v *types.AcceleratorCount, value query.Value) error {
	object := value.Object()
	_ = object

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

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

	return nil
}

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

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

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

	return nil
}

func awsEc2query_serializeDocumentAcceleratorManufacturerSet(v []types.AcceleratorManufacturer, value query.Value) error {
	array := value.Array("Item")

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

func awsEc2query_serializeDocumentAcceleratorNameSet(v []types.AcceleratorName, value query.Value) error {
	array := value.Array("Item")

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

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

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

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

	return nil
}

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

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

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

	return nil
}

func awsEc2query_serializeDocumentAcceleratorTypeSet(v []types.AcceleratorType, value query.Value) error {
	array := value.Array("Item")

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

func awsEc2query_serializeDocumentAccessScopePathListRequest(v []types.AccessScopePathRequest, value query.Value) error {
	array := value.Array("Item")

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

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

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

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

	if v.ThroughResources != nil {
		objectKey := object.FlatKey("ThroughResource")
		if err := awsEc2query_serializeDocumentThroughResourcesStatementRequestList(v.ThroughResources, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentAccountAttributeNameStringList(v []types.AccountAttributeName, value query.Value) error {
	array := value.Array("AttributeName")

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

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

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

	return nil
}

func awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v []types.AddIpamOperatingRegion, value query.Value) error {
	array := value.Array("Member")

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

func awsEc2query_serializeDocumentAddPrefixListEntries(v []types.AddPrefixListEntry, value query.Value) error {
	array := value.Array("Member")

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

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

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

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

	return nil
}

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

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

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

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

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

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

func awsEc2query_serializeDocumentArchitectureTypeSet(v []types.ArchitectureType, value query.Value) error {
	array := value.Array("Item")

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

	return nil
}

func awsEc2query_serializeDocumentAthenaIntegrationsSet(v []types.AthenaIntegration, value query.Value) error {
	array := value.Array("Item")

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

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

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

	return nil
}

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

func awsEc2query_serializeDocumentBlockDeviceMappingList(v []types.BlockDeviceMapping, value query.Value) error {
	array := value.Array("Item")

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

func awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v []types.BlockDeviceMapping, value query.Value) error {
	array := value.Array("BlockDeviceMapping")

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

	return nil
}

func awsEc2query_serializeDocumentClassicLoadBalancers(v []types.ClassicLoadBalancer, value query.Value) error {
	array := value.Array("Item")

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

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

	if v.ClassicLoadBalancers != nil {
		objectKey := object.FlatKey("ClassicLoadBalancers")
		if err := awsEc2query_serializeDocumentClassicLoadBalancers(v.ClassicLoadBalancers, objectKey); err != nil {
			return err
		}
	}

	return nil
}

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

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

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

	return nil
}

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

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

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

	if v.UploadSize != nil {
		objectKey := object.Key("UploadSize")
		switch {
		case math.IsNaN(*v.UploadSize):
			objectKey.String("NaN")

		case math.IsInf(*v.UploadSize, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.UploadSize, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.UploadSize)

		}
	}

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

	return nil
}

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

func awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v []types.ClientVpnAuthenticationRequest, value query.Value) error {
	array := value.Array("Member")

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

func awsEc2query_serializeDocumentCpuManufacturerSet(v []types.CpuManufacturer, value query.Value) error {
	array := value.Array("Item")

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

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

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

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

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

	return nil
}

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetId")
		if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

	return nil
}

func awsEc2query_serializeDocumentCreateVolumePermissionList(v []types.CreateVolumePermission, value query.Value) error {
	array := value.Array("Item")

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

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

	if v.Add != nil {
		objectKey := object.FlatKey("Add")
		if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Add, objectKey); err != nil {
			return err
		}
	}

	if v.Remove != nil {
		objectKey := object.FlatKey("Remove")
		if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Remove, objectKey); err != nil {
			return err
		}
	}

	return nil
}

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

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

	return nil
}

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

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

func awsEc2query_serializeDocumentDataQueries(v []types.DataQuery, value query.Value) error {
	array := value.Array("Member")

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

func awsEc2query_serializeDocumentDataQuery(v *types.DataQuery, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Destination != nil {
		objectKey := object.Key("Destination")
		objectKey.String(*v.Destination)
	}

	if v.Id != nil {
		objectKey := object.Key("Id")
		objectKey.String(*v.Id)
	}

	if len(v.Metric) > 0 {
		objectKey := object.Key("Metric")
		objectKey.String(string(v.Metric))
	}

	if len(v.Period) > 0 {
		objectKey := object.Key("Period")
		objectKey.String(string(v.Period))
	}

	if v.Source != nil {
		objectKey := object.Key("Source")
		objectKey.String(*v.Source)
	}

	if len(v.Statistic) > 0 {
		objectKey := object.Key("Statistic")
		objectKey.String(string(v.Statistic))
	}

	return nil
}

func awsEc2query_serializeDocumentDedicatedHostIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v *types.DeregisterInstanceTagAttributeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.IncludeAllTagsOfInstance != nil {
		objectKey := object.Key("IncludeAllTagsOfInstance")
		objectKey.Boolean(*v.IncludeAllTagsOfInstance)
	}

	if v.InstanceTagKeys != nil {
		objectKey := object.FlatKey("InstanceTagKey")
		if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentDestinationOptionsRequest(v *types.DestinationOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.FileFormat) > 0 {
		objectKey := object.Key("FileFormat")
		objectKey.String(string(v.FileFormat))
	}

	if v.HiveCompatiblePartitions != nil {
		objectKey := object.Key("HiveCompatiblePartitions")
		objectKey.Boolean(*v.HiveCompatiblePartitions)
	}

	if v.PerHourPartition != nil {
		objectKey := object.Key("PerHourPartition")
		objectKey.Boolean(*v.PerHourPartition)
	}

	return nil
}

func awsEc2query_serializeDocumentDhcpOptionsIdStringList(v []string, value query.Value) error {
	array := value.Array("DhcpOptionsId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentDirectoryServiceAuthenticationRequest(v *types.DirectoryServiceAuthenticationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DirectoryId != nil {
		objectKey := object.Key("DirectoryId")
		objectKey.String(*v.DirectoryId)
	}

	return nil
}

func awsEc2query_serializeDocumentDiskImage(v *types.DiskImage, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.Image != nil {
		objectKey := object.Key("Image")
		if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil {
			return err
		}
	}

	if v.Volume != nil {
		objectKey := object.Key("Volume")
		if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentDiskImageDetail(v *types.DiskImageDetail, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Bytes != nil {
		objectKey := object.Key("Bytes")
		objectKey.Long(*v.Bytes)
	}

	if len(v.Format) > 0 {
		objectKey := object.Key("Format")
		objectKey.String(string(v.Format))
	}

	if v.ImportManifestUrl != nil {
		objectKey := object.Key("ImportManifestUrl")
		objectKey.String(*v.ImportManifestUrl)
	}

	return nil
}

func awsEc2query_serializeDocumentDiskImageList(v []types.DiskImage, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentDiskImage(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentDnsOptionsSpecification(v *types.DnsOptionsSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.DnsRecordIpType) > 0 {
		objectKey := object.Key("DnsRecordIpType")
		objectKey.String(string(v.DnsRecordIpType))
	}

	if v.PrivateDnsOnlyForInboundResolverEndpoint != nil {
		objectKey := object.Key("PrivateDnsOnlyForInboundResolverEndpoint")
		objectKey.Boolean(*v.PrivateDnsOnlyForInboundResolverEndpoint)
	}

	return nil
}

func awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v *types.DnsServersOptionsModifyStructure, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomDnsServers != nil {
		objectKey := object.FlatKey("CustomDnsServers")
		if err := awsEc2query_serializeDocumentValueStringList(v.CustomDnsServers, objectKey); err != nil {
			return err
		}
	}

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentEbsBlockDevice(v *types.EbsBlockDevice, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.Iops != nil {
		objectKey := object.Key("Iops")
		objectKey.Integer(*v.Iops)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.Throughput != nil {
		objectKey := object.Key("Throughput")
		objectKey.Integer(*v.Throughput)
	}

	if v.VolumeSize != nil {
		objectKey := object.Key("VolumeSize")
		objectKey.Integer(*v.VolumeSize)
	}

	if len(v.VolumeType) > 0 {
		objectKey := object.Key("VolumeType")
		objectKey.String(string(v.VolumeType))
	}

	return nil
}

func awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v *types.EbsInstanceBlockDeviceSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentEipAssociationIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentElasticGpuIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentElasticGpuSpecification(v *types.ElasticGpuSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.String(*v.Type)
	}

	return nil
}

func awsEc2query_serializeDocumentElasticGpuSpecificationList(v []types.ElasticGpuSpecification, value query.Value) error {
	array := value.Array("ElasticGpuSpecification")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentElasticGpuSpecifications(v []types.ElasticGpuSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentElasticInferenceAccelerator(v *types.ElasticInferenceAccelerator, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Count != nil {
		objectKey := object.Key("Count")
		objectKey.Integer(*v.Count)
	}

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.String(*v.Type)
	}

	return nil
}

func awsEc2query_serializeDocumentElasticInferenceAccelerators(v []types.ElasticInferenceAccelerator, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentElasticInferenceAccelerator(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentEnaSrdSpecification(v *types.EnaSrdSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnaSrdEnabled != nil {
		objectKey := object.Key("EnaSrdEnabled")
		objectKey.Boolean(*v.EnaSrdEnabled)
	}

	if v.EnaSrdUdpSpecification != nil {
		objectKey := object.Key("EnaSrdUdpSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdUdpSpecification(v.EnaSrdUdpSpecification, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v *types.EnaSrdSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnaSrdEnabled != nil {
		objectKey := object.Key("EnaSrdEnabled")
		objectKey.Boolean(*v.EnaSrdEnabled)
	}

	if v.EnaSrdUdpSpecification != nil {
		objectKey := object.Key("EnaSrdUdpSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdUdpSpecificationRequest(v.EnaSrdUdpSpecification, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentEnaSrdUdpSpecification(v *types.EnaSrdUdpSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnaSrdUdpEnabled != nil {
		objectKey := object.Key("EnaSrdUdpEnabled")
		objectKey.Boolean(*v.EnaSrdUdpEnabled)
	}

	return nil
}

func awsEc2query_serializeDocumentEnaSrdUdpSpecificationRequest(v *types.EnaSrdUdpSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnaSrdUdpEnabled != nil {
		objectKey := object.Key("EnaSrdUdpEnabled")
		objectKey.Boolean(*v.EnaSrdUdpEnabled)
	}

	return nil
}

func awsEc2query_serializeDocumentEnclaveOptionsRequest(v *types.EnclaveOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentExcludedInstanceTypeSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentExecutableByStringList(v []string, value query.Value) error {
	array := value.Array("ExecutableBy")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentExportImageTaskIdList(v []string, value query.Value) error {
	array := value.Array("ExportImageTaskId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentExportTaskIdStringList(v []string, value query.Value) error {
	array := value.Array("ExportTaskId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentExportTaskS3LocationRequest(v *types.ExportTaskS3LocationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.S3Bucket != nil {
		objectKey := object.Key("S3Bucket")
		objectKey.String(*v.S3Bucket)
	}

	if v.S3Prefix != nil {
		objectKey := object.Key("S3Prefix")
		objectKey.String(*v.S3Prefix)
	}

	return nil
}

func awsEc2query_serializeDocumentExportToS3TaskSpecification(v *types.ExportToS3TaskSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ContainerFormat) > 0 {
		objectKey := object.Key("ContainerFormat")
		objectKey.String(string(v.ContainerFormat))
	}

	if len(v.DiskImageFormat) > 0 {
		objectKey := object.Key("DiskImageFormat")
		objectKey.String(string(v.DiskImageFormat))
	}

	if v.S3Bucket != nil {
		objectKey := object.Key("S3Bucket")
		objectKey.String(*v.S3Bucket)
	}

	if v.S3Prefix != nil {
		objectKey := object.Key("S3Prefix")
		objectKey.String(*v.S3Prefix)
	}

	return nil
}

func awsEc2query_serializeDocumentFastLaunchImageIdList(v []string, value query.Value) error {
	array := value.Array("ImageId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentFastLaunchLaunchTemplateSpecificationRequest(v *types.FastLaunchLaunchTemplateSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.Version != nil {
		objectKey := object.Key("Version")
		objectKey.String(*v.Version)
	}

	return nil
}

func awsEc2query_serializeDocumentFastLaunchSnapshotConfigurationRequest(v *types.FastLaunchSnapshotConfigurationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.TargetResourceCount != nil {
		objectKey := object.Key("TargetResourceCount")
		objectKey.Integer(*v.TargetResourceCount)
	}

	return nil
}

func awsEc2query_serializeDocumentFederatedAuthenticationRequest(v *types.FederatedAuthenticationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.SAMLProviderArn != nil {
		objectKey := object.Key("SAMLProviderArn")
		objectKey.String(*v.SAMLProviderArn)
	}

	if v.SelfServiceSAMLProviderArn != nil {
		objectKey := object.Key("SelfServiceSAMLProviderArn")
		objectKey.String(*v.SelfServiceSAMLProviderArn)
	}

	return nil
}

func awsEc2query_serializeDocumentFilter(v *types.Filter, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.Values != nil {
		objectKey := object.FlatKey("Value")
		if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentFilterList(v []types.Filter, value query.Value) error {
	array := value.Array("Filter")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentFilter(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentFleetIdSet(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v []types.FleetLaunchTemplateConfigRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(v *types.FleetLaunchTemplateConfigRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateSpecification != nil {
		objectKey := object.Key("LaunchTemplateSpecification")
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v.LaunchTemplateSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Overrides != nil {
		objectKey := object.FlatKey("Overrides")
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v.Overrides, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v []types.FleetLaunchTemplateOverridesRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(v *types.FleetLaunchTemplateOverridesRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.MaxPrice != nil {
		objectKey := object.Key("MaxPrice")
		objectKey.String(*v.MaxPrice)
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.Priority != nil {
		objectKey := object.Key("Priority")
		switch {
		case math.IsNaN(*v.Priority):
			objectKey.String("NaN")

		case math.IsInf(*v.Priority, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Priority, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Priority)

		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.WeightedCapacity != nil {
		objectKey := object.Key("WeightedCapacity")
		switch {
		case math.IsNaN(*v.WeightedCapacity):
			objectKey.String("NaN")

		case math.IsInf(*v.WeightedCapacity, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.WeightedCapacity, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.WeightedCapacity)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v *types.FleetLaunchTemplateSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.Version != nil {
		objectKey := object.Key("Version")
		objectKey.String(*v.Version)
	}

	return nil
}

func awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v *types.FleetLaunchTemplateSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.Version != nil {
		objectKey := object.Key("Version")
		objectKey.String(*v.Version)
	}

	return nil
}

func awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v *types.FleetSpotCapacityRebalanceRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ReplacementStrategy) > 0 {
		objectKey := object.Key("ReplacementStrategy")
		objectKey.String(string(v.ReplacementStrategy))
	}

	if v.TerminationDelay != nil {
		objectKey := object.Key("TerminationDelay")
		objectKey.Integer(*v.TerminationDelay)
	}

	return nil
}

func awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v *types.FleetSpotMaintenanceStrategiesRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityRebalance != nil {
		objectKey := object.Key("CapacityRebalance")
		if err := awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v.CapacityRebalance, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentFlowLogIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentFlowLogResourceIds(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentFpgaImageIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentGroupIdentifier(v *types.GroupIdentifier, value query.Value) error {
	object := value.Object()
	_ = object

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	return nil
}

func awsEc2query_serializeDocumentGroupIdentifierList(v []types.GroupIdentifier, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentGroupIdentifier(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentGroupIds(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentGroupIdStringList(v []string, value query.Value) error {
	array := value.Array("GroupId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentGroupNameStringList(v []string, value query.Value) error {
	array := value.Array("GroupName")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentHibernationOptionsRequest(v *types.HibernationOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Configured != nil {
		objectKey := object.Key("Configured")
		objectKey.Boolean(*v.Configured)
	}

	return nil
}

func awsEc2query_serializeDocumentHostReservationIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIamInstanceProfileSpecification(v *types.IamInstanceProfileSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	return nil
}

func awsEc2query_serializeDocumentIcmpTypeCode(v *types.IcmpTypeCode, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Code != nil {
		objectKey := object.Key("Code")
		objectKey.Integer(*v.Code)
	}

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.Integer(*v.Type)
	}

	return nil
}

func awsEc2query_serializeDocumentIKEVersionsRequestList(v []types.IKEVersionsRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIKEVersionsRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentIKEVersionsRequestListValue(v *types.IKEVersionsRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentImageDiskContainer(v *types.ImageDiskContainer, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DeviceName != nil {
		objectKey := object.Key("DeviceName")
		objectKey.String(*v.DeviceName)
	}

	if v.Format != nil {
		objectKey := object.Key("Format")
		objectKey.String(*v.Format)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.Url != nil {
		objectKey := object.Key("Url")
		objectKey.String(*v.Url)
	}

	if v.UserBucket != nil {
		objectKey := object.Key("UserBucket")
		if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentImageDiskContainerList(v []types.ImageDiskContainer, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentImageDiskContainer(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentImageIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentImageIdStringList(v []string, value query.Value) error {
	array := value.Array("ImageId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(v *types.ImportImageLicenseConfigurationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LicenseConfigurationArn != nil {
		objectKey := object.Key("LicenseConfigurationArn")
		objectKey.String(*v.LicenseConfigurationArn)
	}

	return nil
}

func awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v []types.ImportImageLicenseConfigurationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v *types.ImportInstanceLaunchSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AdditionalInfo != nil {
		objectKey := object.Key("AdditionalInfo")
		objectKey.String(*v.AdditionalInfo)
	}

	if len(v.Architecture) > 0 {
		objectKey := object.Key("Architecture")
		objectKey.String(string(v.Architecture))
	}

	if v.GroupIds != nil {
		objectKey := object.FlatKey("GroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.GroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.GroupNames != nil {
		objectKey := object.FlatKey("GroupName")
		if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.GroupNames, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceInitiatedShutdownBehavior) > 0 {
		objectKey := object.Key("InstanceInitiatedShutdownBehavior")
		objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		objectKey.Boolean(*v.Monitoring)
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		if err := awsEc2query_serializeDocumentUserData(v.UserData, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentImportSnapshotTaskIdList(v []string, value query.Value) error {
	array := value.Array("ImportTaskId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentImportTaskIdList(v []string, value query.Value) error {
	array := value.Array("ImportTaskId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInsideCidrBlocksStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(v *types.InstanceBlockDeviceMappingSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeviceName != nil {
		objectKey := object.Key("DeviceName")
		objectKey.String(*v.DeviceName)
	}

	if v.Ebs != nil {
		objectKey := object.Key("Ebs")
		if err := awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v.Ebs, objectKey); err != nil {
			return err
		}
	}

	if v.NoDevice != nil {
		objectKey := object.Key("NoDevice")
		objectKey.String(*v.NoDevice)
	}

	if v.VirtualName != nil {
		objectKey := object.Key("VirtualName")
		objectKey.String(*v.VirtualName)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v []types.InstanceBlockDeviceMappingSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v []types.InstanceCreditSpecificationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(v *types.InstanceCreditSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CpuCredits != nil {
		objectKey := object.Key("CpuCredits")
		objectKey.String(*v.CpuCredits)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v *types.InstanceEventWindowAssociationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DedicatedHostIds != nil {
		objectKey := object.FlatKey("DedicatedHostId")
		if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceTags != nil {
		objectKey := object.FlatKey("InstanceTag")
		if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v *types.InstanceEventWindowDisassociationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DedicatedHostIds != nil {
		objectKey := object.FlatKey("DedicatedHostId")
		if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceTags != nil {
		objectKey := object.FlatKey("InstanceTag")
		if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceEventWindowIdSet(v []string, value query.Value) error {
	array := value.Array("InstanceEventWindowId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(v *types.InstanceEventWindowTimeRangeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EndHour != nil {
		objectKey := object.Key("EndHour")
		objectKey.Integer(*v.EndHour)
	}

	if len(v.EndWeekDay) > 0 {
		objectKey := object.Key("EndWeekDay")
		objectKey.String(string(v.EndWeekDay))
	}

	if v.StartHour != nil {
		objectKey := object.Key("StartHour")
		objectKey.Integer(*v.StartHour)
	}

	if len(v.StartWeekDay) > 0 {
		objectKey := object.Key("StartWeekDay")
		objectKey.String(string(v.StartWeekDay))
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v []types.InstanceEventWindowTimeRangeRequest, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceGenerationSet(v []types.InstanceGeneration, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceIdStringList(v []string, value query.Value) error {
	array := value.Array("InstanceId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceIpv6Address(v *types.InstanceIpv6Address, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6Address != nil {
		objectKey := object.Key("Ipv6Address")
		objectKey.String(*v.Ipv6Address)
	}

	if v.IsPrimaryIpv6 != nil {
		objectKey := object.Key("IsPrimaryIpv6")
		objectKey.Boolean(*v.IsPrimaryIpv6)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceIpv6AddressList(v []types.InstanceIpv6Address, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceIpv6Address(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v []types.InstanceIpv6AddressRequest, value query.Value) error {
	array := value.Array("InstanceIpv6Address")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceIpv6AddressRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceIpv6AddressRequest(v *types.InstanceIpv6AddressRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6Address != nil {
		objectKey := object.Key("Ipv6Address")
		objectKey.String(*v.Ipv6Address)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceMaintenanceOptionsRequest(v *types.InstanceMaintenanceOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AutoRecovery) > 0 {
		objectKey := object.Key("AutoRecovery")
		objectKey.String(string(v.AutoRecovery))
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v *types.InstanceMarketOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.MarketType) > 0 {
		objectKey := object.Key("MarketType")
		objectKey.String(string(v.MarketType))
	}

	if v.SpotOptions != nil {
		objectKey := object.Key("SpotOptions")
		if err := awsEc2query_serializeDocumentSpotMarketOptions(v.SpotOptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v *types.InstanceMetadataOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.HttpEndpoint) > 0 {
		objectKey := object.Key("HttpEndpoint")
		objectKey.String(string(v.HttpEndpoint))
	}

	if len(v.HttpProtocolIpv6) > 0 {
		objectKey := object.Key("HttpProtocolIpv6")
		objectKey.String(string(v.HttpProtocolIpv6))
	}

	if v.HttpPutResponseHopLimit != nil {
		objectKey := object.Key("HttpPutResponseHopLimit")
		objectKey.Integer(*v.HttpPutResponseHopLimit)
	}

	if len(v.HttpTokens) > 0 {
		objectKey := object.Key("HttpTokens")
		objectKey.String(string(v.HttpTokens))
	}

	if len(v.InstanceMetadataTags) > 0 {
		objectKey := object.Key("InstanceMetadataTags")
		objectKey.String(string(v.InstanceMetadataTags))
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(v *types.InstanceNetworkInterfaceSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociateCarrierIpAddress != nil {
		objectKey := object.Key("AssociateCarrierIpAddress")
		objectKey.Boolean(*v.AssociateCarrierIpAddress)
	}

	if v.AssociatePublicIpAddress != nil {
		objectKey := object.Key("AssociatePublicIpAddress")
		objectKey.Boolean(*v.AssociatePublicIpAddress)
	}

	if v.ConnectionTrackingSpecification != nil {
		objectKey := object.Key("ConnectionTrackingSpecification")
		if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DeviceIndex != nil {
		objectKey := object.Key("DeviceIndex")
		objectKey.Integer(*v.DeviceIndex)
	}

	if v.EnaSrdSpecification != nil {
		objectKey := object.Key("EnaSrdSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v.EnaSrdSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.InterfaceType != nil {
		objectKey := object.Key("InterfaceType")
		objectKey.String(*v.InterfaceType)
	}

	if v.Ipv4PrefixCount != nil {
		objectKey := object.Key("Ipv4PrefixCount")
		objectKey.Integer(*v.Ipv4PrefixCount)
	}

	if v.Ipv4Prefixes != nil {
		objectKey := object.FlatKey("Ipv4Prefix")
		if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Addresses")
		if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6PrefixCount != nil {
		objectKey := object.Key("Ipv6PrefixCount")
		objectKey.Integer(*v.Ipv6PrefixCount)
	}

	if v.Ipv6Prefixes != nil {
		objectKey := object.FlatKey("Ipv6Prefix")
		if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkCardIndex != nil {
		objectKey := object.Key("NetworkCardIndex")
		objectKey.Integer(*v.NetworkCardIndex)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrimaryIpv6 != nil {
		objectKey := object.Key("PrimaryIpv6")
		objectKey.Boolean(*v.PrimaryIpv6)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddresses")
		if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v []types.InstanceNetworkInterfaceSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceRequirements(v *types.InstanceRequirements, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AcceleratorCount != nil {
		objectKey := object.Key("AcceleratorCount")
		if err := awsEc2query_serializeDocumentAcceleratorCount(v.AcceleratorCount, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorManufacturers != nil {
		objectKey := object.FlatKey("AcceleratorManufacturerSet")
		if err := awsEc2query_serializeDocumentAcceleratorManufacturerSet(v.AcceleratorManufacturers, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorNames != nil {
		objectKey := object.FlatKey("AcceleratorNameSet")
		if err := awsEc2query_serializeDocumentAcceleratorNameSet(v.AcceleratorNames, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorTotalMemoryMiB != nil {
		objectKey := object.Key("AcceleratorTotalMemoryMiB")
		if err := awsEc2query_serializeDocumentAcceleratorTotalMemoryMiB(v.AcceleratorTotalMemoryMiB, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorTypes != nil {
		objectKey := object.FlatKey("AcceleratorTypeSet")
		if err := awsEc2query_serializeDocumentAcceleratorTypeSet(v.AcceleratorTypes, objectKey); err != nil {
			return err
		}
	}

	if v.AllowedInstanceTypes != nil {
		objectKey := object.FlatKey("AllowedInstanceTypeSet")
		if err := awsEc2query_serializeDocumentAllowedInstanceTypeSet(v.AllowedInstanceTypes, objectKey); err != nil {
			return err
		}
	}

	if len(v.BareMetal) > 0 {
		objectKey := object.Key("BareMetal")
		objectKey.String(string(v.BareMetal))
	}

	if v.BaselineEbsBandwidthMbps != nil {
		objectKey := object.Key("BaselineEbsBandwidthMbps")
		if err := awsEc2query_serializeDocumentBaselineEbsBandwidthMbps(v.BaselineEbsBandwidthMbps, objectKey); err != nil {
			return err
		}
	}

	if len(v.BurstablePerformance) > 0 {
		objectKey := object.Key("BurstablePerformance")
		objectKey.String(string(v.BurstablePerformance))
	}

	if v.CpuManufacturers != nil {
		objectKey := object.FlatKey("CpuManufacturerSet")
		if err := awsEc2query_serializeDocumentCpuManufacturerSet(v.CpuManufacturers, objectKey); err != nil {
			return err
		}
	}

	if v.ExcludedInstanceTypes != nil {
		objectKey := object.FlatKey("ExcludedInstanceTypeSet")
		if err := awsEc2query_serializeDocumentExcludedInstanceTypeSet(v.ExcludedInstanceTypes, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceGenerations != nil {
		objectKey := object.FlatKey("InstanceGenerationSet")
		if err := awsEc2query_serializeDocumentInstanceGenerationSet(v.InstanceGenerations, objectKey); err != nil {
			return err
		}
	}

	if len(v.LocalStorage) > 0 {
		objectKey := object.Key("LocalStorage")
		objectKey.String(string(v.LocalStorage))
	}

	if v.LocalStorageTypes != nil {
		objectKey := object.FlatKey("LocalStorageTypeSet")
		if err := awsEc2query_serializeDocumentLocalStorageTypeSet(v.LocalStorageTypes, objectKey); err != nil {
			return err
		}
	}

	if v.MemoryGiBPerVCpu != nil {
		objectKey := object.Key("MemoryGiBPerVCpu")
		if err := awsEc2query_serializeDocumentMemoryGiBPerVCpu(v.MemoryGiBPerVCpu, objectKey); err != nil {
			return err
		}
	}

	if v.MemoryMiB != nil {
		objectKey := object.Key("MemoryMiB")
		if err := awsEc2query_serializeDocumentMemoryMiB(v.MemoryMiB, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkBandwidthGbps != nil {
		objectKey := object.Key("NetworkBandwidthGbps")
		if err := awsEc2query_serializeDocumentNetworkBandwidthGbps(v.NetworkBandwidthGbps, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceCount != nil {
		objectKey := object.Key("NetworkInterfaceCount")
		if err := awsEc2query_serializeDocumentNetworkInterfaceCount(v.NetworkInterfaceCount, objectKey); err != nil {
			return err
		}
	}

	if v.OnDemandMaxPricePercentageOverLowestPrice != nil {
		objectKey := object.Key("OnDemandMaxPricePercentageOverLowestPrice")
		objectKey.Integer(*v.OnDemandMaxPricePercentageOverLowestPrice)
	}

	if v.RequireHibernateSupport != nil {
		objectKey := object.Key("RequireHibernateSupport")
		objectKey.Boolean(*v.RequireHibernateSupport)
	}

	if v.SpotMaxPricePercentageOverLowestPrice != nil {
		objectKey := object.Key("SpotMaxPricePercentageOverLowestPrice")
		objectKey.Integer(*v.SpotMaxPricePercentageOverLowestPrice)
	}

	if v.TotalLocalStorageGB != nil {
		objectKey := object.Key("TotalLocalStorageGB")
		if err := awsEc2query_serializeDocumentTotalLocalStorageGB(v.TotalLocalStorageGB, objectKey); err != nil {
			return err
		}
	}

	if v.VCpuCount != nil {
		objectKey := object.Key("VCpuCount")
		if err := awsEc2query_serializeDocumentVCpuCountRange(v.VCpuCount, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceRequirementsRequest(v *types.InstanceRequirementsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AcceleratorCount != nil {
		objectKey := object.Key("AcceleratorCount")
		if err := awsEc2query_serializeDocumentAcceleratorCountRequest(v.AcceleratorCount, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorManufacturers != nil {
		objectKey := object.FlatKey("AcceleratorManufacturer")
		if err := awsEc2query_serializeDocumentAcceleratorManufacturerSet(v.AcceleratorManufacturers, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorNames != nil {
		objectKey := object.FlatKey("AcceleratorName")
		if err := awsEc2query_serializeDocumentAcceleratorNameSet(v.AcceleratorNames, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorTotalMemoryMiB != nil {
		objectKey := object.Key("AcceleratorTotalMemoryMiB")
		if err := awsEc2query_serializeDocumentAcceleratorTotalMemoryMiBRequest(v.AcceleratorTotalMemoryMiB, objectKey); err != nil {
			return err
		}
	}

	if v.AcceleratorTypes != nil {
		objectKey := object.FlatKey("AcceleratorType")
		if err := awsEc2query_serializeDocumentAcceleratorTypeSet(v.AcceleratorTypes, objectKey); err != nil {
			return err
		}
	}

	if v.AllowedInstanceTypes != nil {
		objectKey := object.FlatKey("AllowedInstanceType")
		if err := awsEc2query_serializeDocumentAllowedInstanceTypeSet(v.AllowedInstanceTypes, objectKey); err != nil {
			return err
		}
	}

	if len(v.BareMetal) > 0 {
		objectKey := object.Key("BareMetal")
		objectKey.String(string(v.BareMetal))
	}

	if v.BaselineEbsBandwidthMbps != nil {
		objectKey := object.Key("BaselineEbsBandwidthMbps")
		if err := awsEc2query_serializeDocumentBaselineEbsBandwidthMbpsRequest(v.BaselineEbsBandwidthMbps, objectKey); err != nil {
			return err
		}
	}

	if len(v.BurstablePerformance) > 0 {
		objectKey := object.Key("BurstablePerformance")
		objectKey.String(string(v.BurstablePerformance))
	}

	if v.CpuManufacturers != nil {
		objectKey := object.FlatKey("CpuManufacturer")
		if err := awsEc2query_serializeDocumentCpuManufacturerSet(v.CpuManufacturers, objectKey); err != nil {
			return err
		}
	}

	if v.ExcludedInstanceTypes != nil {
		objectKey := object.FlatKey("ExcludedInstanceType")
		if err := awsEc2query_serializeDocumentExcludedInstanceTypeSet(v.ExcludedInstanceTypes, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceGenerations != nil {
		objectKey := object.FlatKey("InstanceGeneration")
		if err := awsEc2query_serializeDocumentInstanceGenerationSet(v.InstanceGenerations, objectKey); err != nil {
			return err
		}
	}

	if len(v.LocalStorage) > 0 {
		objectKey := object.Key("LocalStorage")
		objectKey.String(string(v.LocalStorage))
	}

	if v.LocalStorageTypes != nil {
		objectKey := object.FlatKey("LocalStorageType")
		if err := awsEc2query_serializeDocumentLocalStorageTypeSet(v.LocalStorageTypes, objectKey); err != nil {
			return err
		}
	}

	if v.MemoryGiBPerVCpu != nil {
		objectKey := object.Key("MemoryGiBPerVCpu")
		if err := awsEc2query_serializeDocumentMemoryGiBPerVCpuRequest(v.MemoryGiBPerVCpu, objectKey); err != nil {
			return err
		}
	}

	if v.MemoryMiB != nil {
		objectKey := object.Key("MemoryMiB")
		if err := awsEc2query_serializeDocumentMemoryMiBRequest(v.MemoryMiB, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkBandwidthGbps != nil {
		objectKey := object.Key("NetworkBandwidthGbps")
		if err := awsEc2query_serializeDocumentNetworkBandwidthGbpsRequest(v.NetworkBandwidthGbps, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceCount != nil {
		objectKey := object.Key("NetworkInterfaceCount")
		if err := awsEc2query_serializeDocumentNetworkInterfaceCountRequest(v.NetworkInterfaceCount, objectKey); err != nil {
			return err
		}
	}

	if v.OnDemandMaxPricePercentageOverLowestPrice != nil {
		objectKey := object.Key("OnDemandMaxPricePercentageOverLowestPrice")
		objectKey.Integer(*v.OnDemandMaxPricePercentageOverLowestPrice)
	}

	if v.RequireHibernateSupport != nil {
		objectKey := object.Key("RequireHibernateSupport")
		objectKey.Boolean(*v.RequireHibernateSupport)
	}

	if v.SpotMaxPricePercentageOverLowestPrice != nil {
		objectKey := object.Key("SpotMaxPricePercentageOverLowestPrice")
		objectKey.Integer(*v.SpotMaxPricePercentageOverLowestPrice)
	}

	if v.TotalLocalStorageGB != nil {
		objectKey := object.Key("TotalLocalStorageGB")
		if err := awsEc2query_serializeDocumentTotalLocalStorageGBRequest(v.TotalLocalStorageGB, objectKey); err != nil {
			return err
		}
	}

	if v.VCpuCount != nil {
		objectKey := object.Key("VCpuCount")
		if err := awsEc2query_serializeDocumentVCpuCountRangeRequest(v.VCpuCount, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceRequirementsWithMetadataRequest(v *types.InstanceRequirementsWithMetadataRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ArchitectureTypes != nil {
		objectKey := object.FlatKey("ArchitectureType")
		if err := awsEc2query_serializeDocumentArchitectureTypeSet(v.ArchitectureTypes, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil {
			return err
		}
	}

	if v.VirtualizationTypes != nil {
		objectKey := object.FlatKey("VirtualizationType")
		if err := awsEc2query_serializeDocumentVirtualizationTypeSet(v.VirtualizationTypes, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceSpecification(v *types.InstanceSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ExcludeBootVolume != nil {
		objectKey := object.Key("ExcludeBootVolume")
		objectKey.Boolean(*v.ExcludeBootVolume)
	}

	if v.ExcludeDataVolumeIds != nil {
		objectKey := object.FlatKey("ExcludeDataVolumeId")
		if err := awsEc2query_serializeDocumentVolumeIdStringList(v.ExcludeDataVolumeIds, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeDocumentInstanceTagKeySet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceTypeList(v []types.InstanceType, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentInstanceTypes(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIntegrateServices(v *types.IntegrateServices, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AthenaIntegrations != nil {
		objectKey := object.FlatKey("AthenaIntegration")
		if err := awsEc2query_serializeDocumentAthenaIntegrationsSet(v.AthenaIntegrations, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentInternetGatewayIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpamCidrAuthorizationContext(v *types.IpamCidrAuthorizationContext, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Message != nil {
		objectKey := object.Key("Message")
		objectKey.String(*v.Message)
	}

	if v.Signature != nil {
		objectKey := object.Key("Signature")
		objectKey.String(*v.Signature)
	}

	return nil
}

func awsEc2query_serializeDocumentIpamPoolAllocationAllowedCidrs(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpamPoolAllocationDisallowedCidrs(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpamPoolSourceResourceRequest(v *types.IpamPoolSourceResourceRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ResourceId != nil {
		objectKey := object.Key("ResourceId")
		objectKey.String(*v.ResourceId)
	}

	if v.ResourceOwner != nil {
		objectKey := object.Key("ResourceOwner")
		objectKey.String(*v.ResourceOwner)
	}

	if v.ResourceRegion != nil {
		objectKey := object.Key("ResourceRegion")
		objectKey.String(*v.ResourceRegion)
	}

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	return nil
}

func awsEc2query_serializeDocumentIpList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpPermission(v *types.IpPermission, value query.Value) error {
	object := value.Object()
	_ = object

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.IpRanges != nil {
		objectKey := object.FlatKey("IpRanges")
		if err := awsEc2query_serializeDocumentIpRangeList(v.IpRanges, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6Ranges != nil {
		objectKey := object.FlatKey("Ipv6Ranges")
		if err := awsEc2query_serializeDocumentIpv6RangeList(v.Ipv6Ranges, objectKey); err != nil {
			return err
		}
	}

	if v.PrefixListIds != nil {
		objectKey := object.FlatKey("PrefixListIds")
		if err := awsEc2query_serializeDocumentPrefixListIdList(v.PrefixListIds, objectKey); err != nil {
			return err
		}
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	if v.UserIdGroupPairs != nil {
		objectKey := object.FlatKey("Groups")
		if err := awsEc2query_serializeDocumentUserIdGroupPairList(v.UserIdGroupPairs, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentIpPermissionList(v []types.IpPermission, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIpPermission(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentIpPrefixList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpRange(v *types.IpRange, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIp != nil {
		objectKey := object.Key("CidrIp")
		objectKey.String(*v.CidrIp)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	return nil
}

func awsEc2query_serializeDocumentIpRangeList(v []types.IpRange, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIpRange(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentIpv4PrefixList(v []types.Ipv4PrefixSpecificationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(v *types.Ipv4PrefixSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv4Prefix != nil {
		objectKey := object.Key("Ipv4Prefix")
		objectKey.String(*v.Ipv4Prefix)
	}

	return nil
}

func awsEc2query_serializeDocumentIpv6AddressList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpv6PoolIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentIpv6PrefixList(v []types.Ipv6PrefixSpecificationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(v *types.Ipv6PrefixSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6Prefix != nil {
		objectKey := object.Key("Ipv6Prefix")
		objectKey.String(*v.Ipv6Prefix)
	}

	return nil
}

func awsEc2query_serializeDocumentIpv6Range(v *types.Ipv6Range, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIpv6 != nil {
		objectKey := object.Key("CidrIpv6")
		objectKey.String(*v.CidrIpv6)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	return nil
}

func awsEc2query_serializeDocumentIpv6RangeList(v []types.Ipv6Range, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentIpv6Range(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentKeyNameStringList(v []string, value query.Value) error {
	array := value.Array("KeyName")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentKeyPairIdStringList(v []string, value query.Value) error {
	array := value.Array("KeyPairId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchPermission(v *types.LaunchPermission, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Group) > 0 {
		objectKey := object.Key("Group")
		objectKey.String(string(v.Group))
	}

	if v.OrganizationalUnitArn != nil {
		objectKey := object.Key("OrganizationalUnitArn")
		objectKey.String(*v.OrganizationalUnitArn)
	}

	if v.OrganizationArn != nil {
		objectKey := object.Key("OrganizationArn")
		objectKey.String(*v.OrganizationArn)
	}

	if v.UserId != nil {
		objectKey := object.Key("UserId")
		objectKey.String(*v.UserId)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchPermissionList(v []types.LaunchPermission, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchPermission(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchPermissionModifications(v *types.LaunchPermissionModifications, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Add != nil {
		objectKey := object.FlatKey("Add")
		if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Add, objectKey); err != nil {
			return err
		}
	}

	if v.Remove != nil {
		objectKey := object.FlatKey("Remove")
		if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Remove, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchSpecsList(v []types.SpotFleetLaunchSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentSpotFleetLaunchSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(v *types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeviceName != nil {
		objectKey := object.Key("DeviceName")
		objectKey.String(*v.DeviceName)
	}

	if v.Ebs != nil {
		objectKey := object.Key("Ebs")
		if err := awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v.Ebs, objectKey); err != nil {
			return err
		}
	}

	if v.NoDevice != nil {
		objectKey := object.Key("NoDevice")
		objectKey.String(*v.NoDevice)
	}

	if v.VirtualName != nil {
		objectKey := object.Key("VirtualName")
		objectKey.String(*v.VirtualName)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v []types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error {
	array := value.Array("BlockDeviceMapping")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v *types.LaunchTemplateCapacityReservationSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CapacityReservationPreference) > 0 {
		objectKey := object.Key("CapacityReservationPreference")
		objectKey.String(string(v.CapacityReservationPreference))
	}

	if v.CapacityReservationTarget != nil {
		objectKey := object.Key("CapacityReservationTarget")
		if err := awsEc2query_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateConfig(v *types.LaunchTemplateConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateSpecification != nil {
		objectKey := object.Key("LaunchTemplateSpecification")
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v.LaunchTemplateSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Overrides != nil {
		objectKey := object.FlatKey("Overrides")
		if err := awsEc2query_serializeDocumentLaunchTemplateOverridesList(v.Overrides, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateConfigList(v []types.LaunchTemplateConfig, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateConfig(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v *types.LaunchTemplateCpuOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AmdSevSnp) > 0 {
		objectKey := object.Key("AmdSevSnp")
		objectKey.String(string(v.AmdSevSnp))
	}

	if v.CoreCount != nil {
		objectKey := object.Key("CoreCount")
		objectKey.Integer(*v.CoreCount)
	}

	if v.ThreadsPerCore != nil {
		objectKey := object.Key("ThreadsPerCore")
		objectKey.Integer(*v.ThreadsPerCore)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v *types.LaunchTemplateEbsBlockDeviceRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.Iops != nil {
		objectKey := object.Key("Iops")
		objectKey.Integer(*v.Iops)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.Throughput != nil {
		objectKey := object.Key("Throughput")
		objectKey.Integer(*v.Throughput)
	}

	if v.VolumeSize != nil {
		objectKey := object.Key("VolumeSize")
		objectKey.Integer(*v.VolumeSize)
	}

	if len(v.VolumeType) > 0 {
		objectKey := object.Key("VolumeType")
		objectKey.String(string(v.VolumeType))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(v *types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Count != nil {
		objectKey := object.Key("Count")
		objectKey.Integer(*v.Count)
	}

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.String(*v.Type)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v []types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v *types.LaunchTemplateEnclaveOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v *types.LaunchTemplateHibernationOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Configured != nil {
		objectKey := object.Key("Configured")
		objectKey.Boolean(*v.Configured)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v *types.LaunchTemplateIamInstanceProfileSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateInstanceMaintenanceOptionsRequest(v *types.LaunchTemplateInstanceMaintenanceOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AutoRecovery) > 0 {
		objectKey := object.Key("AutoRecovery")
		objectKey.String(string(v.AutoRecovery))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v *types.LaunchTemplateInstanceMarketOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.MarketType) > 0 {
		objectKey := object.Key("MarketType")
		objectKey.String(string(v.MarketType))
	}

	if v.SpotOptions != nil {
		objectKey := object.Key("SpotOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v.SpotOptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v *types.LaunchTemplateInstanceMetadataOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.HttpEndpoint) > 0 {
		objectKey := object.Key("HttpEndpoint")
		objectKey.String(string(v.HttpEndpoint))
	}

	if len(v.HttpProtocolIpv6) > 0 {
		objectKey := object.Key("HttpProtocolIpv6")
		objectKey.String(string(v.HttpProtocolIpv6))
	}

	if v.HttpPutResponseHopLimit != nil {
		objectKey := object.Key("HttpPutResponseHopLimit")
		objectKey.Integer(*v.HttpPutResponseHopLimit)
	}

	if len(v.HttpTokens) > 0 {
		objectKey := object.Key("HttpTokens")
		objectKey.String(string(v.HttpTokens))
	}

	if len(v.InstanceMetadataTags) > 0 {
		objectKey := object.Key("InstanceMetadataTags")
		objectKey.String(string(v.InstanceMetadataTags))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(v *types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociateCarrierIpAddress != nil {
		objectKey := object.Key("AssociateCarrierIpAddress")
		objectKey.Boolean(*v.AssociateCarrierIpAddress)
	}

	if v.AssociatePublicIpAddress != nil {
		objectKey := object.Key("AssociatePublicIpAddress")
		objectKey.Boolean(*v.AssociatePublicIpAddress)
	}

	if v.ConnectionTrackingSpecification != nil {
		objectKey := object.Key("ConnectionTrackingSpecification")
		if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DeviceIndex != nil {
		objectKey := object.Key("DeviceIndex")
		objectKey.Integer(*v.DeviceIndex)
	}

	if v.EnaSrdSpecification != nil {
		objectKey := object.Key("EnaSrdSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v.EnaSrdSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.InterfaceType != nil {
		objectKey := object.Key("InterfaceType")
		objectKey.String(*v.InterfaceType)
	}

	if v.Ipv4PrefixCount != nil {
		objectKey := object.Key("Ipv4PrefixCount")
		objectKey.Integer(*v.Ipv4PrefixCount)
	}

	if v.Ipv4Prefixes != nil {
		objectKey := object.FlatKey("Ipv4Prefix")
		if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Addresses")
		if err := awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6PrefixCount != nil {
		objectKey := object.Key("Ipv6PrefixCount")
		objectKey.Integer(*v.Ipv6PrefixCount)
	}

	if v.Ipv6Prefixes != nil {
		objectKey := object.FlatKey("Ipv6Prefix")
		if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkCardIndex != nil {
		objectKey := object.Key("NetworkCardIndex")
		objectKey.Integer(*v.NetworkCardIndex)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrimaryIpv6 != nil {
		objectKey := object.Key("PrimaryIpv6")
		objectKey.Boolean(*v.PrimaryIpv6)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddresses")
		if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v []types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error {
	array := value.Array("InstanceNetworkInterfaceSpecification")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(v *types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LicenseConfigurationArn != nil {
		objectKey := object.Key("LicenseConfigurationArn")
		objectKey.String(*v.LicenseConfigurationArn)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v []types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateNameStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateOverrides(v *types.LaunchTemplateOverrides, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirements(v.InstanceRequirements, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.Priority != nil {
		objectKey := object.Key("Priority")
		switch {
		case math.IsNaN(*v.Priority):
			objectKey.String("NaN")

		case math.IsInf(*v.Priority, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Priority, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Priority)

		}
	}

	if v.SpotPrice != nil {
		objectKey := object.Key("SpotPrice")
		objectKey.String(*v.SpotPrice)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.WeightedCapacity != nil {
		objectKey := object.Key("WeightedCapacity")
		switch {
		case math.IsNaN(*v.WeightedCapacity):
			objectKey.String("NaN")

		case math.IsInf(*v.WeightedCapacity, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.WeightedCapacity, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.WeightedCapacity)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateOverridesList(v []types.LaunchTemplateOverrides, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateOverrides(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v *types.LaunchTemplatePlacementRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Affinity != nil {
		objectKey := object.Key("Affinity")
		objectKey.String(*v.Affinity)
	}

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.HostId != nil {
		objectKey := object.Key("HostId")
		objectKey.String(*v.HostId)
	}

	if v.HostResourceGroupArn != nil {
		objectKey := object.Key("HostResourceGroupArn")
		objectKey.String(*v.HostResourceGroupArn)
	}

	if v.PartitionNumber != nil {
		objectKey := object.Key("PartitionNumber")
		objectKey.Integer(*v.PartitionNumber)
	}

	if v.SpreadDomain != nil {
		objectKey := object.Key("SpreadDomain")
		objectKey.String(*v.SpreadDomain)
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v *types.LaunchTemplatePrivateDnsNameOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnableResourceNameDnsAAAARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsAAAARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord)
	}

	if v.EnableResourceNameDnsARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsARecord)
	}

	if len(v.HostnameType) > 0 {
		objectKey := object.Key("HostnameType")
		objectKey.String(string(v.HostnameType))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v *types.LaunchTemplatesMonitoringRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateSpecification(v *types.LaunchTemplateSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.Version != nil {
		objectKey := object.Key("Version")
		objectKey.String(*v.Version)
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v *types.LaunchTemplateSpotMarketOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BlockDurationMinutes != nil {
		objectKey := object.Key("BlockDurationMinutes")
		objectKey.Integer(*v.BlockDurationMinutes)
	}

	if len(v.InstanceInterruptionBehavior) > 0 {
		objectKey := object.Key("InstanceInterruptionBehavior")
		objectKey.String(string(v.InstanceInterruptionBehavior))
	}

	if v.MaxPrice != nil {
		objectKey := object.Key("MaxPrice")
		objectKey.String(*v.MaxPrice)
	}

	if len(v.SpotInstanceType) > 0 {
		objectKey := object.Key("SpotInstanceType")
		objectKey.String(string(v.SpotInstanceType))
	}

	if v.ValidUntil != nil {
		objectKey := object.Key("ValidUntil")
		objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(v *types.LaunchTemplateTagSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	if v.Tags != nil {
		objectKey := object.FlatKey("Tag")
		if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v []types.LaunchTemplateTagSpecificationRequest, value query.Value) error {
	array := value.Array("LaunchTemplateTagSpecificationRequest")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLicenseConfigurationRequest(v *types.LicenseConfigurationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LicenseConfigurationArn != nil {
		objectKey := object.Key("LicenseConfigurationArn")
		objectKey.String(*v.LicenseConfigurationArn)
	}

	return nil
}

func awsEc2query_serializeDocumentLicenseSpecificationListRequest(v []types.LicenseConfigurationRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLicenseConfigurationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLoadBalancersConfig(v *types.LoadBalancersConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClassicLoadBalancersConfig != nil {
		objectKey := object.Key("ClassicLoadBalancersConfig")
		if err := awsEc2query_serializeDocumentClassicLoadBalancersConfig(v.ClassicLoadBalancersConfig, objectKey); err != nil {
			return err
		}
	}

	if v.TargetGroupsConfig != nil {
		objectKey := object.Key("TargetGroupsConfig")
		if err := awsEc2query_serializeDocumentTargetGroupsConfig(v.TargetGroupsConfig, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLoadPermissionListRequest(v []types.LoadPermissionRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentLoadPermissionRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentLoadPermissionModifications(v *types.LoadPermissionModifications, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Add != nil {
		objectKey := object.FlatKey("Add")
		if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Add, objectKey); err != nil {
			return err
		}
	}

	if v.Remove != nil {
		objectKey := object.FlatKey("Remove")
		if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Remove, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentLoadPermissionRequest(v *types.LoadPermissionRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Group) > 0 {
		objectKey := object.Key("Group")
		objectKey.String(string(v.Group))
	}

	if v.UserId != nil {
		objectKey := object.Key("UserId")
		objectKey.String(*v.UserId)
	}

	return nil
}

func awsEc2query_serializeDocumentLocalGatewayIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentLocalStorageTypeSet(v []types.LocalStorageType, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentMemoryGiBPerVCpu(v *types.MemoryGiBPerVCpu, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentMemoryGiBPerVCpuRequest(v *types.MemoryGiBPerVCpuRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentMemoryMiB(v *types.MemoryMiB, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentMemoryMiBRequest(v *types.MemoryMiBRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentModifyTransitGatewayOptions(v *types.ModifyTransitGatewayOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddTransitGatewayCidrBlocks != nil {
		objectKey := object.FlatKey("AddTransitGatewayCidrBlocks")
		if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.AddTransitGatewayCidrBlocks, objectKey); err != nil {
			return err
		}
	}

	if v.AmazonSideAsn != nil {
		objectKey := object.Key("AmazonSideAsn")
		objectKey.Long(*v.AmazonSideAsn)
	}

	if v.AssociationDefaultRouteTableId != nil {
		objectKey := object.Key("AssociationDefaultRouteTableId")
		objectKey.String(*v.AssociationDefaultRouteTableId)
	}

	if len(v.AutoAcceptSharedAttachments) > 0 {
		objectKey := object.Key("AutoAcceptSharedAttachments")
		objectKey.String(string(v.AutoAcceptSharedAttachments))
	}

	if len(v.DefaultRouteTableAssociation) > 0 {
		objectKey := object.Key("DefaultRouteTableAssociation")
		objectKey.String(string(v.DefaultRouteTableAssociation))
	}

	if len(v.DefaultRouteTablePropagation) > 0 {
		objectKey := object.Key("DefaultRouteTablePropagation")
		objectKey.String(string(v.DefaultRouteTablePropagation))
	}

	if len(v.DnsSupport) > 0 {
		objectKey := object.Key("DnsSupport")
		objectKey.String(string(v.DnsSupport))
	}

	if v.PropagationDefaultRouteTableId != nil {
		objectKey := object.Key("PropagationDefaultRouteTableId")
		objectKey.String(*v.PropagationDefaultRouteTableId)
	}

	if v.RemoveTransitGatewayCidrBlocks != nil {
		objectKey := object.FlatKey("RemoveTransitGatewayCidrBlocks")
		if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.RemoveTransitGatewayCidrBlocks, objectKey); err != nil {
			return err
		}
	}

	if len(v.SecurityGroupReferencingSupport) > 0 {
		objectKey := object.Key("SecurityGroupReferencingSupport")
		objectKey.String(string(v.SecurityGroupReferencingSupport))
	}

	if len(v.VpnEcmpSupport) > 0 {
		objectKey := object.Key("VpnEcmpSupport")
		objectKey.String(string(v.VpnEcmpSupport))
	}

	return nil
}

func awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v *types.ModifyTransitGatewayVpcAttachmentRequestOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ApplianceModeSupport) > 0 {
		objectKey := object.Key("ApplianceModeSupport")
		objectKey.String(string(v.ApplianceModeSupport))
	}

	if len(v.DnsSupport) > 0 {
		objectKey := object.Key("DnsSupport")
		objectKey.String(string(v.DnsSupport))
	}

	if len(v.Ipv6Support) > 0 {
		objectKey := object.Key("Ipv6Support")
		objectKey.String(string(v.Ipv6Support))
	}

	if len(v.SecurityGroupReferencingSupport) > 0 {
		objectKey := object.Key("SecurityGroupReferencingSupport")
		objectKey.String(string(v.SecurityGroupReferencingSupport))
	}

	return nil
}

func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointEniOptions(v *types.ModifyVerifiedAccessEndpointEniOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Port != nil {
		objectKey := object.Key("Port")
		objectKey.Integer(*v.Port)
	}

	if len(v.Protocol) > 0 {
		objectKey := object.Key("Protocol")
		objectKey.String(string(v.Protocol))
	}

	return nil
}

func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointLoadBalancerOptions(v *types.ModifyVerifiedAccessEndpointLoadBalancerOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Port != nil {
		objectKey := object.Key("Port")
		objectKey.Integer(*v.Port)
	}

	if len(v.Protocol) > 0 {
		objectKey := object.Key("Protocol")
		objectKey.String(string(v.Protocol))
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetId")
		if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointSubnetIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderDeviceOptions(v *types.ModifyVerifiedAccessTrustProviderDeviceOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PublicSigningKeyUrl != nil {
		objectKey := object.Key("PublicSigningKeyUrl")
		objectKey.String(*v.PublicSigningKeyUrl)
	}

	return nil
}

func awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderOidcOptions(v *types.ModifyVerifiedAccessTrustProviderOidcOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AuthorizationEndpoint != nil {
		objectKey := object.Key("AuthorizationEndpoint")
		objectKey.String(*v.AuthorizationEndpoint)
	}

	if v.ClientId != nil {
		objectKey := object.Key("ClientId")
		objectKey.String(*v.ClientId)
	}

	if v.ClientSecret != nil {
		objectKey := object.Key("ClientSecret")
		objectKey.String(*v.ClientSecret)
	}

	if v.Issuer != nil {
		objectKey := object.Key("Issuer")
		objectKey.String(*v.Issuer)
	}

	if v.Scope != nil {
		objectKey := object.Key("Scope")
		objectKey.String(*v.Scope)
	}

	if v.TokenEndpoint != nil {
		objectKey := object.Key("TokenEndpoint")
		objectKey.String(*v.TokenEndpoint)
	}

	if v.UserInfoEndpoint != nil {
		objectKey := object.Key("UserInfoEndpoint")
		objectKey.String(*v.UserInfoEndpoint)
	}

	return nil
}

func awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v *types.ModifyVpnTunnelOptionsSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DPDTimeoutAction != nil {
		objectKey := object.Key("DPDTimeoutAction")
		objectKey.String(*v.DPDTimeoutAction)
	}

	if v.DPDTimeoutSeconds != nil {
		objectKey := object.Key("DPDTimeoutSeconds")
		objectKey.Integer(*v.DPDTimeoutSeconds)
	}

	if v.EnableTunnelLifecycleControl != nil {
		objectKey := object.Key("EnableTunnelLifecycleControl")
		objectKey.Boolean(*v.EnableTunnelLifecycleControl)
	}

	if v.IKEVersions != nil {
		objectKey := object.FlatKey("IKEVersion")
		if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil {
			return err
		}
	}

	if v.LogOptions != nil {
		objectKey := object.Key("LogOptions")
		if err := awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v.LogOptions, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1DHGroupNumbers != nil {
		objectKey := object.FlatKey("Phase1DHGroupNumber")
		if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1EncryptionAlgorithms != nil {
		objectKey := object.FlatKey("Phase1EncryptionAlgorithm")
		if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1IntegrityAlgorithms != nil {
		objectKey := object.FlatKey("Phase1IntegrityAlgorithm")
		if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1LifetimeSeconds != nil {
		objectKey := object.Key("Phase1LifetimeSeconds")
		objectKey.Integer(*v.Phase1LifetimeSeconds)
	}

	if v.Phase2DHGroupNumbers != nil {
		objectKey := object.FlatKey("Phase2DHGroupNumber")
		if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2EncryptionAlgorithms != nil {
		objectKey := object.FlatKey("Phase2EncryptionAlgorithm")
		if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2IntegrityAlgorithms != nil {
		objectKey := object.FlatKey("Phase2IntegrityAlgorithm")
		if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2LifetimeSeconds != nil {
		objectKey := object.Key("Phase2LifetimeSeconds")
		objectKey.Integer(*v.Phase2LifetimeSeconds)
	}

	if v.PreSharedKey != nil {
		objectKey := object.Key("PreSharedKey")
		objectKey.String(*v.PreSharedKey)
	}

	if v.RekeyFuzzPercentage != nil {
		objectKey := object.Key("RekeyFuzzPercentage")
		objectKey.Integer(*v.RekeyFuzzPercentage)
	}

	if v.RekeyMarginTimeSeconds != nil {
		objectKey := object.Key("RekeyMarginTimeSeconds")
		objectKey.Integer(*v.RekeyMarginTimeSeconds)
	}

	if v.ReplayWindowSize != nil {
		objectKey := object.Key("ReplayWindowSize")
		objectKey.Integer(*v.ReplayWindowSize)
	}

	if v.StartupAction != nil {
		objectKey := object.Key("StartupAction")
		objectKey.String(*v.StartupAction)
	}

	if v.TunnelInsideCidr != nil {
		objectKey := object.Key("TunnelInsideCidr")
		objectKey.String(*v.TunnelInsideCidr)
	}

	if v.TunnelInsideIpv6Cidr != nil {
		objectKey := object.Key("TunnelInsideIpv6Cidr")
		objectKey.String(*v.TunnelInsideIpv6Cidr)
	}

	return nil
}

func awsEc2query_serializeDocumentNatGatewayIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkAclIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkBandwidthGbps(v *types.NetworkBandwidthGbps, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentNetworkBandwidthGbpsRequest(v *types.NetworkBandwidthGbpsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentNetworkInsightsAccessScopeAnalysisIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkInsightsAccessScopeIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkInsightsPathIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v *types.NetworkInterfaceAttachmentChanges, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AttachmentId != nil {
		objectKey := object.Key("AttachmentId")
		objectKey.String(*v.AttachmentId)
	}

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	return nil
}

func awsEc2query_serializeDocumentNetworkInterfaceCount(v *types.NetworkInterfaceCount, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentNetworkInterfaceCountRequest(v *types.NetworkInterfaceCountRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentNetworkInterfaceIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentNewDhcpConfiguration(v *types.NewDhcpConfiguration, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Key != nil {
		objectKey := object.Key("Key")
		objectKey.String(*v.Key)
	}

	if v.Values != nil {
		objectKey := object.FlatKey("Value")
		if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentNewDhcpConfigurationList(v []types.NewDhcpConfiguration, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentNewDhcpConfiguration(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentOccurrenceDayRequestSet(v []int32, value query.Value) error {
	array := value.Array("OccurenceDay")

	for i := range v {
		av := array.Value()
		av.Integer(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentOnDemandOptionsRequest(v *types.OnDemandOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AllocationStrategy) > 0 {
		objectKey := object.Key("AllocationStrategy")
		objectKey.String(string(v.AllocationStrategy))
	}

	if v.CapacityReservationOptions != nil {
		objectKey := object.Key("CapacityReservationOptions")
		if err := awsEc2query_serializeDocumentCapacityReservationOptionsRequest(v.CapacityReservationOptions, objectKey); err != nil {
			return err
		}
	}

	if v.MaxTotalPrice != nil {
		objectKey := object.Key("MaxTotalPrice")
		objectKey.String(*v.MaxTotalPrice)
	}

	if v.MinTargetCapacity != nil {
		objectKey := object.Key("MinTargetCapacity")
		objectKey.Integer(*v.MinTargetCapacity)
	}

	if v.SingleAvailabilityZone != nil {
		objectKey := object.Key("SingleAvailabilityZone")
		objectKey.Boolean(*v.SingleAvailabilityZone)
	}

	if v.SingleInstanceType != nil {
		objectKey := object.Key("SingleInstanceType")
		objectKey.Boolean(*v.SingleInstanceType)
	}

	return nil
}

func awsEc2query_serializeDocumentOrganizationalUnitArnStringList(v []string, value query.Value) error {
	array := value.Array("OrganizationalUnitArn")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentOrganizationArnStringList(v []string, value query.Value) error {
	array := value.Array("OrganizationArn")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentOwnerStringList(v []string, value query.Value) error {
	array := value.Array("Owner")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPacketHeaderStatementRequest(v *types.PacketHeaderStatementRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationAddresses != nil {
		objectKey := object.FlatKey("DestinationAddress")
		if err := awsEc2query_serializeDocumentValueStringList(v.DestinationAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.DestinationPorts != nil {
		objectKey := object.FlatKey("DestinationPort")
		if err := awsEc2query_serializeDocumentValueStringList(v.DestinationPorts, objectKey); err != nil {
			return err
		}
	}

	if v.DestinationPrefixLists != nil {
		objectKey := object.FlatKey("DestinationPrefixList")
		if err := awsEc2query_serializeDocumentValueStringList(v.DestinationPrefixLists, objectKey); err != nil {
			return err
		}
	}

	if v.Protocols != nil {
		objectKey := object.FlatKey("Protocol")
		if err := awsEc2query_serializeDocumentProtocolList(v.Protocols, objectKey); err != nil {
			return err
		}
	}

	if v.SourceAddresses != nil {
		objectKey := object.FlatKey("SourceAddress")
		if err := awsEc2query_serializeDocumentValueStringList(v.SourceAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SourcePorts != nil {
		objectKey := object.FlatKey("SourcePort")
		if err := awsEc2query_serializeDocumentValueStringList(v.SourcePorts, objectKey); err != nil {
			return err
		}
	}

	if v.SourcePrefixLists != nil {
		objectKey := object.FlatKey("SourcePrefixList")
		if err := awsEc2query_serializeDocumentValueStringList(v.SourcePrefixLists, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentPathRequestFilter(v *types.PathRequestFilter, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationAddress != nil {
		objectKey := object.Key("DestinationAddress")
		objectKey.String(*v.DestinationAddress)
	}

	if v.DestinationPortRange != nil {
		objectKey := object.Key("DestinationPortRange")
		if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.DestinationPortRange, objectKey); err != nil {
			return err
		}
	}

	if v.SourceAddress != nil {
		objectKey := object.Key("SourceAddress")
		objectKey.String(*v.SourceAddress)
	}

	if v.SourcePortRange != nil {
		objectKey := object.Key("SourcePortRange")
		if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.SourcePortRange, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentPathStatementRequest(v *types.PathStatementRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PacketHeaderStatement != nil {
		objectKey := object.Key("PacketHeaderStatement")
		if err := awsEc2query_serializeDocumentPacketHeaderStatementRequest(v.PacketHeaderStatement, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceStatement != nil {
		objectKey := object.Key("ResourceStatement")
		if err := awsEc2query_serializeDocumentResourceStatementRequest(v.ResourceStatement, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v *types.PeeringConnectionOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllowDnsResolutionFromRemoteVpc != nil {
		objectKey := object.Key("AllowDnsResolutionFromRemoteVpc")
		objectKey.Boolean(*v.AllowDnsResolutionFromRemoteVpc)
	}

	if v.AllowEgressFromLocalClassicLinkToRemoteVpc != nil {
		objectKey := object.Key("AllowEgressFromLocalClassicLinkToRemoteVpc")
		objectKey.Boolean(*v.AllowEgressFromLocalClassicLinkToRemoteVpc)
	}

	if v.AllowEgressFromLocalVpcToRemoteClassicLink != nil {
		objectKey := object.Key("AllowEgressFromLocalVpcToRemoteClassicLink")
		objectKey.Boolean(*v.AllowEgressFromLocalVpcToRemoteClassicLink)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v []types.Phase1DHGroupNumbersRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(v *types.Phase1DHGroupNumbersRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.Integer(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v []types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(v *types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v []types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(v *types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v []types.Phase2DHGroupNumbersRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(v *types.Phase2DHGroupNumbersRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.Integer(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v []types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(v *types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v []types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(v *types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeDocumentPlacement(v *types.Placement, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Affinity != nil {
		objectKey := object.Key("Affinity")
		objectKey.String(*v.Affinity)
	}

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.HostId != nil {
		objectKey := object.Key("HostId")
		objectKey.String(*v.HostId)
	}

	if v.HostResourceGroupArn != nil {
		objectKey := object.Key("HostResourceGroupArn")
		objectKey.String(*v.HostResourceGroupArn)
	}

	if v.PartitionNumber != nil {
		objectKey := object.Key("PartitionNumber")
		objectKey.Integer(*v.PartitionNumber)
	}

	if v.SpreadDomain != nil {
		objectKey := object.Key("SpreadDomain")
		objectKey.String(*v.SpreadDomain)
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	return nil
}

func awsEc2query_serializeDocumentPlacementGroupIdStringList(v []string, value query.Value) error {
	array := value.Array("GroupId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPlacementGroupStringList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPortRange(v *types.PortRange, value query.Value) error {
	object := value.Object()
	_ = object

	if v.From != nil {
		objectKey := object.Key("From")
		objectKey.Integer(*v.From)
	}

	if v.To != nil {
		objectKey := object.Key("To")
		objectKey.Integer(*v.To)
	}

	return nil
}

func awsEc2query_serializeDocumentPrefixListId(v *types.PrefixListId, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	return nil
}

func awsEc2query_serializeDocumentPrefixListIdList(v []types.PrefixListId, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPrefixListId(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPrefixListResourceIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPriceScheduleSpecification(v *types.PriceScheduleSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CurrencyCode) > 0 {
		objectKey := object.Key("CurrencyCode")
		objectKey.String(string(v.CurrencyCode))
	}

	if v.Price != nil {
		objectKey := object.Key("Price")
		switch {
		case math.IsNaN(*v.Price):
			objectKey.String("NaN")

		case math.IsInf(*v.Price, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Price, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Price)

		}
	}

	if v.Term != nil {
		objectKey := object.Key("Term")
		objectKey.Long(*v.Term)
	}

	return nil
}

func awsEc2query_serializeDocumentPriceScheduleSpecificationList(v []types.PriceScheduleSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPriceScheduleSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v *types.PrivateDnsNameOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnableResourceNameDnsAAAARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsAAAARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord)
	}

	if v.EnableResourceNameDnsARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsARecord)
	}

	if len(v.HostnameType) > 0 {
		objectKey := object.Key("HostnameType")
		objectKey.String(string(v.HostnameType))
	}

	return nil
}

func awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v []types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error {
	array := value.Array("PrivateIpAddressConfigSet")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPrivateIpAddressSpecification(v *types.PrivateIpAddressSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Primary != nil {
		objectKey := object.Key("Primary")
		objectKey.Boolean(*v.Primary)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	return nil
}

func awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v []types.PrivateIpAddressSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPrivateIpAddressSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentPrivateIpAddressStringList(v []string, value query.Value) error {
	array := value.Array("PrivateIpAddress")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentProductCodeStringList(v []string, value query.Value) error {
	array := value.Array("ProductCode")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentProductDescriptionList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentProtocolList(v []types.Protocol, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentPublicIpStringList(v []string, value query.Value) error {
	array := value.Array("PublicIp")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentPurchaseRequest(v *types.PurchaseRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.PurchaseToken != nil {
		objectKey := object.Key("PurchaseToken")
		objectKey.String(*v.PurchaseToken)
	}

	return nil
}

func awsEc2query_serializeDocumentPurchaseRequestSet(v []types.PurchaseRequest, value query.Value) error {
	array := value.Array("PurchaseRequest")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentPurchaseRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentReasonCodesList(v []types.ReportInstanceReasonCodes, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentRegionNames(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRegionNameStringList(v []string, value query.Value) error {
	array := value.Array("RegionName")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v *types.RegisterInstanceTagAttributeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.IncludeAllTagsOfInstance != nil {
		objectKey := object.Key("IncludeAllTagsOfInstance")
		objectKey.Boolean(*v.IncludeAllTagsOfInstance)
	}

	if v.InstanceTagKeys != nil {
		objectKey := object.FlatKey("InstanceTagKey")
		if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentRemoveIpamOperatingRegion(v *types.RemoveIpamOperatingRegion, value query.Value) error {
	object := value.Object()
	_ = object

	if v.RegionName != nil {
		objectKey := object.Key("RegionName")
		objectKey.String(*v.RegionName)
	}

	return nil
}

func awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v []types.RemoveIpamOperatingRegion, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegion(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentRemovePrefixListEntries(v []types.RemovePrefixListEntry, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentRemovePrefixListEntry(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentRemovePrefixListEntry(v *types.RemovePrefixListEntry, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	return nil
}

func awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v []string, value query.Value) error {
	array := value.Array("ReplaceRootVolumeTaskId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRequestFilterPortRange(v *types.RequestFilterPortRange, value query.Value) error {
	object := value.Object()
	_ = object

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeDocumentRequestHostIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRequestHostIdSet(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRequestInstanceTypeList(v []types.InstanceType, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentRequestIpamResourceTag(v *types.RequestIpamResourceTag, 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 awsEc2query_serializeDocumentRequestIpamResourceTagList(v []types.RequestIpamResourceTag, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentRequestIpamResourceTag(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentRequestLaunchTemplateData(v *types.RequestLaunchTemplateData, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.CapacityReservationSpecification != nil {
		objectKey := object.Key("CapacityReservationSpecification")
		if err := awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v.CapacityReservationSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.CpuOptions != nil {
		objectKey := object.Key("CpuOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v.CpuOptions, objectKey); err != nil {
			return err
		}
	}

	if v.CreditSpecification != nil {
		objectKey := object.Key("CreditSpecification")
		if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.DisableApiStop != nil {
		objectKey := object.Key("DisableApiStop")
		objectKey.Boolean(*v.DisableApiStop)
	}

	if v.DisableApiTermination != nil {
		objectKey := object.Key("DisableApiTermination")
		objectKey.Boolean(*v.DisableApiTermination)
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.ElasticGpuSpecifications != nil {
		objectKey := object.FlatKey("ElasticGpuSpecification")
		if err := awsEc2query_serializeDocumentElasticGpuSpecificationList(v.ElasticGpuSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.ElasticInferenceAccelerators != nil {
		objectKey := object.FlatKey("ElasticInferenceAccelerator")
		if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v.ElasticInferenceAccelerators, objectKey); err != nil {
			return err
		}
	}

	if v.EnclaveOptions != nil {
		objectKey := object.Key("EnclaveOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil {
			return err
		}
	}

	if v.HibernationOptions != nil {
		objectKey := object.Key("HibernationOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil {
			return err
		}
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if len(v.InstanceInitiatedShutdownBehavior) > 0 {
		objectKey := object.Key("InstanceInitiatedShutdownBehavior")
		objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
	}

	if v.InstanceMarketOptions != nil {
		objectKey := object.Key("InstanceMarketOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.LicenseSpecifications != nil {
		objectKey := object.FlatKey("LicenseSpecification")
		if err := awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.MaintenanceOptions != nil {
		objectKey := object.Key("MaintenanceOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMaintenanceOptionsRequest(v.MaintenanceOptions, objectKey); err != nil {
			return err
		}
	}

	if v.MetadataOptions != nil {
		objectKey := object.Key("MetadataOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil {
			return err
		}
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		if err := awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v.Monitoring, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaces != nil {
		objectKey := object.FlatKey("NetworkInterface")
		if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v.NetworkInterfaces, objectKey); err != nil {
			return err
		}
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateDnsNameOptions != nil {
		objectKey := object.Key("PrivateDnsNameOptions")
		if err := awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil {
			return err
		}
	}

	if v.RamDiskId != nil {
		objectKey := object.Key("RamDiskId")
		objectKey.String(*v.RamDiskId)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroups != nil {
		objectKey := object.FlatKey("SecurityGroup")
		if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		objectKey.String(*v.UserData)
	}

	return nil
}

func awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v *types.RequestSpotLaunchSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddressingType != nil {
		objectKey := object.Key("AddressingType")
		objectKey.String(*v.AddressingType)
	}

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaces != nil {
		objectKey := object.FlatKey("NetworkInterface")
		if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
			return err
		}
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.RamdiskId != nil {
		objectKey := object.Key("RamdiskId")
		objectKey.String(*v.RamdiskId)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroups != nil {
		objectKey := object.FlatKey("SecurityGroup")
		if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v.SecurityGroups, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		objectKey.String(*v.UserData)
	}

	return nil
}

func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentReservationFleetInstanceSpecification(v *types.ReservationFleetInstanceSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.AvailabilityZoneId != nil {
		objectKey := object.Key("AvailabilityZoneId")
		objectKey.String(*v.AvailabilityZoneId)
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if len(v.InstancePlatform) > 0 {
		objectKey := object.Key("InstancePlatform")
		objectKey.String(string(v.InstancePlatform))
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.Priority != nil {
		objectKey := object.Key("Priority")
		objectKey.Integer(*v.Priority)
	}

	if v.Weight != nil {
		objectKey := object.Key("Weight")
		switch {
		case math.IsNaN(*v.Weight):
			objectKey.String("NaN")

		case math.IsInf(*v.Weight, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Weight, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Weight)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentReservationFleetInstanceSpecificationList(v []types.ReservationFleetInstanceSpecification, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentReservationFleetInstanceSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentReservedInstanceIdSet(v []string, value query.Value) error {
	array := value.Array("ReservedInstanceId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentReservedInstanceLimitPrice(v *types.ReservedInstanceLimitPrice, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Amount != nil {
		objectKey := object.Key("Amount")
		switch {
		case math.IsNaN(*v.Amount):
			objectKey.String("NaN")

		case math.IsInf(*v.Amount, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Amount, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Amount)

		}
	}

	if len(v.CurrencyCode) > 0 {
		objectKey := object.Key("CurrencyCode")
		objectKey.String(string(v.CurrencyCode))
	}

	return nil
}

func awsEc2query_serializeDocumentReservedInstancesConfiguration(v *types.ReservedInstancesConfiguration, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.Platform != nil {
		objectKey := object.Key("Platform")
		objectKey.String(*v.Platform)
	}

	if len(v.Scope) > 0 {
		objectKey := object.Key("Scope")
		objectKey.String(string(v.Scope))
	}

	return nil
}

func awsEc2query_serializeDocumentReservedInstancesConfigurationList(v []types.ReservedInstancesConfiguration, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentReservedInstancesConfiguration(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentReservedInstancesIdStringList(v []string, value query.Value) error {
	array := value.Array("ReservedInstancesId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v []string, value query.Value) error {
	array := value.Array("ReservedInstancesModificationId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentResourceIdList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentResourceList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentResourceStatementRequest(v *types.ResourceStatementRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Resources != nil {
		objectKey := object.FlatKey("Resource")
		if err := awsEc2query_serializeDocumentValueStringList(v.Resources, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceTypes != nil {
		objectKey := object.FlatKey("ResourceType")
		if err := awsEc2query_serializeDocumentValueStringList(v.ResourceTypes, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentRestorableByStringList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRouteTableIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v *types.RunInstancesMonitoringEnabled, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentS3ObjectTag(v *types.S3ObjectTag, 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 awsEc2query_serializeDocumentS3ObjectTagList(v []types.S3ObjectTag, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentS3ObjectTag(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentS3Storage(v *types.S3Storage, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AWSAccessKeyId != nil {
		objectKey := object.Key("AWSAccessKeyId")
		objectKey.String(*v.AWSAccessKeyId)
	}

	if v.Bucket != nil {
		objectKey := object.Key("Bucket")
		objectKey.String(*v.Bucket)
	}

	if v.Prefix != nil {
		objectKey := object.Key("Prefix")
		objectKey.String(*v.Prefix)
	}

	if v.UploadPolicy != nil {
		objectKey := object.Key("UploadPolicy")
		objectKey.Base64EncodeBytes(v.UploadPolicy)
	}

	if v.UploadPolicySignature != nil {
		objectKey := object.Key("UploadPolicySignature")
		objectKey.String(*v.UploadPolicySignature)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v []string, value query.Value) error {
	array := value.Array("ScheduledInstanceId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v *types.ScheduledInstanceRecurrenceRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Frequency != nil {
		objectKey := object.Key("Frequency")
		objectKey.String(*v.Frequency)
	}

	if v.Interval != nil {
		objectKey := object.Key("Interval")
		objectKey.Integer(*v.Interval)
	}

	if v.OccurrenceDays != nil {
		objectKey := object.FlatKey("OccurrenceDay")
		if err := awsEc2query_serializeDocumentOccurrenceDayRequestSet(v.OccurrenceDays, objectKey); err != nil {
			return err
		}
	}

	if v.OccurrenceRelativeToEnd != nil {
		objectKey := object.Key("OccurrenceRelativeToEnd")
		objectKey.Boolean(*v.OccurrenceRelativeToEnd)
	}

	if v.OccurrenceUnit != nil {
		objectKey := object.Key("OccurrenceUnit")
		objectKey.String(*v.OccurrenceUnit)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(v *types.ScheduledInstancesBlockDeviceMapping, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeviceName != nil {
		objectKey := object.Key("DeviceName")
		objectKey.String(*v.DeviceName)
	}

	if v.Ebs != nil {
		objectKey := object.Key("Ebs")
		if err := awsEc2query_serializeDocumentScheduledInstancesEbs(v.Ebs, objectKey); err != nil {
			return err
		}
	}

	if v.NoDevice != nil {
		objectKey := object.Key("NoDevice")
		objectKey.String(*v.NoDevice)
	}

	if v.VirtualName != nil {
		objectKey := object.Key("VirtualName")
		objectKey.String(*v.VirtualName)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v []types.ScheduledInstancesBlockDeviceMapping, value query.Value) error {
	array := value.Array("BlockDeviceMapping")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesEbs(v *types.ScheduledInstancesEbs, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.Iops != nil {
		objectKey := object.Key("Iops")
		objectKey.Integer(*v.Iops)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.VolumeSize != nil {
		objectKey := object.Key("VolumeSize")
		objectKey.Integer(*v.VolumeSize)
	}

	if v.VolumeType != nil {
		objectKey := object.Key("VolumeType")
		objectKey.String(*v.VolumeType)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v *types.ScheduledInstancesIamInstanceProfile, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesIpv6Address(v *types.ScheduledInstancesIpv6Address, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6Address != nil {
		objectKey := object.Key("Ipv6Address")
		objectKey.String(*v.Ipv6Address)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v []types.ScheduledInstancesIpv6Address, value query.Value) error {
	array := value.Array("Ipv6Address")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentScheduledInstancesIpv6Address(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v *types.ScheduledInstancesLaunchSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		objectKey.String(*v.InstanceType)
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		if err := awsEc2query_serializeDocumentScheduledInstancesMonitoring(v.Monitoring, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaces != nil {
		objectKey := object.FlatKey("NetworkInterface")
		if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v.NetworkInterfaces, objectKey); err != nil {
			return err
		}
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentScheduledInstancesPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.RamdiskId != nil {
		objectKey := object.Key("RamdiskId")
		objectKey.String(*v.RamdiskId)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		objectKey.String(*v.UserData)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesMonitoring(v *types.ScheduledInstancesMonitoring, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(v *types.ScheduledInstancesNetworkInterface, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociatePublicIpAddress != nil {
		objectKey := object.Key("AssociatePublicIpAddress")
		objectKey.Boolean(*v.AssociatePublicIpAddress)
	}

	if v.DeleteOnTermination != nil {
		objectKey := object.Key("DeleteOnTermination")
		objectKey.Boolean(*v.DeleteOnTermination)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DeviceIndex != nil {
		objectKey := object.Key("DeviceIndex")
		objectKey.Integer(*v.DeviceIndex)
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("Group")
		if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Address")
		if err := awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.PrivateIpAddressConfigs != nil {
		objectKey := object.FlatKey("PrivateIpAddressConfig")
		if err := awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v.PrivateIpAddressConfigs, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v []types.ScheduledInstancesNetworkInterface, value query.Value) error {
	array := value.Array("NetworkInterface")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesPlacement(v *types.ScheduledInstancesPlacement, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(v *types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Primary != nil {
		objectKey := object.Key("Primary")
		objectKey.Boolean(*v.Primary)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	return nil
}

func awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v []string, value query.Value) error {
	array := value.Array("SecurityGroupId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupIdStringList(v []string, value query.Value) error {
	array := value.Array("SecurityGroupId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupIdStringListRequest(v []string, value query.Value) error {
	array := value.Array("SecurityGroupId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleDescription(v *types.SecurityGroupRuleDescription, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.SecurityGroupRuleId != nil {
		objectKey := object.Key("SecurityGroupRuleId")
		objectKey.String(*v.SecurityGroupRuleId)
	}

	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v []types.SecurityGroupRuleDescription, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentSecurityGroupRuleDescription(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleRequest(v *types.SecurityGroupRuleRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIpv4 != nil {
		objectKey := object.Key("CidrIpv4")
		objectKey.String(*v.CidrIpv4)
	}

	if v.CidrIpv6 != nil {
		objectKey := object.Key("CidrIpv6")
		objectKey.String(*v.CidrIpv6)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.ReferencedGroupId != nil {
		objectKey := object.Key("ReferencedGroupId")
		objectKey.String(*v.ReferencedGroupId)
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleUpdate(v *types.SecurityGroupRuleUpdate, value query.Value) error {
	object := value.Object()
	_ = object

	if v.SecurityGroupRule != nil {
		objectKey := object.Key("SecurityGroupRule")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleRequest(v.SecurityGroupRule, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroupRuleId != nil {
		objectKey := object.Key("SecurityGroupRuleId")
		objectKey.String(*v.SecurityGroupRuleId)
	}

	return nil
}

func awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v []types.SecurityGroupRuleUpdate, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdate(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentSecurityGroupStringList(v []string, value query.Value) error {
	array := value.Array("SecurityGroup")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v *types.SlotDateTimeRangeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EarliestTime != nil {
		objectKey := object.Key("EarliestTime")
		objectKey.String(smithytime.FormatDateTime(*v.EarliestTime))
	}

	if v.LatestTime != nil {
		objectKey := object.Key("LatestTime")
		objectKey.String(smithytime.FormatDateTime(*v.LatestTime))
	}

	return nil
}

func awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v *types.SlotStartTimeRangeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EarliestTime != nil {
		objectKey := object.Key("EarliestTime")
		objectKey.String(smithytime.FormatDateTime(*v.EarliestTime))
	}

	if v.LatestTime != nil {
		objectKey := object.Key("LatestTime")
		objectKey.String(smithytime.FormatDateTime(*v.LatestTime))
	}

	return nil
}

func awsEc2query_serializeDocumentSnapshotDiskContainer(v *types.SnapshotDiskContainer, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.Format != nil {
		objectKey := object.Key("Format")
		objectKey.String(*v.Format)
	}

	if v.Url != nil {
		objectKey := object.Key("Url")
		objectKey.String(*v.Url)
	}

	if v.UserBucket != nil {
		objectKey := object.Key("UserBucket")
		if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentSnapshotIdStringList(v []string, value query.Value) error {
	array := value.Array("SnapshotId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSpotCapacityRebalance(v *types.SpotCapacityRebalance, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ReplacementStrategy) > 0 {
		objectKey := object.Key("ReplacementStrategy")
		objectKey.String(string(v.ReplacementStrategy))
	}

	if v.TerminationDelay != nil {
		objectKey := object.Key("TerminationDelay")
		objectKey.Integer(*v.TerminationDelay)
	}

	return nil
}

func awsEc2query_serializeDocumentSpotFleetLaunchSpecification(v *types.SpotFleetLaunchSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddressingType != nil {
		objectKey := object.Key("AddressingType")
		objectKey.String(*v.AddressingType)
	}

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirements(v.InstanceRequirements, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		if err := awsEc2query_serializeDocumentSpotFleetMonitoring(v.Monitoring, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaces != nil {
		objectKey := object.FlatKey("NetworkInterfaceSet")
		if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
			return err
		}
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.RamdiskId != nil {
		objectKey := object.Key("RamdiskId")
		objectKey.String(*v.RamdiskId)
	}

	if v.SecurityGroups != nil {
		objectKey := object.FlatKey("GroupSet")
		if err := awsEc2query_serializeDocumentGroupIdentifierList(v.SecurityGroups, objectKey); err != nil {
			return err
		}
	}

	if v.SpotPrice != nil {
		objectKey := object.Key("SpotPrice")
		objectKey.String(*v.SpotPrice)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecificationSet")
		if err := awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		objectKey.String(*v.UserData)
	}

	if v.WeightedCapacity != nil {
		objectKey := object.Key("WeightedCapacity")
		switch {
		case math.IsNaN(*v.WeightedCapacity):
			objectKey.String("NaN")

		case math.IsInf(*v.WeightedCapacity, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.WeightedCapacity, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.WeightedCapacity)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentSpotFleetMonitoring(v *types.SpotFleetMonitoring, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentSpotFleetRequestConfigData(v *types.SpotFleetRequestConfigData, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AllocationStrategy) > 0 {
		objectKey := object.Key("AllocationStrategy")
		objectKey.String(string(v.AllocationStrategy))
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.Context != nil {
		objectKey := object.Key("Context")
		objectKey.String(*v.Context)
	}

	if len(v.ExcessCapacityTerminationPolicy) > 0 {
		objectKey := object.Key("ExcessCapacityTerminationPolicy")
		objectKey.String(string(v.ExcessCapacityTerminationPolicy))
	}

	if v.FulfilledCapacity != nil {
		objectKey := object.Key("FulfilledCapacity")
		switch {
		case math.IsNaN(*v.FulfilledCapacity):
			objectKey.String("NaN")

		case math.IsInf(*v.FulfilledCapacity, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.FulfilledCapacity, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.FulfilledCapacity)

		}
	}

	if v.IamFleetRole != nil {
		objectKey := object.Key("IamFleetRole")
		objectKey.String(*v.IamFleetRole)
	}

	if len(v.InstanceInterruptionBehavior) > 0 {
		objectKey := object.Key("InstanceInterruptionBehavior")
		objectKey.String(string(v.InstanceInterruptionBehavior))
	}

	if v.InstancePoolsToUseCount != nil {
		objectKey := object.Key("InstancePoolsToUseCount")
		objectKey.Integer(*v.InstancePoolsToUseCount)
	}

	if v.LaunchSpecifications != nil {
		objectKey := object.FlatKey("LaunchSpecifications")
		if err := awsEc2query_serializeDocumentLaunchSpecsList(v.LaunchSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateConfigs != nil {
		objectKey := object.FlatKey("LaunchTemplateConfigs")
		if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil {
			return err
		}
	}

	if v.LoadBalancersConfig != nil {
		objectKey := object.Key("LoadBalancersConfig")
		if err := awsEc2query_serializeDocumentLoadBalancersConfig(v.LoadBalancersConfig, objectKey); err != nil {
			return err
		}
	}

	if len(v.OnDemandAllocationStrategy) > 0 {
		objectKey := object.Key("OnDemandAllocationStrategy")
		objectKey.String(string(v.OnDemandAllocationStrategy))
	}

	if v.OnDemandFulfilledCapacity != nil {
		objectKey := object.Key("OnDemandFulfilledCapacity")
		switch {
		case math.IsNaN(*v.OnDemandFulfilledCapacity):
			objectKey.String("NaN")

		case math.IsInf(*v.OnDemandFulfilledCapacity, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.OnDemandFulfilledCapacity, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.OnDemandFulfilledCapacity)

		}
	}

	if v.OnDemandMaxTotalPrice != nil {
		objectKey := object.Key("OnDemandMaxTotalPrice")
		objectKey.String(*v.OnDemandMaxTotalPrice)
	}

	if v.OnDemandTargetCapacity != nil {
		objectKey := object.Key("OnDemandTargetCapacity")
		objectKey.Integer(*v.OnDemandTargetCapacity)
	}

	if v.ReplaceUnhealthyInstances != nil {
		objectKey := object.Key("ReplaceUnhealthyInstances")
		objectKey.Boolean(*v.ReplaceUnhealthyInstances)
	}

	if v.SpotMaintenanceStrategies != nil {
		objectKey := object.Key("SpotMaintenanceStrategies")
		if err := awsEc2query_serializeDocumentSpotMaintenanceStrategies(v.SpotMaintenanceStrategies, objectKey); err != nil {
			return err
		}
	}

	if v.SpotMaxTotalPrice != nil {
		objectKey := object.Key("SpotMaxTotalPrice")
		objectKey.String(*v.SpotMaxTotalPrice)
	}

	if v.SpotPrice != nil {
		objectKey := object.Key("SpotPrice")
		objectKey.String(*v.SpotPrice)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TargetCapacity != nil {
		objectKey := object.Key("TargetCapacity")
		objectKey.Integer(*v.TargetCapacity)
	}

	if len(v.TargetCapacityUnitType) > 0 {
		objectKey := object.Key("TargetCapacityUnitType")
		objectKey.String(string(v.TargetCapacityUnitType))
	}

	if v.TerminateInstancesWithExpiration != nil {
		objectKey := object.Key("TerminateInstancesWithExpiration")
		objectKey.Boolean(*v.TerminateInstancesWithExpiration)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.ValidFrom != nil {
		objectKey := object.Key("ValidFrom")
		objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
	}

	if v.ValidUntil != nil {
		objectKey := object.Key("ValidUntil")
		objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
	}

	return nil
}

func awsEc2query_serializeDocumentSpotFleetRequestIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSpotFleetTagSpecification(v *types.SpotFleetTagSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	if v.Tags != nil {
		objectKey := object.FlatKey("Tag")
		if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v []types.SpotFleetTagSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentSpotFleetTagSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentSpotInstanceRequestIdList(v []string, value query.Value) error {
	array := value.Array("SpotInstanceRequestId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentSpotMaintenanceStrategies(v *types.SpotMaintenanceStrategies, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityRebalance != nil {
		objectKey := object.Key("CapacityRebalance")
		if err := awsEc2query_serializeDocumentSpotCapacityRebalance(v.CapacityRebalance, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentSpotMarketOptions(v *types.SpotMarketOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BlockDurationMinutes != nil {
		objectKey := object.Key("BlockDurationMinutes")
		objectKey.Integer(*v.BlockDurationMinutes)
	}

	if len(v.InstanceInterruptionBehavior) > 0 {
		objectKey := object.Key("InstanceInterruptionBehavior")
		objectKey.String(string(v.InstanceInterruptionBehavior))
	}

	if v.MaxPrice != nil {
		objectKey := object.Key("MaxPrice")
		objectKey.String(*v.MaxPrice)
	}

	if len(v.SpotInstanceType) > 0 {
		objectKey := object.Key("SpotInstanceType")
		objectKey.String(string(v.SpotInstanceType))
	}

	if v.ValidUntil != nil {
		objectKey := object.Key("ValidUntil")
		objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
	}

	return nil
}

func awsEc2query_serializeDocumentSpotOptionsRequest(v *types.SpotOptionsRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AllocationStrategy) > 0 {
		objectKey := object.Key("AllocationStrategy")
		objectKey.String(string(v.AllocationStrategy))
	}

	if len(v.InstanceInterruptionBehavior) > 0 {
		objectKey := object.Key("InstanceInterruptionBehavior")
		objectKey.String(string(v.InstanceInterruptionBehavior))
	}

	if v.InstancePoolsToUseCount != nil {
		objectKey := object.Key("InstancePoolsToUseCount")
		objectKey.Integer(*v.InstancePoolsToUseCount)
	}

	if v.MaintenanceStrategies != nil {
		objectKey := object.Key("MaintenanceStrategies")
		if err := awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v.MaintenanceStrategies, objectKey); err != nil {
			return err
		}
	}

	if v.MaxTotalPrice != nil {
		objectKey := object.Key("MaxTotalPrice")
		objectKey.String(*v.MaxTotalPrice)
	}

	if v.MinTargetCapacity != nil {
		objectKey := object.Key("MinTargetCapacity")
		objectKey.Integer(*v.MinTargetCapacity)
	}

	if v.SingleAvailabilityZone != nil {
		objectKey := object.Key("SingleAvailabilityZone")
		objectKey.Boolean(*v.SingleAvailabilityZone)
	}

	if v.SingleInstanceType != nil {
		objectKey := object.Key("SingleInstanceType")
		objectKey.Boolean(*v.SingleInstanceType)
	}

	return nil
}

func awsEc2query_serializeDocumentSpotPlacement(v *types.SpotPlacement, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	return nil
}

func awsEc2query_serializeDocumentStorage(v *types.Storage, value query.Value) error {
	object := value.Object()
	_ = object

	if v.S3 != nil {
		objectKey := object.Key("S3")
		if err := awsEc2query_serializeDocumentS3Storage(v.S3, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentStorageLocation(v *types.StorageLocation, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Bucket != nil {
		objectKey := object.Key("Bucket")
		objectKey.String(*v.Bucket)
	}

	if v.Key != nil {
		objectKey := object.Key("Key")
		objectKey.String(*v.Key)
	}

	return nil
}

func awsEc2query_serializeDocumentSubnetConfiguration(v *types.SubnetConfiguration, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv4 != nil {
		objectKey := object.Key("Ipv4")
		objectKey.String(*v.Ipv4)
	}

	if v.Ipv6 != nil {
		objectKey := object.Key("Ipv6")
		objectKey.String(*v.Ipv6)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeDocumentSubnetConfigurationsList(v []types.SubnetConfiguration, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentSubnetConfiguration(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentSubnetIdStringList(v []string, value query.Value) error {
	array := value.Array("SubnetId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_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 awsEc2query_serializeDocumentTagList(v []types.Tag, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentTag(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentTagSpecification(v *types.TagSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	if v.Tags != nil {
		objectKey := object.FlatKey("Tag")
		if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentTagSpecificationList(v []types.TagSpecification, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentTagSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v *types.TargetCapacitySpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.DefaultTargetCapacityType) > 0 {
		objectKey := object.Key("DefaultTargetCapacityType")
		objectKey.String(string(v.DefaultTargetCapacityType))
	}

	if v.OnDemandTargetCapacity != nil {
		objectKey := object.Key("OnDemandTargetCapacity")
		objectKey.Integer(*v.OnDemandTargetCapacity)
	}

	if v.SpotTargetCapacity != nil {
		objectKey := object.Key("SpotTargetCapacity")
		objectKey.Integer(*v.SpotTargetCapacity)
	}

	if len(v.TargetCapacityUnitType) > 0 {
		objectKey := object.Key("TargetCapacityUnitType")
		objectKey.String(string(v.TargetCapacityUnitType))
	}

	if v.TotalTargetCapacity != nil {
		objectKey := object.Key("TotalTargetCapacity")
		objectKey.Integer(*v.TotalTargetCapacity)
	}

	return nil
}

func awsEc2query_serializeDocumentTargetConfigurationRequest(v *types.TargetConfigurationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.OfferingId != nil {
		objectKey := object.Key("OfferingId")
		objectKey.String(*v.OfferingId)
	}

	return nil
}

func awsEc2query_serializeDocumentTargetConfigurationRequestSet(v []types.TargetConfigurationRequest, value query.Value) error {
	array := value.Array("TargetConfigurationRequest")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentTargetConfigurationRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentTargetGroup(v *types.TargetGroup, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	return nil
}

func awsEc2query_serializeDocumentTargetGroups(v []types.TargetGroup, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentTargetGroup(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentTargetGroupsConfig(v *types.TargetGroupsConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.TargetGroups != nil {
		objectKey := object.FlatKey("TargetGroups")
		if err := awsEc2query_serializeDocumentTargetGroups(v.TargetGroups, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentThroughResourcesStatementRequest(v *types.ThroughResourcesStatementRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ResourceStatement != nil {
		objectKey := object.Key("ResourceStatement")
		if err := awsEc2query_serializeDocumentResourceStatementRequest(v.ResourceStatement, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentThroughResourcesStatementRequestList(v []types.ThroughResourcesStatementRequest, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentThroughResourcesStatementRequest(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentTotalLocalStorageGB(v *types.TotalLocalStorageGB, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentTotalLocalStorageGBRequest(v *types.TotalLocalStorageGBRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		switch {
		case math.IsNaN(*v.Max):
			objectKey.String("NaN")

		case math.IsInf(*v.Max, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Max, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Max)

		}
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		switch {
		case math.IsNaN(*v.Min):
			objectKey.String("NaN")

		case math.IsInf(*v.Min, 1):
			objectKey.String("Infinity")

		case math.IsInf(*v.Min, -1):
			objectKey.String("-Infinity")

		default:
			objectKey.Double(*v.Min)

		}
	}

	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v []types.TrafficMirrorFilterRuleField, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v []types.TrafficMirrorNetworkService, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v *types.TrafficMirrorPortRangeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v []types.TrafficMirrorSessionField, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v []string, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v *types.TransitGatewayConnectRequestBgpOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PeerAsn != nil {
		objectKey := object.Key("PeerAsn")
		objectKey.Long(*v.PeerAsn)
	}

	return nil
}

func awsEc2query_serializeDocumentTransitGatewayIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayPolicyTableIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayRequestOptions(v *types.TransitGatewayRequestOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AmazonSideAsn != nil {
		objectKey := object.Key("AmazonSideAsn")
		objectKey.Long(*v.AmazonSideAsn)
	}

	if len(v.AutoAcceptSharedAttachments) > 0 {
		objectKey := object.Key("AutoAcceptSharedAttachments")
		objectKey.String(string(v.AutoAcceptSharedAttachments))
	}

	if len(v.DefaultRouteTableAssociation) > 0 {
		objectKey := object.Key("DefaultRouteTableAssociation")
		objectKey.String(string(v.DefaultRouteTableAssociation))
	}

	if len(v.DefaultRouteTablePropagation) > 0 {
		objectKey := object.Key("DefaultRouteTablePropagation")
		objectKey.String(string(v.DefaultRouteTablePropagation))
	}

	if len(v.DnsSupport) > 0 {
		objectKey := object.Key("DnsSupport")
		objectKey.String(string(v.DnsSupport))
	}

	if len(v.MulticastSupport) > 0 {
		objectKey := object.Key("MulticastSupport")
		objectKey.String(string(v.MulticastSupport))
	}

	if len(v.SecurityGroupReferencingSupport) > 0 {
		objectKey := object.Key("SecurityGroupReferencingSupport")
		objectKey.String(string(v.SecurityGroupReferencingSupport))
	}

	if v.TransitGatewayCidrBlocks != nil {
		objectKey := object.FlatKey("TransitGatewayCidrBlocks")
		if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.TransitGatewayCidrBlocks, objectKey); err != nil {
			return err
		}
	}

	if len(v.VpnEcmpSupport) > 0 {
		objectKey := object.Key("VpnEcmpSupport")
		objectKey.String(string(v.VpnEcmpSupport))
	}

	return nil
}

func awsEc2query_serializeDocumentTransitGatewayRouteTableAnnouncementIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentUserBucket(v *types.UserBucket, value query.Value) error {
	object := value.Object()
	_ = object

	if v.S3Bucket != nil {
		objectKey := object.Key("S3Bucket")
		objectKey.String(*v.S3Bucket)
	}

	if v.S3Key != nil {
		objectKey := object.Key("S3Key")
		objectKey.String(*v.S3Key)
	}

	return nil
}

func awsEc2query_serializeDocumentUserData(v *types.UserData, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Data != nil {
		objectKey := object.Key("Data")
		objectKey.String(*v.Data)
	}

	return nil
}

func awsEc2query_serializeDocumentUserGroupStringList(v []string, value query.Value) error {
	array := value.Array("UserGroup")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentUserIdGroupPair(v *types.UserIdGroupPair, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.PeeringStatus != nil {
		objectKey := object.Key("PeeringStatus")
		objectKey.String(*v.PeeringStatus)
	}

	if v.UserId != nil {
		objectKey := object.Key("UserId")
		objectKey.String(*v.UserId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeDocumentUserIdGroupPairList(v []types.UserIdGroupPair, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentUserIdGroupPair(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentUserIdStringList(v []string, value query.Value) error {
	array := value.Array("UserId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentValueStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVCpuCountRange(v *types.VCpuCountRange, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentVCpuCountRangeRequest(v *types.VCpuCountRangeRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Max != nil {
		objectKey := object.Key("Max")
		objectKey.Integer(*v.Max)
	}

	if v.Min != nil {
		objectKey := object.Key("Min")
		objectKey.Integer(*v.Min)
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessEndpointIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessGroupIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessLogCloudWatchLogsDestinationOptions(v *types.VerifiedAccessLogCloudWatchLogsDestinationOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	if v.LogGroup != nil {
		objectKey := object.Key("LogGroup")
		objectKey.String(*v.LogGroup)
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v *types.VerifiedAccessLogKinesisDataFirehoseDestinationOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeliveryStream != nil {
		objectKey := object.Key("DeliveryStream")
		objectKey.String(*v.DeliveryStream)
	}

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessLogOptions(v *types.VerifiedAccessLogOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CloudWatchLogs != nil {
		objectKey := object.Key("CloudWatchLogs")
		if err := awsEc2query_serializeDocumentVerifiedAccessLogCloudWatchLogsDestinationOptions(v.CloudWatchLogs, objectKey); err != nil {
			return err
		}
	}

	if v.IncludeTrustContext != nil {
		objectKey := object.Key("IncludeTrustContext")
		objectKey.Boolean(*v.IncludeTrustContext)
	}

	if v.KinesisDataFirehose != nil {
		objectKey := object.Key("KinesisDataFirehose")
		if err := awsEc2query_serializeDocumentVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v.KinesisDataFirehose, objectKey); err != nil {
			return err
		}
	}

	if v.LogVersion != nil {
		objectKey := object.Key("LogVersion")
		objectKey.String(*v.LogVersion)
	}

	if v.S3 != nil {
		objectKey := object.Key("S3")
		if err := awsEc2query_serializeDocumentVerifiedAccessLogS3DestinationOptions(v.S3, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessLogS3DestinationOptions(v *types.VerifiedAccessLogS3DestinationOptions, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BucketName != nil {
		objectKey := object.Key("BucketName")
		objectKey.String(*v.BucketName)
	}

	if v.BucketOwner != nil {
		objectKey := object.Key("BucketOwner")
		objectKey.String(*v.BucketOwner)
	}

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	if v.Prefix != nil {
		objectKey := object.Key("Prefix")
		objectKey.String(*v.Prefix)
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v *types.VerifiedAccessSseSpecificationRequest, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerManagedKeyEnabled != nil {
		objectKey := object.Key("CustomerManagedKeyEnabled")
		objectKey.Boolean(*v.CustomerManagedKeyEnabled)
	}

	if v.KmsKeyArn != nil {
		objectKey := object.Key("KmsKeyArn")
		objectKey.String(*v.KmsKeyArn)
	}

	return nil
}

func awsEc2query_serializeDocumentVerifiedAccessTrustProviderIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVersionStringList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVirtualizationTypeSet(v []types.VirtualizationType, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsEc2query_serializeDocumentVolumeDetail(v *types.VolumeDetail, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Size != nil {
		objectKey := object.Key("Size")
		objectKey.Long(*v.Size)
	}

	return nil
}

func awsEc2query_serializeDocumentVolumeIdStringList(v []string, value query.Value) error {
	array := value.Array("VolumeId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcClassicLinkIdList(v []string, value query.Value) error {
	array := value.Array("VpcId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcEndpointIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcEndpointServiceIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcIdStringList(v []string, value query.Value) error {
	array := value.Array("VpcId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v []string, value query.Value) error {
	array := value.Array("Item")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpnConnectionIdStringList(v []string, value query.Value) error {
	array := value.Array("VpnConnectionId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v *types.VpnConnectionOptionsSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnableAcceleration != nil {
		objectKey := object.Key("EnableAcceleration")
		objectKey.Boolean(*v.EnableAcceleration)
	}

	if v.LocalIpv4NetworkCidr != nil {
		objectKey := object.Key("LocalIpv4NetworkCidr")
		objectKey.String(*v.LocalIpv4NetworkCidr)
	}

	if v.LocalIpv6NetworkCidr != nil {
		objectKey := object.Key("LocalIpv6NetworkCidr")
		objectKey.String(*v.LocalIpv6NetworkCidr)
	}

	if v.OutsideIpAddressType != nil {
		objectKey := object.Key("OutsideIpAddressType")
		objectKey.String(*v.OutsideIpAddressType)
	}

	if v.RemoteIpv4NetworkCidr != nil {
		objectKey := object.Key("RemoteIpv4NetworkCidr")
		objectKey.String(*v.RemoteIpv4NetworkCidr)
	}

	if v.RemoteIpv6NetworkCidr != nil {
		objectKey := object.Key("RemoteIpv6NetworkCidr")
		objectKey.String(*v.RemoteIpv6NetworkCidr)
	}

	if v.StaticRoutesOnly != nil {
		objectKey := object.Key("StaticRoutesOnly")
		objectKey.Boolean(*v.StaticRoutesOnly)
	}

	if v.TransportTransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransportTransitGatewayAttachmentId")
		objectKey.String(*v.TransportTransitGatewayAttachmentId)
	}

	if len(v.TunnelInsideIpVersion) > 0 {
		objectKey := object.Key("TunnelInsideIpVersion")
		objectKey.String(string(v.TunnelInsideIpVersion))
	}

	if v.TunnelOptions != nil {
		objectKey := object.FlatKey("TunnelOptions")
		if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v.TunnelOptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentVpnGatewayIdStringList(v []string, value query.Value) error {
	array := value.Array("VpnGatewayId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v *types.VpnTunnelLogOptionsSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CloudWatchLogOptions != nil {
		objectKey := object.Key("CloudWatchLogOptions")
		if err := awsEc2query_serializeDocumentCloudWatchLogOptionsSpecification(v.CloudWatchLogOptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(v *types.VpnTunnelOptionsSpecification, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DPDTimeoutAction != nil {
		objectKey := object.Key("DPDTimeoutAction")
		objectKey.String(*v.DPDTimeoutAction)
	}

	if v.DPDTimeoutSeconds != nil {
		objectKey := object.Key("DPDTimeoutSeconds")
		objectKey.Integer(*v.DPDTimeoutSeconds)
	}

	if v.EnableTunnelLifecycleControl != nil {
		objectKey := object.Key("EnableTunnelLifecycleControl")
		objectKey.Boolean(*v.EnableTunnelLifecycleControl)
	}

	if v.IKEVersions != nil {
		objectKey := object.FlatKey("IKEVersion")
		if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil {
			return err
		}
	}

	if v.LogOptions != nil {
		objectKey := object.Key("LogOptions")
		if err := awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v.LogOptions, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1DHGroupNumbers != nil {
		objectKey := object.FlatKey("Phase1DHGroupNumber")
		if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1EncryptionAlgorithms != nil {
		objectKey := object.FlatKey("Phase1EncryptionAlgorithm")
		if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1IntegrityAlgorithms != nil {
		objectKey := object.FlatKey("Phase1IntegrityAlgorithm")
		if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase1LifetimeSeconds != nil {
		objectKey := object.Key("Phase1LifetimeSeconds")
		objectKey.Integer(*v.Phase1LifetimeSeconds)
	}

	if v.Phase2DHGroupNumbers != nil {
		objectKey := object.FlatKey("Phase2DHGroupNumber")
		if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2EncryptionAlgorithms != nil {
		objectKey := object.FlatKey("Phase2EncryptionAlgorithm")
		if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2IntegrityAlgorithms != nil {
		objectKey := object.FlatKey("Phase2IntegrityAlgorithm")
		if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil {
			return err
		}
	}

	if v.Phase2LifetimeSeconds != nil {
		objectKey := object.Key("Phase2LifetimeSeconds")
		objectKey.Integer(*v.Phase2LifetimeSeconds)
	}

	if v.PreSharedKey != nil {
		objectKey := object.Key("PreSharedKey")
		objectKey.String(*v.PreSharedKey)
	}

	if v.RekeyFuzzPercentage != nil {
		objectKey := object.Key("RekeyFuzzPercentage")
		objectKey.Integer(*v.RekeyFuzzPercentage)
	}

	if v.RekeyMarginTimeSeconds != nil {
		objectKey := object.Key("RekeyMarginTimeSeconds")
		objectKey.Integer(*v.RekeyMarginTimeSeconds)
	}

	if v.ReplayWindowSize != nil {
		objectKey := object.Key("ReplayWindowSize")
		objectKey.Integer(*v.ReplayWindowSize)
	}

	if v.StartupAction != nil {
		objectKey := object.Key("StartupAction")
		objectKey.String(*v.StartupAction)
	}

	if v.TunnelInsideCidr != nil {
		objectKey := object.Key("TunnelInsideCidr")
		objectKey.String(*v.TunnelInsideCidr)
	}

	if v.TunnelInsideIpv6Cidr != nil {
		objectKey := object.Key("TunnelInsideIpv6Cidr")
		objectKey.String(*v.TunnelInsideIpv6Cidr)
	}

	return nil
}

func awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v []types.VpnTunnelOptionsSpecification, value query.Value) error {
	array := value.Array("Member")

	for i := range v {
		av := array.Value()
		if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsEc2query_serializeDocumentZoneIdStringList(v []string, value query.Value) error {
	array := value.Array("ZoneId")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeDocumentZoneNameStringList(v []string, value query.Value) error {
	array := value.Array("ZoneName")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsEc2query_serializeOpDocumentAcceptAddressTransferInput(v *AcceptAddressTransferInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Address != nil {
		objectKey := object.Key("Address")
		objectKey.String(*v.Address)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(v *AcceptReservedInstancesExchangeQuoteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ReservedInstanceIds != nil {
		objectKey := object.FlatKey("ReservedInstanceId")
		if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TargetConfigurations != nil {
		objectKey := object.FlatKey("TargetConfiguration")
		if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(v *AcceptTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetIds")
		if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(v *AcceptTransitGatewayPeeringAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(v *AcceptTransitGatewayVpcAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(v *AcceptVpcEndpointConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	if v.VpcEndpointIds != nil {
		objectKey := object.FlatKey("VpcEndpointId")
		if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(v *AcceptVpcPeeringConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Asn != nil {
		objectKey := object.Key("Asn")
		objectKey.String(*v.Asn)
	}

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAllocateAddressInput(v *AllocateAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Address != nil {
		objectKey := object.Key("Address")
		objectKey.String(*v.Address)
	}

	if v.CustomerOwnedIpv4Pool != nil {
		objectKey := object.Key("CustomerOwnedIpv4Pool")
		objectKey.String(*v.CustomerOwnedIpv4Pool)
	}

	if len(v.Domain) > 0 {
		objectKey := object.Key("Domain")
		objectKey.String(string(v.Domain))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkBorderGroup != nil {
		objectKey := object.Key("NetworkBorderGroup")
		objectKey.String(*v.NetworkBorderGroup)
	}

	if v.PublicIpv4Pool != nil {
		objectKey := object.Key("PublicIpv4Pool")
		objectKey.String(*v.PublicIpv4Pool)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAllocateHostsInput(v *AllocateHostsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssetIds != nil {
		objectKey := object.FlatKey("AssetId")
		if err := awsEc2query_serializeDocumentAssetIdList(v.AssetIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.AutoPlacement) > 0 {
		objectKey := object.Key("AutoPlacement")
		objectKey.String(string(v.AutoPlacement))
	}

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if len(v.HostMaintenance) > 0 {
		objectKey := object.Key("HostMaintenance")
		objectKey.String(string(v.HostMaintenance))
	}

	if len(v.HostRecovery) > 0 {
		objectKey := object.Key("HostRecovery")
		objectKey.String(string(v.HostRecovery))
	}

	if v.InstanceFamily != nil {
		objectKey := object.Key("InstanceFamily")
		objectKey.String(*v.InstanceFamily)
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		objectKey.String(*v.InstanceType)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.Quantity != nil {
		objectKey := object.Key("Quantity")
		objectKey.Integer(*v.Quantity)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAllocateIpamPoolCidrInput(v *AllocateIpamPoolCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllowedCidrs != nil {
		objectKey := object.FlatKey("AllowedCidr")
		if err := awsEc2query_serializeDocumentIpamPoolAllocationAllowedCidrs(v.AllowedCidrs, objectKey); err != nil {
			return err
		}
	}

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	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.DisallowedCidrs != nil {
		objectKey := object.FlatKey("DisallowedCidr")
		if err := awsEc2query_serializeDocumentIpamPoolAllocationDisallowedCidrs(v.DisallowedCidrs, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.NetmaskLength != nil {
		objectKey := object.Key("NetmaskLength")
		objectKey.Integer(*v.NetmaskLength)
	}

	if v.PreviewNextCidr != nil {
		objectKey := object.Key("PreviewNextCidr")
		objectKey.Boolean(*v.PreviewNextCidr)
	}

	return nil
}

func awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(v *ApplySecurityGroupsToClientVpnTargetNetworkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(v *AssignIpv6AddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Addresses")
		if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6PrefixCount != nil {
		objectKey := object.Key("Ipv6PrefixCount")
		objectKey.Integer(*v.Ipv6PrefixCount)
	}

	if v.Ipv6Prefixes != nil {
		objectKey := object.FlatKey("Ipv6Prefix")
		if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(v *AssignPrivateIpAddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllowReassignment != nil {
		objectKey := object.Key("AllowReassignment")
		objectKey.Boolean(*v.AllowReassignment)
	}

	if v.Ipv4PrefixCount != nil {
		objectKey := object.Key("Ipv4PrefixCount")
		objectKey.Integer(*v.Ipv4PrefixCount)
	}

	if v.Ipv4Prefixes != nil {
		objectKey := object.FlatKey("Ipv4Prefix")
		if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddress")
		if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssignPrivateNatGatewayAddressInput(v *AssignPrivateNatGatewayAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	if v.PrivateIpAddressCount != nil {
		objectKey := object.Key("PrivateIpAddressCount")
		objectKey.Integer(*v.PrivateIpAddressCount)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddress")
		if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateAddressInput(v *AssociateAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.AllowReassociation != nil {
		objectKey := object.Key("AllowReassociation")
		objectKey.Boolean(*v.AllowReassociation)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(v *AssociateClientVpnTargetNetworkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(v *AssociateDhcpOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DhcpOptionsId != nil {
		objectKey := object.Key("DhcpOptionsId")
		objectKey.String(*v.DhcpOptionsId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(v *AssociateEnclaveCertificateIamRoleInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CertificateArn != nil {
		objectKey := object.Key("CertificateArn")
		objectKey.String(*v.CertificateArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RoleArn != nil {
		objectKey := object.Key("RoleArn")
		objectKey.String(*v.RoleArn)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(v *AssociateIamInstanceProfileInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(v *AssociateInstanceEventWindowInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationTarget != nil {
		objectKey := object.Key("AssociationTarget")
		if err := awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v.AssociationTarget, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceEventWindowId != nil {
		objectKey := object.Key("InstanceEventWindowId")
		objectKey.String(*v.InstanceEventWindowId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateIpamByoasnInput(v *AssociateIpamByoasnInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Asn != nil {
		objectKey := object.Key("Asn")
		objectKey.String(*v.Asn)
	}

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateIpamResourceDiscoveryInput(v *AssociateIpamResourceDiscoveryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateNatGatewayAddressInput(v *AssociateNatGatewayAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationIds != nil {
		objectKey := object.FlatKey("AllocationId")
		if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddress")
		if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateRouteTableInput(v *AssociateRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GatewayId != nil {
		objectKey := object.Key("GatewayId")
		objectKey.String(*v.GatewayId)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.Ipv6IpamPoolId != nil {
		objectKey := object.Key("Ipv6IpamPoolId")
		objectKey.String(*v.Ipv6IpamPoolId)
	}

	if v.Ipv6NetmaskLength != nil {
		objectKey := object.Key("Ipv6NetmaskLength")
		objectKey.Integer(*v.Ipv6NetmaskLength)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(v *AssociateTransitGatewayMulticastDomainInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetIds")
		if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateTransitGatewayPolicyTableInput(v *AssociateTransitGatewayPolicyTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayPolicyTableId != nil {
		objectKey := object.Key("TransitGatewayPolicyTableId")
		objectKey.String(*v.TransitGatewayPolicyTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(v *AssociateTransitGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(v *AssociateTrunkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BranchInterfaceId != nil {
		objectKey := object.Key("BranchInterfaceId")
		objectKey.String(*v.BranchInterfaceId)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GreKey != nil {
		objectKey := object.Key("GreKey")
		objectKey.Integer(*v.GreKey)
	}

	if v.TrunkInterfaceId != nil {
		objectKey := object.Key("TrunkInterfaceId")
		objectKey.String(*v.TrunkInterfaceId)
	}

	if v.VlanId != nil {
		objectKey := object.Key("VlanId")
		objectKey.Integer(*v.VlanId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(v *AssociateVpcCidrBlockInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AmazonProvidedIpv6CidrBlock != nil {
		objectKey := object.Key("AmazonProvidedIpv6CidrBlock")
		objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock)
	}

	if v.CidrBlock != nil {
		objectKey := object.Key("CidrBlock")
		objectKey.String(*v.CidrBlock)
	}

	if v.Ipv4IpamPoolId != nil {
		objectKey := object.Key("Ipv4IpamPoolId")
		objectKey.String(*v.Ipv4IpamPoolId)
	}

	if v.Ipv4NetmaskLength != nil {
		objectKey := object.Key("Ipv4NetmaskLength")
		objectKey.Integer(*v.Ipv4NetmaskLength)
	}

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.Ipv6CidrBlockNetworkBorderGroup != nil {
		objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup")
		objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup)
	}

	if v.Ipv6IpamPoolId != nil {
		objectKey := object.Key("Ipv6IpamPoolId")
		objectKey.String(*v.Ipv6IpamPoolId)
	}

	if v.Ipv6NetmaskLength != nil {
		objectKey := object.Key("Ipv6NetmaskLength")
		objectKey.Integer(*v.Ipv6NetmaskLength)
	}

	if v.Ipv6Pool != nil {
		objectKey := object.Key("Ipv6Pool")
		objectKey.String(*v.Ipv6Pool)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(v *AttachClassicLinkVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachInternetGatewayInput(v *AttachInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InternetGatewayId != nil {
		objectKey := object.Key("InternetGatewayId")
		objectKey.String(*v.InternetGatewayId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(v *AttachNetworkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeviceIndex != nil {
		objectKey := object.Key("DeviceIndex")
		objectKey.Integer(*v.DeviceIndex)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EnaSrdSpecification != nil {
		objectKey := object.Key("EnaSrdSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdSpecification(v.EnaSrdSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.NetworkCardIndex != nil {
		objectKey := object.Key("NetworkCardIndex")
		objectKey.Integer(*v.NetworkCardIndex)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachVerifiedAccessTrustProviderInput(v *AttachVerifiedAccessTrustProviderInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	if v.VerifiedAccessTrustProviderId != nil {
		objectKey := object.Key("VerifiedAccessTrustProviderId")
		objectKey.String(*v.VerifiedAccessTrustProviderId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachVolumeInput(v *AttachVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Device != nil {
		objectKey := object.Key("Device")
		objectKey.String(*v.Device)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAttachVpnGatewayInput(v *AttachVpnGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	if v.VpnGatewayId != nil {
		objectKey := object.Key("VpnGatewayId")
		objectKey.String(*v.VpnGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(v *AuthorizeClientVpnIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AccessGroupId != nil {
		objectKey := object.Key("AccessGroupId")
		objectKey.String(*v.AccessGroupId)
	}

	if v.AuthorizeAllGroups != nil {
		objectKey := object.Key("AuthorizeAllGroups")
		objectKey.Boolean(*v.AuthorizeAllGroups)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TargetNetworkCidr != nil {
		objectKey := object.Key("TargetNetworkCidr")
		objectKey.String(*v.TargetNetworkCidr)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(v *AuthorizeSecurityGroupEgressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIp != nil {
		objectKey := object.Key("CidrIp")
		objectKey.String(*v.CidrIp)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.SourceSecurityGroupName != nil {
		objectKey := object.Key("SourceSecurityGroupName")
		objectKey.String(*v.SourceSecurityGroupName)
	}

	if v.SourceSecurityGroupOwnerId != nil {
		objectKey := object.Key("SourceSecurityGroupOwnerId")
		objectKey.String(*v.SourceSecurityGroupOwnerId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(v *AuthorizeSecurityGroupIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIp != nil {
		objectKey := object.Key("CidrIp")
		objectKey.String(*v.CidrIp)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.SourceSecurityGroupName != nil {
		objectKey := object.Key("SourceSecurityGroupName")
		objectKey.String(*v.SourceSecurityGroupName)
	}

	if v.SourceSecurityGroupOwnerId != nil {
		objectKey := object.Key("SourceSecurityGroupOwnerId")
		objectKey.String(*v.SourceSecurityGroupOwnerId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentBundleInstanceInput(v *BundleInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.Storage != nil {
		objectKey := object.Key("Storage")
		if err := awsEc2query_serializeDocumentStorage(v.Storage, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelBundleTaskInput(v *CancelBundleTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BundleId != nil {
		objectKey := object.Key("BundleId")
		objectKey.String(*v.BundleId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelCapacityReservationFleetsInput(v *CancelCapacityReservationFleetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationFleetIds != nil {
		objectKey := object.FlatKey("CapacityReservationFleetId")
		if err := awsEc2query_serializeDocumentCapacityReservationFleetIdSet(v.CapacityReservationFleetIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelCapacityReservationInput(v *CancelCapacityReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationId != nil {
		objectKey := object.Key("CapacityReservationId")
		objectKey.String(*v.CapacityReservationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelConversionTaskInput(v *CancelConversionTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConversionTaskId != nil {
		objectKey := object.Key("ConversionTaskId")
		objectKey.String(*v.ConversionTaskId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ReasonMessage != nil {
		objectKey := object.Key("ReasonMessage")
		objectKey.String(*v.ReasonMessage)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelExportTaskInput(v *CancelExportTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ExportTaskId != nil {
		objectKey := object.Key("ExportTaskId")
		objectKey.String(*v.ExportTaskId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelImageLaunchPermissionInput(v *CancelImageLaunchPermissionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelImportTaskInput(v *CancelImportTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CancelReason != nil {
		objectKey := object.Key("CancelReason")
		objectKey.String(*v.CancelReason)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImportTaskId != nil {
		objectKey := object.Key("ImportTaskId")
		objectKey.String(*v.ImportTaskId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(v *CancelReservedInstancesListingInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ReservedInstancesListingId != nil {
		objectKey := object.Key("ReservedInstancesListingId")
		objectKey.String(*v.ReservedInstancesListingId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(v *CancelSpotFleetRequestsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SpotFleetRequestIds != nil {
		objectKey := object.FlatKey("SpotFleetRequestId")
		if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil {
			return err
		}
	}

	if v.TerminateInstances != nil {
		objectKey := object.Key("TerminateInstances")
		objectKey.Boolean(*v.TerminateInstances)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(v *CancelSpotInstanceRequestsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SpotInstanceRequestIds != nil {
		objectKey := object.FlatKey("SpotInstanceRequestId")
		if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentConfirmProductInstanceInput(v *ConfirmProductInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.ProductCode != nil {
		objectKey := object.Key("ProductCode")
		objectKey.String(*v.ProductCode)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCopyFpgaImageInput(v *CopyFpgaImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.SourceFpgaImageId != nil {
		objectKey := object.Key("SourceFpgaImageId")
		objectKey.String(*v.SourceFpgaImageId)
	}

	if v.SourceRegion != nil {
		objectKey := object.Key("SourceRegion")
		objectKey.String(*v.SourceRegion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCopyImageInput(v *CopyImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.CopyImageTags != nil {
		objectKey := object.Key("CopyImageTags")
		objectKey.Boolean(*v.CopyImageTags)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DestinationOutpostArn != nil {
		objectKey := object.Key("DestinationOutpostArn")
		objectKey.String(*v.DestinationOutpostArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.SourceImageId != nil {
		objectKey := object.Key("SourceImageId")
		objectKey.String(*v.SourceImageId)
	}

	if v.SourceRegion != nil {
		objectKey := object.Key("SourceRegion")
		objectKey.String(*v.SourceRegion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCopySnapshotInput(v *CopySnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DestinationOutpostArn != nil {
		objectKey := object.Key("DestinationOutpostArn")
		objectKey.String(*v.DestinationOutpostArn)
	}

	if v.destinationRegion != nil {
		objectKey := object.Key("DestinationRegion")
		objectKey.String(*v.destinationRegion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.PresignedUrl != nil {
		objectKey := object.Key("PresignedUrl")
		objectKey.String(*v.PresignedUrl)
	}

	if v.SourceRegion != nil {
		objectKey := object.Key("SourceRegion")
		objectKey.String(*v.SourceRegion)
	}

	if v.SourceSnapshotId != nil {
		objectKey := object.Key("SourceSnapshotId")
		objectKey.String(*v.SourceSnapshotId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCapacityReservationFleetInput(v *CreateCapacityReservationFleetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationStrategy != nil {
		objectKey := object.Key("AllocationStrategy")
		objectKey.String(*v.AllocationStrategy)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndDate != nil {
		objectKey := object.Key("EndDate")
		objectKey.String(smithytime.FormatDateTime(*v.EndDate))
	}

	if len(v.InstanceMatchCriteria) > 0 {
		objectKey := object.Key("InstanceMatchCriteria")
		objectKey.String(string(v.InstanceMatchCriteria))
	}

	if v.InstanceTypeSpecifications != nil {
		objectKey := object.FlatKey("InstanceTypeSpecification")
		if err := awsEc2query_serializeDocumentReservationFleetInstanceSpecificationList(v.InstanceTypeSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	if v.TotalTargetCapacity != nil {
		objectKey := object.Key("TotalTargetCapacity")
		objectKey.Integer(*v.TotalTargetCapacity)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCapacityReservationInput(v *CreateCapacityReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.AvailabilityZoneId != nil {
		objectKey := object.Key("AvailabilityZoneId")
		objectKey.String(*v.AvailabilityZoneId)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.EndDate != nil {
		objectKey := object.Key("EndDate")
		objectKey.String(smithytime.FormatDateTime(*v.EndDate))
	}

	if len(v.EndDateType) > 0 {
		objectKey := object.Key("EndDateType")
		objectKey.String(string(v.EndDateType))
	}

	if v.EphemeralStorage != nil {
		objectKey := object.Key("EphemeralStorage")
		objectKey.Boolean(*v.EphemeralStorage)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if len(v.InstanceMatchCriteria) > 0 {
		objectKey := object.Key("InstanceMatchCriteria")
		objectKey.String(string(v.InstanceMatchCriteria))
	}

	if len(v.InstancePlatform) > 0 {
		objectKey := object.Key("InstancePlatform")
		objectKey.String(string(v.InstancePlatform))
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		objectKey.String(*v.InstanceType)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.PlacementGroupArn != nil {
		objectKey := object.Key("PlacementGroupArn")
		objectKey.String(*v.PlacementGroupArn)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecifications")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(v *CreateCarrierGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(v *CreateClientVpnEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AuthenticationOptions != nil {
		objectKey := object.FlatKey("Authentication")
		if err := awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v.AuthenticationOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ClientCidrBlock != nil {
		objectKey := object.Key("ClientCidrBlock")
		objectKey.String(*v.ClientCidrBlock)
	}

	if v.ClientConnectOptions != nil {
		objectKey := object.Key("ClientConnectOptions")
		if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ClientLoginBannerOptions != nil {
		objectKey := object.Key("ClientLoginBannerOptions")
		if err := awsEc2query_serializeDocumentClientLoginBannerOptions(v.ClientLoginBannerOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ConnectionLogOptions != nil {
		objectKey := object.Key("ConnectionLogOptions")
		if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DnsServers != nil {
		objectKey := object.FlatKey("DnsServers")
		if err := awsEc2query_serializeDocumentValueStringList(v.DnsServers, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.SelfServicePortal) > 0 {
		objectKey := object.Key("SelfServicePortal")
		objectKey.String(string(v.SelfServicePortal))
	}

	if v.ServerCertificateArn != nil {
		objectKey := object.Key("ServerCertificateArn")
		objectKey.String(*v.ServerCertificateArn)
	}

	if v.SessionTimeoutHours != nil {
		objectKey := object.Key("SessionTimeoutHours")
		objectKey.Integer(*v.SessionTimeoutHours)
	}

	if v.SplitTunnel != nil {
		objectKey := object.Key("SplitTunnel")
		objectKey.Boolean(*v.SplitTunnel)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.TransportProtocol) > 0 {
		objectKey := object.Key("TransportProtocol")
		objectKey.String(string(v.TransportProtocol))
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	if v.VpnPort != nil {
		objectKey := object.Key("VpnPort")
		objectKey.Integer(*v.VpnPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(v *CreateClientVpnRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TargetVpcSubnetId != nil {
		objectKey := object.Key("TargetVpcSubnetId")
		objectKey.String(*v.TargetVpcSubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCoipCidrInput(v *CreateCoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.CoipPoolId != nil {
		objectKey := object.Key("CoipPoolId")
		objectKey.String(*v.CoipPoolId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCoipPoolInput(v *CreateCoipPoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(v *CreateCustomerGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BgpAsn != nil {
		objectKey := object.Key("BgpAsn")
		objectKey.Integer(*v.BgpAsn)
	}

	if v.CertificateArn != nil {
		objectKey := object.Key("CertificateArn")
		objectKey.String(*v.CertificateArn)
	}

	if v.DeviceName != nil {
		objectKey := object.Key("DeviceName")
		objectKey.String(*v.DeviceName)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpAddress != nil {
		objectKey := object.Key("IpAddress")
		objectKey.String(*v.IpAddress)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(v *CreateDefaultSubnetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Ipv6Native != nil {
		objectKey := object.Key("Ipv6Native")
		objectKey.Boolean(*v.Ipv6Native)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateDefaultVpcInput(v *CreateDefaultVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(v *CreateDhcpOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DhcpConfigurations != nil {
		objectKey := object.FlatKey("DhcpConfiguration")
		if err := awsEc2query_serializeDocumentNewDhcpConfigurationList(v.DhcpConfigurations, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(v *CreateEgressOnlyInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.Context != nil {
		objectKey := object.Key("Context")
		objectKey.String(*v.Context)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.ExcessCapacityTerminationPolicy) > 0 {
		objectKey := object.Key("ExcessCapacityTerminationPolicy")
		objectKey.String(string(v.ExcessCapacityTerminationPolicy))
	}

	if v.LaunchTemplateConfigs != nil {
		objectKey := object.FlatKey("LaunchTemplateConfigs")
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil {
			return err
		}
	}

	if v.OnDemandOptions != nil {
		objectKey := object.Key("OnDemandOptions")
		if err := awsEc2query_serializeDocumentOnDemandOptionsRequest(v.OnDemandOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ReplaceUnhealthyInstances != nil {
		objectKey := object.Key("ReplaceUnhealthyInstances")
		objectKey.Boolean(*v.ReplaceUnhealthyInstances)
	}

	if v.SpotOptions != nil {
		objectKey := object.Key("SpotOptions")
		if err := awsEc2query_serializeDocumentSpotOptionsRequest(v.SpotOptions, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TargetCapacitySpecification != nil {
		objectKey := object.Key("TargetCapacitySpecification")
		if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil {
			return err
		}
	}

	if v.TerminateInstancesWithExpiration != nil {
		objectKey := object.Key("TerminateInstancesWithExpiration")
		objectKey.Boolean(*v.TerminateInstancesWithExpiration)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.ValidFrom != nil {
		objectKey := object.Key("ValidFrom")
		objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
	}

	if v.ValidUntil != nil {
		objectKey := object.Key("ValidUntil")
		objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateFlowLogsInput(v *CreateFlowLogsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DeliverCrossAccountRole != nil {
		objectKey := object.Key("DeliverCrossAccountRole")
		objectKey.String(*v.DeliverCrossAccountRole)
	}

	if v.DeliverLogsPermissionArn != nil {
		objectKey := object.Key("DeliverLogsPermissionArn")
		objectKey.String(*v.DeliverLogsPermissionArn)
	}

	if v.DestinationOptions != nil {
		objectKey := object.Key("DestinationOptions")
		if err := awsEc2query_serializeDocumentDestinationOptionsRequest(v.DestinationOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LogDestination != nil {
		objectKey := object.Key("LogDestination")
		objectKey.String(*v.LogDestination)
	}

	if len(v.LogDestinationType) > 0 {
		objectKey := object.Key("LogDestinationType")
		objectKey.String(string(v.LogDestinationType))
	}

	if v.LogFormat != nil {
		objectKey := object.Key("LogFormat")
		objectKey.String(*v.LogFormat)
	}

	if v.LogGroupName != nil {
		objectKey := object.Key("LogGroupName")
		objectKey.String(*v.LogGroupName)
	}

	if v.MaxAggregationInterval != nil {
		objectKey := object.Key("MaxAggregationInterval")
		objectKey.Integer(*v.MaxAggregationInterval)
	}

	if v.ResourceIds != nil {
		objectKey := object.FlatKey("ResourceId")
		if err := awsEc2query_serializeDocumentFlowLogResourceIds(v.ResourceIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.TrafficType) > 0 {
		objectKey := object.Key("TrafficType")
		objectKey.String(string(v.TrafficType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateFpgaImageInput(v *CreateFpgaImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InputStorageLocation != nil {
		objectKey := object.Key("InputStorageLocation")
		if err := awsEc2query_serializeDocumentStorageLocation(v.InputStorageLocation, objectKey); err != nil {
			return err
		}
	}

	if v.LogsStorageLocation != nil {
		objectKey := object.Key("LogsStorageLocation")
		if err := awsEc2query_serializeDocumentStorageLocation(v.LogsStorageLocation, objectKey); err != nil {
			return err
		}
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateImageInput(v *CreateImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.NoReboot != nil {
		objectKey := object.Key("NoReboot")
		objectKey.Boolean(*v.NoReboot)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateInstanceConnectEndpointInput(v *CreateInstanceConnectEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PreserveClientIp != nil {
		objectKey := object.Key("PreserveClientIp")
		objectKey.Boolean(*v.PreserveClientIp)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringListRequest(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(v *CreateInstanceEventWindowInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CronExpression != nil {
		objectKey := object.Key("CronExpression")
		objectKey.String(*v.CronExpression)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TimeRanges != nil {
		objectKey := object.FlatKey("TimeRange")
		if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.ExportToS3Task != nil {
		objectKey := object.Key("ExportToS3")
		if err := awsEc2query_serializeDocumentExportToS3TaskSpecification(v.ExportToS3Task, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.TargetEnvironment) > 0 {
		objectKey := object.Key("TargetEnvironment")
		objectKey.String(string(v.TargetEnvironment))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateInternetGatewayInput(v *CreateInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateIpamInput(v *CreateIpamInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.OperatingRegions != nil {
		objectKey := object.FlatKey("OperatingRegion")
		if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.OperatingRegions, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Tier) > 0 {
		objectKey := object.Key("Tier")
		objectKey.String(string(v.Tier))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateIpamPoolInput(v *CreateIpamPoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AddressFamily) > 0 {
		objectKey := object.Key("AddressFamily")
		objectKey.String(string(v.AddressFamily))
	}

	if v.AllocationDefaultNetmaskLength != nil {
		objectKey := object.Key("AllocationDefaultNetmaskLength")
		objectKey.Integer(*v.AllocationDefaultNetmaskLength)
	}

	if v.AllocationMaxNetmaskLength != nil {
		objectKey := object.Key("AllocationMaxNetmaskLength")
		objectKey.Integer(*v.AllocationMaxNetmaskLength)
	}

	if v.AllocationMinNetmaskLength != nil {
		objectKey := object.Key("AllocationMinNetmaskLength")
		objectKey.Integer(*v.AllocationMinNetmaskLength)
	}

	if v.AllocationResourceTags != nil {
		objectKey := object.FlatKey("AllocationResourceTag")
		if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.AllocationResourceTags, objectKey); err != nil {
			return err
		}
	}

	if v.AutoImport != nil {
		objectKey := object.Key("AutoImport")
		objectKey.Boolean(*v.AutoImport)
	}

	if len(v.AwsService) > 0 {
		objectKey := object.Key("AwsService")
		objectKey.String(string(v.AwsService))
	}

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamScopeId != nil {
		objectKey := object.Key("IpamScopeId")
		objectKey.String(*v.IpamScopeId)
	}

	if v.Locale != nil {
		objectKey := object.Key("Locale")
		objectKey.String(*v.Locale)
	}

	if len(v.PublicIpSource) > 0 {
		objectKey := object.Key("PublicIpSource")
		objectKey.String(string(v.PublicIpSource))
	}

	if v.PubliclyAdvertisable != nil {
		objectKey := object.Key("PubliclyAdvertisable")
		objectKey.Boolean(*v.PubliclyAdvertisable)
	}

	if v.SourceIpamPoolId != nil {
		objectKey := object.Key("SourceIpamPoolId")
		objectKey.String(*v.SourceIpamPoolId)
	}

	if v.SourceResource != nil {
		objectKey := object.Key("SourceResource")
		if err := awsEc2query_serializeDocumentIpamPoolSourceResourceRequest(v.SourceResource, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateIpamResourceDiscoveryInput(v *CreateIpamResourceDiscoveryInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.OperatingRegions != nil {
		objectKey := object.FlatKey("OperatingRegion")
		if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.OperatingRegions, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateIpamScopeInput(v *CreateIpamScopeInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateKeyPairInput(v *CreateKeyPairInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.KeyFormat) > 0 {
		objectKey := object.Key("KeyFormat")
		objectKey.String(string(v.KeyFormat))
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if len(v.KeyType) > 0 {
		objectKey := object.Key("KeyType")
		objectKey.String(string(v.KeyType))
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(v *CreateLaunchTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchTemplateData != nil {
		objectKey := object.Key("LaunchTemplateData")
		if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VersionDescription != nil {
		objectKey := object.Key("VersionDescription")
		objectKey.String(*v.VersionDescription)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(v *CreateLaunchTemplateVersionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchTemplateData != nil {
		objectKey := object.Key("LaunchTemplateData")
		if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.ResolveAlias != nil {
		objectKey := object.Key("ResolveAlias")
		objectKey.Boolean(*v.ResolveAlias)
	}

	if v.SourceVersion != nil {
		objectKey := object.Key("SourceVersion")
		objectKey.String(*v.SourceVersion)
	}

	if v.VersionDescription != nil {
		objectKey := object.Key("VersionDescription")
		objectKey.String(*v.VersionDescription)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(v *CreateLocalGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	if v.LocalGatewayVirtualInterfaceGroupId != nil {
		objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId")
		objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableInput(v *CreateLocalGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayId != nil {
		objectKey := object.Key("LocalGatewayId")
		objectKey.String(*v.LocalGatewayId)
	}

	if len(v.Mode) > 0 {
		objectKey := object.Key("Mode")
		objectKey.String(string(v.Mode))
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	if v.LocalGatewayVirtualInterfaceGroupId != nil {
		objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId")
		objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(v *CreateLocalGatewayRouteTableVpcAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(v *CreateManagedPrefixListInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddressFamily != nil {
		objectKey := object.Key("AddressFamily")
		objectKey.String(*v.AddressFamily)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Entries != nil {
		objectKey := object.FlatKey("Entry")
		if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.Entries, objectKey); err != nil {
			return err
		}
	}

	if v.MaxEntries != nil {
		objectKey := object.Key("MaxEntries")
		objectKey.Integer(*v.MaxEntries)
	}

	if v.PrefixListName != nil {
		objectKey := object.Key("PrefixListName")
		objectKey.String(*v.PrefixListName)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNatGatewayInput(v *CreateNatGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if len(v.ConnectivityType) > 0 {
		objectKey := object.Key("ConnectivityType")
		objectKey.String(string(v.ConnectivityType))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.SecondaryAllocationIds != nil {
		objectKey := object.FlatKey("SecondaryAllocationId")
		if err := awsEc2query_serializeDocumentAllocationIdList(v.SecondaryAllocationIds, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	if v.SecondaryPrivateIpAddresses != nil {
		objectKey := object.FlatKey("SecondaryPrivateIpAddress")
		if err := awsEc2query_serializeDocumentIpList(v.SecondaryPrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(v *CreateNetworkAclEntryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrBlock != nil {
		objectKey := object.Key("CidrBlock")
		objectKey.String(*v.CidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Egress != nil {
		objectKey := object.Key("Egress")
		objectKey.Boolean(*v.Egress)
	}

	if v.IcmpTypeCode != nil {
		objectKey := object.Key("Icmp")
		if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.NetworkAclId != nil {
		objectKey := object.Key("NetworkAclId")
		objectKey.String(*v.NetworkAclId)
	}

	if v.PortRange != nil {
		objectKey := object.Key("PortRange")
		if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil {
			return err
		}
	}

	if v.Protocol != nil {
		objectKey := object.Key("Protocol")
		objectKey.String(*v.Protocol)
	}

	if len(v.RuleAction) > 0 {
		objectKey := object.Key("RuleAction")
		objectKey.String(string(v.RuleAction))
	}

	if v.RuleNumber != nil {
		objectKey := object.Key("RuleNumber")
		objectKey.Integer(*v.RuleNumber)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkAclInput(v *CreateNetworkAclInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkInsightsAccessScopeInput(v *CreateNetworkInsightsAccessScopeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ExcludePaths != nil {
		objectKey := object.FlatKey("ExcludePath")
		if err := awsEc2query_serializeDocumentAccessScopePathListRequest(v.ExcludePaths, objectKey); err != nil {
			return err
		}
	}

	if v.MatchPaths != nil {
		objectKey := object.FlatKey("MatchPath")
		if err := awsEc2query_serializeDocumentAccessScopePathListRequest(v.MatchPaths, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(v *CreateNetworkInsightsPathInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.Destination != nil {
		objectKey := object.Key("Destination")
		objectKey.String(*v.Destination)
	}

	if v.DestinationIp != nil {
		objectKey := object.Key("DestinationIp")
		objectKey.String(*v.DestinationIp)
	}

	if v.DestinationPort != nil {
		objectKey := object.Key("DestinationPort")
		objectKey.Integer(*v.DestinationPort)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FilterAtDestination != nil {
		objectKey := object.Key("FilterAtDestination")
		if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtDestination, objectKey); err != nil {
			return err
		}
	}

	if v.FilterAtSource != nil {
		objectKey := object.Key("FilterAtSource")
		if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtSource, objectKey); err != nil {
			return err
		}
	}

	if len(v.Protocol) > 0 {
		objectKey := object.Key("Protocol")
		objectKey.String(string(v.Protocol))
	}

	if v.Source != nil {
		objectKey := object.Key("Source")
		objectKey.String(*v.Source)
	}

	if v.SourceIp != nil {
		objectKey := object.Key("SourceIp")
		objectKey.String(*v.SourceIp)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(v *CreateNetworkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ConnectionTrackingSpecification != nil {
		objectKey := object.Key("ConnectionTrackingSpecification")
		if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EnablePrimaryIpv6 != nil {
		objectKey := object.Key("EnablePrimaryIpv6")
		objectKey.Boolean(*v.EnablePrimaryIpv6)
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if len(v.InterfaceType) > 0 {
		objectKey := object.Key("InterfaceType")
		objectKey.String(string(v.InterfaceType))
	}

	if v.Ipv4PrefixCount != nil {
		objectKey := object.Key("Ipv4PrefixCount")
		objectKey.Integer(*v.Ipv4PrefixCount)
	}

	if v.Ipv4Prefixes != nil {
		objectKey := object.FlatKey("Ipv4Prefix")
		if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Addresses")
		if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6PrefixCount != nil {
		objectKey := object.Key("Ipv6PrefixCount")
		objectKey.Integer(*v.Ipv6PrefixCount)
	}

	if v.Ipv6Prefixes != nil {
		objectKey := object.FlatKey("Ipv6Prefix")
		if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddresses")
		if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	if v.SecondaryPrivateIpAddressCount != nil {
		objectKey := object.Key("SecondaryPrivateIpAddressCount")
		objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(v *CreateNetworkInterfacePermissionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AwsAccountId != nil {
		objectKey := object.Key("AwsAccountId")
		objectKey.String(*v.AwsAccountId)
	}

	if v.AwsService != nil {
		objectKey := object.Key("AwsService")
		objectKey.String(*v.AwsService)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if len(v.Permission) > 0 {
		objectKey := object.Key("Permission")
		objectKey.String(string(v.Permission))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreatePlacementGroupInput(v *CreatePlacementGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.PartitionCount != nil {
		objectKey := object.Key("PartitionCount")
		objectKey.Integer(*v.PartitionCount)
	}

	if len(v.SpreadLevel) > 0 {
		objectKey := object.Key("SpreadLevel")
		objectKey.String(string(v.SpreadLevel))
	}

	if len(v.Strategy) > 0 {
		objectKey := object.Key("Strategy")
		objectKey.String(string(v.Strategy))
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreatePublicIpv4PoolInput(v *CreatePublicIpv4PoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(v *CreateReplaceRootVolumeTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DeleteReplacedRootVolume != nil {
		objectKey := object.Key("DeleteReplacedRootVolume")
		objectKey.Boolean(*v.DeleteReplacedRootVolume)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(v *CreateReservedInstancesListingInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.PriceSchedules != nil {
		objectKey := object.FlatKey("PriceSchedules")
		if err := awsEc2query_serializeDocumentPriceScheduleSpecificationList(v.PriceSchedules, objectKey); err != nil {
			return err
		}
	}

	if v.ReservedInstancesId != nil {
		objectKey := object.Key("ReservedInstancesId")
		objectKey.String(*v.ReservedInstancesId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(v *CreateRestoreImageTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Bucket != nil {
		objectKey := object.Key("Bucket")
		objectKey.String(*v.Bucket)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.ObjectKey != nil {
		objectKey := object.Key("ObjectKey")
		objectKey.String(*v.ObjectKey)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateRouteInput(v *CreateRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CarrierGatewayId != nil {
		objectKey := object.Key("CarrierGatewayId")
		objectKey.String(*v.CarrierGatewayId)
	}

	if v.CoreNetworkArn != nil {
		objectKey := object.Key("CoreNetworkArn")
		objectKey.String(*v.CoreNetworkArn)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationIpv6CidrBlock != nil {
		objectKey := object.Key("DestinationIpv6CidrBlock")
		objectKey.String(*v.DestinationIpv6CidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EgressOnlyInternetGatewayId != nil {
		objectKey := object.Key("EgressOnlyInternetGatewayId")
		objectKey.String(*v.EgressOnlyInternetGatewayId)
	}

	if v.GatewayId != nil {
		objectKey := object.Key("GatewayId")
		objectKey.String(*v.GatewayId)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.LocalGatewayId != nil {
		objectKey := object.Key("LocalGatewayId")
		objectKey.String(*v.LocalGatewayId)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	if v.VpcEndpointId != nil {
		objectKey := object.Key("VpcEndpointId")
		objectKey.String(*v.VpcEndpointId)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateRouteTableInput(v *CreateRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSecurityGroupInput(v *CreateSecurityGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("GroupDescription")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSnapshotInput(v *CreateSnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSnapshotsInput(v *CreateSnapshotsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CopyTagsFromSource) > 0 {
		objectKey := object.Key("CopyTagsFromSource")
		objectKey.String(string(v.CopyTagsFromSource))
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceSpecification != nil {
		objectKey := object.Key("InstanceSpecification")
		if err := awsEc2query_serializeDocumentInstanceSpecification(v.InstanceSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(v *CreateSpotDatafeedSubscriptionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Bucket != nil {
		objectKey := object.Key("Bucket")
		objectKey.String(*v.Bucket)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Prefix != nil {
		objectKey := object.Key("Prefix")
		objectKey.String(*v.Prefix)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(v *CreateStoreImageTaskInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Bucket != nil {
		objectKey := object.Key("Bucket")
		objectKey.String(*v.Bucket)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.S3ObjectTags != nil {
		objectKey := object.FlatKey("S3ObjectTag")
		if err := awsEc2query_serializeDocumentS3ObjectTagList(v.S3ObjectTags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(v *CreateSubnetCidrReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.ReservationType) > 0 {
		objectKey := object.Key("ReservationType")
		objectKey.String(string(v.ReservationType))
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateSubnetInput(v *CreateSubnetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.AvailabilityZoneId != nil {
		objectKey := object.Key("AvailabilityZoneId")
		objectKey.String(*v.AvailabilityZoneId)
	}

	if v.CidrBlock != nil {
		objectKey := object.Key("CidrBlock")
		objectKey.String(*v.CidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Ipv4IpamPoolId != nil {
		objectKey := object.Key("Ipv4IpamPoolId")
		objectKey.String(*v.Ipv4IpamPoolId)
	}

	if v.Ipv4NetmaskLength != nil {
		objectKey := object.Key("Ipv4NetmaskLength")
		objectKey.Integer(*v.Ipv4NetmaskLength)
	}

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.Ipv6IpamPoolId != nil {
		objectKey := object.Key("Ipv6IpamPoolId")
		objectKey.String(*v.Ipv6IpamPoolId)
	}

	if v.Ipv6Native != nil {
		objectKey := object.Key("Ipv6Native")
		objectKey.Boolean(*v.Ipv6Native)
	}

	if v.Ipv6NetmaskLength != nil {
		objectKey := object.Key("Ipv6NetmaskLength")
		objectKey.Integer(*v.Ipv6NetmaskLength)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Resources != nil {
		objectKey := object.FlatKey("ResourceId")
		if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil {
			return err
		}
	}

	if v.Tags != nil {
		objectKey := object.FlatKey("Tag")
		if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(v *CreateTrafficMirrorFilterInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(v *CreateTrafficMirrorFilterRuleInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationPortRange != nil {
		objectKey := object.Key("DestinationPortRange")
		if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Protocol != nil {
		objectKey := object.Key("Protocol")
		objectKey.Integer(*v.Protocol)
	}

	if len(v.RuleAction) > 0 {
		objectKey := object.Key("RuleAction")
		objectKey.String(string(v.RuleAction))
	}

	if v.RuleNumber != nil {
		objectKey := object.Key("RuleNumber")
		objectKey.Integer(*v.RuleNumber)
	}

	if v.SourceCidrBlock != nil {
		objectKey := object.Key("SourceCidrBlock")
		objectKey.String(*v.SourceCidrBlock)
	}

	if v.SourcePortRange != nil {
		objectKey := object.Key("SourcePortRange")
		if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil {
			return err
		}
	}

	if len(v.TrafficDirection) > 0 {
		objectKey := object.Key("TrafficDirection")
		objectKey.String(string(v.TrafficDirection))
	}

	if v.TrafficMirrorFilterId != nil {
		objectKey := object.Key("TrafficMirrorFilterId")
		objectKey.String(*v.TrafficMirrorFilterId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(v *CreateTrafficMirrorSessionInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PacketLength != nil {
		objectKey := object.Key("PacketLength")
		objectKey.Integer(*v.PacketLength)
	}

	if v.SessionNumber != nil {
		objectKey := object.Key("SessionNumber")
		objectKey.Integer(*v.SessionNumber)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TrafficMirrorFilterId != nil {
		objectKey := object.Key("TrafficMirrorFilterId")
		objectKey.String(*v.TrafficMirrorFilterId)
	}

	if v.TrafficMirrorTargetId != nil {
		objectKey := object.Key("TrafficMirrorTargetId")
		objectKey.String(*v.TrafficMirrorTargetId)
	}

	if v.VirtualNetworkId != nil {
		objectKey := object.Key("VirtualNetworkId")
		objectKey.Integer(*v.VirtualNetworkId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(v *CreateTrafficMirrorTargetInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GatewayLoadBalancerEndpointId != nil {
		objectKey := object.Key("GatewayLoadBalancerEndpointId")
		objectKey.String(*v.GatewayLoadBalancerEndpointId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.NetworkLoadBalancerArn != nil {
		objectKey := object.Key("NetworkLoadBalancerArn")
		objectKey.String(*v.NetworkLoadBalancerArn)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(v *CreateTransitGatewayConnectInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransportTransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransportTransitGatewayAttachmentId")
		objectKey.String(*v.TransportTransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(v *CreateTransitGatewayConnectPeerInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BgpOptions != nil {
		objectKey := object.Key("BgpOptions")
		if err := awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v.BgpOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InsideCidrBlocks != nil {
		objectKey := object.FlatKey("InsideCidrBlocks")
		if err := awsEc2query_serializeDocumentInsideCidrBlocksStringList(v.InsideCidrBlocks, objectKey); err != nil {
			return err
		}
	}

	if v.PeerAddress != nil {
		objectKey := object.Key("PeerAddress")
		objectKey.String(*v.PeerAddress)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAddress != nil {
		objectKey := object.Key("TransitGatewayAddress")
		objectKey.String(*v.TransitGatewayAddress)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayInput(v *CreateTransitGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentTransitGatewayRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(v *CreateTransitGatewayMulticastDomainInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentCreateTransitGatewayMulticastDomainRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(v *CreateTransitGatewayPeeringAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentCreateTransitGatewayPeeringAttachmentRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.PeerAccountId != nil {
		objectKey := object.Key("PeerAccountId")
		objectKey.String(*v.PeerAccountId)
	}

	if v.PeerRegion != nil {
		objectKey := object.Key("PeerRegion")
		objectKey.String(*v.PeerRegion)
	}

	if v.PeerTransitGatewayId != nil {
		objectKey := object.Key("PeerTransitGatewayId")
		objectKey.String(*v.PeerTransitGatewayId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayPolicyTableInput(v *CreateTransitGatewayPolicyTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecifications")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(v *CreateTransitGatewayPrefixListReferenceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Blackhole != nil {
		objectKey := object.Key("Blackhole")
		objectKey.Boolean(*v.Blackhole)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(v *CreateTransitGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Blackhole != nil {
		objectKey := object.Key("Blackhole")
		objectKey.Boolean(*v.Blackhole)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableAnnouncementInput(v *CreateTransitGatewayRouteTableAnnouncementInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PeeringAttachmentId != nil {
		objectKey := object.Key("PeeringAttachmentId")
		objectKey.String(*v.PeeringAttachmentId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(v *CreateTransitGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecifications")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(v *CreateTransitGatewayVpcAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentCreateTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetIds")
		if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecifications")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVerifiedAccessEndpointInput(v *CreateVerifiedAccessEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ApplicationDomain != nil {
		objectKey := object.Key("ApplicationDomain")
		objectKey.String(*v.ApplicationDomain)
	}

	if len(v.AttachmentType) > 0 {
		objectKey := object.Key("AttachmentType")
		objectKey.String(string(v.AttachmentType))
	}

	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.DomainCertificateArn != nil {
		objectKey := object.Key("DomainCertificateArn")
		objectKey.String(*v.DomainCertificateArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndpointDomainPrefix != nil {
		objectKey := object.Key("EndpointDomainPrefix")
		objectKey.String(*v.EndpointDomainPrefix)
	}

	if len(v.EndpointType) > 0 {
		objectKey := object.Key("EndpointType")
		objectKey.String(string(v.EndpointType))
	}

	if v.LoadBalancerOptions != nil {
		objectKey := object.Key("LoadBalancerOptions")
		if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointLoadBalancerOptions(v.LoadBalancerOptions, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceOptions != nil {
		objectKey := object.Key("NetworkInterfaceOptions")
		if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointEniOptions(v.NetworkInterfaceOptions, objectKey); err != nil {
			return err
		}
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVerifiedAccessGroupInput(v *CreateVerifiedAccessGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVerifiedAccessInstanceInput(v *CreateVerifiedAccessInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FIPSEnabled != nil {
		objectKey := object.Key("FIPSEnabled")
		objectKey.Boolean(*v.FIPSEnabled)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVerifiedAccessTrustProviderInput(v *CreateVerifiedAccessTrustProviderInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DeviceOptions != nil {
		objectKey := object.Key("DeviceOptions")
		if err := awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderDeviceOptions(v.DeviceOptions, objectKey); err != nil {
			return err
		}
	}

	if len(v.DeviceTrustProviderType) > 0 {
		objectKey := object.Key("DeviceTrustProviderType")
		objectKey.String(string(v.DeviceTrustProviderType))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.OidcOptions != nil {
		objectKey := object.Key("OidcOptions")
		if err := awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderOidcOptions(v.OidcOptions, objectKey); err != nil {
			return err
		}
	}

	if v.PolicyReferenceName != nil {
		objectKey := object.Key("PolicyReferenceName")
		objectKey.String(*v.PolicyReferenceName)
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.TrustProviderType) > 0 {
		objectKey := object.Key("TrustProviderType")
		objectKey.String(string(v.TrustProviderType))
	}

	if len(v.UserTrustProviderType) > 0 {
		objectKey := object.Key("UserTrustProviderType")
		objectKey.String(string(v.UserTrustProviderType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVolumeInput(v *CreateVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.Iops != nil {
		objectKey := object.Key("Iops")
		objectKey.Integer(*v.Iops)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.MultiAttachEnabled != nil {
		objectKey := object.Key("MultiAttachEnabled")
		objectKey.Boolean(*v.MultiAttachEnabled)
	}

	if v.OutpostArn != nil {
		objectKey := object.Key("OutpostArn")
		objectKey.String(*v.OutpostArn)
	}

	if v.Size != nil {
		objectKey := object.Key("Size")
		objectKey.Integer(*v.Size)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.Throughput != nil {
		objectKey := object.Key("Throughput")
		objectKey.Integer(*v.Throughput)
	}

	if len(v.VolumeType) > 0 {
		objectKey := object.Key("VolumeType")
		objectKey.String(string(v.VolumeType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(v *CreateVpcEndpointConnectionNotificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ConnectionEvents != nil {
		objectKey := object.FlatKey("ConnectionEvents")
		if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil {
			return err
		}
	}

	if v.ConnectionNotificationArn != nil {
		objectKey := object.Key("ConnectionNotificationArn")
		objectKey.String(*v.ConnectionNotificationArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	if v.VpcEndpointId != nil {
		objectKey := object.Key("VpcEndpointId")
		objectKey.String(*v.VpcEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpcEndpointInput(v *CreateVpcEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DnsOptions != nil {
		objectKey := object.Key("DnsOptions")
		if err := awsEc2query_serializeDocumentDnsOptionsSpecification(v.DnsOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.IpAddressType) > 0 {
		objectKey := object.Key("IpAddressType")
		objectKey.String(string(v.IpAddressType))
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.PrivateDnsEnabled != nil {
		objectKey := object.Key("PrivateDnsEnabled")
		objectKey.Boolean(*v.PrivateDnsEnabled)
	}

	if v.RouteTableIds != nil {
		objectKey := object.FlatKey("RouteTableId")
		if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RouteTableIds, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.ServiceName != nil {
		objectKey := object.Key("ServiceName")
		objectKey.String(*v.ServiceName)
	}

	if v.SubnetConfigurations != nil {
		objectKey := object.FlatKey("SubnetConfiguration")
		if err := awsEc2query_serializeDocumentSubnetConfigurationsList(v.SubnetConfigurations, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetId")
		if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.VpcEndpointType) > 0 {
		objectKey := object.Key("VpcEndpointType")
		objectKey.String(string(v.VpcEndpointType))
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(v *CreateVpcEndpointServiceConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AcceptanceRequired != nil {
		objectKey := object.Key("AcceptanceRequired")
		objectKey.Boolean(*v.AcceptanceRequired)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GatewayLoadBalancerArns != nil {
		objectKey := object.FlatKey("GatewayLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.GatewayLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkLoadBalancerArns != nil {
		objectKey := object.FlatKey("NetworkLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.NetworkLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateDnsName != nil {
		objectKey := object.Key("PrivateDnsName")
		objectKey.String(*v.PrivateDnsName)
	}

	if v.SupportedIpAddressTypes != nil {
		objectKey := object.FlatKey("SupportedIpAddressType")
		if err := awsEc2query_serializeDocumentValueStringList(v.SupportedIpAddressTypes, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpcInput(v *CreateVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AmazonProvidedIpv6CidrBlock != nil {
		objectKey := object.Key("AmazonProvidedIpv6CidrBlock")
		objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock)
	}

	if v.CidrBlock != nil {
		objectKey := object.Key("CidrBlock")
		objectKey.String(*v.CidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.InstanceTenancy) > 0 {
		objectKey := object.Key("InstanceTenancy")
		objectKey.String(string(v.InstanceTenancy))
	}

	if v.Ipv4IpamPoolId != nil {
		objectKey := object.Key("Ipv4IpamPoolId")
		objectKey.String(*v.Ipv4IpamPoolId)
	}

	if v.Ipv4NetmaskLength != nil {
		objectKey := object.Key("Ipv4NetmaskLength")
		objectKey.Integer(*v.Ipv4NetmaskLength)
	}

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.Ipv6CidrBlockNetworkBorderGroup != nil {
		objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup")
		objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup)
	}

	if v.Ipv6IpamPoolId != nil {
		objectKey := object.Key("Ipv6IpamPoolId")
		objectKey.String(*v.Ipv6IpamPoolId)
	}

	if v.Ipv6NetmaskLength != nil {
		objectKey := object.Key("Ipv6NetmaskLength")
		objectKey.Integer(*v.Ipv6NetmaskLength)
	}

	if v.Ipv6Pool != nil {
		objectKey := object.Key("Ipv6Pool")
		objectKey.String(*v.Ipv6Pool)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(v *CreateVpcPeeringConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PeerOwnerId != nil {
		objectKey := object.Key("PeerOwnerId")
		objectKey.String(*v.PeerOwnerId)
	}

	if v.PeerRegion != nil {
		objectKey := object.Key("PeerRegion")
		objectKey.String(*v.PeerRegion)
	}

	if v.PeerVpcId != nil {
		objectKey := object.Key("PeerVpcId")
		objectKey.String(*v.PeerVpcId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpnConnectionInput(v *CreateVpnConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerGatewayId != nil {
		objectKey := object.Key("CustomerGatewayId")
		objectKey.String(*v.CustomerGatewayId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.String(*v.Type)
	}

	if v.VpnGatewayId != nil {
		objectKey := object.Key("VpnGatewayId")
		objectKey.String(*v.VpnGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(v *CreateVpnConnectionRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentCreateVpnGatewayInput(v *CreateVpnGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AmazonSideAsn != nil {
		objectKey := object.Key("AmazonSideAsn")
		objectKey.Long(*v.AmazonSideAsn)
	}

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(v *DeleteCarrierGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CarrierGatewayId != nil {
		objectKey := object.Key("CarrierGatewayId")
		objectKey.String(*v.CarrierGatewayId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(v *DeleteClientVpnEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(v *DeleteClientVpnRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TargetVpcSubnetId != nil {
		objectKey := object.Key("TargetVpcSubnetId")
		objectKey.String(*v.TargetVpcSubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteCoipCidrInput(v *DeleteCoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.CoipPoolId != nil {
		objectKey := object.Key("CoipPoolId")
		objectKey.String(*v.CoipPoolId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteCoipPoolInput(v *DeleteCoipPoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CoipPoolId != nil {
		objectKey := object.Key("CoipPoolId")
		objectKey.String(*v.CoipPoolId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(v *DeleteCustomerGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerGatewayId != nil {
		objectKey := object.Key("CustomerGatewayId")
		objectKey.String(*v.CustomerGatewayId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(v *DeleteDhcpOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DhcpOptionsId != nil {
		objectKey := object.Key("DhcpOptionsId")
		objectKey.String(*v.DhcpOptionsId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(v *DeleteEgressOnlyInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EgressOnlyInternetGatewayId != nil {
		objectKey := object.Key("EgressOnlyInternetGatewayId")
		objectKey.String(*v.EgressOnlyInternetGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteFleetsInput(v *DeleteFleetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FleetIds != nil {
		objectKey := object.FlatKey("FleetId")
		if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TerminateInstances != nil {
		objectKey := object.Key("TerminateInstances")
		objectKey.Boolean(*v.TerminateInstances)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteFlowLogsInput(v *DeleteFlowLogsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FlowLogIds != nil {
		objectKey := object.FlatKey("FlowLogId")
		if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteFpgaImageInput(v *DeleteFpgaImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FpgaImageId != nil {
		objectKey := object.Key("FpgaImageId")
		objectKey.String(*v.FpgaImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteInstanceConnectEndpointInput(v *DeleteInstanceConnectEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceConnectEndpointId != nil {
		objectKey := object.Key("InstanceConnectEndpointId")
		objectKey.String(*v.InstanceConnectEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(v *DeleteInstanceEventWindowInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ForceDelete != nil {
		objectKey := object.Key("ForceDelete")
		objectKey.Boolean(*v.ForceDelete)
	}

	if v.InstanceEventWindowId != nil {
		objectKey := object.Key("InstanceEventWindowId")
		objectKey.String(*v.InstanceEventWindowId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(v *DeleteInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InternetGatewayId != nil {
		objectKey := object.Key("InternetGatewayId")
		objectKey.String(*v.InternetGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteIpamInput(v *DeleteIpamInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cascade != nil {
		objectKey := object.Key("Cascade")
		objectKey.Boolean(*v.Cascade)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteIpamPoolInput(v *DeleteIpamPoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cascade != nil {
		objectKey := object.Key("Cascade")
		objectKey.Boolean(*v.Cascade)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteIpamResourceDiscoveryInput(v *DeleteIpamResourceDiscoveryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteIpamScopeInput(v *DeleteIpamScopeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamScopeId != nil {
		objectKey := object.Key("IpamScopeId")
		objectKey.String(*v.IpamScopeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteKeyPairInput(v *DeleteKeyPairInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.KeyPairId != nil {
		objectKey := object.Key("KeyPairId")
		objectKey.String(*v.KeyPairId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(v *DeleteLaunchTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(v *DeleteLaunchTemplateVersionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.Versions != nil {
		objectKey := object.FlatKey("LaunchTemplateVersion")
		if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(v *DeleteLocalGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableInput(v *DeleteLocalGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId != nil {
		objectKey := object.Key("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId")
		objectKey.String(*v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(v *DeleteLocalGatewayRouteTableVpcAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableVpcAssociationId != nil {
		objectKey := object.Key("LocalGatewayRouteTableVpcAssociationId")
		objectKey.String(*v.LocalGatewayRouteTableVpcAssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(v *DeleteManagedPrefixListInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNatGatewayInput(v *DeleteNatGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(v *DeleteNetworkAclEntryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Egress != nil {
		objectKey := object.Key("Egress")
		objectKey.Boolean(*v.Egress)
	}

	if v.NetworkAclId != nil {
		objectKey := object.Key("NetworkAclId")
		objectKey.String(*v.NetworkAclId)
	}

	if v.RuleNumber != nil {
		objectKey := object.Key("RuleNumber")
		objectKey.Integer(*v.RuleNumber)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkAclInput(v *DeleteNetworkAclInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkAclId != nil {
		objectKey := object.Key("NetworkAclId")
		objectKey.String(*v.NetworkAclId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisInput(v *DeleteNetworkInsightsAccessScopeAnalysisInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsAccessScopeAnalysisId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeAnalysisId")
		objectKey.String(*v.NetworkInsightsAccessScopeAnalysisId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeInput(v *DeleteNetworkInsightsAccessScopeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsAccessScopeId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeId")
		objectKey.String(*v.NetworkInsightsAccessScopeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(v *DeleteNetworkInsightsAnalysisInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsAnalysisId != nil {
		objectKey := object.Key("NetworkInsightsAnalysisId")
		objectKey.String(*v.NetworkInsightsAnalysisId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(v *DeleteNetworkInsightsPathInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsPathId != nil {
		objectKey := object.Key("NetworkInsightsPathId")
		objectKey.String(*v.NetworkInsightsPathId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(v *DeleteNetworkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(v *DeleteNetworkInterfacePermissionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Force != nil {
		objectKey := object.Key("Force")
		objectKey.Boolean(*v.Force)
	}

	if v.NetworkInterfacePermissionId != nil {
		objectKey := object.Key("NetworkInterfacePermissionId")
		objectKey.String(*v.NetworkInterfacePermissionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeletePlacementGroupInput(v *DeletePlacementGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeletePublicIpv4PoolInput(v *DeletePublicIpv4PoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PoolId != nil {
		objectKey := object.Key("PoolId")
		objectKey.String(*v.PoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(v *DeleteQueuedReservedInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ReservedInstancesIds != nil {
		objectKey := object.FlatKey("ReservedInstancesId")
		if err := awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v.ReservedInstancesIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteRouteInput(v *DeleteRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationIpv6CidrBlock != nil {
		objectKey := object.Key("DestinationIpv6CidrBlock")
		objectKey.String(*v.DestinationIpv6CidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteRouteTableInput(v *DeleteRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(v *DeleteSecurityGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteSnapshotInput(v *DeleteSnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(v *DeleteSpotDatafeedSubscriptionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(v *DeleteSubnetCidrReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetCidrReservationId != nil {
		objectKey := object.Key("SubnetCidrReservationId")
		objectKey.String(*v.SubnetCidrReservationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteSubnetInput(v *DeleteSubnetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Resources != nil {
		objectKey := object.FlatKey("ResourceId")
		if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil {
			return err
		}
	}

	if v.Tags != nil {
		objectKey := object.FlatKey("Tag")
		if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(v *DeleteTrafficMirrorFilterInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TrafficMirrorFilterId != nil {
		objectKey := object.Key("TrafficMirrorFilterId")
		objectKey.String(*v.TrafficMirrorFilterId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(v *DeleteTrafficMirrorFilterRuleInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TrafficMirrorFilterRuleId != nil {
		objectKey := object.Key("TrafficMirrorFilterRuleId")
		objectKey.String(*v.TrafficMirrorFilterRuleId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(v *DeleteTrafficMirrorSessionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TrafficMirrorSessionId != nil {
		objectKey := object.Key("TrafficMirrorSessionId")
		objectKey.String(*v.TrafficMirrorSessionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(v *DeleteTrafficMirrorTargetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TrafficMirrorTargetId != nil {
		objectKey := object.Key("TrafficMirrorTargetId")
		objectKey.String(*v.TrafficMirrorTargetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(v *DeleteTransitGatewayConnectInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(v *DeleteTransitGatewayConnectPeerInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayConnectPeerId != nil {
		objectKey := object.Key("TransitGatewayConnectPeerId")
		objectKey.String(*v.TransitGatewayConnectPeerId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(v *DeleteTransitGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(v *DeleteTransitGatewayMulticastDomainInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(v *DeleteTransitGatewayPeeringAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayPolicyTableInput(v *DeleteTransitGatewayPolicyTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayPolicyTableId != nil {
		objectKey := object.Key("TransitGatewayPolicyTableId")
		objectKey.String(*v.TransitGatewayPolicyTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(v *DeleteTransitGatewayPrefixListReferenceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(v *DeleteTransitGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementInput(v *DeleteTransitGatewayRouteTableAnnouncementInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayRouteTableAnnouncementId != nil {
		objectKey := object.Key("TransitGatewayRouteTableAnnouncementId")
		objectKey.String(*v.TransitGatewayRouteTableAnnouncementId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(v *DeleteTransitGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(v *DeleteTransitGatewayVpcAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVerifiedAccessEndpointInput(v *DeleteVerifiedAccessEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessEndpointId != nil {
		objectKey := object.Key("VerifiedAccessEndpointId")
		objectKey.String(*v.VerifiedAccessEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVerifiedAccessGroupInput(v *DeleteVerifiedAccessGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVerifiedAccessInstanceInput(v *DeleteVerifiedAccessInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVerifiedAccessTrustProviderInput(v *DeleteVerifiedAccessTrustProviderInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessTrustProviderId != nil {
		objectKey := object.Key("VerifiedAccessTrustProviderId")
		objectKey.String(*v.VerifiedAccessTrustProviderId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVolumeInput(v *DeleteVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(v *DeleteVpcEndpointConnectionNotificationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConnectionNotificationIds != nil {
		objectKey := object.FlatKey("ConnectionNotificationId")
		if err := awsEc2query_serializeDocumentConnectionNotificationIdsList(v.ConnectionNotificationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(v *DeleteVpcEndpointServiceConfigurationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ServiceIds != nil {
		objectKey := object.FlatKey("ServiceId")
		if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(v *DeleteVpcEndpointsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcEndpointIds != nil {
		objectKey := object.FlatKey("VpcEndpointId")
		if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpcInput(v *DeleteVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(v *DeleteVpcPeeringConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(v *DeleteVpnConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(v *DeleteVpnConnectionRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(v *DeleteVpnGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpnGatewayId != nil {
		objectKey := object.Key("VpnGatewayId")
		objectKey.String(*v.VpnGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeprovisionIpamByoasnInput(v *DeprovisionIpamByoasnInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Asn != nil {
		objectKey := object.Key("Asn")
		objectKey.String(*v.Asn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeprovisionIpamPoolCidrInput(v *DeprovisionIpamPoolCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeprovisionPublicIpv4PoolCidrInput(v *DeprovisionPublicIpv4PoolCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PoolId != nil {
		objectKey := object.Key("PoolId")
		objectKey.String(*v.PoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeregisterImageInput(v *DeregisterImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(v *DeregisterInstanceEventNotificationAttributesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceTagAttribute != nil {
		objectKey := object.Key("InstanceTagAttribute")
		if err := awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(v *DeregisterTransitGatewayMulticastGroupMembersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupIpAddress != nil {
		objectKey := object.Key("GroupIpAddress")
		objectKey.String(*v.GroupIpAddress)
	}

	if v.NetworkInterfaceIds != nil {
		objectKey := object.FlatKey("NetworkInterfaceIds")
		if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(v *DeregisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupIpAddress != nil {
		objectKey := object.Key("GroupIpAddress")
		objectKey.String(*v.GroupIpAddress)
	}

	if v.NetworkInterfaceIds != nil {
		objectKey := object.FlatKey("NetworkInterfaceIds")
		if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AttributeNames != nil {
		objectKey := object.FlatKey("AttributeName")
		if err := awsEc2query_serializeDocumentAccountAttributeNameStringList(v.AttributeNames, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(v *DescribeAddressesAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationIds != nil {
		objectKey := object.FlatKey("AllocationId")
		if err := awsEc2query_serializeDocumentAllocationIds(v.AllocationIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentDescribeAddressesInput(v *DescribeAddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationIds != nil {
		objectKey := object.FlatKey("AllocationId")
		if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.PublicIps != nil {
		objectKey := object.FlatKey("PublicIp")
		if err := awsEc2query_serializeDocumentPublicIpStringList(v.PublicIps, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeAddressTransfersInput(v *DescribeAddressTransfersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationIds != nil {
		objectKey := object.FlatKey("AllocationId")
		if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(v *DescribeAggregateIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(v *DescribeAvailabilityZonesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllAvailabilityZones != nil {
		objectKey := object.Key("AllAvailabilityZones")
		objectKey.Boolean(*v.AllAvailabilityZones)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ZoneIds != nil {
		objectKey := object.FlatKey("ZoneId")
		if err := awsEc2query_serializeDocumentZoneIdStringList(v.ZoneIds, objectKey); err != nil {
			return err
		}
	}

	if v.ZoneNames != nil {
		objectKey := object.FlatKey("ZoneName")
		if err := awsEc2query_serializeDocumentZoneNameStringList(v.ZoneNames, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsInput(v *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeBundleTasksInput(v *DescribeBundleTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BundleIds != nil {
		objectKey := object.FlatKey("BundleId")
		if err := awsEc2query_serializeDocumentBundleIdStringList(v.BundleIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(v *DescribeByoipCidrsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentDescribeCapacityBlockOfferingsInput(v *DescribeCapacityBlockOfferingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityDurationHours != nil {
		objectKey := object.Key("CapacityDurationHours")
		objectKey.Integer(*v.CapacityDurationHours)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndDateRange != nil {
		objectKey := object.Key("EndDateRange")
		objectKey.String(smithytime.FormatDateTime(*v.EndDateRange))
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		objectKey.String(*v.InstanceType)
	}

	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.StartDateRange != nil {
		objectKey := object.Key("StartDateRange")
		objectKey.String(smithytime.FormatDateTime(*v.StartDateRange))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeCapacityReservationFleetsInput(v *DescribeCapacityReservationFleetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationFleetIds != nil {
		objectKey := object.FlatKey("CapacityReservationFleetId")
		if err := awsEc2query_serializeDocumentCapacityReservationFleetIdSet(v.CapacityReservationFleetIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(v *DescribeCapacityReservationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationIds != nil {
		objectKey := object.FlatKey("CapacityReservationId")
		if err := awsEc2query_serializeDocumentCapacityReservationIdSet(v.CapacityReservationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(v *DescribeCarrierGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CarrierGatewayIds != nil {
		objectKey := object.FlatKey("CarrierGatewayId")
		if err := awsEc2query_serializeDocumentCarrierGatewayIdSet(v.CarrierGatewayIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(v *DescribeClassicLinkInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(v *DescribeClientVpnAuthorizationRulesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(v *DescribeClientVpnConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(v *DescribeClientVpnEndpointsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointIds != nil {
		objectKey := object.FlatKey("ClientVpnEndpointId")
		if err := awsEc2query_serializeDocumentClientVpnEndpointIdList(v.ClientVpnEndpointIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(v *DescribeClientVpnRoutesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(v *DescribeClientVpnTargetNetworksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationIds != nil {
		objectKey := object.FlatKey("AssociationIds")
		if err := awsEc2query_serializeDocumentValueStringList(v.AssociationIds, objectKey); err != nil {
			return err
		}
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(v *DescribeCoipPoolsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PoolIds != nil {
		objectKey := object.FlatKey("PoolId")
		if err := awsEc2query_serializeDocumentCoipPoolIdSet(v.PoolIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeConversionTasksInput(v *DescribeConversionTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConversionTaskIds != nil {
		objectKey := object.FlatKey("ConversionTaskId")
		if err := awsEc2query_serializeDocumentConversionIdStringList(v.ConversionTaskIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(v *DescribeCustomerGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerGatewayIds != nil {
		objectKey := object.FlatKey("CustomerGatewayId")
		if err := awsEc2query_serializeDocumentCustomerGatewayIdStringList(v.CustomerGatewayIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(v *DescribeDhcpOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DhcpOptionsIds != nil {
		objectKey := object.FlatKey("DhcpOptionsId")
		if err := awsEc2query_serializeDocumentDhcpOptionsIdStringList(v.DhcpOptionsIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(v *DescribeEgressOnlyInternetGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EgressOnlyInternetGatewayIds != nil {
		objectKey := object.FlatKey("EgressOnlyInternetGatewayId")
		if err := awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v.EgressOnlyInternetGatewayIds, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeElasticGpusInput(v *DescribeElasticGpusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ElasticGpuIds != nil {
		objectKey := object.FlatKey("ElasticGpuId")
		if err := awsEc2query_serializeDocumentElasticGpuIdSet(v.ElasticGpuIds, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(v *DescribeExportImageTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ExportImageTaskIds != nil {
		objectKey := object.FlatKey("ExportImageTaskId")
		if err := awsEc2query_serializeDocumentExportImageTaskIdList(v.ExportImageTaskIds, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeExportTasksInput(v *DescribeExportTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ExportTaskIds != nil {
		objectKey := object.FlatKey("ExportTaskId")
		if err := awsEc2query_serializeDocumentExportTaskIdStringList(v.ExportTaskIds, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFastLaunchImagesInput(v *DescribeFastLaunchImagesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ImageIds != nil {
		objectKey := object.FlatKey("ImageId")
		if err := awsEc2query_serializeDocumentFastLaunchImageIdList(v.ImageIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(v *DescribeFastSnapshotRestoresInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(v *DescribeFleetHistoryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.EventType) > 0 {
		objectKey := object.Key("EventType")
		objectKey.String(string(v.EventType))
	}

	if v.FleetId != nil {
		objectKey := object.Key("FleetId")
		objectKey.String(*v.FleetId)
	}

	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.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(v *DescribeFleetInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.FleetId != nil {
		objectKey := object.Key("FleetId")
		objectKey.String(*v.FleetId)
	}

	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 awsEc2query_serializeOpDocumentDescribeFleetsInput(v *DescribeFleetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.FleetIds != nil {
		objectKey := object.FlatKey("FleetId")
		if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFlowLogsInput(v *DescribeFlowLogsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filter != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
			return err
		}
	}

	if v.FlowLogIds != nil {
		objectKey := object.FlatKey("FlowLogId")
		if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(v *DescribeFpgaImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FpgaImageId != nil {
		objectKey := object.Key("FpgaImageId")
		objectKey.String(*v.FpgaImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(v *DescribeFpgaImagesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.FpgaImageIds != nil {
		objectKey := object.FlatKey("FpgaImageId")
		if err := awsEc2query_serializeDocumentFpgaImageIdList(v.FpgaImageIds, 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.Owners != nil {
		objectKey := object.FlatKey("Owner")
		if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(v *DescribeHostReservationOfferingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filter != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
			return err
		}
	}

	if v.MaxDuration != nil {
		objectKey := object.Key("MaxDuration")
		objectKey.Integer(*v.MaxDuration)
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.MinDuration != nil {
		objectKey := object.Key("MinDuration")
		objectKey.Integer(*v.MinDuration)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.OfferingId != nil {
		objectKey := object.Key("OfferingId")
		objectKey.String(*v.OfferingId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeHostReservationsInput(v *DescribeHostReservationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filter != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
			return err
		}
	}

	if v.HostReservationIdSet != nil {
		objectKey := object.FlatKey("HostReservationIdSet")
		if err := awsEc2query_serializeDocumentHostReservationIdSet(v.HostReservationIdSet, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeHostsInput(v *DescribeHostsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filter != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
			return err
		}
	}

	if v.HostIds != nil {
		objectKey := object.FlatKey("HostId")
		if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(v *DescribeIamInstanceProfileAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationIds != nil {
		objectKey := object.FlatKey("AssociationId")
		if err := awsEc2query_serializeDocumentAssociationIdList(v.AssociationIds, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(v *DescribeIdentityIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PrincipalArn != nil {
		objectKey := object.Key("PrincipalArn")
		objectKey.String(*v.PrincipalArn)
	}

	if v.Resource != nil {
		objectKey := object.Key("Resource")
		objectKey.String(*v.Resource)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIdFormatInput(v *DescribeIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Resource != nil {
		objectKey := object.Key("Resource")
		objectKey.String(*v.Resource)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeImageAttributeInput(v *DescribeImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeImagesInput(v *DescribeImagesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ExecutableUsers != nil {
		objectKey := object.FlatKey("ExecutableBy")
		if err := awsEc2query_serializeDocumentExecutableByStringList(v.ExecutableUsers, objectKey); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ImageIds != nil {
		objectKey := object.FlatKey("ImageId")
		if err := awsEc2query_serializeDocumentImageIdStringList(v.ImageIds, objectKey); err != nil {
			return err
		}
	}

	if v.IncludeDeprecated != nil {
		objectKey := object.Key("IncludeDeprecated")
		objectKey.Boolean(*v.IncludeDeprecated)
	}

	if v.IncludeDisabled != nil {
		objectKey := object.Key("IncludeDisabled")
		objectKey.Boolean(*v.IncludeDisabled)
	}

	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.Owners != nil {
		objectKey := object.FlatKey("Owner")
		if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(v *DescribeImportImageTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filters")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ImportTaskIds != nil {
		objectKey := object.FlatKey("ImportTaskId")
		if err := awsEc2query_serializeDocumentImportTaskIdList(v.ImportTaskIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(v *DescribeImportSnapshotTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filters")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ImportTaskIds != nil {
		objectKey := object.FlatKey("ImportTaskId")
		if err := awsEc2query_serializeDocumentImportSnapshotTaskIdList(v.ImportTaskIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(v *DescribeInstanceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceConnectEndpointsInput(v *DescribeInstanceConnectEndpointsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceConnectEndpointIds != nil {
		objectKey := object.FlatKey("InstanceConnectEndpointId")
		if err := awsEc2query_serializeDocumentValueStringList(v.InstanceConnectEndpointIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(v *DescribeInstanceCreditSpecificationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(v *DescribeInstanceEventNotificationAttributesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(v *DescribeInstanceEventWindowsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceEventWindowIds != nil {
		objectKey := object.FlatKey("InstanceEventWindowId")
		if err := awsEc2query_serializeDocumentInstanceEventWindowIdSet(v.InstanceEventWindowIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstancesInput(v *DescribeInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(v *DescribeInstanceStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IncludeAllInstances != nil {
		objectKey := object.Key("IncludeAllInstances")
		objectKey.Boolean(*v.IncludeAllInstances)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(v *DescribeInstanceTopologyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.GroupNames != nil {
		objectKey := object.FlatKey("GroupName")
		if err := awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v.GroupNames, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v.InstanceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(v *DescribeInstanceTypeOfferingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if len(v.LocationType) > 0 {
		objectKey := object.Key("LocationType")
		objectKey.String(string(v.LocationType))
	}

	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 awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(v *DescribeInstanceTypesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceTypes != nil {
		objectKey := object.FlatKey("InstanceType")
		if err := awsEc2query_serializeDocumentRequestInstanceTypeList(v.InstanceTypes, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(v *DescribeInternetGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InternetGatewayIds != nil {
		objectKey := object.FlatKey("InternetGatewayId")
		if err := awsEc2query_serializeDocumentInternetGatewayIdList(v.InternetGatewayIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpamByoasnInput(v *DescribeIpamByoasnInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentDescribeIpamPoolsInput(v *DescribeIpamPoolsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamPoolIds != nil {
		objectKey := object.FlatKey("IpamPoolId")
		if err := awsEc2query_serializeDocumentValueStringList(v.IpamPoolIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveriesInput(v *DescribeIpamResourceDiscoveriesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamResourceDiscoveryIds != nil {
		objectKey := object.FlatKey("IpamResourceDiscoveryId")
		if err := awsEc2query_serializeDocumentValueStringList(v.IpamResourceDiscoveryIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveryAssociationsInput(v *DescribeIpamResourceDiscoveryAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamResourceDiscoveryAssociationIds != nil {
		objectKey := object.FlatKey("IpamResourceDiscoveryAssociationId")
		if err := awsEc2query_serializeDocumentValueStringList(v.IpamResourceDiscoveryAssociationIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpamScopesInput(v *DescribeIpamScopesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamScopeIds != nil {
		objectKey := object.FlatKey("IpamScopeId")
		if err := awsEc2query_serializeDocumentValueStringList(v.IpamScopeIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpamsInput(v *DescribeIpamsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamIds != nil {
		objectKey := object.FlatKey("IpamId")
		if err := awsEc2query_serializeDocumentValueStringList(v.IpamIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(v *DescribeIpv6PoolsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PoolIds != nil {
		objectKey := object.FlatKey("PoolId")
		if err := awsEc2query_serializeDocumentIpv6PoolIdList(v.PoolIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeKeyPairsInput(v *DescribeKeyPairsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IncludePublicKey != nil {
		objectKey := object.Key("IncludePublicKey")
		objectKey.Boolean(*v.IncludePublicKey)
	}

	if v.KeyNames != nil {
		objectKey := object.FlatKey("KeyName")
		if err := awsEc2query_serializeDocumentKeyNameStringList(v.KeyNames, objectKey); err != nil {
			return err
		}
	}

	if v.KeyPairIds != nil {
		objectKey := object.FlatKey("KeyPairId")
		if err := awsEc2query_serializeDocumentKeyPairIdStringList(v.KeyPairIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(v *DescribeLaunchTemplatesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateIds != nil {
		objectKey := object.FlatKey("LaunchTemplateId")
		if err := awsEc2query_serializeDocumentLaunchTemplateIdStringList(v.LaunchTemplateIds, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateNames != nil {
		objectKey := object.FlatKey("LaunchTemplateName")
		if err := awsEc2query_serializeDocumentLaunchTemplateNameStringList(v.LaunchTemplateNames, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(v *DescribeLaunchTemplateVersionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.MaxVersion != nil {
		objectKey := object.Key("MaxVersion")
		objectKey.String(*v.MaxVersion)
	}

	if v.MinVersion != nil {
		objectKey := object.Key("MinVersion")
		objectKey.String(*v.MinVersion)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.ResolveAlias != nil {
		objectKey := object.Key("ResolveAlias")
		objectKey.Boolean(*v.ResolveAlias)
	}

	if v.Versions != nil {
		objectKey := object.FlatKey("LaunchTemplateVersion")
		if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(v *DescribeLocalGatewayRouteTablesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayRouteTableIds != nil {
		objectKey := object.FlatKey("LocalGatewayRouteTableId")
		if err := awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v.LocalGatewayRouteTableIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(v *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds != nil {
		objectKey := object.FlatKey("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId")
		if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(v *DescribeLocalGatewayRouteTableVpcAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayRouteTableVpcAssociationIds != nil {
		objectKey := object.FlatKey("LocalGatewayRouteTableVpcAssociationId")
		if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v.LocalGatewayRouteTableVpcAssociationIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(v *DescribeLocalGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayIds != nil {
		objectKey := object.FlatKey("LocalGatewayId")
		if err := awsEc2query_serializeDocumentLocalGatewayIdSet(v.LocalGatewayIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(v *DescribeLocalGatewayVirtualInterfaceGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayVirtualInterfaceGroupIds != nil {
		objectKey := object.FlatKey("LocalGatewayVirtualInterfaceGroupId")
		if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v.LocalGatewayVirtualInterfaceGroupIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(v *DescribeLocalGatewayVirtualInterfacesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayVirtualInterfaceIds != nil {
		objectKey := object.FlatKey("LocalGatewayVirtualInterfaceId")
		if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v.LocalGatewayVirtualInterfaceIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeLockedSnapshotsInput(v *DescribeLockedSnapshotsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.SnapshotIds != nil {
		objectKey := object.FlatKey("SnapshotId")
		if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(v *DescribeManagedPrefixListsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PrefixListIds != nil {
		objectKey := object.FlatKey("PrefixListId")
		if err := awsEc2query_serializeDocumentValueStringList(v.PrefixListIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(v *DescribeMovingAddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PublicIps != nil {
		objectKey := object.FlatKey("PublicIp")
		if err := awsEc2query_serializeDocumentValueStringList(v.PublicIps, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(v *DescribeNatGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filter != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NatGatewayIds != nil {
		objectKey := object.FlatKey("NatGatewayId")
		if err := awsEc2query_serializeDocumentNatGatewayIdStringList(v.NatGatewayIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(v *DescribeNetworkAclsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkAclIds != nil {
		objectKey := object.FlatKey("NetworkAclId")
		if err := awsEc2query_serializeDocumentNetworkAclIdStringList(v.NetworkAclIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesInput(v *DescribeNetworkInsightsAccessScopeAnalysesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AnalysisStartTimeBegin != nil {
		objectKey := object.Key("AnalysisStartTimeBegin")
		objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTimeBegin))
	}

	if v.AnalysisStartTimeEnd != nil {
		objectKey := object.Key("AnalysisStartTimeEnd")
		objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTimeEnd))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInsightsAccessScopeAnalysisIds != nil {
		objectKey := object.FlatKey("NetworkInsightsAccessScopeAnalysisId")
		if err := awsEc2query_serializeDocumentNetworkInsightsAccessScopeAnalysisIdList(v.NetworkInsightsAccessScopeAnalysisIds, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInsightsAccessScopeId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeId")
		objectKey.String(*v.NetworkInsightsAccessScopeId)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopesInput(v *DescribeNetworkInsightsAccessScopesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInsightsAccessScopeIds != nil {
		objectKey := object.FlatKey("NetworkInsightsAccessScopeId")
		if err := awsEc2query_serializeDocumentNetworkInsightsAccessScopeIdList(v.NetworkInsightsAccessScopeIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(v *DescribeNetworkInsightsAnalysesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AnalysisEndTime != nil {
		objectKey := object.Key("AnalysisEndTime")
		objectKey.String(smithytime.FormatDateTime(*v.AnalysisEndTime))
	}

	if v.AnalysisStartTime != nil {
		objectKey := object.Key("AnalysisStartTime")
		objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTime))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInsightsAnalysisIds != nil {
		objectKey := object.FlatKey("NetworkInsightsAnalysisId")
		if err := awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v.NetworkInsightsAnalysisIds, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInsightsPathId != nil {
		objectKey := object.Key("NetworkInsightsPathId")
		objectKey.String(*v.NetworkInsightsPathId)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(v *DescribeNetworkInsightsPathsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInsightsPathIds != nil {
		objectKey := object.FlatKey("NetworkInsightsPathId")
		if err := awsEc2query_serializeDocumentNetworkInsightsPathIdList(v.NetworkInsightsPathIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(v *DescribeNetworkInterfaceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(v *DescribeNetworkInterfacePermissionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInterfacePermissionIds != nil {
		objectKey := object.FlatKey("NetworkInterfacePermissionId")
		if err := awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v.NetworkInterfacePermissionIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(v *DescribeNetworkInterfacesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInterfaceIds != nil {
		objectKey := object.FlatKey("NetworkInterfaceId")
		if err := awsEc2query_serializeDocumentNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(v *DescribePlacementGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.GroupIds != nil {
		objectKey := object.FlatKey("GroupId")
		if err := awsEc2query_serializeDocumentPlacementGroupIdStringList(v.GroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.GroupNames != nil {
		objectKey := object.FlatKey("GroupName")
		if err := awsEc2query_serializeDocumentPlacementGroupStringList(v.GroupNames, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribePrefixListsInput(v *DescribePrefixListsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PrefixListIds != nil {
		objectKey := object.FlatKey("PrefixListId")
		if err := awsEc2query_serializeDocumentPrefixListResourceIdStringList(v.PrefixListIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(v *DescribePrincipalIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.FlatKey("Resource")
		if err := awsEc2query_serializeDocumentResourceList(v.Resources, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(v *DescribePublicIpv4PoolsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PoolIds != nil {
		objectKey := object.FlatKey("PoolId")
		if err := awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v.PoolIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeRegionsInput(v *DescribeRegionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllRegions != nil {
		objectKey := object.Key("AllRegions")
		objectKey.Boolean(*v.AllRegions)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.RegionNames != nil {
		objectKey := object.FlatKey("RegionName")
		if err := awsEc2query_serializeDocumentRegionNameStringList(v.RegionNames, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(v *DescribeReplaceRootVolumeTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.ReplaceRootVolumeTaskIds != nil {
		objectKey := object.FlatKey("ReplaceRootVolumeTaskId")
		if err := awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v.ReplaceRootVolumeTaskIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(v *DescribeReservedInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if len(v.OfferingClass) > 0 {
		objectKey := object.Key("OfferingClass")
		objectKey.String(string(v.OfferingClass))
	}

	if len(v.OfferingType) > 0 {
		objectKey := object.Key("OfferingType")
		objectKey.String(string(v.OfferingType))
	}

	if v.ReservedInstancesIds != nil {
		objectKey := object.FlatKey("ReservedInstancesId")
		if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(v *DescribeReservedInstancesListingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ReservedInstancesId != nil {
		objectKey := object.Key("ReservedInstancesId")
		objectKey.String(*v.ReservedInstancesId)
	}

	if v.ReservedInstancesListingId != nil {
		objectKey := object.Key("ReservedInstancesListingId")
		objectKey.String(*v.ReservedInstancesListingId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(v *DescribeReservedInstancesModificationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.ReservedInstancesModificationIds != nil {
		objectKey := object.FlatKey("ReservedInstancesModificationId")
		if err := awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v.ReservedInstancesModificationIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(v *DescribeReservedInstancesOfferingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IncludeMarketplace != nil {
		objectKey := object.Key("IncludeMarketplace")
		objectKey.Boolean(*v.IncludeMarketplace)
	}

	if len(v.InstanceTenancy) > 0 {
		objectKey := object.Key("InstanceTenancy")
		objectKey.String(string(v.InstanceTenancy))
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.MaxDuration != nil {
		objectKey := object.Key("MaxDuration")
		objectKey.Long(*v.MaxDuration)
	}

	if v.MaxInstanceCount != nil {
		objectKey := object.Key("MaxInstanceCount")
		objectKey.Integer(*v.MaxInstanceCount)
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.MinDuration != nil {
		objectKey := object.Key("MinDuration")
		objectKey.Long(*v.MinDuration)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if len(v.OfferingClass) > 0 {
		objectKey := object.Key("OfferingClass")
		objectKey.String(string(v.OfferingClass))
	}

	if len(v.OfferingType) > 0 {
		objectKey := object.Key("OfferingType")
		objectKey.String(string(v.OfferingType))
	}

	if len(v.ProductDescription) > 0 {
		objectKey := object.Key("ProductDescription")
		objectKey.String(string(v.ProductDescription))
	}

	if v.ReservedInstancesOfferingIds != nil {
		objectKey := object.FlatKey("ReservedInstancesOfferingId")
		if err := awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v.ReservedInstancesOfferingIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeRouteTablesInput(v *DescribeRouteTablesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.RouteTableIds != nil {
		objectKey := object.FlatKey("RouteTableId")
		if err := awsEc2query_serializeDocumentRouteTableIdStringList(v.RouteTableIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(v *DescribeScheduledInstanceAvailabilityInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.FirstSlotStartTimeRange != nil {
		objectKey := object.Key("FirstSlotStartTimeRange")
		if err := awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v.FirstSlotStartTimeRange, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.MaxSlotDurationInHours != nil {
		objectKey := object.Key("MaxSlotDurationInHours")
		objectKey.Integer(*v.MaxSlotDurationInHours)
	}

	if v.MinSlotDurationInHours != nil {
		objectKey := object.Key("MinSlotDurationInHours")
		objectKey.Integer(*v.MinSlotDurationInHours)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.Recurrence != nil {
		objectKey := object.Key("Recurrence")
		if err := awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v.Recurrence, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(v *DescribeScheduledInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.ScheduledInstanceIds != nil {
		objectKey := object.FlatKey("ScheduledInstanceId")
		if err := awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v.ScheduledInstanceIds, objectKey); err != nil {
			return err
		}
	}

	if v.SlotStartTimeRange != nil {
		objectKey := object.Key("SlotStartTimeRange")
		if err := awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v.SlotStartTimeRange, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(v *DescribeSecurityGroupReferencesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupId != nil {
		objectKey := object.FlatKey("GroupId")
		if err := awsEc2query_serializeDocumentGroupIds(v.GroupId, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(v *DescribeSecurityGroupRulesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.SecurityGroupRuleIds != nil {
		objectKey := object.FlatKey("SecurityGroupRuleId")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(v *DescribeSecurityGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.GroupIds != nil {
		objectKey := object.FlatKey("GroupId")
		if err := awsEc2query_serializeDocumentGroupIdStringList(v.GroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.GroupNames != nil {
		objectKey := object.FlatKey("GroupName")
		if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(v *DescribeSnapshotAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSnapshotsInput(v *DescribeSnapshotsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.OwnerIds != nil {
		objectKey := object.FlatKey("Owner")
		if err := awsEc2query_serializeDocumentOwnerStringList(v.OwnerIds, objectKey); err != nil {
			return err
		}
	}

	if v.RestorableByUserIds != nil {
		objectKey := object.FlatKey("RestorableBy")
		if err := awsEc2query_serializeDocumentRestorableByStringList(v.RestorableByUserIds, objectKey); err != nil {
			return err
		}
	}

	if v.SnapshotIds != nil {
		objectKey := object.FlatKey("SnapshotId")
		if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(v *DescribeSnapshotTierStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(v *DescribeSpotDatafeedSubscriptionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(v *DescribeSpotFleetInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.SpotFleetRequestId != nil {
		objectKey := object.Key("SpotFleetRequestId")
		objectKey.String(*v.SpotFleetRequestId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(v *DescribeSpotFleetRequestHistoryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.EventType) > 0 {
		objectKey := object.Key("EventType")
		objectKey.String(string(v.EventType))
	}

	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.SpotFleetRequestId != nil {
		objectKey := object.Key("SpotFleetRequestId")
		objectKey.String(*v.SpotFleetRequestId)
	}

	if v.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(v *DescribeSpotFleetRequestsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.SpotFleetRequestIds != nil {
		objectKey := object.FlatKey("SpotFleetRequestId")
		if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(v *DescribeSpotInstanceRequestsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.SpotInstanceRequestIds != nil {
		objectKey := object.FlatKey("SpotInstanceRequestId")
		if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(v *DescribeSpotPriceHistoryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndTime != nil {
		objectKey := object.Key("EndTime")
		objectKey.String(smithytime.FormatDateTime(*v.EndTime))
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceTypes != nil {
		objectKey := object.FlatKey("InstanceType")
		if err := awsEc2query_serializeDocumentInstanceTypeList(v.InstanceTypes, 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.ProductDescriptions != nil {
		objectKey := object.FlatKey("ProductDescription")
		if err := awsEc2query_serializeDocumentProductDescriptionList(v.ProductDescriptions, objectKey); err != nil {
			return err
		}
	}

	if v.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(v *DescribeStaleSecurityGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(v *DescribeStoreImageTasksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.ImageIds != nil {
		objectKey := object.FlatKey("ImageId")
		if err := awsEc2query_serializeDocumentImageIdList(v.ImageIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeSubnetsInput(v *DescribeSubnetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetId")
		if err := awsEc2query_serializeDocumentSubnetIdStringList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(v *DescribeTrafficMirrorFiltersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TrafficMirrorFilterIds != nil {
		objectKey := object.FlatKey("TrafficMirrorFilterId")
		if err := awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v.TrafficMirrorFilterIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(v *DescribeTrafficMirrorSessionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TrafficMirrorSessionIds != nil {
		objectKey := object.FlatKey("TrafficMirrorSessionId")
		if err := awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v.TrafficMirrorSessionIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(v *DescribeTrafficMirrorTargetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TrafficMirrorTargetIds != nil {
		objectKey := object.FlatKey("TrafficMirrorTargetId")
		if err := awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v.TrafficMirrorTargetIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(v *DescribeTransitGatewayAttachmentsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayAttachmentIds != nil {
		objectKey := object.FlatKey("TransitGatewayAttachmentIds")
		if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(v *DescribeTransitGatewayConnectPeersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayConnectPeerIds != nil {
		objectKey := object.FlatKey("TransitGatewayConnectPeerIds")
		if err := awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v.TransitGatewayConnectPeerIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(v *DescribeTransitGatewayConnectsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayAttachmentIds != nil {
		objectKey := object.FlatKey("TransitGatewayAttachmentIds")
		if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(v *DescribeTransitGatewayMulticastDomainsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayMulticastDomainIds != nil {
		objectKey := object.FlatKey("TransitGatewayMulticastDomainIds")
		if err := awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v.TransitGatewayMulticastDomainIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(v *DescribeTransitGatewayPeeringAttachmentsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayAttachmentIds != nil {
		objectKey := object.FlatKey("TransitGatewayAttachmentIds")
		if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayPolicyTablesInput(v *DescribeTransitGatewayPolicyTablesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayPolicyTableIds != nil {
		objectKey := object.FlatKey("TransitGatewayPolicyTableIds")
		if err := awsEc2query_serializeDocumentTransitGatewayPolicyTableIdStringList(v.TransitGatewayPolicyTableIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsInput(v *DescribeTransitGatewayRouteTableAnnouncementsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayRouteTableAnnouncementIds != nil {
		objectKey := object.FlatKey("TransitGatewayRouteTableAnnouncementIds")
		if err := awsEc2query_serializeDocumentTransitGatewayRouteTableAnnouncementIdStringList(v.TransitGatewayRouteTableAnnouncementIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(v *DescribeTransitGatewayRouteTablesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayRouteTableIds != nil {
		objectKey := object.FlatKey("TransitGatewayRouteTableIds")
		if err := awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v.TransitGatewayRouteTableIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(v *DescribeTransitGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayIds != nil {
		objectKey := object.FlatKey("TransitGatewayIds")
		if err := awsEc2query_serializeDocumentTransitGatewayIdStringList(v.TransitGatewayIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(v *DescribeTransitGatewayVpcAttachmentsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayAttachmentIds != nil {
		objectKey := object.FlatKey("TransitGatewayAttachmentIds")
		if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(v *DescribeTrunkInterfaceAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationIds != nil {
		objectKey := object.FlatKey("AssociationId")
		if err := awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v.AssociationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVerifiedAccessEndpointsInput(v *DescribeVerifiedAccessEndpointsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VerifiedAccessEndpointIds != nil {
		objectKey := object.FlatKey("VerifiedAccessEndpointId")
		if err := awsEc2query_serializeDocumentVerifiedAccessEndpointIdList(v.VerifiedAccessEndpointIds, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVerifiedAccessGroupsInput(v *DescribeVerifiedAccessGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VerifiedAccessGroupIds != nil {
		objectKey := object.FlatKey("VerifiedAccessGroupId")
		if err := awsEc2query_serializeDocumentVerifiedAccessGroupIdList(v.VerifiedAccessGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsInput(v *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VerifiedAccessInstanceIds != nil {
		objectKey := object.FlatKey("VerifiedAccessInstanceId")
		if err := awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v.VerifiedAccessInstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstancesInput(v *DescribeVerifiedAccessInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VerifiedAccessInstanceIds != nil {
		objectKey := object.FlatKey("VerifiedAccessInstanceId")
		if err := awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v.VerifiedAccessInstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVerifiedAccessTrustProvidersInput(v *DescribeVerifiedAccessTrustProvidersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VerifiedAccessTrustProviderIds != nil {
		objectKey := object.FlatKey("VerifiedAccessTrustProviderId")
		if err := awsEc2query_serializeDocumentVerifiedAccessTrustProviderIdList(v.VerifiedAccessTrustProviderIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(v *DescribeVolumeAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVolumesInput(v *DescribeVolumesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VolumeIds != nil {
		objectKey := object.FlatKey("VolumeId")
		if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(v *DescribeVolumesModificationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VolumeIds != nil {
		objectKey := object.FlatKey("VolumeId")
		if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(v *DescribeVolumeStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VolumeIds != nil {
		objectKey := object.FlatKey("VolumeId")
		if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(v *DescribeVpcAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(v *DescribeVpcClassicLinkDnsSupportInput, 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.VpcIds != nil {
		objectKey := object.FlatKey("VpcIds")
		if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(v *DescribeVpcClassicLinkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.VpcIds != nil {
		objectKey := object.FlatKey("VpcId")
		if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(v *DescribeVpcEndpointConnectionNotificationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConnectionNotificationId != nil {
		objectKey := object.Key("ConnectionNotificationId")
		objectKey.String(*v.ConnectionNotificationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(v *DescribeVpcEndpointConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(v *DescribeVpcEndpointServiceConfigurationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.ServiceIds != nil {
		objectKey := object.FlatKey("ServiceId")
		if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(v *DescribeVpcEndpointServicePermissionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(v *DescribeVpcEndpointServicesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.ServiceNames != nil {
		objectKey := object.FlatKey("ServiceName")
		if err := awsEc2query_serializeDocumentValueStringList(v.ServiceNames, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(v *DescribeVpcEndpointsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VpcEndpointIds != nil {
		objectKey := object.FlatKey("VpcEndpointId")
		if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(v *DescribeVpcPeeringConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VpcPeeringConnectionIds != nil {
		objectKey := object.FlatKey("VpcPeeringConnectionId")
		if err := awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v.VpcPeeringConnectionIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpcsInput(v *DescribeVpcsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VpcIds != nil {
		objectKey := object.FlatKey("VpcId")
		if err := awsEc2query_serializeDocumentVpcIdStringList(v.VpcIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(v *DescribeVpnConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.VpnConnectionIds != nil {
		objectKey := object.FlatKey("VpnConnectionId")
		if err := awsEc2query_serializeDocumentVpnConnectionIdStringList(v.VpnConnectionIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(v *DescribeVpnGatewaysInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.VpnGatewayIds != nil {
		objectKey := object.FlatKey("VpnGatewayId")
		if err := awsEc2query_serializeDocumentVpnGatewayIdStringList(v.VpnGatewayIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(v *DetachClassicLinkVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachInternetGatewayInput(v *DetachInternetGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InternetGatewayId != nil {
		objectKey := object.Key("InternetGatewayId")
		objectKey.String(*v.InternetGatewayId)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(v *DetachNetworkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AttachmentId != nil {
		objectKey := object.Key("AttachmentId")
		objectKey.String(*v.AttachmentId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Force != nil {
		objectKey := object.Key("Force")
		objectKey.Boolean(*v.Force)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachVerifiedAccessTrustProviderInput(v *DetachVerifiedAccessTrustProviderInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	if v.VerifiedAccessTrustProviderId != nil {
		objectKey := object.Key("VerifiedAccessTrustProviderId")
		objectKey.String(*v.VerifiedAccessTrustProviderId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachVolumeInput(v *DetachVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Device != nil {
		objectKey := object.Key("Device")
		objectKey.String(*v.Device)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Force != nil {
		objectKey := object.Key("Force")
		objectKey.Boolean(*v.Force)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDetachVpnGatewayInput(v *DetachVpnGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	if v.VpnGatewayId != nil {
		objectKey := object.Key("VpnGatewayId")
		objectKey.String(*v.VpnGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableAddressTransferInput(v *DisableAddressTransferInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionInput(v *DisableAwsNetworkPerformanceMetricSubscriptionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Destination != nil {
		objectKey := object.Key("Destination")
		objectKey.String(*v.Destination)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.Metric) > 0 {
		objectKey := object.Key("Metric")
		objectKey.String(string(v.Metric))
	}

	if v.Source != nil {
		objectKey := object.Key("Source")
		objectKey.String(*v.Source)
	}

	if len(v.Statistic) > 0 {
		objectKey := object.Key("Statistic")
		objectKey.String(string(v.Statistic))
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(v *DisableEbsEncryptionByDefaultInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableFastLaunchInput(v *DisableFastLaunchInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Force != nil {
		objectKey := object.Key("Force")
		objectKey.Boolean(*v.Force)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(v *DisableFastSnapshotRestoresInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZones != nil {
		objectKey := object.FlatKey("AvailabilityZone")
		if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SourceSnapshotIds != nil {
		objectKey := object.FlatKey("SourceSnapshotId")
		if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(v *DisableImageBlockPublicAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableImageDeprecationInput(v *DisableImageDeprecationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableImageInput(v *DisableImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableIpamOrganizationAdminAccountInput(v *DisableIpamOrganizationAdminAccountInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DelegatedAdminAccountId != nil {
		objectKey := object.Key("DelegatedAdminAccountId")
		objectKey.String(*v.DelegatedAdminAccountId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(v *DisableSerialConsoleAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableSnapshotBlockPublicAccessInput(v *DisableSnapshotBlockPublicAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(v *DisableTransitGatewayRouteTablePropagationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableAnnouncementId != nil {
		objectKey := object.Key("TransitGatewayRouteTableAnnouncementId")
		objectKey.String(*v.TransitGatewayRouteTableAnnouncementId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(v *DisableVgwRoutePropagationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GatewayId != nil {
		objectKey := object.Key("GatewayId")
		objectKey.String(*v.GatewayId)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(v *DisableVpcClassicLinkDnsSupportInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(v *DisableVpcClassicLinkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateAddressInput(v *DisassociateAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(v *DisassociateClientVpnTargetNetworkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(v *DisassociateEnclaveCertificateIamRoleInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CertificateArn != nil {
		objectKey := object.Key("CertificateArn")
		objectKey.String(*v.CertificateArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RoleArn != nil {
		objectKey := object.Key("RoleArn")
		objectKey.String(*v.RoleArn)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(v *DisassociateIamInstanceProfileInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(v *DisassociateInstanceEventWindowInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationTarget != nil {
		objectKey := object.Key("AssociationTarget")
		if err := awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v.AssociationTarget, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceEventWindowId != nil {
		objectKey := object.Key("InstanceEventWindowId")
		objectKey.String(*v.InstanceEventWindowId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateIpamByoasnInput(v *DisassociateIpamByoasnInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Asn != nil {
		objectKey := object.Key("Asn")
		objectKey.String(*v.Asn)
	}

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateIpamResourceDiscoveryInput(v *DisassociateIpamResourceDiscoveryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamResourceDiscoveryAssociationId != nil {
		objectKey := object.Key("IpamResourceDiscoveryAssociationId")
		objectKey.String(*v.IpamResourceDiscoveryAssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateNatGatewayAddressInput(v *DisassociateNatGatewayAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationIds != nil {
		objectKey := object.FlatKey("AssociationId")
		if err := awsEc2query_serializeDocumentEipAssociationIdList(v.AssociationIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.MaxDrainDurationSeconds != nil {
		objectKey := object.Key("MaxDrainDurationSeconds")
		objectKey.Integer(*v.MaxDrainDurationSeconds)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateRouteTableInput(v *DisassociateRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(v *DisassociateTransitGatewayMulticastDomainInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetIds")
		if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateTransitGatewayPolicyTableInput(v *DisassociateTransitGatewayPolicyTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayPolicyTableId != nil {
		objectKey := object.Key("TransitGatewayPolicyTableId")
		objectKey.String(*v.TransitGatewayPolicyTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(v *DisassociateTransitGatewayRouteTableInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(v *DisassociateTrunkInterfaceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(v *DisassociateVpcCidrBlockInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableAddressTransferInput(v *EnableAddressTransferInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransferAccountId != nil {
		objectKey := object.Key("TransferAccountId")
		objectKey.String(*v.TransferAccountId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionInput(v *EnableAwsNetworkPerformanceMetricSubscriptionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Destination != nil {
		objectKey := object.Key("Destination")
		objectKey.String(*v.Destination)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.Metric) > 0 {
		objectKey := object.Key("Metric")
		objectKey.String(string(v.Metric))
	}

	if v.Source != nil {
		objectKey := object.Key("Source")
		objectKey.String(*v.Source)
	}

	if len(v.Statistic) > 0 {
		objectKey := object.Key("Statistic")
		objectKey.String(string(v.Statistic))
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(v *EnableEbsEncryptionByDefaultInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableFastLaunchInput(v *EnableFastLaunchInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.LaunchTemplate != nil {
		objectKey := object.Key("LaunchTemplate")
		if err := awsEc2query_serializeDocumentFastLaunchLaunchTemplateSpecificationRequest(v.LaunchTemplate, objectKey); err != nil {
			return err
		}
	}

	if v.MaxParallelLaunches != nil {
		objectKey := object.Key("MaxParallelLaunches")
		objectKey.Integer(*v.MaxParallelLaunches)
	}

	if v.ResourceType != nil {
		objectKey := object.Key("ResourceType")
		objectKey.String(*v.ResourceType)
	}

	if v.SnapshotConfiguration != nil {
		objectKey := object.Key("SnapshotConfiguration")
		if err := awsEc2query_serializeDocumentFastLaunchSnapshotConfigurationRequest(v.SnapshotConfiguration, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(v *EnableFastSnapshotRestoresInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZones != nil {
		objectKey := object.FlatKey("AvailabilityZone")
		if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SourceSnapshotIds != nil {
		objectKey := object.FlatKey("SourceSnapshotId")
		if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(v *EnableImageBlockPublicAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.ImageBlockPublicAccessState) > 0 {
		objectKey := object.Key("ImageBlockPublicAccessState")
		objectKey.String(string(v.ImageBlockPublicAccessState))
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableImageDeprecationInput(v *EnableImageDeprecationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DeprecateAt != nil {
		objectKey := object.Key("DeprecateAt")
		objectKey.String(smithytime.FormatDateTime(*v.DeprecateAt))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableImageInput(v *EnableImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableIpamOrganizationAdminAccountInput(v *EnableIpamOrganizationAdminAccountInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DelegatedAdminAccountId != nil {
		objectKey := object.Key("DelegatedAdminAccountId")
		objectKey.String(*v.DelegatedAdminAccountId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingInput(v *EnableReachabilityAnalyzerOrganizationSharingInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(v *EnableSerialConsoleAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableSnapshotBlockPublicAccessInput(v *EnableSnapshotBlockPublicAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.State) > 0 {
		objectKey := object.Key("State")
		objectKey.String(string(v.State))
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(v *EnableTransitGatewayRouteTablePropagationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableAnnouncementId != nil {
		objectKey := object.Key("TransitGatewayRouteTableAnnouncementId")
		objectKey.String(*v.TransitGatewayRouteTableAnnouncementId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(v *EnableVgwRoutePropagationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GatewayId != nil {
		objectKey := object.Key("GatewayId")
		objectKey.String(*v.GatewayId)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableVolumeIOInput(v *EnableVolumeIOInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(v *EnableVpcClassicLinkDnsSupportInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(v *EnableVpcClassicLinkInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(v *ExportClientVpnClientCertificateRevocationListInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(v *ExportClientVpnClientConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentExportImageInput(v *ExportImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	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 len(v.DiskImageFormat) > 0 {
		objectKey := object.Key("DiskImageFormat")
		objectKey.String(string(v.DiskImageFormat))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.RoleName != nil {
		objectKey := object.Key("RoleName")
		objectKey.String(*v.RoleName)
	}

	if v.S3ExportLocation != nil {
		objectKey := object.Key("S3ExportLocation")
		if err := awsEc2query_serializeDocumentExportTaskS3LocationRequest(v.S3ExportLocation, objectKey); err != nil {
			return err
		}
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(v *ExportTransitGatewayRoutesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.S3Bucket != nil {
		objectKey := object.Key("S3Bucket")
		objectKey.String(*v.S3Bucket)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(v *GetAssociatedEnclaveCertificateIamRolesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CertificateArn != nil {
		objectKey := object.Key("CertificateArn")
		objectKey.String(*v.CertificateArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(v *GetAssociatedIpv6PoolCidrsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.PoolId != nil {
		objectKey := object.Key("PoolId")
		objectKey.String(*v.PoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetAwsNetworkPerformanceDataInput(v *GetAwsNetworkPerformanceDataInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DataQueries != nil {
		objectKey := object.FlatKey("DataQuery")
		if err := awsEc2query_serializeDocumentDataQueries(v.DataQueries, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndTime != nil {
		objectKey := object.Key("EndTime")
		objectKey.String(smithytime.FormatDateTime(*v.EndTime))
	}

	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.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(v *GetCapacityReservationUsageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationId != nil {
		objectKey := object.Key("CapacityReservationId")
		objectKey.String(*v.CapacityReservationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(v *GetCoipPoolUsageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.PoolId != nil {
		objectKey := object.Key("PoolId")
		objectKey.String(*v.PoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetConsoleOutputInput(v *GetConsoleOutputInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.Latest != nil {
		objectKey := object.Key("Latest")
		objectKey.Boolean(*v.Latest)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(v *GetConsoleScreenshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.WakeUp != nil {
		objectKey := object.Key("WakeUp")
		objectKey.Boolean(*v.WakeUp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(v *GetDefaultCreditSpecificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.InstanceFamily) > 0 {
		objectKey := object.Key("InstanceFamily")
		objectKey.String(string(v.InstanceFamily))
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(v *GetEbsDefaultKmsKeyIdInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(v *GetEbsEncryptionByDefaultInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(v *GetFlowLogsIntegrationTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConfigDeliveryS3DestinationArn != nil {
		objectKey := object.Key("ConfigDeliveryS3DestinationArn")
		objectKey.String(*v.ConfigDeliveryS3DestinationArn)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FlowLogId != nil {
		objectKey := object.Key("FlowLogId")
		objectKey.String(*v.FlowLogId)
	}

	if v.IntegrateServices != nil {
		objectKey := object.Key("IntegrateService")
		if err := awsEc2query_serializeDocumentIntegrateServices(v.IntegrateServices, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(v *GetGroupsForCapacityReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationId != nil {
		objectKey := object.Key("CapacityReservationId")
		objectKey.String(*v.CapacityReservationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(v *GetHostReservationPurchasePreviewInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.HostIdSet != nil {
		objectKey := object.FlatKey("HostIdSet")
		if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil {
			return err
		}
	}

	if v.OfferingId != nil {
		objectKey := object.Key("OfferingId")
		objectKey.String(*v.OfferingId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(v *GetImageBlockPublicAccessStateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetInstanceTypesFromInstanceRequirementsInput(v *GetInstanceTypesFromInstanceRequirementsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ArchitectureTypes != nil {
		objectKey := object.FlatKey("ArchitectureType")
		if err := awsEc2query_serializeDocumentArchitectureTypeSet(v.ArchitectureTypes, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceRequirements != nil {
		objectKey := object.Key("InstanceRequirements")
		if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, 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.VirtualizationTypes != nil {
		objectKey := object.FlatKey("VirtualizationType")
		if err := awsEc2query_serializeDocumentVirtualizationTypeSet(v.VirtualizationTypes, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetInstanceUefiDataInput(v *GetInstanceUefiDataInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetIpamAddressHistoryInput(v *GetIpamAddressHistoryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndTime != nil {
		objectKey := object.Key("EndTime")
		objectKey.String(smithytime.FormatDateTime(*v.EndTime))
	}

	if v.IpamScopeId != nil {
		objectKey := object.Key("IpamScopeId")
		objectKey.String(*v.IpamScopeId)
	}

	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.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetIpamDiscoveredAccountsInput(v *GetIpamDiscoveredAccountsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DiscoveryRegion != nil {
		objectKey := object.Key("DiscoveryRegion")
		objectKey.String(*v.DiscoveryRegion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	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 awsEc2query_serializeOpDocumentGetIpamDiscoveredPublicAddressesInput(v *GetIpamDiscoveredPublicAddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddressRegion != nil {
		objectKey := object.Key("AddressRegion")
		objectKey.String(*v.AddressRegion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	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 awsEc2query_serializeOpDocumentGetIpamDiscoveredResourceCidrsInput(v *GetIpamDiscoveredResourceCidrsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	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.ResourceRegion != nil {
		objectKey := object.Key("ResourceRegion")
		objectKey.String(*v.ResourceRegion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetIpamPoolAllocationsInput(v *GetIpamPoolAllocationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamPoolAllocationId != nil {
		objectKey := object.Key("IpamPoolAllocationId")
		objectKey.String(*v.IpamPoolAllocationId)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	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 awsEc2query_serializeOpDocumentGetIpamPoolCidrsInput(v *GetIpamPoolCidrsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	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 awsEc2query_serializeOpDocumentGetIpamResourceCidrsInput(v *GetIpamResourceCidrsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.IpamScopeId != nil {
		objectKey := object.Key("IpamScopeId")
		objectKey.String(*v.IpamScopeId)
	}

	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.ResourceId != nil {
		objectKey := object.Key("ResourceId")
		objectKey.String(*v.ResourceId)
	}

	if v.ResourceOwner != nil {
		objectKey := object.Key("ResourceOwner")
		objectKey.String(*v.ResourceOwner)
	}

	if v.ResourceTag != nil {
		objectKey := object.Key("ResourceTag")
		if err := awsEc2query_serializeDocumentRequestIpamResourceTag(v.ResourceTag, objectKey); err != nil {
			return err
		}
	}

	if len(v.ResourceType) > 0 {
		objectKey := object.Key("ResourceType")
		objectKey.String(string(v.ResourceType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(v *GetLaunchTemplateDataInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(v *GetManagedPrefixListAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(v *GetManagedPrefixListEntriesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.TargetVersion != nil {
		objectKey := object.Key("TargetVersion")
		objectKey.Long(*v.TargetVersion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsInput(v *GetNetworkInsightsAccessScopeAnalysisFindingsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NetworkInsightsAccessScopeAnalysisId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeAnalysisId")
		objectKey.String(*v.NetworkInsightsAccessScopeAnalysisId)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeContentInput(v *GetNetworkInsightsAccessScopeContentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsAccessScopeId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeId")
		objectKey.String(*v.NetworkInsightsAccessScopeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetPasswordDataInput(v *GetPasswordDataInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(v *GetReservedInstancesExchangeQuoteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ReservedInstanceIds != nil {
		objectKey := object.FlatKey("ReservedInstanceId")
		if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TargetConfigurations != nil {
		objectKey := object.FlatKey("TargetConfiguration")
		if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(v *GetSecurityGroupsForVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(v *GetSerialConsoleAccessStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetSnapshotBlockPublicAccessStateInput(v *GetSnapshotBlockPublicAccessStateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetSpotPlacementScoresInput(v *GetSpotPlacementScoresInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceRequirementsWithMetadata != nil {
		objectKey := object.Key("InstanceRequirementsWithMetadata")
		if err := awsEc2query_serializeDocumentInstanceRequirementsWithMetadataRequest(v.InstanceRequirementsWithMetadata, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceTypes != nil {
		objectKey := object.FlatKey("InstanceType")
		if err := awsEc2query_serializeDocumentInstanceTypes(v.InstanceTypes, 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.RegionNames != nil {
		objectKey := object.FlatKey("RegionName")
		if err := awsEc2query_serializeDocumentRegionNames(v.RegionNames, objectKey); err != nil {
			return err
		}
	}

	if v.SingleAvailabilityZone != nil {
		objectKey := object.Key("SingleAvailabilityZone")
		objectKey.Boolean(*v.SingleAvailabilityZone)
	}

	if v.TargetCapacity != nil {
		objectKey := object.Key("TargetCapacity")
		objectKey.Integer(*v.TargetCapacity)
	}

	if len(v.TargetCapacityUnitType) > 0 {
		objectKey := object.Key("TargetCapacityUnitType")
		objectKey.String(string(v.TargetCapacityUnitType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(v *GetSubnetCidrReservationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(v *GetTransitGatewayAttachmentPropagationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(v *GetTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableAssociationsInput(v *GetTransitGatewayPolicyTableAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayPolicyTableId != nil {
		objectKey := object.Key("TransitGatewayPolicyTableId")
		objectKey.String(*v.TransitGatewayPolicyTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableEntriesInput(v *GetTransitGatewayPolicyTableEntriesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayPolicyTableId != nil {
		objectKey := object.Key("TransitGatewayPolicyTableId")
		objectKey.String(*v.TransitGatewayPolicyTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(v *GetTransitGatewayPrefixListReferencesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(v *GetTransitGatewayRouteTableAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(v *GetTransitGatewayRouteTablePropagationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetVerifiedAccessEndpointPolicyInput(v *GetVerifiedAccessEndpointPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessEndpointId != nil {
		objectKey := object.Key("VerifiedAccessEndpointId")
		objectKey.String(*v.VerifiedAccessEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetVerifiedAccessGroupPolicyInput(v *GetVerifiedAccessGroupPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(v *GetVpnConnectionDeviceSampleConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InternetKeyExchangeVersion != nil {
		objectKey := object.Key("InternetKeyExchangeVersion")
		objectKey.String(*v.InternetKeyExchangeVersion)
	}

	if v.VpnConnectionDeviceTypeId != nil {
		objectKey := object.Key("VpnConnectionDeviceTypeId")
		objectKey.String(*v.VpnConnectionDeviceTypeId)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(v *GetVpnConnectionDeviceTypesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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 awsEc2query_serializeOpDocumentGetVpnTunnelReplacementStatusInput(v *GetVpnTunnelReplacementStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	if v.VpnTunnelOutsideIpAddress != nil {
		objectKey := object.Key("VpnTunnelOutsideIpAddress")
		objectKey.String(*v.VpnTunnelOutsideIpAddress)
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(v *ImportClientVpnClientCertificateRevocationListInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CertificateRevocationList != nil {
		objectKey := object.Key("CertificateRevocationList")
		objectKey.String(*v.CertificateRevocationList)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportImageInput(v *ImportImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Architecture != nil {
		objectKey := object.Key("Architecture")
		objectKey.String(*v.Architecture)
	}

	if len(v.BootMode) > 0 {
		objectKey := object.Key("BootMode")
		objectKey.String(string(v.BootMode))
	}

	if v.ClientData != nil {
		objectKey := object.Key("ClientData")
		if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil {
			return err
		}
	}

	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.DiskContainers != nil {
		objectKey := object.FlatKey("DiskContainer")
		if err := awsEc2query_serializeDocumentImageDiskContainerList(v.DiskContainers, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.Hypervisor != nil {
		objectKey := object.Key("Hypervisor")
		objectKey.String(*v.Hypervisor)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.LicenseSpecifications != nil {
		objectKey := object.FlatKey("LicenseSpecifications")
		if err := awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.LicenseType != nil {
		objectKey := object.Key("LicenseType")
		objectKey.String(*v.LicenseType)
	}

	if v.Platform != nil {
		objectKey := object.Key("Platform")
		objectKey.String(*v.Platform)
	}

	if v.RoleName != nil {
		objectKey := object.Key("RoleName")
		objectKey.String(*v.RoleName)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.UsageOperation != nil {
		objectKey := object.Key("UsageOperation")
		objectKey.String(*v.UsageOperation)
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportInstanceInput(v *ImportInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DiskImages != nil {
		objectKey := object.FlatKey("DiskImage")
		if err := awsEc2query_serializeDocumentDiskImageList(v.DiskImages, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchSpecification != nil {
		objectKey := object.Key("LaunchSpecification")
		if err := awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
			return err
		}
	}

	if len(v.Platform) > 0 {
		objectKey := object.Key("Platform")
		objectKey.String(string(v.Platform))
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportKeyPairInput(v *ImportKeyPairInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.PublicKeyMaterial != nil {
		objectKey := object.Key("PublicKeyMaterial")
		objectKey.Base64EncodeBytes(v.PublicKeyMaterial)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportSnapshotInput(v *ImportSnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientData != nil {
		objectKey := object.Key("ClientData")
		if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil {
			return err
		}
	}

	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.DiskContainer != nil {
		objectKey := object.Key("DiskContainer")
		if err := awsEc2query_serializeDocumentSnapshotDiskContainer(v.DiskContainer, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Encrypted != nil {
		objectKey := object.Key("Encrypted")
		objectKey.Boolean(*v.Encrypted)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	if v.RoleName != nil {
		objectKey := object.Key("RoleName")
		objectKey.String(*v.RoleName)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentImportVolumeInput(v *ImportVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZone != nil {
		objectKey := object.Key("AvailabilityZone")
		objectKey.String(*v.AvailabilityZone)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Image != nil {
		objectKey := object.Key("Image")
		if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil {
			return err
		}
	}

	if v.Volume != nil {
		objectKey := object.Key("Volume")
		if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentListImagesInRecycleBinInput(v *ListImagesInRecycleBinInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageIds != nil {
		objectKey := object.FlatKey("ImageId")
		if err := awsEc2query_serializeDocumentImageIdStringList(v.ImageIds, 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)
	}

	return nil
}

func awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(v *ListSnapshotsInRecycleBinInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	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.SnapshotIds != nil {
		objectKey := object.FlatKey("SnapshotId")
		if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentLockSnapshotInput(v *LockSnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CoolOffPeriod != nil {
		objectKey := object.Key("CoolOffPeriod")
		objectKey.Integer(*v.CoolOffPeriod)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ExpirationDate != nil {
		objectKey := object.Key("ExpirationDate")
		objectKey.String(smithytime.FormatDateTime(*v.ExpirationDate))
	}

	if v.LockDuration != nil {
		objectKey := object.Key("LockDuration")
		objectKey.Integer(*v.LockDuration)
	}

	if len(v.LockMode) > 0 {
		objectKey := object.Key("LockMode")
		objectKey.String(string(v.LockMode))
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyAddressAttributeInput(v *ModifyAddressAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.DomainName != nil {
		objectKey := object.Key("DomainName")
		objectKey.String(*v.DomainName)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(v *ModifyAvailabilityZoneGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if len(v.OptInStatus) > 0 {
		objectKey := object.Key("OptInStatus")
		objectKey.String(string(v.OptInStatus))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyCapacityReservationFleetInput(v *ModifyCapacityReservationFleetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationFleetId != nil {
		objectKey := object.Key("CapacityReservationFleetId")
		objectKey.String(*v.CapacityReservationFleetId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndDate != nil {
		objectKey := object.Key("EndDate")
		objectKey.String(smithytime.FormatDateTime(*v.EndDate))
	}

	if v.RemoveEndDate != nil {
		objectKey := object.Key("RemoveEndDate")
		objectKey.Boolean(*v.RemoveEndDate)
	}

	if v.TotalTargetCapacity != nil {
		objectKey := object.Key("TotalTargetCapacity")
		objectKey.Integer(*v.TotalTargetCapacity)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyCapacityReservationInput(v *ModifyCapacityReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Accept != nil {
		objectKey := object.Key("Accept")
		objectKey.Boolean(*v.Accept)
	}

	if v.AdditionalInfo != nil {
		objectKey := object.Key("AdditionalInfo")
		objectKey.String(*v.AdditionalInfo)
	}

	if v.CapacityReservationId != nil {
		objectKey := object.Key("CapacityReservationId")
		objectKey.String(*v.CapacityReservationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndDate != nil {
		objectKey := object.Key("EndDate")
		objectKey.String(smithytime.FormatDateTime(*v.EndDate))
	}

	if len(v.EndDateType) > 0 {
		objectKey := object.Key("EndDateType")
		objectKey.String(string(v.EndDateType))
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(v *ModifyClientVpnEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientConnectOptions != nil {
		objectKey := object.Key("ClientConnectOptions")
		if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ClientLoginBannerOptions != nil {
		objectKey := object.Key("ClientLoginBannerOptions")
		if err := awsEc2query_serializeDocumentClientLoginBannerOptions(v.ClientLoginBannerOptions, objectKey); err != nil {
			return err
		}
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.ConnectionLogOptions != nil {
		objectKey := object.Key("ConnectionLogOptions")
		if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DnsServers != nil {
		objectKey := object.Key("DnsServers")
		if err := awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v.DnsServers, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.SelfServicePortal) > 0 {
		objectKey := object.Key("SelfServicePortal")
		objectKey.String(string(v.SelfServicePortal))
	}

	if v.ServerCertificateArn != nil {
		objectKey := object.Key("ServerCertificateArn")
		objectKey.String(*v.ServerCertificateArn)
	}

	if v.SessionTimeoutHours != nil {
		objectKey := object.Key("SessionTimeoutHours")
		objectKey.Integer(*v.SessionTimeoutHours)
	}

	if v.SplitTunnel != nil {
		objectKey := object.Key("SplitTunnel")
		objectKey.Boolean(*v.SplitTunnel)
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	if v.VpnPort != nil {
		objectKey := object.Key("VpnPort")
		objectKey.Integer(*v.VpnPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(v *ModifyDefaultCreditSpecificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CpuCredits != nil {
		objectKey := object.Key("CpuCredits")
		objectKey.String(*v.CpuCredits)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.InstanceFamily) > 0 {
		objectKey := object.Key("InstanceFamily")
		objectKey.String(string(v.InstanceFamily))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(v *ModifyEbsDefaultKmsKeyIdInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.KmsKeyId != nil {
		objectKey := object.Key("KmsKeyId")
		objectKey.String(*v.KmsKeyId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyFleetInput(v *ModifyFleetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Context != nil {
		objectKey := object.Key("Context")
		objectKey.String(*v.Context)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.ExcessCapacityTerminationPolicy) > 0 {
		objectKey := object.Key("ExcessCapacityTerminationPolicy")
		objectKey.String(string(v.ExcessCapacityTerminationPolicy))
	}

	if v.FleetId != nil {
		objectKey := object.Key("FleetId")
		objectKey.String(*v.FleetId)
	}

	if v.LaunchTemplateConfigs != nil {
		objectKey := object.FlatKey("LaunchTemplateConfig")
		if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil {
			return err
		}
	}

	if v.TargetCapacitySpecification != nil {
		objectKey := object.Key("TargetCapacitySpecification")
		if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(v *ModifyFpgaImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FpgaImageId != nil {
		objectKey := object.Key("FpgaImageId")
		objectKey.String(*v.FpgaImageId)
	}

	if v.LoadPermission != nil {
		objectKey := object.Key("LoadPermission")
		if err := awsEc2query_serializeDocumentLoadPermissionModifications(v.LoadPermission, objectKey); err != nil {
			return err
		}
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if len(v.OperationType) > 0 {
		objectKey := object.Key("OperationType")
		objectKey.String(string(v.OperationType))
	}

	if v.ProductCodes != nil {
		objectKey := object.FlatKey("ProductCode")
		if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil {
			return err
		}
	}

	if v.UserGroups != nil {
		objectKey := object.FlatKey("UserGroup")
		if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil {
			return err
		}
	}

	if v.UserIds != nil {
		objectKey := object.FlatKey("UserId")
		if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyHostsInput(v *ModifyHostsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AutoPlacement) > 0 {
		objectKey := object.Key("AutoPlacement")
		objectKey.String(string(v.AutoPlacement))
	}

	if v.HostIds != nil {
		objectKey := object.FlatKey("HostId")
		if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil {
			return err
		}
	}

	if len(v.HostMaintenance) > 0 {
		objectKey := object.Key("HostMaintenance")
		objectKey.String(string(v.HostMaintenance))
	}

	if len(v.HostRecovery) > 0 {
		objectKey := object.Key("HostRecovery")
		objectKey.String(string(v.HostRecovery))
	}

	if v.InstanceFamily != nil {
		objectKey := object.Key("InstanceFamily")
		objectKey.String(*v.InstanceFamily)
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		objectKey.String(*v.InstanceType)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(v *ModifyIdentityIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PrincipalArn != nil {
		objectKey := object.Key("PrincipalArn")
		objectKey.String(*v.PrincipalArn)
	}

	if v.Resource != nil {
		objectKey := object.Key("Resource")
		objectKey.String(*v.Resource)
	}

	if v.UseLongIds != nil {
		objectKey := object.Key("UseLongIds")
		objectKey.Boolean(*v.UseLongIds)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIdFormatInput(v *ModifyIdFormatInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Resource != nil {
		objectKey := object.Key("Resource")
		objectKey.String(*v.Resource)
	}

	if v.UseLongIds != nil {
		objectKey := object.Key("UseLongIds")
		objectKey.Boolean(*v.UseLongIds)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyImageAttributeInput(v *ModifyImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Attribute != nil {
		objectKey := object.Key("Attribute")
		objectKey.String(*v.Attribute)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if v.ImdsSupport != nil {
		objectKey := object.Key("ImdsSupport")
		if err := awsEc2query_serializeDocumentAttributeValue(v.ImdsSupport, objectKey); err != nil {
			return err
		}
	}

	if v.LaunchPermission != nil {
		objectKey := object.Key("LaunchPermission")
		if err := awsEc2query_serializeDocumentLaunchPermissionModifications(v.LaunchPermission, objectKey); err != nil {
			return err
		}
	}

	if len(v.OperationType) > 0 {
		objectKey := object.Key("OperationType")
		objectKey.String(string(v.OperationType))
	}

	if v.OrganizationalUnitArns != nil {
		objectKey := object.FlatKey("OrganizationalUnitArn")
		if err := awsEc2query_serializeDocumentOrganizationalUnitArnStringList(v.OrganizationalUnitArns, objectKey); err != nil {
			return err
		}
	}

	if v.OrganizationArns != nil {
		objectKey := object.FlatKey("OrganizationArn")
		if err := awsEc2query_serializeDocumentOrganizationArnStringList(v.OrganizationArns, objectKey); err != nil {
			return err
		}
	}

	if v.ProductCodes != nil {
		objectKey := object.FlatKey("ProductCode")
		if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil {
			return err
		}
	}

	if v.UserGroups != nil {
		objectKey := object.FlatKey("UserGroup")
		if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil {
			return err
		}
	}

	if v.UserIds != nil {
		objectKey := object.FlatKey("UserId")
		if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
			return err
		}
	}

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(v *ModifyInstanceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.DisableApiStop != nil {
		objectKey := object.Key("DisableApiStop")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableApiStop, objectKey); err != nil {
			return err
		}
	}

	if v.DisableApiTermination != nil {
		objectKey := object.Key("DisableApiTermination")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableApiTermination, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EbsOptimized, objectKey); err != nil {
			return err
		}
	}

	if v.EnaSupport != nil {
		objectKey := object.Key("EnaSupport")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnaSupport, objectKey); err != nil {
			return err
		}
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("GroupId")
		if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.InstanceInitiatedShutdownBehavior != nil {
		objectKey := object.Key("InstanceInitiatedShutdownBehavior")
		if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceInitiatedShutdownBehavior, objectKey); err != nil {
			return err
		}
	}

	if v.InstanceType != nil {
		objectKey := object.Key("InstanceType")
		if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceType, objectKey); err != nil {
			return err
		}
	}

	if v.Kernel != nil {
		objectKey := object.Key("Kernel")
		if err := awsEc2query_serializeDocumentAttributeValue(v.Kernel, objectKey); err != nil {
			return err
		}
	}

	if v.Ramdisk != nil {
		objectKey := object.Key("Ramdisk")
		if err := awsEc2query_serializeDocumentAttributeValue(v.Ramdisk, objectKey); err != nil {
			return err
		}
	}

	if v.SourceDestCheck != nil {
		objectKey := object.Key("SourceDestCheck")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil {
			return err
		}
	}

	if v.SriovNetSupport != nil {
		objectKey := object.Key("SriovNetSupport")
		if err := awsEc2query_serializeDocumentAttributeValue(v.SriovNetSupport, objectKey); err != nil {
			return err
		}
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		if err := awsEc2query_serializeDocumentBlobAttributeValue(v.UserData, objectKey); err != nil {
			return err
		}
	}

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(v *ModifyInstanceCapacityReservationAttributesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityReservationSpecification != nil {
		objectKey := object.Key("CapacityReservationSpecification")
		if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceCreditSpecifications != nil {
		objectKey := object.FlatKey("InstanceCreditSpecification")
		if err := awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v.InstanceCreditSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(v *ModifyInstanceEventStartTimeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceEventId != nil {
		objectKey := object.Key("InstanceEventId")
		objectKey.String(*v.InstanceEventId)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.NotBefore != nil {
		objectKey := object.Key("NotBefore")
		objectKey.String(smithytime.FormatDateTime(*v.NotBefore))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(v *ModifyInstanceEventWindowInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CronExpression != nil {
		objectKey := object.Key("CronExpression")
		objectKey.String(*v.CronExpression)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceEventWindowId != nil {
		objectKey := object.Key("InstanceEventWindowId")
		objectKey.String(*v.InstanceEventWindowId)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.TimeRanges != nil {
		objectKey := object.FlatKey("TimeRange")
		if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceMaintenanceOptionsInput(v *ModifyInstanceMaintenanceOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AutoRecovery) > 0 {
		objectKey := object.Key("AutoRecovery")
		objectKey.String(string(v.AutoRecovery))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(v *ModifyInstanceMetadataOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.HttpEndpoint) > 0 {
		objectKey := object.Key("HttpEndpoint")
		objectKey.String(string(v.HttpEndpoint))
	}

	if len(v.HttpProtocolIpv6) > 0 {
		objectKey := object.Key("HttpProtocolIpv6")
		objectKey.String(string(v.HttpProtocolIpv6))
	}

	if v.HttpPutResponseHopLimit != nil {
		objectKey := object.Key("HttpPutResponseHopLimit")
		objectKey.Integer(*v.HttpPutResponseHopLimit)
	}

	if len(v.HttpTokens) > 0 {
		objectKey := object.Key("HttpTokens")
		objectKey.String(string(v.HttpTokens))
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if len(v.InstanceMetadataTags) > 0 {
		objectKey := object.Key("InstanceMetadataTags")
		objectKey.String(string(v.InstanceMetadataTags))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyInstancePlacementInput(v *ModifyInstancePlacementInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Affinity) > 0 {
		objectKey := object.Key("Affinity")
		objectKey.String(string(v.Affinity))
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.HostId != nil {
		objectKey := object.Key("HostId")
		objectKey.String(*v.HostId)
	}

	if v.HostResourceGroupArn != nil {
		objectKey := object.Key("HostResourceGroupArn")
		objectKey.String(*v.HostResourceGroupArn)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.PartitionNumber != nil {
		objectKey := object.Key("PartitionNumber")
		objectKey.Integer(*v.PartitionNumber)
	}

	if len(v.Tenancy) > 0 {
		objectKey := object.Key("Tenancy")
		objectKey.String(string(v.Tenancy))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIpamInput(v *ModifyIpamInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddOperatingRegions != nil {
		objectKey := object.FlatKey("AddOperatingRegion")
		if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.AddOperatingRegions, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	if v.RemoveOperatingRegions != nil {
		objectKey := object.FlatKey("RemoveOperatingRegion")
		if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v.RemoveOperatingRegions, objectKey); err != nil {
			return err
		}
	}

	if len(v.Tier) > 0 {
		objectKey := object.Key("Tier")
		objectKey.String(string(v.Tier))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIpamPoolInput(v *ModifyIpamPoolInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddAllocationResourceTags != nil {
		objectKey := object.FlatKey("AddAllocationResourceTag")
		if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.AddAllocationResourceTags, objectKey); err != nil {
			return err
		}
	}

	if v.AllocationDefaultNetmaskLength != nil {
		objectKey := object.Key("AllocationDefaultNetmaskLength")
		objectKey.Integer(*v.AllocationDefaultNetmaskLength)
	}

	if v.AllocationMaxNetmaskLength != nil {
		objectKey := object.Key("AllocationMaxNetmaskLength")
		objectKey.Integer(*v.AllocationMaxNetmaskLength)
	}

	if v.AllocationMinNetmaskLength != nil {
		objectKey := object.Key("AllocationMinNetmaskLength")
		objectKey.Integer(*v.AllocationMinNetmaskLength)
	}

	if v.AutoImport != nil {
		objectKey := object.Key("AutoImport")
		objectKey.Boolean(*v.AutoImport)
	}

	if v.ClearAllocationDefaultNetmaskLength != nil {
		objectKey := object.Key("ClearAllocationDefaultNetmaskLength")
		objectKey.Boolean(*v.ClearAllocationDefaultNetmaskLength)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.RemoveAllocationResourceTags != nil {
		objectKey := object.FlatKey("RemoveAllocationResourceTag")
		if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.RemoveAllocationResourceTags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIpamResourceCidrInput(v *ModifyIpamResourceCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CurrentIpamScopeId != nil {
		objectKey := object.Key("CurrentIpamScopeId")
		objectKey.String(*v.CurrentIpamScopeId)
	}

	if v.DestinationIpamScopeId != nil {
		objectKey := object.Key("DestinationIpamScopeId")
		objectKey.String(*v.DestinationIpamScopeId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Monitored != nil {
		objectKey := object.Key("Monitored")
		objectKey.Boolean(*v.Monitored)
	}

	if v.ResourceCidr != nil {
		objectKey := object.Key("ResourceCidr")
		objectKey.String(*v.ResourceCidr)
	}

	if v.ResourceId != nil {
		objectKey := object.Key("ResourceId")
		objectKey.String(*v.ResourceId)
	}

	if v.ResourceRegion != nil {
		objectKey := object.Key("ResourceRegion")
		objectKey.String(*v.ResourceRegion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIpamResourceDiscoveryInput(v *ModifyIpamResourceDiscoveryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddOperatingRegions != nil {
		objectKey := object.FlatKey("AddOperatingRegion")
		if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.AddOperatingRegions, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamResourceDiscoveryId != nil {
		objectKey := object.Key("IpamResourceDiscoveryId")
		objectKey.String(*v.IpamResourceDiscoveryId)
	}

	if v.RemoveOperatingRegions != nil {
		objectKey := object.FlatKey("RemoveOperatingRegion")
		if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v.RemoveOperatingRegions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyIpamScopeInput(v *ModifyIpamScopeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamScopeId != nil {
		objectKey := object.Key("IpamScopeId")
		objectKey.String(*v.IpamScopeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(v *ModifyLaunchTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DefaultVersion != nil {
		objectKey := object.Key("SetDefaultVersion")
		objectKey.String(*v.DefaultVersion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LaunchTemplateId != nil {
		objectKey := object.Key("LaunchTemplateId")
		objectKey.String(*v.LaunchTemplateId)
	}

	if v.LaunchTemplateName != nil {
		objectKey := object.Key("LaunchTemplateName")
		objectKey.String(*v.LaunchTemplateName)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyLocalGatewayRouteInput(v *ModifyLocalGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	if v.LocalGatewayVirtualInterfaceGroupId != nil {
		objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId")
		objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(v *ModifyManagedPrefixListInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddEntries != nil {
		objectKey := object.FlatKey("AddEntry")
		if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.AddEntries, objectKey); err != nil {
			return err
		}
	}

	if v.CurrentVersion != nil {
		objectKey := object.Key("CurrentVersion")
		objectKey.Long(*v.CurrentVersion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.MaxEntries != nil {
		objectKey := object.Key("MaxEntries")
		objectKey.Integer(*v.MaxEntries)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.PrefixListName != nil {
		objectKey := object.Key("PrefixListName")
		objectKey.String(*v.PrefixListName)
	}

	if v.RemoveEntries != nil {
		objectKey := object.FlatKey("RemoveEntry")
		if err := awsEc2query_serializeDocumentRemovePrefixListEntries(v.RemoveEntries, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(v *ModifyNetworkInterfaceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Attachment != nil {
		objectKey := object.Key("Attachment")
		if err := awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v.Attachment, objectKey); err != nil {
			return err
		}
	}

	if v.ConnectionTrackingSpecification != nil {
		objectKey := object.Key("ConnectionTrackingSpecification")
		if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EnablePrimaryIpv6 != nil {
		objectKey := object.Key("EnablePrimaryIpv6")
		objectKey.Boolean(*v.EnablePrimaryIpv6)
	}

	if v.EnaSrdSpecification != nil {
		objectKey := object.Key("EnaSrdSpecification")
		if err := awsEc2query_serializeDocumentEnaSrdSpecification(v.EnaSrdSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.Groups != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.SourceDestCheck != nil {
		objectKey := object.Key("SourceDestCheck")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(v *ModifyPrivateDnsNameOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EnableResourceNameDnsAAAARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsAAAARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord)
	}

	if v.EnableResourceNameDnsARecord != nil {
		objectKey := object.Key("EnableResourceNameDnsARecord")
		objectKey.Boolean(*v.EnableResourceNameDnsARecord)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if len(v.PrivateDnsHostnameType) > 0 {
		objectKey := object.Key("PrivateDnsHostnameType")
		objectKey.String(string(v.PrivateDnsHostnameType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyReservedInstancesInput(v *ModifyReservedInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.ReservedInstancesIds != nil {
		objectKey := object.FlatKey("ReservedInstancesId")
		if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil {
			return err
		}
	}

	if v.TargetConfigurations != nil {
		objectKey := object.FlatKey("ReservedInstancesConfigurationSetItemType")
		if err := awsEc2query_serializeDocumentReservedInstancesConfigurationList(v.TargetConfigurations, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(v *ModifySecurityGroupRulesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.SecurityGroupRules != nil {
		objectKey := object.FlatKey("SecurityGroupRule")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v.SecurityGroupRules, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(v *ModifySnapshotAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.CreateVolumePermission != nil {
		objectKey := object.Key("CreateVolumePermission")
		if err := awsEc2query_serializeDocumentCreateVolumePermissionModifications(v.CreateVolumePermission, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupNames != nil {
		objectKey := object.FlatKey("UserGroup")
		if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, objectKey); err != nil {
			return err
		}
	}

	if len(v.OperationType) > 0 {
		objectKey := object.Key("OperationType")
		objectKey.String(string(v.OperationType))
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.UserIds != nil {
		objectKey := object.FlatKey("UserId")
		if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifySnapshotTierInput(v *ModifySnapshotTierInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if len(v.StorageTier) > 0 {
		objectKey := object.Key("StorageTier")
		objectKey.String(string(v.StorageTier))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Context != nil {
		objectKey := object.Key("Context")
		objectKey.String(*v.Context)
	}

	if len(v.ExcessCapacityTerminationPolicy) > 0 {
		objectKey := object.Key("ExcessCapacityTerminationPolicy")
		objectKey.String(string(v.ExcessCapacityTerminationPolicy))
	}

	if v.LaunchTemplateConfigs != nil {
		objectKey := object.FlatKey("LaunchTemplateConfig")
		if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil {
			return err
		}
	}

	if v.OnDemandTargetCapacity != nil {
		objectKey := object.Key("OnDemandTargetCapacity")
		objectKey.Integer(*v.OnDemandTargetCapacity)
	}

	if v.SpotFleetRequestId != nil {
		objectKey := object.Key("SpotFleetRequestId")
		objectKey.String(*v.SpotFleetRequestId)
	}

	if v.TargetCapacity != nil {
		objectKey := object.Key("TargetCapacity")
		objectKey.Integer(*v.TargetCapacity)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifySubnetAttributeInput(v *ModifySubnetAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssignIpv6AddressOnCreation != nil {
		objectKey := object.Key("AssignIpv6AddressOnCreation")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AssignIpv6AddressOnCreation, objectKey); err != nil {
			return err
		}
	}

	if v.CustomerOwnedIpv4Pool != nil {
		objectKey := object.Key("CustomerOwnedIpv4Pool")
		objectKey.String(*v.CustomerOwnedIpv4Pool)
	}

	if v.DisableLniAtDeviceIndex != nil {
		objectKey := object.Key("DisableLniAtDeviceIndex")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableLniAtDeviceIndex, objectKey); err != nil {
			return err
		}
	}

	if v.EnableDns64 != nil {
		objectKey := object.Key("EnableDns64")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDns64, objectKey); err != nil {
			return err
		}
	}

	if v.EnableLniAtDeviceIndex != nil {
		objectKey := object.Key("EnableLniAtDeviceIndex")
		objectKey.Integer(*v.EnableLniAtDeviceIndex)
	}

	if v.EnableResourceNameDnsAAAARecordOnLaunch != nil {
		objectKey := object.Key("EnableResourceNameDnsAAAARecordOnLaunch")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsAAAARecordOnLaunch, objectKey); err != nil {
			return err
		}
	}

	if v.EnableResourceNameDnsARecordOnLaunch != nil {
		objectKey := object.Key("EnableResourceNameDnsARecordOnLaunch")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsARecordOnLaunch, objectKey); err != nil {
			return err
		}
	}

	if v.MapCustomerOwnedIpOnLaunch != nil {
		objectKey := object.Key("MapCustomerOwnedIpOnLaunch")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapCustomerOwnedIpOnLaunch, objectKey); err != nil {
			return err
		}
	}

	if v.MapPublicIpOnLaunch != nil {
		objectKey := object.Key("MapPublicIpOnLaunch")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapPublicIpOnLaunch, objectKey); err != nil {
			return err
		}
	}

	if len(v.PrivateDnsHostnameTypeOnLaunch) > 0 {
		objectKey := object.Key("PrivateDnsHostnameTypeOnLaunch")
		objectKey.String(string(v.PrivateDnsHostnameTypeOnLaunch))
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(v *ModifyTrafficMirrorFilterNetworkServicesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddNetworkServices != nil {
		objectKey := object.FlatKey("AddNetworkService")
		if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.AddNetworkServices, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RemoveNetworkServices != nil {
		objectKey := object.FlatKey("RemoveNetworkService")
		if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.RemoveNetworkServices, objectKey); err != nil {
			return err
		}
	}

	if v.TrafficMirrorFilterId != nil {
		objectKey := object.Key("TrafficMirrorFilterId")
		objectKey.String(*v.TrafficMirrorFilterId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(v *ModifyTrafficMirrorFilterRuleInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationPortRange != nil {
		objectKey := object.Key("DestinationPortRange")
		if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Protocol != nil {
		objectKey := object.Key("Protocol")
		objectKey.Integer(*v.Protocol)
	}

	if v.RemoveFields != nil {
		objectKey := object.FlatKey("RemoveField")
		if err := awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v.RemoveFields, objectKey); err != nil {
			return err
		}
	}

	if len(v.RuleAction) > 0 {
		objectKey := object.Key("RuleAction")
		objectKey.String(string(v.RuleAction))
	}

	if v.RuleNumber != nil {
		objectKey := object.Key("RuleNumber")
		objectKey.Integer(*v.RuleNumber)
	}

	if v.SourceCidrBlock != nil {
		objectKey := object.Key("SourceCidrBlock")
		objectKey.String(*v.SourceCidrBlock)
	}

	if v.SourcePortRange != nil {
		objectKey := object.Key("SourcePortRange")
		if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil {
			return err
		}
	}

	if len(v.TrafficDirection) > 0 {
		objectKey := object.Key("TrafficDirection")
		objectKey.String(string(v.TrafficDirection))
	}

	if v.TrafficMirrorFilterRuleId != nil {
		objectKey := object.Key("TrafficMirrorFilterRuleId")
		objectKey.String(*v.TrafficMirrorFilterRuleId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(v *ModifyTrafficMirrorSessionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PacketLength != nil {
		objectKey := object.Key("PacketLength")
		objectKey.Integer(*v.PacketLength)
	}

	if v.RemoveFields != nil {
		objectKey := object.FlatKey("RemoveField")
		if err := awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v.RemoveFields, objectKey); err != nil {
			return err
		}
	}

	if v.SessionNumber != nil {
		objectKey := object.Key("SessionNumber")
		objectKey.Integer(*v.SessionNumber)
	}

	if v.TrafficMirrorFilterId != nil {
		objectKey := object.Key("TrafficMirrorFilterId")
		objectKey.String(*v.TrafficMirrorFilterId)
	}

	if v.TrafficMirrorSessionId != nil {
		objectKey := object.Key("TrafficMirrorSessionId")
		objectKey.String(*v.TrafficMirrorSessionId)
	}

	if v.TrafficMirrorTargetId != nil {
		objectKey := object.Key("TrafficMirrorTargetId")
		objectKey.String(*v.TrafficMirrorTargetId)
	}

	if v.VirtualNetworkId != nil {
		objectKey := object.Key("VirtualNetworkId")
		objectKey.Integer(*v.VirtualNetworkId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTransitGatewayInput(v *ModifyTransitGatewayInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentModifyTransitGatewayOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(v *ModifyTransitGatewayPrefixListReferenceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Blackhole != nil {
		objectKey := object.Key("Blackhole")
		objectKey.Boolean(*v.Blackhole)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(v *ModifyTransitGatewayVpcAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddSubnetIds != nil {
		objectKey := object.FlatKey("AddSubnetIds")
		if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.AddSubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Options != nil {
		objectKey := object.Key("Options")
		if err := awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil {
			return err
		}
	}

	if v.RemoveSubnetIds != nil {
		objectKey := object.FlatKey("RemoveSubnetIds")
		if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.RemoveSubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointInput(v *ModifyVerifiedAccessEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LoadBalancerOptions != nil {
		objectKey := object.Key("LoadBalancerOptions")
		if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointLoadBalancerOptions(v.LoadBalancerOptions, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceOptions != nil {
		objectKey := object.Key("NetworkInterfaceOptions")
		if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointEniOptions(v.NetworkInterfaceOptions, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessEndpointId != nil {
		objectKey := object.Key("VerifiedAccessEndpointId")
		objectKey.String(*v.VerifiedAccessEndpointId)
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointPolicyInput(v *ModifyVerifiedAccessEndpointPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.PolicyEnabled != nil {
		objectKey := object.Key("PolicyEnabled")
		objectKey.Boolean(*v.PolicyEnabled)
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessEndpointId != nil {
		objectKey := object.Key("VerifiedAccessEndpointId")
		objectKey.String(*v.VerifiedAccessEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupInput(v *ModifyVerifiedAccessGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupPolicyInput(v *ModifyVerifiedAccessGroupPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.PolicyEnabled != nil {
		objectKey := object.Key("PolicyEnabled")
		objectKey.Boolean(*v.PolicyEnabled)
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessGroupId != nil {
		objectKey := object.Key("VerifiedAccessGroupId")
		objectKey.String(*v.VerifiedAccessGroupId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceInput(v *ModifyVerifiedAccessInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationInput(v *ModifyVerifiedAccessInstanceLoggingConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AccessLogs != nil {
		objectKey := object.Key("AccessLogs")
		if err := awsEc2query_serializeDocumentVerifiedAccessLogOptions(v.AccessLogs, objectKey); err != nil {
			return err
		}
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VerifiedAccessInstanceId != nil {
		objectKey := object.Key("VerifiedAccessInstanceId")
		objectKey.String(*v.VerifiedAccessInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVerifiedAccessTrustProviderInput(v *ModifyVerifiedAccessTrustProviderInput, value query.Value) error {
	object := value.Object()
	_ = object

	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.DeviceOptions != nil {
		objectKey := object.Key("DeviceOptions")
		if err := awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderDeviceOptions(v.DeviceOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.OidcOptions != nil {
		objectKey := object.Key("OidcOptions")
		if err := awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderOidcOptions(v.OidcOptions, objectKey); err != nil {
			return err
		}
	}

	if v.SseSpecification != nil {
		objectKey := object.Key("SseSpecification")
		if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.VerifiedAccessTrustProviderId != nil {
		objectKey := object.Key("VerifiedAccessTrustProviderId")
		objectKey.String(*v.VerifiedAccessTrustProviderId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(v *ModifyVolumeAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AutoEnableIO != nil {
		objectKey := object.Key("AutoEnableIO")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AutoEnableIO, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVolumeInput(v *ModifyVolumeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Iops != nil {
		objectKey := object.Key("Iops")
		objectKey.Integer(*v.Iops)
	}

	if v.MultiAttachEnabled != nil {
		objectKey := object.Key("MultiAttachEnabled")
		objectKey.Boolean(*v.MultiAttachEnabled)
	}

	if v.Size != nil {
		objectKey := object.Key("Size")
		objectKey.Integer(*v.Size)
	}

	if v.Throughput != nil {
		objectKey := object.Key("Throughput")
		objectKey.Integer(*v.Throughput)
	}

	if v.VolumeId != nil {
		objectKey := object.Key("VolumeId")
		objectKey.String(*v.VolumeId)
	}

	if len(v.VolumeType) > 0 {
		objectKey := object.Key("VolumeType")
		objectKey.String(string(v.VolumeType))
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcAttributeInput(v *ModifyVpcAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnableDnsHostnames != nil {
		objectKey := object.Key("EnableDnsHostnames")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsHostnames, objectKey); err != nil {
			return err
		}
	}

	if v.EnableDnsSupport != nil {
		objectKey := object.Key("EnableDnsSupport")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsSupport, objectKey); err != nil {
			return err
		}
	}

	if v.EnableNetworkAddressUsageMetrics != nil {
		objectKey := object.Key("EnableNetworkAddressUsageMetrics")
		if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableNetworkAddressUsageMetrics, objectKey); err != nil {
			return err
		}
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(v *ModifyVpcEndpointConnectionNotificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ConnectionEvents != nil {
		objectKey := object.FlatKey("ConnectionEvents")
		if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil {
			return err
		}
	}

	if v.ConnectionNotificationArn != nil {
		objectKey := object.Key("ConnectionNotificationArn")
		objectKey.String(*v.ConnectionNotificationArn)
	}

	if v.ConnectionNotificationId != nil {
		objectKey := object.Key("ConnectionNotificationId")
		objectKey.String(*v.ConnectionNotificationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcEndpointInput(v *ModifyVpcEndpointInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddRouteTableIds != nil {
		objectKey := object.FlatKey("AddRouteTableId")
		if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.AddRouteTableIds, objectKey); err != nil {
			return err
		}
	}

	if v.AddSecurityGroupIds != nil {
		objectKey := object.FlatKey("AddSecurityGroupId")
		if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.AddSecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.AddSubnetIds != nil {
		objectKey := object.FlatKey("AddSubnetId")
		if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.AddSubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.DnsOptions != nil {
		objectKey := object.Key("DnsOptions")
		if err := awsEc2query_serializeDocumentDnsOptionsSpecification(v.DnsOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.IpAddressType) > 0 {
		objectKey := object.Key("IpAddressType")
		objectKey.String(string(v.IpAddressType))
	}

	if v.PolicyDocument != nil {
		objectKey := object.Key("PolicyDocument")
		objectKey.String(*v.PolicyDocument)
	}

	if v.PrivateDnsEnabled != nil {
		objectKey := object.Key("PrivateDnsEnabled")
		objectKey.Boolean(*v.PrivateDnsEnabled)
	}

	if v.RemoveRouteTableIds != nil {
		objectKey := object.FlatKey("RemoveRouteTableId")
		if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RemoveRouteTableIds, objectKey); err != nil {
			return err
		}
	}

	if v.RemoveSecurityGroupIds != nil {
		objectKey := object.FlatKey("RemoveSecurityGroupId")
		if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.RemoveSecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.RemoveSubnetIds != nil {
		objectKey := object.FlatKey("RemoveSubnetId")
		if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.RemoveSubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.ResetPolicy != nil {
		objectKey := object.Key("ResetPolicy")
		objectKey.Boolean(*v.ResetPolicy)
	}

	if v.SubnetConfigurations != nil {
		objectKey := object.FlatKey("SubnetConfiguration")
		if err := awsEc2query_serializeDocumentSubnetConfigurationsList(v.SubnetConfigurations, objectKey); err != nil {
			return err
		}
	}

	if v.VpcEndpointId != nil {
		objectKey := object.Key("VpcEndpointId")
		objectKey.String(*v.VpcEndpointId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(v *ModifyVpcEndpointServiceConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AcceptanceRequired != nil {
		objectKey := object.Key("AcceptanceRequired")
		objectKey.Boolean(*v.AcceptanceRequired)
	}

	if v.AddGatewayLoadBalancerArns != nil {
		objectKey := object.FlatKey("AddGatewayLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.AddGatewayLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.AddNetworkLoadBalancerArns != nil {
		objectKey := object.FlatKey("AddNetworkLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.AddNetworkLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.AddSupportedIpAddressTypes != nil {
		objectKey := object.FlatKey("AddSupportedIpAddressType")
		if err := awsEc2query_serializeDocumentValueStringList(v.AddSupportedIpAddressTypes, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrivateDnsName != nil {
		objectKey := object.Key("PrivateDnsName")
		objectKey.String(*v.PrivateDnsName)
	}

	if v.RemoveGatewayLoadBalancerArns != nil {
		objectKey := object.FlatKey("RemoveGatewayLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.RemoveGatewayLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.RemoveNetworkLoadBalancerArns != nil {
		objectKey := object.FlatKey("RemoveNetworkLoadBalancerArn")
		if err := awsEc2query_serializeDocumentValueStringList(v.RemoveNetworkLoadBalancerArns, objectKey); err != nil {
			return err
		}
	}

	if v.RemovePrivateDnsName != nil {
		objectKey := object.Key("RemovePrivateDnsName")
		objectKey.Boolean(*v.RemovePrivateDnsName)
	}

	if v.RemoveSupportedIpAddressTypes != nil {
		objectKey := object.FlatKey("RemoveSupportedIpAddressType")
		if err := awsEc2query_serializeDocumentValueStringList(v.RemoveSupportedIpAddressTypes, objectKey); err != nil {
			return err
		}
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcEndpointServicePayerResponsibilityInput(v *ModifyVpcEndpointServicePayerResponsibilityInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.PayerResponsibility) > 0 {
		objectKey := object.Key("PayerResponsibility")
		objectKey.String(string(v.PayerResponsibility))
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(v *ModifyVpcEndpointServicePermissionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddAllowedPrincipals != nil {
		objectKey := object.FlatKey("AddAllowedPrincipals")
		if err := awsEc2query_serializeDocumentValueStringList(v.AddAllowedPrincipals, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RemoveAllowedPrincipals != nil {
		objectKey := object.FlatKey("RemoveAllowedPrincipals")
		if err := awsEc2query_serializeDocumentValueStringList(v.RemoveAllowedPrincipals, objectKey); err != nil {
			return err
		}
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(v *ModifyVpcPeeringConnectionOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AccepterPeeringConnectionOptions != nil {
		objectKey := object.Key("AccepterPeeringConnectionOptions")
		if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.AccepterPeeringConnectionOptions, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RequesterPeeringConnectionOptions != nil {
		objectKey := object.Key("RequesterPeeringConnectionOptions")
		if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.RequesterPeeringConnectionOptions, objectKey); err != nil {
			return err
		}
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpcTenancyInput(v *ModifyVpcTenancyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.InstanceTenancy) > 0 {
		objectKey := object.Key("InstanceTenancy")
		objectKey.String(string(v.InstanceTenancy))
	}

	if v.VpcId != nil {
		objectKey := object.Key("VpcId")
		objectKey.String(*v.VpcId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpnConnectionInput(v *ModifyVpnConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerGatewayId != nil {
		objectKey := object.Key("CustomerGatewayId")
		objectKey.String(*v.CustomerGatewayId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	if v.VpnGatewayId != nil {
		objectKey := object.Key("VpnGatewayId")
		objectKey.String(*v.VpnGatewayId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(v *ModifyVpnConnectionOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.LocalIpv4NetworkCidr != nil {
		objectKey := object.Key("LocalIpv4NetworkCidr")
		objectKey.String(*v.LocalIpv4NetworkCidr)
	}

	if v.LocalIpv6NetworkCidr != nil {
		objectKey := object.Key("LocalIpv6NetworkCidr")
		objectKey.String(*v.LocalIpv6NetworkCidr)
	}

	if v.RemoteIpv4NetworkCidr != nil {
		objectKey := object.Key("RemoteIpv4NetworkCidr")
		objectKey.String(*v.RemoteIpv4NetworkCidr)
	}

	if v.RemoteIpv6NetworkCidr != nil {
		objectKey := object.Key("RemoteIpv6NetworkCidr")
		objectKey.String(*v.RemoteIpv6NetworkCidr)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(v *ModifyVpnTunnelCertificateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	if v.VpnTunnelOutsideIpAddress != nil {
		objectKey := object.Key("VpnTunnelOutsideIpAddress")
		objectKey.String(*v.VpnTunnelOutsideIpAddress)
	}

	return nil
}

func awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(v *ModifyVpnTunnelOptionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SkipTunnelReplacement != nil {
		objectKey := object.Key("SkipTunnelReplacement")
		objectKey.Boolean(*v.SkipTunnelReplacement)
	}

	if v.TunnelOptions != nil {
		objectKey := object.Key("TunnelOptions")
		if err := awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v.TunnelOptions, objectKey); err != nil {
			return err
		}
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	if v.VpnTunnelOutsideIpAddress != nil {
		objectKey := object.Key("VpnTunnelOutsideIpAddress")
		objectKey.String(*v.VpnTunnelOutsideIpAddress)
	}

	return nil
}

func awsEc2query_serializeOpDocumentMonitorInstancesInput(v *MonitorInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentMoveAddressToVpcInput(v *MoveAddressToVpcInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentMoveByoipCidrToIpamInput(v *MoveByoipCidrToIpamInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.IpamPoolOwner != nil {
		objectKey := object.Key("IpamPoolOwner")
		objectKey.String(*v.IpamPoolOwner)
	}

	return nil
}

func awsEc2query_serializeOpDocumentProvisionByoipCidrInput(v *ProvisionByoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.CidrAuthorizationContext != nil {
		objectKey := object.Key("CidrAuthorizationContext")
		if err := awsEc2query_serializeDocumentCidrAuthorizationContext(v.CidrAuthorizationContext, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.MultiRegion != nil {
		objectKey := object.Key("MultiRegion")
		objectKey.Boolean(*v.MultiRegion)
	}

	if v.PoolTagSpecifications != nil {
		objectKey := object.FlatKey("PoolTagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.PoolTagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.PubliclyAdvertisable != nil {
		objectKey := object.Key("PubliclyAdvertisable")
		objectKey.Boolean(*v.PubliclyAdvertisable)
	}

	return nil
}

func awsEc2query_serializeOpDocumentProvisionIpamByoasnInput(v *ProvisionIpamByoasnInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Asn != nil {
		objectKey := object.Key("Asn")
		objectKey.String(*v.Asn)
	}

	if v.AsnAuthorizationContext != nil {
		objectKey := object.Key("AsnAuthorizationContext")
		if err := awsEc2query_serializeDocumentAsnAuthorizationContext(v.AsnAuthorizationContext, objectKey); err != nil {
			return err
		}
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamId != nil {
		objectKey := object.Key("IpamId")
		objectKey.String(*v.IpamId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(v *ProvisionIpamPoolCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.CidrAuthorizationContext != nil {
		objectKey := object.Key("CidrAuthorizationContext")
		if err := awsEc2query_serializeDocumentIpamCidrAuthorizationContext(v.CidrAuthorizationContext, objectKey); err != nil {
			return err
		}
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.NetmaskLength != nil {
		objectKey := object.Key("NetmaskLength")
		objectKey.Integer(*v.NetmaskLength)
	}

	return nil
}

func awsEc2query_serializeOpDocumentProvisionPublicIpv4PoolCidrInput(v *ProvisionPublicIpv4PoolCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	if v.NetmaskLength != nil {
		objectKey := object.Key("NetmaskLength")
		objectKey.Integer(*v.NetmaskLength)
	}

	if v.PoolId != nil {
		objectKey := object.Key("PoolId")
		objectKey.String(*v.PoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentPurchaseCapacityBlockInput(v *PurchaseCapacityBlockInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CapacityBlockOfferingId != nil {
		objectKey := object.Key("CapacityBlockOfferingId")
		objectKey.String(*v.CapacityBlockOfferingId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if len(v.InstancePlatform) > 0 {
		objectKey := object.Key("InstancePlatform")
		objectKey.String(string(v.InstancePlatform))
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentPurchaseHostReservationInput(v *PurchaseHostReservationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if len(v.CurrencyCode) > 0 {
		objectKey := object.Key("CurrencyCode")
		objectKey.String(string(v.CurrencyCode))
	}

	if v.HostIdSet != nil {
		objectKey := object.FlatKey("HostIdSet")
		if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil {
			return err
		}
	}

	if v.LimitPrice != nil {
		objectKey := object.Key("LimitPrice")
		objectKey.String(*v.LimitPrice)
	}

	if v.OfferingId != nil {
		objectKey := object.Key("OfferingId")
		objectKey.String(*v.OfferingId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(v *PurchaseReservedInstancesOfferingInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.LimitPrice != nil {
		objectKey := object.Key("LimitPrice")
		if err := awsEc2query_serializeDocumentReservedInstanceLimitPrice(v.LimitPrice, objectKey); err != nil {
			return err
		}
	}

	if v.PurchaseTime != nil {
		objectKey := object.Key("PurchaseTime")
		objectKey.String(smithytime.FormatDateTime(*v.PurchaseTime))
	}

	if v.ReservedInstancesOfferingId != nil {
		objectKey := object.Key("ReservedInstancesOfferingId")
		objectKey.String(*v.ReservedInstancesOfferingId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(v *PurchaseScheduledInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PurchaseRequests != nil {
		objectKey := object.FlatKey("PurchaseRequest")
		if err := awsEc2query_serializeDocumentPurchaseRequestSet(v.PurchaseRequests, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentRebootInstancesInput(v *RebootInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentRegisterImageInput(v *RegisterImageInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Architecture) > 0 {
		objectKey := object.Key("Architecture")
		objectKey.String(string(v.Architecture))
	}

	if v.BillingProducts != nil {
		objectKey := object.FlatKey("BillingProduct")
		if err := awsEc2query_serializeDocumentBillingProductList(v.BillingProducts, objectKey); err != nil {
			return err
		}
	}

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if len(v.BootMode) > 0 {
		objectKey := object.Key("BootMode")
		objectKey.String(string(v.BootMode))
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EnaSupport != nil {
		objectKey := object.Key("EnaSupport")
		objectKey.Boolean(*v.EnaSupport)
	}

	if v.ImageLocation != nil {
		objectKey := object.Key("ImageLocation")
		objectKey.String(*v.ImageLocation)
	}

	if len(v.ImdsSupport) > 0 {
		objectKey := object.Key("ImdsSupport")
		objectKey.String(string(v.ImdsSupport))
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.Name != nil {
		objectKey := object.Key("Name")
		objectKey.String(*v.Name)
	}

	if v.RamdiskId != nil {
		objectKey := object.Key("RamdiskId")
		objectKey.String(*v.RamdiskId)
	}

	if v.RootDeviceName != nil {
		objectKey := object.Key("RootDeviceName")
		objectKey.String(*v.RootDeviceName)
	}

	if v.SriovNetSupport != nil {
		objectKey := object.Key("SriovNetSupport")
		objectKey.String(*v.SriovNetSupport)
	}

	if len(v.TpmSupport) > 0 {
		objectKey := object.Key("TpmSupport")
		objectKey.String(string(v.TpmSupport))
	}

	if v.UefiData != nil {
		objectKey := object.Key("UefiData")
		objectKey.String(*v.UefiData)
	}

	if v.VirtualizationType != nil {
		objectKey := object.Key("VirtualizationType")
		objectKey.String(*v.VirtualizationType)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(v *RegisterInstanceEventNotificationAttributesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceTagAttribute != nil {
		objectKey := object.Key("InstanceTagAttribute")
		if err := awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(v *RegisterTransitGatewayMulticastGroupMembersInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupIpAddress != nil {
		objectKey := object.Key("GroupIpAddress")
		objectKey.String(*v.GroupIpAddress)
	}

	if v.NetworkInterfaceIds != nil {
		objectKey := object.FlatKey("NetworkInterfaceIds")
		if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(v *RegisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupIpAddress != nil {
		objectKey := object.Key("GroupIpAddress")
		objectKey.String(*v.GroupIpAddress)
	}

	if v.NetworkInterfaceIds != nil {
		objectKey := object.FlatKey("NetworkInterfaceIds")
		if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(v *RejectTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SubnetIds != nil {
		objectKey := object.FlatKey("SubnetIds")
		if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(v *RejectTransitGatewayPeeringAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(v *RejectTransitGatewayVpcAttachmentInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(v *RejectVpcEndpointConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	if v.VpcEndpointIds != nil {
		objectKey := object.FlatKey("VpcEndpointId")
		if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(v *RejectVpcPeeringConnectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReleaseAddressInput(v *ReleaseAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkBorderGroup != nil {
		objectKey := object.Key("NetworkBorderGroup")
		objectKey.String(*v.NetworkBorderGroup)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReleaseHostsInput(v *ReleaseHostsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.HostIds != nil {
		objectKey := object.FlatKey("HostId")
		if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentReleaseIpamPoolAllocationInput(v *ReleaseIpamPoolAllocationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.IpamPoolAllocationId != nil {
		objectKey := object.Key("IpamPoolAllocationId")
		objectKey.String(*v.IpamPoolAllocationId)
	}

	if v.IpamPoolId != nil {
		objectKey := object.Key("IpamPoolId")
		objectKey.String(*v.IpamPoolId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(v *ReplaceIamInstanceProfileAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(v *ReplaceNetworkAclAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkAclId != nil {
		objectKey := object.Key("NetworkAclId")
		objectKey.String(*v.NetworkAclId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(v *ReplaceNetworkAclEntryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrBlock != nil {
		objectKey := object.Key("CidrBlock")
		objectKey.String(*v.CidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Egress != nil {
		objectKey := object.Key("Egress")
		objectKey.Boolean(*v.Egress)
	}

	if v.IcmpTypeCode != nil {
		objectKey := object.Key("Icmp")
		if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6CidrBlock != nil {
		objectKey := object.Key("Ipv6CidrBlock")
		objectKey.String(*v.Ipv6CidrBlock)
	}

	if v.NetworkAclId != nil {
		objectKey := object.Key("NetworkAclId")
		objectKey.String(*v.NetworkAclId)
	}

	if v.PortRange != nil {
		objectKey := object.Key("PortRange")
		if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil {
			return err
		}
	}

	if v.Protocol != nil {
		objectKey := object.Key("Protocol")
		objectKey.String(*v.Protocol)
	}

	if len(v.RuleAction) > 0 {
		objectKey := object.Key("RuleAction")
		objectKey.String(string(v.RuleAction))
	}

	if v.RuleNumber != nil {
		objectKey := object.Key("RuleNumber")
		objectKey.Integer(*v.RuleNumber)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceRouteInput(v *ReplaceRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CarrierGatewayId != nil {
		objectKey := object.Key("CarrierGatewayId")
		objectKey.String(*v.CarrierGatewayId)
	}

	if v.CoreNetworkArn != nil {
		objectKey := object.Key("CoreNetworkArn")
		objectKey.String(*v.CoreNetworkArn)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DestinationIpv6CidrBlock != nil {
		objectKey := object.Key("DestinationIpv6CidrBlock")
		objectKey.String(*v.DestinationIpv6CidrBlock)
	}

	if v.DestinationPrefixListId != nil {
		objectKey := object.Key("DestinationPrefixListId")
		objectKey.String(*v.DestinationPrefixListId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EgressOnlyInternetGatewayId != nil {
		objectKey := object.Key("EgressOnlyInternetGatewayId")
		objectKey.String(*v.EgressOnlyInternetGatewayId)
	}

	if v.GatewayId != nil {
		objectKey := object.Key("GatewayId")
		objectKey.String(*v.GatewayId)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	if v.LocalGatewayId != nil {
		objectKey := object.Key("LocalGatewayId")
		objectKey.String(*v.LocalGatewayId)
	}

	if v.LocalTarget != nil {
		objectKey := object.Key("LocalTarget")
		objectKey.Boolean(*v.LocalTarget)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	if v.TransitGatewayId != nil {
		objectKey := object.Key("TransitGatewayId")
		objectKey.String(*v.TransitGatewayId)
	}

	if v.VpcEndpointId != nil {
		objectKey := object.Key("VpcEndpointId")
		objectKey.String(*v.VpcEndpointId)
	}

	if v.VpcPeeringConnectionId != nil {
		objectKey := object.Key("VpcPeeringConnectionId")
		objectKey.String(*v.VpcPeeringConnectionId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(v *ReplaceRouteTableAssociationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AssociationId != nil {
		objectKey := object.Key("AssociationId")
		objectKey.String(*v.AssociationId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RouteTableId != nil {
		objectKey := object.Key("RouteTableId")
		objectKey.String(*v.RouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(v *ReplaceTransitGatewayRouteInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Blackhole != nil {
		objectKey := object.Key("Blackhole")
		objectKey.Boolean(*v.Blackhole)
	}

	if v.DestinationCidrBlock != nil {
		objectKey := object.Key("DestinationCidrBlock")
		objectKey.String(*v.DestinationCidrBlock)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.TransitGatewayAttachmentId != nil {
		objectKey := object.Key("TransitGatewayAttachmentId")
		objectKey.String(*v.TransitGatewayAttachmentId)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReplaceVpnTunnelInput(v *ReplaceVpnTunnelInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ApplyPendingMaintenance != nil {
		objectKey := object.Key("ApplyPendingMaintenance")
		objectKey.Boolean(*v.ApplyPendingMaintenance)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.VpnConnectionId != nil {
		objectKey := object.Key("VpnConnectionId")
		objectKey.String(*v.VpnConnectionId)
	}

	if v.VpnTunnelOutsideIpAddress != nil {
		objectKey := object.Key("VpnTunnelOutsideIpAddress")
		objectKey.String(*v.VpnTunnelOutsideIpAddress)
	}

	return nil
}

func awsEc2query_serializeOpDocumentReportInstanceStatusInput(v *ReportInstanceStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EndTime != nil {
		objectKey := object.Key("EndTime")
		objectKey.String(smithytime.FormatDateTime(*v.EndTime))
	}

	if v.Instances != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.Instances, objectKey); err != nil {
			return err
		}
	}

	if v.ReasonCodes != nil {
		objectKey := object.FlatKey("ReasonCode")
		if err := awsEc2query_serializeDocumentReasonCodesList(v.ReasonCodes, objectKey); err != nil {
			return err
		}
	}

	if v.StartTime != nil {
		objectKey := object.Key("StartTime")
		objectKey.String(smithytime.FormatDateTime(*v.StartTime))
	}

	if len(v.Status) > 0 {
		objectKey := object.Key("Status")
		objectKey.String(string(v.Status))
	}

	return nil
}

func awsEc2query_serializeOpDocumentRequestSpotFleetInput(v *RequestSpotFleetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SpotFleetRequestConfig != nil {
		objectKey := object.Key("SpotFleetRequestConfig")
		if err := awsEc2query_serializeDocumentSpotFleetRequestConfigData(v.SpotFleetRequestConfig, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentRequestSpotInstancesInput(v *RequestSpotInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AvailabilityZoneGroup != nil {
		objectKey := object.Key("AvailabilityZoneGroup")
		objectKey.String(*v.AvailabilityZoneGroup)
	}

	if v.BlockDurationMinutes != nil {
		objectKey := object.Key("BlockDurationMinutes")
		objectKey.Integer(*v.BlockDurationMinutes)
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if len(v.InstanceInterruptionBehavior) > 0 {
		objectKey := object.Key("InstanceInterruptionBehavior")
		objectKey.String(string(v.InstanceInterruptionBehavior))
	}

	if v.LaunchGroup != nil {
		objectKey := object.Key("LaunchGroup")
		objectKey.String(*v.LaunchGroup)
	}

	if v.LaunchSpecification != nil {
		objectKey := object.Key("LaunchSpecification")
		if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.SpotPrice != nil {
		objectKey := object.Key("SpotPrice")
		objectKey.String(*v.SpotPrice)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.ValidFrom != nil {
		objectKey := object.Key("ValidFrom")
		objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
	}

	if v.ValidUntil != nil {
		objectKey := object.Key("ValidUntil")
		objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetAddressAttributeInput(v *ResetAddressAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AllocationId != nil {
		objectKey := object.Key("AllocationId")
		objectKey.String(*v.AllocationId)
	}

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(v *ResetEbsDefaultKmsKeyIdInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(v *ResetFpgaImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FpgaImageId != nil {
		objectKey := object.Key("FpgaImageId")
		objectKey.String(*v.FpgaImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetImageAttributeInput(v *ResetImageAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetInstanceAttributeInput(v *ResetInstanceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(v *ResetNetworkInterfaceAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.SourceDestCheck != nil {
		objectKey := object.Key("SourceDestCheck")
		objectKey.String(*v.SourceDestCheck)
	}

	return nil
}

func awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(v *ResetSnapshotAttributeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Attribute) > 0 {
		objectKey := object.Key("Attribute")
		objectKey.String(string(v.Attribute))
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(v *RestoreAddressToClassicInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PublicIp != nil {
		objectKey := object.Key("PublicIp")
		objectKey.String(*v.PublicIp)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRestoreImageFromRecycleBinInput(v *RestoreImageFromRecycleBinInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(v *RestoreManagedPrefixListVersionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CurrentVersion != nil {
		objectKey := object.Key("CurrentVersion")
		objectKey.Long(*v.CurrentVersion)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PrefixListId != nil {
		objectKey := object.Key("PrefixListId")
		objectKey.String(*v.PrefixListId)
	}

	if v.PreviousVersion != nil {
		objectKey := object.Key("PreviousVersion")
		objectKey.Long(*v.PreviousVersion)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(v *RestoreSnapshotFromRecycleBinInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(v *RestoreSnapshotTierInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.PermanentRestore != nil {
		objectKey := object.Key("PermanentRestore")
		objectKey.Boolean(*v.PermanentRestore)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	if v.TemporaryRestoreDays != nil {
		objectKey := object.Key("TemporaryRestoreDays")
		objectKey.Integer(*v.TemporaryRestoreDays)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AccessGroupId != nil {
		objectKey := object.Key("AccessGroupId")
		objectKey.String(*v.AccessGroupId)
	}

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.RevokeAllGroups != nil {
		objectKey := object.Key("RevokeAllGroups")
		objectKey.Boolean(*v.RevokeAllGroups)
	}

	if v.TargetNetworkCidr != nil {
		objectKey := object.Key("TargetNetworkCidr")
		objectKey.String(*v.TargetNetworkCidr)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(v *RevokeSecurityGroupEgressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIp != nil {
		objectKey := object.Key("CidrIp")
		objectKey.String(*v.CidrIp)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.SecurityGroupRuleIds != nil {
		objectKey := object.FlatKey("SecurityGroupRuleId")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
			return err
		}
	}

	if v.SourceSecurityGroupName != nil {
		objectKey := object.Key("SourceSecurityGroupName")
		objectKey.String(*v.SourceSecurityGroupName)
	}

	if v.SourceSecurityGroupOwnerId != nil {
		objectKey := object.Key("SourceSecurityGroupOwnerId")
		objectKey.String(*v.SourceSecurityGroupOwnerId)
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(v *RevokeSecurityGroupIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CidrIp != nil {
		objectKey := object.Key("CidrIp")
		objectKey.String(*v.CidrIp)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FromPort != nil {
		objectKey := object.Key("FromPort")
		objectKey.Integer(*v.FromPort)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.IpProtocol != nil {
		objectKey := object.Key("IpProtocol")
		objectKey.String(*v.IpProtocol)
	}

	if v.SecurityGroupRuleIds != nil {
		objectKey := object.FlatKey("SecurityGroupRuleId")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
			return err
		}
	}

	if v.SourceSecurityGroupName != nil {
		objectKey := object.Key("SourceSecurityGroupName")
		objectKey.String(*v.SourceSecurityGroupName)
	}

	if v.SourceSecurityGroupOwnerId != nil {
		objectKey := object.Key("SourceSecurityGroupOwnerId")
		objectKey.String(*v.SourceSecurityGroupOwnerId)
	}

	if v.ToPort != nil {
		objectKey := object.Key("ToPort")
		objectKey.Integer(*v.ToPort)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRunInstancesInput(v *RunInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AdditionalInfo != nil {
		objectKey := object.Key("AdditionalInfo")
		objectKey.String(*v.AdditionalInfo)
	}

	if v.BlockDeviceMappings != nil {
		objectKey := object.FlatKey("BlockDeviceMapping")
		if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
			return err
		}
	}

	if v.CapacityReservationSpecification != nil {
		objectKey := object.Key("CapacityReservationSpecification")
		if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.CpuOptions != nil {
		objectKey := object.Key("CpuOptions")
		if err := awsEc2query_serializeDocumentCpuOptionsRequest(v.CpuOptions, objectKey); err != nil {
			return err
		}
	}

	if v.CreditSpecification != nil {
		objectKey := object.Key("CreditSpecification")
		if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.DisableApiStop != nil {
		objectKey := object.Key("DisableApiStop")
		objectKey.Boolean(*v.DisableApiStop)
	}

	if v.DisableApiTermination != nil {
		objectKey := object.Key("DisableApiTermination")
		objectKey.Boolean(*v.DisableApiTermination)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.EbsOptimized != nil {
		objectKey := object.Key("EbsOptimized")
		objectKey.Boolean(*v.EbsOptimized)
	}

	if v.ElasticGpuSpecification != nil {
		objectKey := object.FlatKey("ElasticGpuSpecification")
		if err := awsEc2query_serializeDocumentElasticGpuSpecifications(v.ElasticGpuSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.ElasticInferenceAccelerators != nil {
		objectKey := object.FlatKey("ElasticInferenceAccelerator")
		if err := awsEc2query_serializeDocumentElasticInferenceAccelerators(v.ElasticInferenceAccelerators, objectKey); err != nil {
			return err
		}
	}

	if v.EnablePrimaryIpv6 != nil {
		objectKey := object.Key("EnablePrimaryIpv6")
		objectKey.Boolean(*v.EnablePrimaryIpv6)
	}

	if v.EnclaveOptions != nil {
		objectKey := object.Key("EnclaveOptions")
		if err := awsEc2query_serializeDocumentEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil {
			return err
		}
	}

	if v.HibernationOptions != nil {
		objectKey := object.Key("HibernationOptions")
		if err := awsEc2query_serializeDocumentHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil {
			return err
		}
	}

	if v.IamInstanceProfile != nil {
		objectKey := object.Key("IamInstanceProfile")
		if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
			return err
		}
	}

	if v.ImageId != nil {
		objectKey := object.Key("ImageId")
		objectKey.String(*v.ImageId)
	}

	if len(v.InstanceInitiatedShutdownBehavior) > 0 {
		objectKey := object.Key("InstanceInitiatedShutdownBehavior")
		objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
	}

	if v.InstanceMarketOptions != nil {
		objectKey := object.Key("InstanceMarketOptions")
		if err := awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil {
			return err
		}
	}

	if len(v.InstanceType) > 0 {
		objectKey := object.Key("InstanceType")
		objectKey.String(string(v.InstanceType))
	}

	if v.Ipv6AddressCount != nil {
		objectKey := object.Key("Ipv6AddressCount")
		objectKey.Integer(*v.Ipv6AddressCount)
	}

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Address")
		if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.KernelId != nil {
		objectKey := object.Key("KernelId")
		objectKey.String(*v.KernelId)
	}

	if v.KeyName != nil {
		objectKey := object.Key("KeyName")
		objectKey.String(*v.KeyName)
	}

	if v.LaunchTemplate != nil {
		objectKey := object.Key("LaunchTemplate")
		if err := awsEc2query_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil {
			return err
		}
	}

	if v.LicenseSpecifications != nil {
		objectKey := object.FlatKey("LicenseSpecification")
		if err := awsEc2query_serializeDocumentLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.MaintenanceOptions != nil {
		objectKey := object.Key("MaintenanceOptions")
		if err := awsEc2query_serializeDocumentInstanceMaintenanceOptionsRequest(v.MaintenanceOptions, objectKey); err != nil {
			return err
		}
	}

	if v.MaxCount != nil {
		objectKey := object.Key("MaxCount")
		objectKey.Integer(*v.MaxCount)
	}

	if v.MetadataOptions != nil {
		objectKey := object.Key("MetadataOptions")
		if err := awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil {
			return err
		}
	}

	if v.MinCount != nil {
		objectKey := object.Key("MinCount")
		objectKey.Integer(*v.MinCount)
	}

	if v.Monitoring != nil {
		objectKey := object.Key("Monitoring")
		if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaces != nil {
		objectKey := object.FlatKey("NetworkInterface")
		if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
			return err
		}
	}

	if v.Placement != nil {
		objectKey := object.Key("Placement")
		if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateDnsNameOptions != nil {
		objectKey := object.Key("PrivateDnsNameOptions")
		if err := awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil {
			return err
		}
	}

	if v.PrivateIpAddress != nil {
		objectKey := object.Key("PrivateIpAddress")
		objectKey.String(*v.PrivateIpAddress)
	}

	if v.RamdiskId != nil {
		objectKey := object.Key("RamdiskId")
		objectKey.String(*v.RamdiskId)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.FlatKey("SecurityGroupId")
		if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroups != nil {
		objectKey := object.FlatKey("SecurityGroup")
		if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil {
			return err
		}
	}

	if v.SubnetId != nil {
		objectKey := object.Key("SubnetId")
		objectKey.String(*v.SubnetId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	if v.UserData != nil {
		objectKey := object.Key("UserData")
		objectKey.String(*v.UserData)
	}

	return nil
}

func awsEc2query_serializeOpDocumentRunScheduledInstancesInput(v *RunScheduledInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceCount != nil {
		objectKey := object.Key("InstanceCount")
		objectKey.Integer(*v.InstanceCount)
	}

	if v.LaunchSpecification != nil {
		objectKey := object.Key("LaunchSpecification")
		if err := awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
			return err
		}
	}

	if v.ScheduledInstanceId != nil {
		objectKey := object.Key("ScheduledInstanceId")
		objectKey.String(*v.ScheduledInstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(v *SearchLocalGatewayRoutesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.LocalGatewayRouteTableId != nil {
		objectKey := object.Key("LocalGatewayRouteTableId")
		objectKey.String(*v.LocalGatewayRouteTableId)
	}

	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 awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(v *SearchTransitGatewayMulticastGroupsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(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.TransitGatewayMulticastDomainId != nil {
		objectKey := object.Key("TransitGatewayMulticastDomainId")
		objectKey.String(*v.TransitGatewayMulticastDomainId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(v *SearchTransitGatewayRoutesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Filters != nil {
		objectKey := object.FlatKey("Filter")
		if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.TransitGatewayRouteTableId != nil {
		objectKey := object.Key("TransitGatewayRouteTableId")
		objectKey.String(*v.TransitGatewayRouteTableId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(v *SendDiagnosticInterruptInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceId != nil {
		objectKey := object.Key("InstanceId")
		objectKey.String(*v.InstanceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentStartInstancesInput(v *StartInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AdditionalInfo != nil {
		objectKey := object.Key("AdditionalInfo")
		objectKey.String(*v.AdditionalInfo)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentStartNetworkInsightsAccessScopeAnalysisInput(v *StartNetworkInsightsAccessScopeAnalysisInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.NetworkInsightsAccessScopeId != nil {
		objectKey := object.Key("NetworkInsightsAccessScopeId")
		objectKey.String(*v.NetworkInsightsAccessScopeId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(v *StartNetworkInsightsAnalysisInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AdditionalAccounts != nil {
		objectKey := object.FlatKey("AdditionalAccount")
		if err := awsEc2query_serializeDocumentValueStringList(v.AdditionalAccounts, objectKey); err != nil {
			return err
		}
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.FilterInArns != nil {
		objectKey := object.FlatKey("FilterInArn")
		if err := awsEc2query_serializeDocumentArnList(v.FilterInArns, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInsightsPathId != nil {
		objectKey := object.Key("NetworkInsightsPathId")
		objectKey.String(*v.NetworkInsightsPathId)
	}

	if v.TagSpecifications != nil {
		objectKey := object.FlatKey("TagSpecification")
		if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(v *StartVpcEndpointServicePrivateDnsVerificationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.ServiceId != nil {
		objectKey := object.Key("ServiceId")
		objectKey.String(*v.ServiceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentStopInstancesInput(v *StopInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Force != nil {
		objectKey := object.Key("Force")
		objectKey.Boolean(*v.Force)
	}

	if v.Hibernate != nil {
		objectKey := object.Key("Hibernate")
		objectKey.Boolean(*v.Hibernate)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(v *TerminateClientVpnConnectionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientVpnEndpointId != nil {
		objectKey := object.Key("ClientVpnEndpointId")
		objectKey.String(*v.ClientVpnEndpointId)
	}

	if v.ConnectionId != nil {
		objectKey := object.Key("ConnectionId")
		objectKey.String(*v.ConnectionId)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.Username != nil {
		objectKey := object.Key("Username")
		objectKey.String(*v.Username)
	}

	return nil
}

func awsEc2query_serializeOpDocumentTerminateInstancesInput(v *TerminateInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(v *UnassignIpv6AddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv6Addresses != nil {
		objectKey := object.FlatKey("Ipv6Addresses")
		if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
			return err
		}
	}

	if v.Ipv6Prefixes != nil {
		objectKey := object.FlatKey("Ipv6Prefix")
		if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(v *UnassignPrivateIpAddressesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Ipv4Prefixes != nil {
		objectKey := object.FlatKey("Ipv4Prefix")
		if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil {
			return err
		}
	}

	if v.NetworkInterfaceId != nil {
		objectKey := object.Key("NetworkInterfaceId")
		objectKey.String(*v.NetworkInterfaceId)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddress")
		if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentUnassignPrivateNatGatewayAddressInput(v *UnassignPrivateNatGatewayAddressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.MaxDrainDurationSeconds != nil {
		objectKey := object.Key("MaxDrainDurationSeconds")
		objectKey.Integer(*v.MaxDrainDurationSeconds)
	}

	if v.NatGatewayId != nil {
		objectKey := object.Key("NatGatewayId")
		objectKey.String(*v.NatGatewayId)
	}

	if v.PrivateIpAddresses != nil {
		objectKey := object.FlatKey("PrivateIpAddress")
		if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentUnlockSnapshotInput(v *UnlockSnapshotInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.SnapshotId != nil {
		objectKey := object.Key("SnapshotId")
		objectKey.String(*v.SnapshotId)
	}

	return nil
}

func awsEc2query_serializeOpDocumentUnmonitorInstancesInput(v *UnmonitorInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.InstanceIds != nil {
		objectKey := object.FlatKey("InstanceId")
		if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(v *UpdateSecurityGroupRuleDescriptionsEgressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroupRuleDescriptions != nil {
		objectKey := object.FlatKey("SecurityGroupRuleDescription")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(v *UpdateSecurityGroupRuleDescriptionsIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	if v.GroupId != nil {
		objectKey := object.Key("GroupId")
		objectKey.String(*v.GroupId)
	}

	if v.GroupName != nil {
		objectKey := object.Key("GroupName")
		objectKey.String(*v.GroupName)
	}

	if v.IpPermissions != nil {
		objectKey := object.FlatKey("IpPermissions")
		if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
			return err
		}
	}

	if v.SecurityGroupRuleDescriptions != nil {
		objectKey := object.FlatKey("SecurityGroupRuleDescription")
		if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(v *WithdrawByoipCidrInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Cidr != nil {
		objectKey := object.Key("Cidr")
		objectKey.String(*v.Cidr)
	}

	if v.DryRun != nil {
		objectKey := object.Key("DryRun")
		objectKey.Boolean(*v.DryRun)
	}

	return nil
}
