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

package elasticache

import (
	"bytes"
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/aws/protocol/query"
	"github.com/aws/aws-sdk-go-v2/service/elasticache/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"
	"path"
)

type awsAwsquery_serializeOpAddTagsToResource struct {
}

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

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

	input, ok := in.Parameters.(*AddTagsToResourceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("AddTagsToResource")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpAuthorizeCacheSecurityGroupIngress struct {
}

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

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

	input, ok := in.Parameters.(*AuthorizeCacheSecurityGroupIngressInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("AuthorizeCacheSecurityGroupIngress")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpBatchApplyUpdateAction struct {
}

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

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

	input, ok := in.Parameters.(*BatchApplyUpdateActionInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("BatchApplyUpdateAction")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpBatchStopUpdateAction struct {
}

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

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

	input, ok := in.Parameters.(*BatchStopUpdateActionInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("BatchStopUpdateAction")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCompleteMigration struct {
}

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

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

	input, ok := in.Parameters.(*CompleteMigrationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CompleteMigration")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCopySnapshot struct {
}

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

func (m *awsAwsquery_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("2015-02-02")

	if err := awsAwsquery_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 awsAwsquery_serializeOpCreateCacheCluster struct {
}

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

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

	input, ok := in.Parameters.(*CreateCacheClusterInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateCacheCluster")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateCacheParameterGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateCacheParameterGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateCacheParameterGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateCacheSecurityGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateCacheSecurityGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateCacheSecurityGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateCacheSubnetGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateCacheSubnetGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateCacheSubnetGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateSnapshot struct {
}

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

func (m *awsAwsquery_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("2015-02-02")

	if err := awsAwsquery_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 awsAwsquery_serializeOpCreateUser struct {
}

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

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

	input, ok := in.Parameters.(*CreateUserInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateUser")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateUserGroup struct {
}

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

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

	input, ok := in.Parameters.(*CreateUserGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateUserGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDecreaseNodeGroupsInGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*DecreaseNodeGroupsInGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DecreaseNodeGroupsInGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDecreaseReplicaCount struct {
}

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

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

	input, ok := in.Parameters.(*DecreaseReplicaCountInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DecreaseReplicaCount")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteCacheCluster struct {
}

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

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

	input, ok := in.Parameters.(*DeleteCacheClusterInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteCacheCluster")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteCacheParameterGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteCacheParameterGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteCacheParameterGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteCacheSecurityGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteCacheSecurityGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteCacheSecurityGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteCacheSubnetGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteCacheSubnetGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteCacheSubnetGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteSnapshot struct {
}

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

func (m *awsAwsquery_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("2015-02-02")

	if err := awsAwsquery_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 awsAwsquery_serializeOpDeleteUser struct {
}

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

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

	input, ok := in.Parameters.(*DeleteUserInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteUser")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteUserGroup struct {
}

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

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

	input, ok := in.Parameters.(*DeleteUserGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteUserGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheClusters struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheClustersInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheClusters")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheEngineVersions struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheEngineVersionsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheEngineVersions")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheParameterGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheParameterGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheParameterGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheParameters struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheParametersInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheParameters")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheSecurityGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheSecurityGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheSecurityGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeCacheSubnetGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeCacheSubnetGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeCacheSubnetGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeEngineDefaultParameters struct {
}

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

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

	input, ok := in.Parameters.(*DescribeEngineDefaultParametersInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeEngineDefaultParameters")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeEvents struct {
}

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

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

	input, ok := in.Parameters.(*DescribeEventsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeEvents")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeGlobalReplicationGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeGlobalReplicationGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeGlobalReplicationGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeReplicationGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeReplicationGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeReplicationGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeReservedCacheNodes struct {
}

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

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

	input, ok := in.Parameters.(*DescribeReservedCacheNodesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeReservedCacheNodes")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeReservedCacheNodesOfferings struct {
}

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

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

	input, ok := in.Parameters.(*DescribeReservedCacheNodesOfferingsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeReservedCacheNodesOfferings")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeServiceUpdates struct {
}

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

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

	input, ok := in.Parameters.(*DescribeServiceUpdatesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeServiceUpdates")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeSnapshots struct {
}

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

func (m *awsAwsquery_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("2015-02-02")

	if err := awsAwsquery_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 awsAwsquery_serializeOpDescribeUpdateActions struct {
}

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

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

	input, ok := in.Parameters.(*DescribeUpdateActionsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeUpdateActions")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeUserGroups struct {
}

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

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

	input, ok := in.Parameters.(*DescribeUserGroupsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeUserGroups")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeUsers struct {
}

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

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

	input, ok := in.Parameters.(*DescribeUsersInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeUsers")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDisassociateGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*DisassociateGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DisassociateGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpFailoverGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*FailoverGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("FailoverGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpIncreaseNodeGroupsInGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*IncreaseNodeGroupsInGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("IncreaseNodeGroupsInGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpIncreaseReplicaCount struct {
}

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

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

	input, ok := in.Parameters.(*IncreaseReplicaCountInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("IncreaseReplicaCount")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListAllowedNodeTypeModifications struct {
}

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

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

	input, ok := in.Parameters.(*ListAllowedNodeTypeModificationsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListAllowedNodeTypeModifications")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListTagsForResource struct {
}

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

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

	input, ok := in.Parameters.(*ListTagsForResourceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListTagsForResource")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyCacheCluster struct {
}

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

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

	input, ok := in.Parameters.(*ModifyCacheClusterInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyCacheCluster")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyCacheParameterGroup struct {
}

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

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

	input, ok := in.Parameters.(*ModifyCacheParameterGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyCacheParameterGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyCacheSubnetGroup struct {
}

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

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

	input, ok := in.Parameters.(*ModifyCacheSubnetGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyCacheSubnetGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*ModifyGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*ModifyReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyReplicationGroupShardConfiguration struct {
}

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

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

	input, ok := in.Parameters.(*ModifyReplicationGroupShardConfigurationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyReplicationGroupShardConfiguration")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyUser struct {
}

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

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

	input, ok := in.Parameters.(*ModifyUserInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyUser")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpModifyUserGroup struct {
}

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

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

	input, ok := in.Parameters.(*ModifyUserGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ModifyUserGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpPurchaseReservedCacheNodesOffering struct {
}

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

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

	input, ok := in.Parameters.(*PurchaseReservedCacheNodesOfferingInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("PurchaseReservedCacheNodesOffering")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRebalanceSlotsInGlobalReplicationGroup struct {
}

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

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

	input, ok := in.Parameters.(*RebalanceSlotsInGlobalReplicationGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RebalanceSlotsInGlobalReplicationGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRebootCacheCluster struct {
}

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

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

	input, ok := in.Parameters.(*RebootCacheClusterInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RebootCacheCluster")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRemoveTagsFromResource struct {
}

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

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

	input, ok := in.Parameters.(*RemoveTagsFromResourceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RemoveTagsFromResource")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpResetCacheParameterGroup struct {
}

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

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

	input, ok := in.Parameters.(*ResetCacheParameterGroupInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ResetCacheParameterGroup")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRevokeCacheSecurityGroupIngress struct {
}

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

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

	input, ok := in.Parameters.(*RevokeCacheSecurityGroupIngressInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RevokeCacheSecurityGroupIngress")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpStartMigration struct {
}

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

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

	input, ok := in.Parameters.(*StartMigrationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("StartMigration")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpTestFailover struct {
}

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

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

	input, ok := in.Parameters.(*TestFailoverInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

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

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("TestFailover")
	body.Key("Version").String("2015-02-02")

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

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

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

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

	return next.HandleSerialize(ctx, in)
}
func awsAwsquery_serializeDocumentAvailabilityZonesList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("AvailabilityZone")

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

func awsAwsquery_serializeDocumentCacheClusterIdList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentCacheNodeIdsList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("CacheNodeId")

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

func awsAwsquery_serializeDocumentCacheSecurityGroupNameList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("CacheSecurityGroupName")

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

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

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

	return nil
}

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

	{
		objectKey := object.Key("NewReplicaCount")
		objectKey.Integer(v.NewReplicaCount)
	}

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

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

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

	return nil
}

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentCustomerNodeEndpointList(v []types.CustomerNodeEndpoint, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

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

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

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

	return nil
}

func awsAwsquery_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.Key("Values")
		if err := awsAwsquery_serializeDocumentFilterValueList(v.Values, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeDocumentFilterList(v []types.Filter, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentFilterValueList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentGlobalNodeGroupIdList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("GlobalNodeGroupId")

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

func awsAwsquery_serializeDocumentKeyList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentLogDeliveryConfigurationRequestList(v []types.LogDeliveryConfigurationRequest, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("LogDeliveryConfigurationRequest")

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

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

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

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

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

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentNodeGroupConfigurationList(v []types.NodeGroupConfiguration, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("NodeGroupConfiguration")

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

func awsAwsquery_serializeDocumentNodeGroupsToRemoveList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("NodeGroupToRemove")

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

func awsAwsquery_serializeDocumentNodeGroupsToRetainList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("NodeGroupToRetain")

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

func awsAwsquery_serializeDocumentOutpostArnsList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("OutpostArn")

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentParameterNameValueList(v []types.ParameterNameValue, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("ParameterNameValue")

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

func awsAwsquery_serializeDocumentPasswordListInput(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentPreferredAvailabilityZoneList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("PreferredAvailabilityZone")

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

func awsAwsquery_serializeDocumentPreferredOutpostArnList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("PreferredOutpostArn")

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

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentRegionalConfigurationList(v []types.RegionalConfiguration, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("RegionalConfiguration")

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

func awsAwsquery_serializeDocumentRemoveReplicasList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentReplicaConfigurationList(v []types.ConfigureShard, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("ConfigureShard")

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

func awsAwsquery_serializeDocumentReplicationGroupIdList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentReshardingConfigurationList(v []types.ReshardingConfiguration, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("ReshardingConfiguration")

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

func awsAwsquery_serializeDocumentSecurityGroupIdsList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("SecurityGroupId")

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

func awsAwsquery_serializeDocumentServiceUpdateStatusList(v []types.ServiceUpdateStatus, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentSnapshotArnsList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("SnapshotArn")

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

func awsAwsquery_serializeDocumentSubnetIdentifierList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("SubnetIdentifier")

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentTagList(v []types.Tag, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("Tag")

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

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

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

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

	return nil
}

func awsAwsquery_serializeDocumentUpdateActionStatusList(v []types.UpdateActionStatus, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentUserGroupIdList(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentUserGroupIdListInput(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

func awsAwsquery_serializeDocumentUserIdListInput(v []string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	array := value.Array("member")

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

	if v.Force {
		objectKey := object.Key("Force")
		objectKey.Boolean(v.Force)
	}

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

	return nil
}

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

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

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

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

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

	{
		objectKey := object.Key("NodeGroupCount")
		objectKey.Integer(v.NodeGroupCount)
	}

	return nil
}

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

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

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

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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

	{
		objectKey := object.Key("RetainPrimaryReplicationGroup")
		objectKey.Boolean(v.RetainPrimaryReplicationGroup)
	}

	return nil
}

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

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

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

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

	if v.DefaultOnly {
		objectKey := object.Key("DefaultOnly")
		objectKey.Boolean(v.DefaultOnly)
	}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

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

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

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

	return nil
}

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

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

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

	{
		objectKey := object.Key("NodeGroupCount")
		objectKey.Integer(v.NodeGroupCount)
	}

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

	return nil
}

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

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

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

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

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

	return nil
}

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

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

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

	return nil
}

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

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

	return nil
}

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

	if v.ApplyImmediately {
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	if v.SecurityGroupIds != nil {
		objectKey := object.Key("SecurityGroupIds")
		if err := awsAwsquery_serializeDocumentSecurityGroupIdsList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SnapshotRetentionLimit != nil {
		objectKey := object.Key("SnapshotRetentionLimit")
		objectKey.Integer(*v.SnapshotRetentionLimit)
	}

	if v.SnapshotWindow != nil {
		objectKey := object.Key("SnapshotWindow")
		objectKey.String(*v.SnapshotWindow)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyCacheParameterGroupInput(v *ModifyCacheParameterGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheParameterGroupName != nil {
		objectKey := object.Key("CacheParameterGroupName")
		objectKey.String(*v.CacheParameterGroupName)
	}

	if v.ParameterNameValues != nil {
		objectKey := object.Key("ParameterNameValues")
		if err := awsAwsquery_serializeDocumentParameterNameValueList(v.ParameterNameValues, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyCacheSubnetGroupInput(v *ModifyCacheSubnetGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheSubnetGroupDescription != nil {
		objectKey := object.Key("CacheSubnetGroupDescription")
		objectKey.String(*v.CacheSubnetGroupDescription)
	}

	if v.CacheSubnetGroupName != nil {
		objectKey := object.Key("CacheSubnetGroupName")
		objectKey.String(*v.CacheSubnetGroupName)
	}

	if v.SubnetIds != nil {
		objectKey := object.Key("SubnetIds")
		if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyGlobalReplicationGroupInput(v *ModifyGlobalReplicationGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

	if v.AutomaticFailoverEnabled != nil {
		objectKey := object.Key("AutomaticFailoverEnabled")
		objectKey.Boolean(*v.AutomaticFailoverEnabled)
	}

	if v.CacheNodeType != nil {
		objectKey := object.Key("CacheNodeType")
		objectKey.String(*v.CacheNodeType)
	}

	if v.CacheParameterGroupName != nil {
		objectKey := object.Key("CacheParameterGroupName")
		objectKey.String(*v.CacheParameterGroupName)
	}

	if v.EngineVersion != nil {
		objectKey := object.Key("EngineVersion")
		objectKey.String(*v.EngineVersion)
	}

	if v.GlobalReplicationGroupDescription != nil {
		objectKey := object.Key("GlobalReplicationGroupDescription")
		objectKey.String(*v.GlobalReplicationGroupDescription)
	}

	if v.GlobalReplicationGroupId != nil {
		objectKey := object.Key("GlobalReplicationGroupId")
		objectKey.String(*v.GlobalReplicationGroupId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyReplicationGroupInput(v *ModifyReplicationGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ApplyImmediately {
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

	if v.AuthToken != nil {
		objectKey := object.Key("AuthToken")
		objectKey.String(*v.AuthToken)
	}

	if len(v.AuthTokenUpdateStrategy) > 0 {
		objectKey := object.Key("AuthTokenUpdateStrategy")
		objectKey.String(string(v.AuthTokenUpdateStrategy))
	}

	if v.AutomaticFailoverEnabled != nil {
		objectKey := object.Key("AutomaticFailoverEnabled")
		objectKey.Boolean(*v.AutomaticFailoverEnabled)
	}

	if v.AutoMinorVersionUpgrade != nil {
		objectKey := object.Key("AutoMinorVersionUpgrade")
		objectKey.Boolean(*v.AutoMinorVersionUpgrade)
	}

	if v.CacheNodeType != nil {
		objectKey := object.Key("CacheNodeType")
		objectKey.String(*v.CacheNodeType)
	}

	if v.CacheParameterGroupName != nil {
		objectKey := object.Key("CacheParameterGroupName")
		objectKey.String(*v.CacheParameterGroupName)
	}

	if v.CacheSecurityGroupNames != nil {
		objectKey := object.Key("CacheSecurityGroupNames")
		if err := awsAwsquery_serializeDocumentCacheSecurityGroupNameList(v.CacheSecurityGroupNames, objectKey); err != nil {
			return err
		}
	}

	if v.EngineVersion != nil {
		objectKey := object.Key("EngineVersion")
		objectKey.String(*v.EngineVersion)
	}

	if v.LogDeliveryConfigurations != nil {
		objectKey := object.Key("LogDeliveryConfigurations")
		if err := awsAwsquery_serializeDocumentLogDeliveryConfigurationRequestList(v.LogDeliveryConfigurations, objectKey); err != nil {
			return err
		}
	}

	if v.MultiAZEnabled != nil {
		objectKey := object.Key("MultiAZEnabled")
		objectKey.Boolean(*v.MultiAZEnabled)
	}

	if v.NodeGroupId != nil {
		objectKey := object.Key("NodeGroupId")
		objectKey.String(*v.NodeGroupId)
	}

	if v.NotificationTopicArn != nil {
		objectKey := object.Key("NotificationTopicArn")
		objectKey.String(*v.NotificationTopicArn)
	}

	if v.NotificationTopicStatus != nil {
		objectKey := object.Key("NotificationTopicStatus")
		objectKey.String(*v.NotificationTopicStatus)
	}

	if v.PreferredMaintenanceWindow != nil {
		objectKey := object.Key("PreferredMaintenanceWindow")
		objectKey.String(*v.PreferredMaintenanceWindow)
	}

	if v.PrimaryClusterId != nil {
		objectKey := object.Key("PrimaryClusterId")
		objectKey.String(*v.PrimaryClusterId)
	}

	if v.RemoveUserGroups != nil {
		objectKey := object.Key("RemoveUserGroups")
		objectKey.Boolean(*v.RemoveUserGroups)
	}

	if v.ReplicationGroupDescription != nil {
		objectKey := object.Key("ReplicationGroupDescription")
		objectKey.String(*v.ReplicationGroupDescription)
	}

	if v.ReplicationGroupId != nil {
		objectKey := object.Key("ReplicationGroupId")
		objectKey.String(*v.ReplicationGroupId)
	}

	if v.SecurityGroupIds != nil {
		objectKey := object.Key("SecurityGroupIds")
		if err := awsAwsquery_serializeDocumentSecurityGroupIdsList(v.SecurityGroupIds, objectKey); err != nil {
			return err
		}
	}

	if v.SnapshotRetentionLimit != nil {
		objectKey := object.Key("SnapshotRetentionLimit")
		objectKey.Integer(*v.SnapshotRetentionLimit)
	}

	if v.SnapshottingClusterId != nil {
		objectKey := object.Key("SnapshottingClusterId")
		objectKey.String(*v.SnapshottingClusterId)
	}

	if v.SnapshotWindow != nil {
		objectKey := object.Key("SnapshotWindow")
		objectKey.String(*v.SnapshotWindow)
	}

	if v.UserGroupIdsToAdd != nil {
		objectKey := object.Key("UserGroupIdsToAdd")
		if err := awsAwsquery_serializeDocumentUserGroupIdList(v.UserGroupIdsToAdd, objectKey); err != nil {
			return err
		}
	}

	if v.UserGroupIdsToRemove != nil {
		objectKey := object.Key("UserGroupIdsToRemove")
		if err := awsAwsquery_serializeDocumentUserGroupIdList(v.UserGroupIdsToRemove, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyReplicationGroupShardConfigurationInput(v *ModifyReplicationGroupShardConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

	{
		objectKey := object.Key("NodeGroupCount")
		objectKey.Integer(v.NodeGroupCount)
	}

	if v.NodeGroupsToRemove != nil {
		objectKey := object.Key("NodeGroupsToRemove")
		if err := awsAwsquery_serializeDocumentNodeGroupsToRemoveList(v.NodeGroupsToRemove, objectKey); err != nil {
			return err
		}
	}

	if v.NodeGroupsToRetain != nil {
		objectKey := object.Key("NodeGroupsToRetain")
		if err := awsAwsquery_serializeDocumentNodeGroupsToRetainList(v.NodeGroupsToRetain, objectKey); err != nil {
			return err
		}
	}

	if v.ReplicationGroupId != nil {
		objectKey := object.Key("ReplicationGroupId")
		objectKey.String(*v.ReplicationGroupId)
	}

	if v.ReshardingConfiguration != nil {
		objectKey := object.Key("ReshardingConfiguration")
		if err := awsAwsquery_serializeDocumentReshardingConfigurationList(v.ReshardingConfiguration, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyUserGroupInput(v *ModifyUserGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.UserGroupId != nil {
		objectKey := object.Key("UserGroupId")
		objectKey.String(*v.UserGroupId)
	}

	if v.UserIdsToAdd != nil {
		objectKey := object.Key("UserIdsToAdd")
		if err := awsAwsquery_serializeDocumentUserIdListInput(v.UserIdsToAdd, objectKey); err != nil {
			return err
		}
	}

	if v.UserIdsToRemove != nil {
		objectKey := object.Key("UserIdsToRemove")
		if err := awsAwsquery_serializeDocumentUserIdListInput(v.UserIdsToRemove, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentModifyUserInput(v *ModifyUserInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AccessString != nil {
		objectKey := object.Key("AccessString")
		objectKey.String(*v.AccessString)
	}

	if v.AppendAccessString != nil {
		objectKey := object.Key("AppendAccessString")
		objectKey.String(*v.AppendAccessString)
	}

	if v.NoPasswordRequired != nil {
		objectKey := object.Key("NoPasswordRequired")
		objectKey.Boolean(*v.NoPasswordRequired)
	}

	if v.Passwords != nil {
		objectKey := object.Key("Passwords")
		if err := awsAwsquery_serializeDocumentPasswordListInput(v.Passwords, objectKey); err != nil {
			return err
		}
	}

	if v.UserId != nil {
		objectKey := object.Key("UserId")
		objectKey.String(*v.UserId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentPurchaseReservedCacheNodesOfferingInput(v *PurchaseReservedCacheNodesOfferingInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheNodeCount != nil {
		objectKey := object.Key("CacheNodeCount")
		objectKey.Integer(*v.CacheNodeCount)
	}

	if v.ReservedCacheNodeId != nil {
		objectKey := object.Key("ReservedCacheNodeId")
		objectKey.String(*v.ReservedCacheNodeId)
	}

	if v.ReservedCacheNodesOfferingId != nil {
		objectKey := object.Key("ReservedCacheNodesOfferingId")
		objectKey.String(*v.ReservedCacheNodesOfferingId)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRebalanceSlotsInGlobalReplicationGroupInput(v *RebalanceSlotsInGlobalReplicationGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	{
		objectKey := object.Key("ApplyImmediately")
		objectKey.Boolean(v.ApplyImmediately)
	}

	if v.GlobalReplicationGroupId != nil {
		objectKey := object.Key("GlobalReplicationGroupId")
		objectKey.String(*v.GlobalReplicationGroupId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRebootCacheClusterInput(v *RebootCacheClusterInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheClusterId != nil {
		objectKey := object.Key("CacheClusterId")
		objectKey.String(*v.CacheClusterId)
	}

	if v.CacheNodeIdsToReboot != nil {
		objectKey := object.Key("CacheNodeIdsToReboot")
		if err := awsAwsquery_serializeDocumentCacheNodeIdsList(v.CacheNodeIdsToReboot, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ResourceName != nil {
		objectKey := object.Key("ResourceName")
		objectKey.String(*v.ResourceName)
	}

	if v.TagKeys != nil {
		objectKey := object.Key("TagKeys")
		if err := awsAwsquery_serializeDocumentKeyList(v.TagKeys, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentResetCacheParameterGroupInput(v *ResetCacheParameterGroupInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheParameterGroupName != nil {
		objectKey := object.Key("CacheParameterGroupName")
		objectKey.String(*v.CacheParameterGroupName)
	}

	if v.ParameterNameValues != nil {
		objectKey := object.Key("ParameterNameValues")
		if err := awsAwsquery_serializeDocumentParameterNameValueList(v.ParameterNameValues, objectKey); err != nil {
			return err
		}
	}

	if v.ResetAllParameters {
		objectKey := object.Key("ResetAllParameters")
		objectKey.Boolean(v.ResetAllParameters)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRevokeCacheSecurityGroupIngressInput(v *RevokeCacheSecurityGroupIngressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CacheSecurityGroupName != nil {
		objectKey := object.Key("CacheSecurityGroupName")
		objectKey.String(*v.CacheSecurityGroupName)
	}

	if v.EC2SecurityGroupName != nil {
		objectKey := object.Key("EC2SecurityGroupName")
		objectKey.String(*v.EC2SecurityGroupName)
	}

	if v.EC2SecurityGroupOwnerId != nil {
		objectKey := object.Key("EC2SecurityGroupOwnerId")
		objectKey.String(*v.EC2SecurityGroupOwnerId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentStartMigrationInput(v *StartMigrationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.CustomerNodeEndpointList != nil {
		objectKey := object.Key("CustomerNodeEndpointList")
		if err := awsAwsquery_serializeDocumentCustomerNodeEndpointList(v.CustomerNodeEndpointList, objectKey); err != nil {
			return err
		}
	}

	if v.ReplicationGroupId != nil {
		objectKey := object.Key("ReplicationGroupId")
		objectKey.String(*v.ReplicationGroupId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentTestFailoverInput(v *TestFailoverInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NodeGroupId != nil {
		objectKey := object.Key("NodeGroupId")
		objectKey.String(*v.NodeGroupId)
	}

	if v.ReplicationGroupId != nil {
		objectKey := object.Key("ReplicationGroupId")
		objectKey.String(*v.ReplicationGroupId)
	}

	return nil
}
