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

package kendra

import (
	"bytes"
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/kendra/document"
	internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document"
	"github.com/aws/aws-sdk-go-v2/service/kendra/types"
	smithy "github.com/aws/smithy-go"
	"github.com/aws/smithy-go/encoding/httpbinding"
	smithyjson "github.com/aws/smithy-go/encoding/json"
	"github.com/aws/smithy-go/middleware"
	smithytime "github.com/aws/smithy-go/time"
	smithyhttp "github.com/aws/smithy-go/transport/http"
	"math"
	"path"
)

type awsAwsjson11_serializeOpAssociateEntitiesToExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentAssociateEntitiesToExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpAssociatePersonasToEntities struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentAssociatePersonasToEntitiesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpBatchDeleteDocument struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentBatchDeleteDocumentInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpBatchGetDocumentStatus struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentBatchGetDocumentStatusInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpBatchPutDocument struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentBatchPutDocumentInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpClearQuerySuggestions struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentClearQuerySuggestionsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateAccessControlConfiguration struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateDataSource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateDataSourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateFaq struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateFaqInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateIndex struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateIndexInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateQuerySuggestionsBlockList struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpCreateThesaurus struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentCreateThesaurusInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteAccessControlConfiguration struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteDataSource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteFaq struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteFaqInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteIndex struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteIndexInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeletePrincipalMapping struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeletePrincipalMappingInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteQuerySuggestionsBlockList struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDeleteThesaurus struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDeleteThesaurusInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeAccessControlConfiguration struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeDataSource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeDataSourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeFaq struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeFaqInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeIndex struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeIndexInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribePrincipalMapping struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribePrincipalMappingInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeQuerySuggestionsBlockList struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsConfigInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDescribeThesaurus struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDescribeThesaurusInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDisassociateEntitiesFromExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDisassociateEntitiesFromExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpDisassociatePersonasFromEntities struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentDisassociatePersonasFromEntitiesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpGetQuerySuggestions struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentGetQuerySuggestionsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpGetSnapshots struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentGetSnapshotsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListAccessControlConfigurations struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListAccessControlConfigurationsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListDataSources struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListDataSourcesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListDataSourceSyncJobs struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListDataSourceSyncJobsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListEntityPersonas struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListEntityPersonasInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListExperienceEntities struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListExperienceEntitiesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListExperiences struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListExperiencesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListFaqs struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListFaqsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListGroupsOlderThanOrderingId struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListGroupsOlderThanOrderingIdInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListIndices struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListIndicesInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListQuerySuggestionsBlockLists struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListQuerySuggestionsBlockListsInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListTagsForResource struct {
}

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

func (m *awsAwsjson11_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-amz-json-1.1")
	httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListTagsForResource")

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpListThesauri struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentListThesauriInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpPutPrincipalMapping struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentPutPrincipalMappingInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpQuery struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentQueryInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpStartDataSourceSyncJob struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentStartDataSourceSyncJobInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpStopDataSourceSyncJob struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentStopDataSourceSyncJobInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpSubmitFeedback struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentSubmitFeedbackInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpTagResource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUntagResource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateAccessControlConfiguration struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateDataSource struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateExperience struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateExperienceInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateIndex struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateIndexInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsConfigInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}

type awsAwsjson11_serializeOpUpdateThesaurus struct {
}

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

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

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

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

	jsonEncoder := smithyjson.NewEncoder()
	if err := awsAwsjson11_serializeOpDocumentUpdateThesaurusInput(input, jsonEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

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

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

	return next.HandleSerialize(ctx, in)
}
func awsAwsjson11_serializeDocumentAccessControlListConfiguration(v *types.AccessControlListConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentAclConfiguration(v *types.AclConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentAlfrescoConfiguration(v *types.AlfrescoConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.BlogFieldMappings != nil {
		ok := object.Key("BlogFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.BlogFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.CrawlComments {
		ok := object.Key("CrawlComments")
		ok.Boolean(v.CrawlComments)
	}

	if v.CrawlSystemFolders {
		ok := object.Key("CrawlSystemFolders")
		ok.Boolean(v.CrawlSystemFolders)
	}

	if v.DocumentLibraryFieldMappings != nil {
		ok := object.Key("DocumentLibraryFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.DocumentLibraryFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.EntityFilter != nil {
		ok := object.Key("EntityFilter")
		if err := awsAwsjson11_serializeDocumentEntityFilter(v.EntityFilter, ok); err != nil {
			return err
		}
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

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

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

	if v.SslCertificateS3Path != nil {
		ok := object.Key("SslCertificateS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil {
			return err
		}
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	if v.WikiFieldMappings != nil {
		ok := object.Key("WikiFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WikiFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentAssociateEntityList(v []types.EntityConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentAttributeFilter(v *types.AttributeFilter, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AndAllFilters != nil {
		ok := object.Key("AndAllFilters")
		if err := awsAwsjson11_serializeDocumentAttributeFilterList(v.AndAllFilters, ok); err != nil {
			return err
		}
	}

	if v.ContainsAll != nil {
		ok := object.Key("ContainsAll")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.ContainsAll, ok); err != nil {
			return err
		}
	}

	if v.ContainsAny != nil {
		ok := object.Key("ContainsAny")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.ContainsAny, ok); err != nil {
			return err
		}
	}

	if v.EqualsTo != nil {
		ok := object.Key("EqualsTo")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.EqualsTo, ok); err != nil {
			return err
		}
	}

	if v.GreaterThan != nil {
		ok := object.Key("GreaterThan")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.GreaterThan, ok); err != nil {
			return err
		}
	}

	if v.GreaterThanOrEquals != nil {
		ok := object.Key("GreaterThanOrEquals")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.GreaterThanOrEquals, ok); err != nil {
			return err
		}
	}

	if v.LessThan != nil {
		ok := object.Key("LessThan")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.LessThan, ok); err != nil {
			return err
		}
	}

	if v.LessThanOrEquals != nil {
		ok := object.Key("LessThanOrEquals")
		if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.LessThanOrEquals, ok); err != nil {
			return err
		}
	}

	if v.NotFilter != nil {
		ok := object.Key("NotFilter")
		if err := awsAwsjson11_serializeDocumentAttributeFilter(v.NotFilter, ok); err != nil {
			return err
		}
	}

	if v.OrAllFilters != nil {
		ok := object.Key("OrAllFilters")
		if err := awsAwsjson11_serializeDocumentAttributeFilterList(v.OrAllFilters, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentAttributeFilterList(v []types.AttributeFilter, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentAuthenticationConfiguration(v *types.AuthenticationConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.BasicAuthentication != nil {
		ok := object.Key("BasicAuthentication")
		if err := awsAwsjson11_serializeDocumentBasicAuthenticationConfigurationList(v.BasicAuthentication, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentBasicAuthenticationConfiguration(v *types.BasicAuthenticationConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentBasicAuthenticationConfigurationList(v []types.BasicAuthenticationConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentBoxConfiguration(v *types.BoxConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CommentFieldMappings != nil {
		ok := object.Key("CommentFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.CommentFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.CrawlComments {
		ok := object.Key("CrawlComments")
		ok.Boolean(v.CrawlComments)
	}

	if v.CrawlTasks {
		ok := object.Key("CrawlTasks")
		ok.Boolean(v.CrawlTasks)
	}

	if v.CrawlWebLinks {
		ok := object.Key("CrawlWebLinks")
		ok.Boolean(v.CrawlWebLinks)
	}

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

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FileFieldMappings != nil {
		ok := object.Key("FileFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FileFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

	if v.TaskFieldMappings != nil {
		ok := object.Key("TaskFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.TaskFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	if v.WebLinkFieldMappings != nil {
		ok := object.Key("WebLinkFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WebLinkFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentCapacityUnitsConfiguration(v *types.CapacityUnitsConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentChangeDetectingColumns(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentClickFeedback(v *types.ClickFeedback, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ClickTime != nil {
		ok := object.Key("ClickTime")
		ok.Double(smithytime.FormatEpochSeconds(*v.ClickTime))
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentClickFeedbackList(v []types.ClickFeedback, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentColumnConfiguration(v *types.ColumnConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ChangeDetectingColumns != nil {
		ok := object.Key("ChangeDetectingColumns")
		if err := awsAwsjson11_serializeDocumentChangeDetectingColumns(v.ChangeDetectingColumns, ok); err != nil {
			return err
		}
	}

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

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

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceAttachmentConfiguration(v *types.ConfluenceAttachmentConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AttachmentFieldMappings != nil {
		ok := object.Key("AttachmentFieldMappings")
		if err := awsAwsjson11_serializeDocumentConfluenceAttachmentFieldMappingsList(v.AttachmentFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceAttachmentFieldMappingsList(v []types.ConfluenceAttachmentToIndexFieldMapping, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentConfluenceAttachmentToIndexFieldMapping(v *types.ConfluenceAttachmentToIndexFieldMapping, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceBlogConfiguration(v *types.ConfluenceBlogConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.BlogFieldMappings != nil {
		ok := object.Key("BlogFieldMappings")
		if err := awsAwsjson11_serializeDocumentConfluenceBlogFieldMappingsList(v.BlogFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceBlogFieldMappingsList(v []types.ConfluenceBlogToIndexFieldMapping, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentConfluenceBlogToIndexFieldMapping(v *types.ConfluenceBlogToIndexFieldMapping, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceConfiguration(v *types.ConfluenceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AttachmentConfiguration != nil {
		ok := object.Key("AttachmentConfiguration")
		if err := awsAwsjson11_serializeDocumentConfluenceAttachmentConfiguration(v.AttachmentConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.BlogConfiguration != nil {
		ok := object.Key("BlogConfiguration")
		if err := awsAwsjson11_serializeDocumentConfluenceBlogConfiguration(v.BlogConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.PageConfiguration != nil {
		ok := object.Key("PageConfiguration")
		if err := awsAwsjson11_serializeDocumentConfluencePageConfiguration(v.PageConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ProxyConfiguration != nil {
		ok := object.Key("ProxyConfiguration")
		if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil {
			return err
		}
	}

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

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

	if v.SpaceConfiguration != nil {
		ok := object.Key("SpaceConfiguration")
		if err := awsAwsjson11_serializeDocumentConfluenceSpaceConfiguration(v.SpaceConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluencePageConfiguration(v *types.ConfluencePageConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.PageFieldMappings != nil {
		ok := object.Key("PageFieldMappings")
		if err := awsAwsjson11_serializeDocumentConfluencePageFieldMappingsList(v.PageFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluencePageFieldMappingsList(v []types.ConfluencePageToIndexFieldMapping, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentConfluencePageToIndexFieldMapping(v *types.ConfluencePageToIndexFieldMapping, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceSpaceConfiguration(v *types.ConfluenceSpaceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlArchivedSpaces {
		ok := object.Key("CrawlArchivedSpaces")
		ok.Boolean(v.CrawlArchivedSpaces)
	}

	if v.CrawlPersonalSpaces {
		ok := object.Key("CrawlPersonalSpaces")
		ok.Boolean(v.CrawlPersonalSpaces)
	}

	if v.ExcludeSpaces != nil {
		ok := object.Key("ExcludeSpaces")
		if err := awsAwsjson11_serializeDocumentConfluenceSpaceList(v.ExcludeSpaces, ok); err != nil {
			return err
		}
	}

	if v.IncludeSpaces != nil {
		ok := object.Key("IncludeSpaces")
		if err := awsAwsjson11_serializeDocumentConfluenceSpaceList(v.IncludeSpaces, ok); err != nil {
			return err
		}
	}

	if v.SpaceFieldMappings != nil {
		ok := object.Key("SpaceFieldMappings")
		if err := awsAwsjson11_serializeDocumentConfluenceSpaceFieldMappingsList(v.SpaceFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentConfluenceSpaceFieldMappingsList(v []types.ConfluenceSpaceToIndexFieldMapping, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentConfluenceSpaceList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentConfluenceSpaceToIndexFieldMapping(v *types.ConfluenceSpaceToIndexFieldMapping, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentConnectionConfiguration(v *types.ConnectionConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentContentSourceConfiguration(v *types.ContentSourceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DataSourceIds != nil {
		ok := object.Key("DataSourceIds")
		if err := awsAwsjson11_serializeDocumentDataSourceIdList(v.DataSourceIds, ok); err != nil {
			return err
		}
	}

	if v.DirectPutContent {
		ok := object.Key("DirectPutContent")
		ok.Boolean(v.DirectPutContent)
	}

	if v.FaqIds != nil {
		ok := object.Key("FaqIds")
		if err := awsAwsjson11_serializeDocumentFaqIdsList(v.FaqIds, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v *types.CustomDocumentEnrichmentConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.InlineConfigurations != nil {
		ok := object.Key("InlineConfigurations")
		if err := awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfigurationList(v.InlineConfigurations, ok); err != nil {
			return err
		}
	}

	if v.PostExtractionHookConfiguration != nil {
		ok := object.Key("PostExtractionHookConfiguration")
		if err := awsAwsjson11_serializeDocumentHookConfiguration(v.PostExtractionHookConfiguration, ok); err != nil {
			return err
		}
	}

	if v.PreExtractionHookConfiguration != nil {
		ok := object.Key("PreExtractionHookConfiguration")
		if err := awsAwsjson11_serializeDocumentHookConfiguration(v.PreExtractionHookConfiguration, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDatabaseConfiguration(v *types.DatabaseConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AclConfiguration != nil {
		ok := object.Key("AclConfiguration")
		if err := awsAwsjson11_serializeDocumentAclConfiguration(v.AclConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ColumnConfiguration != nil {
		ok := object.Key("ColumnConfiguration")
		if err := awsAwsjson11_serializeDocumentColumnConfiguration(v.ColumnConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ConnectionConfiguration != nil {
		ok := object.Key("ConnectionConfiguration")
		if err := awsAwsjson11_serializeDocumentConnectionConfiguration(v.ConnectionConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.SqlConfiguration != nil {
		ok := object.Key("SqlConfiguration")
		if err := awsAwsjson11_serializeDocumentSqlConfiguration(v.SqlConfiguration, ok); err != nil {
			return err
		}
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentDataSourceConfiguration(v *types.DataSourceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AlfrescoConfiguration != nil {
		ok := object.Key("AlfrescoConfiguration")
		if err := awsAwsjson11_serializeDocumentAlfrescoConfiguration(v.AlfrescoConfiguration, ok); err != nil {
			return err
		}
	}

	if v.BoxConfiguration != nil {
		ok := object.Key("BoxConfiguration")
		if err := awsAwsjson11_serializeDocumentBoxConfiguration(v.BoxConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ConfluenceConfiguration != nil {
		ok := object.Key("ConfluenceConfiguration")
		if err := awsAwsjson11_serializeDocumentConfluenceConfiguration(v.ConfluenceConfiguration, ok); err != nil {
			return err
		}
	}

	if v.DatabaseConfiguration != nil {
		ok := object.Key("DatabaseConfiguration")
		if err := awsAwsjson11_serializeDocumentDatabaseConfiguration(v.DatabaseConfiguration, ok); err != nil {
			return err
		}
	}

	if v.FsxConfiguration != nil {
		ok := object.Key("FsxConfiguration")
		if err := awsAwsjson11_serializeDocumentFsxConfiguration(v.FsxConfiguration, ok); err != nil {
			return err
		}
	}

	if v.GitHubConfiguration != nil {
		ok := object.Key("GitHubConfiguration")
		if err := awsAwsjson11_serializeDocumentGitHubConfiguration(v.GitHubConfiguration, ok); err != nil {
			return err
		}
	}

	if v.GoogleDriveConfiguration != nil {
		ok := object.Key("GoogleDriveConfiguration")
		if err := awsAwsjson11_serializeDocumentGoogleDriveConfiguration(v.GoogleDriveConfiguration, ok); err != nil {
			return err
		}
	}

	if v.JiraConfiguration != nil {
		ok := object.Key("JiraConfiguration")
		if err := awsAwsjson11_serializeDocumentJiraConfiguration(v.JiraConfiguration, ok); err != nil {
			return err
		}
	}

	if v.OneDriveConfiguration != nil {
		ok := object.Key("OneDriveConfiguration")
		if err := awsAwsjson11_serializeDocumentOneDriveConfiguration(v.OneDriveConfiguration, ok); err != nil {
			return err
		}
	}

	if v.QuipConfiguration != nil {
		ok := object.Key("QuipConfiguration")
		if err := awsAwsjson11_serializeDocumentQuipConfiguration(v.QuipConfiguration, ok); err != nil {
			return err
		}
	}

	if v.S3Configuration != nil {
		ok := object.Key("S3Configuration")
		if err := awsAwsjson11_serializeDocumentS3DataSourceConfiguration(v.S3Configuration, ok); err != nil {
			return err
		}
	}

	if v.SalesforceConfiguration != nil {
		ok := object.Key("SalesforceConfiguration")
		if err := awsAwsjson11_serializeDocumentSalesforceConfiguration(v.SalesforceConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ServiceNowConfiguration != nil {
		ok := object.Key("ServiceNowConfiguration")
		if err := awsAwsjson11_serializeDocumentServiceNowConfiguration(v.ServiceNowConfiguration, ok); err != nil {
			return err
		}
	}

	if v.SharePointConfiguration != nil {
		ok := object.Key("SharePointConfiguration")
		if err := awsAwsjson11_serializeDocumentSharePointConfiguration(v.SharePointConfiguration, ok); err != nil {
			return err
		}
	}

	if v.SlackConfiguration != nil {
		ok := object.Key("SlackConfiguration")
		if err := awsAwsjson11_serializeDocumentSlackConfiguration(v.SlackConfiguration, ok); err != nil {
			return err
		}
	}

	if v.TemplateConfiguration != nil {
		ok := object.Key("TemplateConfiguration")
		if err := awsAwsjson11_serializeDocumentTemplateConfiguration(v.TemplateConfiguration, ok); err != nil {
			return err
		}
	}

	if v.WebCrawlerConfiguration != nil {
		ok := object.Key("WebCrawlerConfiguration")
		if err := awsAwsjson11_serializeDocumentWebCrawlerConfiguration(v.WebCrawlerConfiguration, ok); err != nil {
			return err
		}
	}

	if v.WorkDocsConfiguration != nil {
		ok := object.Key("WorkDocsConfiguration")
		if err := awsAwsjson11_serializeDocumentWorkDocsConfiguration(v.WorkDocsConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentDataSourceGroup(v *types.DataSourceGroup, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentDataSourceGroups(v []types.DataSourceGroup, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDataSourceIdList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDataSourceSyncJobMetricTarget(v *types.DataSourceSyncJobMetricTarget, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentDataSourceToIndexFieldMapping(v *types.DataSourceToIndexFieldMapping, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v []types.DataSourceToIndexFieldMapping, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v *types.DataSourceVpcConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentDisassociateEntityList(v []types.EntityConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocument(v *types.Document, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.AccessControlList != nil {
		ok := object.Key("AccessControlList")
		if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil {
			return err
		}
	}

	if v.Attributes != nil {
		ok := object.Key("Attributes")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeList(v.Attributes, ok); err != nil {
			return err
		}
	}

	if v.Blob != nil {
		ok := object.Key("Blob")
		ok.Base64EncodeBytes(v.Blob)
	}

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

	if v.HierarchicalAccessControlList != nil {
		ok := object.Key("HierarchicalAccessControlList")
		if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil {
			return err
		}
	}

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

	if v.S3Path != nil {
		ok := object.Key("S3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.S3Path, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDocumentAttribute(v *types.DocumentAttribute, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Value != nil {
		ok := object.Key("Value")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.Value, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentDocumentAttributeCondition(v *types.DocumentAttributeCondition, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.ConditionOnValue != nil {
		ok := object.Key("ConditionOnValue")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.ConditionOnValue, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentAttributeList(v []types.DocumentAttribute, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentAttributeStringListValue(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentAttributeTarget(v *types.DocumentAttributeTarget, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.TargetDocumentAttributeValue != nil {
		ok := object.Key("TargetDocumentAttributeValue")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.TargetDocumentAttributeValue, ok); err != nil {
			return err
		}
	}

	if v.TargetDocumentAttributeValueDeletion {
		ok := object.Key("TargetDocumentAttributeValueDeletion")
		ok.Boolean(v.TargetDocumentAttributeValueDeletion)
	}

	return nil
}

func awsAwsjson11_serializeDocumentDocumentAttributeValue(v *types.DocumentAttributeValue, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DateValue != nil {
		ok := object.Key("DateValue")
		ok.Double(smithytime.FormatEpochSeconds(*v.DateValue))
	}

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

	if v.StringListValue != nil {
		ok := object.Key("StringListValue")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeStringListValue(v.StringListValue, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDocumentIdList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentInfo(v *types.DocumentInfo, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Attributes != nil {
		ok := object.Key("Attributes")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeList(v.Attributes, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDocumentInfoList(v []types.DocumentInfo, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentList(v []types.Document, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentMetadataConfiguration(v *types.DocumentMetadataConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Relevance != nil {
		ok := object.Key("Relevance")
		if err := awsAwsjson11_serializeDocumentRelevance(v.Relevance, ok); err != nil {
			return err
		}
	}

	if v.Search != nil {
		ok := object.Key("Search")
		if err := awsAwsjson11_serializeDocumentSearch(v.Search, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentDocumentMetadataConfigurationList(v []types.DocumentMetadataConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentRelevanceConfiguration(v *types.DocumentRelevanceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Relevance != nil {
		ok := object.Key("Relevance")
		if err := awsAwsjson11_serializeDocumentRelevance(v.Relevance, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentDocumentRelevanceOverrideConfigurationList(v []types.DocumentRelevanceConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentDocumentsMetadataConfiguration(v *types.DocumentsMetadataConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentEntityConfiguration(v *types.EntityConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentEntityFilter(v []types.AlfrescoEntity, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentEntityIdsList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentEntityPersonaConfiguration(v *types.EntityPersonaConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentEntityPersonaConfigurationList(v []types.EntityPersonaConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentExcludeMimeTypesList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentExcludeSharedDrivesList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentExcludeUserAccountsList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentExperienceConfiguration(v *types.ExperienceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ContentSourceConfiguration != nil {
		ok := object.Key("ContentSourceConfiguration")
		if err := awsAwsjson11_serializeDocumentContentSourceConfiguration(v.ContentSourceConfiguration, ok); err != nil {
			return err
		}
	}

	if v.UserIdentityConfiguration != nil {
		ok := object.Key("UserIdentityConfiguration")
		if err := awsAwsjson11_serializeDocumentUserIdentityConfiguration(v.UserIdentityConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentFacet(v *types.Facet, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Facets != nil {
		ok := object.Key("Facets")
		if err := awsAwsjson11_serializeDocumentFacetList(v.Facets, ok); err != nil {
			return err
		}
	}

	if v.MaxResults != 0 {
		ok := object.Key("MaxResults")
		ok.Integer(v.MaxResults)
	}

	return nil
}

func awsAwsjson11_serializeDocumentFacetList(v []types.Facet, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentFaqIdsList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentFolderIdList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentFsxConfiguration(v *types.FsxConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

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

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

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentGitHubConfiguration(v *types.GitHubConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ExclusionFileNamePatterns != nil {
		ok := object.Key("ExclusionFileNamePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFileNamePatterns, ok); err != nil {
			return err
		}
	}

	if v.ExclusionFileTypePatterns != nil {
		ok := object.Key("ExclusionFileTypePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFileTypePatterns, ok); err != nil {
			return err
		}
	}

	if v.ExclusionFolderNamePatterns != nil {
		ok := object.Key("ExclusionFolderNamePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFolderNamePatterns, ok); err != nil {
			return err
		}
	}

	if v.GitHubCommitConfigurationFieldMappings != nil {
		ok := object.Key("GitHubCommitConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubCommitConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubDocumentCrawlProperties != nil {
		ok := object.Key("GitHubDocumentCrawlProperties")
		if err := awsAwsjson11_serializeDocumentGitHubDocumentCrawlProperties(v.GitHubDocumentCrawlProperties, ok); err != nil {
			return err
		}
	}

	if v.GitHubIssueAttachmentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubIssueAttachmentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueAttachmentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubIssueCommentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubIssueCommentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueCommentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubIssueDocumentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubIssueDocumentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueDocumentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubPullRequestCommentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubPullRequestCommentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestCommentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubPullRequestDocumentAttachmentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubPullRequestDocumentConfigurationFieldMappings != nil {
		ok := object.Key("GitHubPullRequestDocumentConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.GitHubRepositoryConfigurationFieldMappings != nil {
		ok := object.Key("GitHubRepositoryConfigurationFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubRepositoryConfigurationFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionFileNamePatterns != nil {
		ok := object.Key("InclusionFileNamePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFileNamePatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionFileTypePatterns != nil {
		ok := object.Key("InclusionFileTypePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFileTypePatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionFolderNamePatterns != nil {
		ok := object.Key("InclusionFolderNamePatterns")
		if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFolderNamePatterns, ok); err != nil {
			return err
		}
	}

	if v.OnPremiseConfiguration != nil {
		ok := object.Key("OnPremiseConfiguration")
		if err := awsAwsjson11_serializeDocumentOnPremiseConfiguration(v.OnPremiseConfiguration, ok); err != nil {
			return err
		}
	}

	if v.RepositoryFilter != nil {
		ok := object.Key("RepositoryFilter")
		if err := awsAwsjson11_serializeDocumentRepositoryNames(v.RepositoryFilter, ok); err != nil {
			return err
		}
	}

	if v.SaaSConfiguration != nil {
		ok := object.Key("SaaSConfiguration")
		if err := awsAwsjson11_serializeDocumentSaaSConfiguration(v.SaaSConfiguration, ok); err != nil {
			return err
		}
	}

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

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

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentGitHubDocumentCrawlProperties(v *types.GitHubDocumentCrawlProperties, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlIssue {
		ok := object.Key("CrawlIssue")
		ok.Boolean(v.CrawlIssue)
	}

	if v.CrawlIssueComment {
		ok := object.Key("CrawlIssueComment")
		ok.Boolean(v.CrawlIssueComment)
	}

	if v.CrawlIssueCommentAttachment {
		ok := object.Key("CrawlIssueCommentAttachment")
		ok.Boolean(v.CrawlIssueCommentAttachment)
	}

	if v.CrawlPullRequest {
		ok := object.Key("CrawlPullRequest")
		ok.Boolean(v.CrawlPullRequest)
	}

	if v.CrawlPullRequestComment {
		ok := object.Key("CrawlPullRequestComment")
		ok.Boolean(v.CrawlPullRequestComment)
	}

	if v.CrawlPullRequestCommentAttachment {
		ok := object.Key("CrawlPullRequestCommentAttachment")
		ok.Boolean(v.CrawlPullRequestCommentAttachment)
	}

	if v.CrawlRepositoryDocuments {
		ok := object.Key("CrawlRepositoryDocuments")
		ok.Boolean(v.CrawlRepositoryDocuments)
	}

	return nil
}

func awsAwsjson11_serializeDocumentGoogleDriveConfiguration(v *types.GoogleDriveConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ExcludeMimeTypes != nil {
		ok := object.Key("ExcludeMimeTypes")
		if err := awsAwsjson11_serializeDocumentExcludeMimeTypesList(v.ExcludeMimeTypes, ok); err != nil {
			return err
		}
	}

	if v.ExcludeSharedDrives != nil {
		ok := object.Key("ExcludeSharedDrives")
		if err := awsAwsjson11_serializeDocumentExcludeSharedDrivesList(v.ExcludeSharedDrives, ok); err != nil {
			return err
		}
	}

	if v.ExcludeUserAccounts != nil {
		ok := object.Key("ExcludeUserAccounts")
		if err := awsAwsjson11_serializeDocumentExcludeUserAccountsList(v.ExcludeUserAccounts, ok); err != nil {
			return err
		}
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentGroupMembers(v *types.GroupMembers, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.MemberGroups != nil {
		ok := object.Key("MemberGroups")
		if err := awsAwsjson11_serializeDocumentMemberGroups(v.MemberGroups, ok); err != nil {
			return err
		}
	}

	if v.MemberUsers != nil {
		ok := object.Key("MemberUsers")
		if err := awsAwsjson11_serializeDocumentMemberUsers(v.MemberUsers, ok); err != nil {
			return err
		}
	}

	if v.S3PathforGroupMembers != nil {
		ok := object.Key("S3PathforGroupMembers")
		if err := awsAwsjson11_serializeDocumentS3Path(v.S3PathforGroupMembers, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentGroups(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentHierarchicalPrincipal(v *types.HierarchicalPrincipal, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.PrincipalList != nil {
		ok := object.Key("PrincipalList")
		if err := awsAwsjson11_serializeDocumentPrincipalList(v.PrincipalList, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v []types.HierarchicalPrincipal, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentHookConfiguration(v *types.HookConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.InvocationCondition != nil {
		ok := object.Key("InvocationCondition")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeCondition(v.InvocationCondition, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfiguration(v *types.InlineCustomDocumentEnrichmentConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Condition != nil {
		ok := object.Key("Condition")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeCondition(v.Condition, ok); err != nil {
			return err
		}
	}

	if v.DocumentContentDeletion {
		ok := object.Key("DocumentContentDeletion")
		ok.Boolean(v.DocumentContentDeletion)
	}

	if v.Target != nil {
		ok := object.Key("Target")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeTarget(v.Target, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfigurationList(v []types.InlineCustomDocumentEnrichmentConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentIssueSubEntityFilter(v []types.IssueSubEntity, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentIssueType(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentJiraConfiguration(v *types.JiraConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AttachmentFieldMappings != nil {
		ok := object.Key("AttachmentFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.CommentFieldMappings != nil {
		ok := object.Key("CommentFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.CommentFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.IssueFieldMappings != nil {
		ok := object.Key("IssueFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.IssueFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.IssueSubEntityFilter != nil {
		ok := object.Key("IssueSubEntityFilter")
		if err := awsAwsjson11_serializeDocumentIssueSubEntityFilter(v.IssueSubEntityFilter, ok); err != nil {
			return err
		}
	}

	if v.IssueType != nil {
		ok := object.Key("IssueType")
		if err := awsAwsjson11_serializeDocumentIssueType(v.IssueType, ok); err != nil {
			return err
		}
	}

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

	if v.Project != nil {
		ok := object.Key("Project")
		if err := awsAwsjson11_serializeDocumentProject(v.Project, ok); err != nil {
			return err
		}
	}

	if v.ProjectFieldMappings != nil {
		ok := object.Key("ProjectFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.ProjectFieldMappings, ok); err != nil {
			return err
		}
	}

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

	if v.Status != nil {
		ok := object.Key("Status")
		if err := awsAwsjson11_serializeDocumentJiraStatus(v.Status, ok); err != nil {
			return err
		}
	}

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	if v.WorkLogFieldMappings != nil {
		ok := object.Key("WorkLogFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WorkLogFieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentJiraStatus(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentJsonTokenTypeConfiguration(v *types.JsonTokenTypeConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentJwtTokenTypeConfiguration(v *types.JwtTokenTypeConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentMemberGroup(v *types.MemberGroup, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentMemberGroups(v []types.MemberGroup, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentMemberUser(v *types.MemberUser, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentMemberUsers(v []types.MemberUser, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentOneDriveConfiguration(v *types.OneDriveConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DisableLocalGroups {
		ok := object.Key("DisableLocalGroups")
		ok.Boolean(v.DisableLocalGroups)
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.OneDriveUsers != nil {
		ok := object.Key("OneDriveUsers")
		if err := awsAwsjson11_serializeDocumentOneDriveUsers(v.OneDriveUsers, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeDocumentOneDriveUserList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentOneDriveUsers(v *types.OneDriveUsers, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.OneDriveUserList != nil {
		ok := object.Key("OneDriveUserList")
		if err := awsAwsjson11_serializeDocumentOneDriveUserList(v.OneDriveUserList, ok); err != nil {
			return err
		}
	}

	if v.OneDriveUserS3Path != nil {
		ok := object.Key("OneDriveUserS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.OneDriveUserS3Path, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentOnPremiseConfiguration(v *types.OnPremiseConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.SslCertificateS3Path != nil {
		ok := object.Key("SslCertificateS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentPrincipal(v *types.Principal, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentPrincipalList(v []types.Principal, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentPrivateChannelFilter(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentProject(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentProxyConfiguration(v *types.ProxyConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeDocumentPublicChannelFilter(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentQuipConfiguration(v *types.QuipConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AttachmentFieldMappings != nil {
		ok := object.Key("AttachmentFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

	if v.CrawlChatRooms {
		ok := object.Key("CrawlChatRooms")
		ok.Boolean(v.CrawlChatRooms)
	}

	if v.CrawlFileComments {
		ok := object.Key("CrawlFileComments")
		ok.Boolean(v.CrawlFileComments)
	}

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

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FolderIds != nil {
		ok := object.Key("FolderIds")
		if err := awsAwsjson11_serializeDocumentFolderIdList(v.FolderIds, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.MessageFieldMappings != nil {
		ok := object.Key("MessageFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.MessageFieldMappings, ok); err != nil {
			return err
		}
	}

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

	if v.ThreadFieldMappings != nil {
		ok := object.Key("ThreadFieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.ThreadFieldMappings, ok); err != nil {
			return err
		}
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentRelevance(v *types.Relevance, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

	if v.ValueImportanceMap != nil {
		ok := object.Key("ValueImportanceMap")
		if err := awsAwsjson11_serializeDocumentValueImportanceMap(v.ValueImportanceMap, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentRelevanceFeedback(v *types.RelevanceFeedback, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentRelevanceFeedbackList(v []types.RelevanceFeedback, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentRepositoryNames(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentS3DataSourceConfiguration(v *types.S3DataSourceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AccessControlListConfiguration != nil {
		ok := object.Key("AccessControlListConfiguration")
		if err := awsAwsjson11_serializeDocumentAccessControlListConfiguration(v.AccessControlListConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.DocumentsMetadataConfiguration != nil {
		ok := object.Key("DocumentsMetadataConfiguration")
		if err := awsAwsjson11_serializeDocumentDocumentsMetadataConfiguration(v.DocumentsMetadataConfiguration, ok); err != nil {
			return err
		}
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.InclusionPrefixes != nil {
		ok := object.Key("InclusionPrefixes")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPrefixes, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentS3Path(v *types.S3Path, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentSaaSConfiguration(v *types.SaaSConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceChatterFeedConfiguration(v *types.SalesforceChatterFeedConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.IncludeFilterTypes != nil {
		ok := object.Key("IncludeFilterTypes")
		if err := awsAwsjson11_serializeDocumentSalesforceChatterFeedIncludeFilterTypes(v.IncludeFilterTypes, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceChatterFeedIncludeFilterTypes(v []types.SalesforceChatterFeedIncludeFilterType, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSalesforceConfiguration(v *types.SalesforceConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ChatterFeedConfiguration != nil {
		ok := object.Key("ChatterFeedConfiguration")
		if err := awsAwsjson11_serializeDocumentSalesforceChatterFeedConfiguration(v.ChatterFeedConfiguration, ok); err != nil {
			return err
		}
	}

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

	if v.ExcludeAttachmentFilePatterns != nil {
		ok := object.Key("ExcludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	if v.IncludeAttachmentFilePatterns != nil {
		ok := object.Key("IncludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	if v.KnowledgeArticleConfiguration != nil {
		ok := object.Key("KnowledgeArticleConfiguration")
		if err := awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration, ok); err != nil {
			return err
		}
	}

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

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

	if v.StandardObjectAttachmentConfiguration != nil {
		ok := object.Key("StandardObjectAttachmentConfiguration")
		if err := awsAwsjson11_serializeDocumentSalesforceStandardObjectAttachmentConfiguration(v.StandardObjectAttachmentConfiguration, ok); err != nil {
			return err
		}
	}

	if v.StandardObjectConfigurations != nil {
		ok := object.Key("StandardObjectConfigurations")
		if err := awsAwsjson11_serializeDocumentSalesforceStandardObjectConfigurationList(v.StandardObjectConfigurations, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfiguration(v *types.SalesforceCustomKnowledgeArticleTypeConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfigurationList(v []types.SalesforceCustomKnowledgeArticleTypeConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleConfiguration(v *types.SalesforceKnowledgeArticleConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CustomKnowledgeArticleTypeConfigurations != nil {
		ok := object.Key("CustomKnowledgeArticleTypeConfigurations")
		if err := awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfigurationList(v.CustomKnowledgeArticleTypeConfigurations, ok); err != nil {
			return err
		}
	}

	if v.IncludedStates != nil {
		ok := object.Key("IncludedStates")
		if err := awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleStateList(v.IncludedStates, ok); err != nil {
			return err
		}
	}

	if v.StandardKnowledgeArticleTypeConfiguration != nil {
		ok := object.Key("StandardKnowledgeArticleTypeConfiguration")
		if err := awsAwsjson11_serializeDocumentSalesforceStandardKnowledgeArticleTypeConfiguration(v.StandardKnowledgeArticleTypeConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleStateList(v []types.SalesforceKnowledgeArticleState, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSalesforceStandardKnowledgeArticleTypeConfiguration(v *types.SalesforceStandardKnowledgeArticleTypeConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceStandardObjectAttachmentConfiguration(v *types.SalesforceStandardObjectAttachmentConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceStandardObjectConfiguration(v *types.SalesforceStandardObjectConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentSalesforceStandardObjectConfigurationList(v []types.SalesforceStandardObjectConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSearch(v *types.Search, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Displayable {
		ok := object.Key("Displayable")
		ok.Boolean(v.Displayable)
	}

	if v.Facetable {
		ok := object.Key("Facetable")
		ok.Boolean(v.Facetable)
	}

	if v.Searchable {
		ok := object.Key("Searchable")
		ok.Boolean(v.Searchable)
	}

	if v.Sortable {
		ok := object.Key("Sortable")
		ok.Boolean(v.Sortable)
	}

	return nil
}

func awsAwsjson11_serializeDocumentSecurityGroupIdList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSeedUrlConfiguration(v *types.SeedUrlConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.SeedUrls != nil {
		ok := object.Key("SeedUrls")
		if err := awsAwsjson11_serializeDocumentSeedUrlList(v.SeedUrls, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentSeedUrlList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentServerSideEncryptionConfiguration(v *types.ServerSideEncryptionConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentServiceNowConfiguration(v *types.ServiceNowConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.KnowledgeArticleConfiguration != nil {
		ok := object.Key("KnowledgeArticleConfiguration")
		if err := awsAwsjson11_serializeDocumentServiceNowKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.ServiceCatalogConfiguration != nil {
		ok := object.Key("ServiceCatalogConfiguration")
		if err := awsAwsjson11_serializeDocumentServiceNowServiceCatalogConfiguration(v.ServiceCatalogConfiguration, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeDocumentServiceNowKnowledgeArticleConfiguration(v *types.ServiceNowKnowledgeArticleConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

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

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

	if v.ExcludeAttachmentFilePatterns != nil {
		ok := object.Key("ExcludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

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

	if v.IncludeAttachmentFilePatterns != nil {
		ok := object.Key("IncludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentServiceNowServiceCatalogConfiguration(v *types.ServiceNowServiceCatalogConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

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

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

	if v.ExcludeAttachmentFilePatterns != nil {
		ok := object.Key("ExcludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.IncludeAttachmentFilePatterns != nil {
		ok := object.Key("IncludeAttachmentFilePatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSharePointConfiguration(v *types.SharePointConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.CrawlAttachments {
		ok := object.Key("CrawlAttachments")
		ok.Boolean(v.CrawlAttachments)
	}

	if v.DisableLocalGroups {
		ok := object.Key("DisableLocalGroups")
		ok.Boolean(v.DisableLocalGroups)
	}

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

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.ProxyConfiguration != nil {
		ok := object.Key("ProxyConfiguration")
		if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil {
			return err
		}
	}

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

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

	if v.SslCertificateS3Path != nil {
		ok := object.Key("SslCertificateS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil {
			return err
		}
	}

	if v.Urls != nil {
		ok := object.Key("Urls")
		if err := awsAwsjson11_serializeDocumentSharePointUrlList(v.Urls, ok); err != nil {
			return err
		}
	}

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSharePointUrlList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSiteMapsConfiguration(v *types.SiteMapsConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.SiteMaps != nil {
		ok := object.Key("SiteMaps")
		if err := awsAwsjson11_serializeDocumentSiteMapsList(v.SiteMaps, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSiteMapsList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSlackConfiguration(v *types.SlackConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlBotMessage {
		ok := object.Key("CrawlBotMessage")
		ok.Boolean(v.CrawlBotMessage)
	}

	if v.ExcludeArchived {
		ok := object.Key("ExcludeArchived")
		ok.Boolean(v.ExcludeArchived)
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

	if v.PrivateChannelFilter != nil {
		ok := object.Key("PrivateChannelFilter")
		if err := awsAwsjson11_serializeDocumentPrivateChannelFilter(v.PrivateChannelFilter, ok); err != nil {
			return err
		}
	}

	if v.PublicChannelFilter != nil {
		ok := object.Key("PublicChannelFilter")
		if err := awsAwsjson11_serializeDocumentPublicChannelFilter(v.PublicChannelFilter, ok); err != nil {
			return err
		}
	}

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

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

	if v.SlackEntityList != nil {
		ok := object.Key("SlackEntityList")
		if err := awsAwsjson11_serializeDocumentSlackEntityList(v.SlackEntityList, ok); err != nil {
			return err
		}
	}

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

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentSlackEntityList(v []types.SlackEntity, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSortingConfiguration(v *types.SortingConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentSpellCorrectionConfiguration(v *types.SpellCorrectionConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	{
		ok := object.Key("IncludeQuerySpellCheckSuggestions")
		ok.Boolean(v.IncludeQuerySpellCheckSuggestions)
	}

	return nil
}

func awsAwsjson11_serializeDocumentSqlConfiguration(v *types.SqlConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentStringList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentSubnetIdList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentTemplate(v document.Interface, value smithyjson.Value) error {
	if v == nil {
		return nil
	}
	if !internaldocument.IsInterface(v) {
		return fmt.Errorf("%T is not a compatible document type", v)
	}
	db, err := v.MarshalSmithyDocument()
	if err != nil {
		return err
	}
	value.Write(db)
	return nil
}

func awsAwsjson11_serializeDocumentTemplateConfiguration(v *types.TemplateConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Template != nil {
		ok := object.Key("Template")
		if err := awsAwsjson11_serializeDocumentTemplate(v.Template, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.EndTime != nil {
		ok := object.Key("EndTime")
		ok.Double(smithytime.FormatEpochSeconds(*v.EndTime))
	}

	if v.StartTime != nil {
		ok := object.Key("StartTime")
		ok.Double(smithytime.FormatEpochSeconds(*v.StartTime))
	}

	return nil
}

func awsAwsjson11_serializeDocumentUrls(v *types.Urls, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.SeedUrlConfiguration != nil {
		ok := object.Key("SeedUrlConfiguration")
		if err := awsAwsjson11_serializeDocumentSeedUrlConfiguration(v.SeedUrlConfiguration, ok); err != nil {
			return err
		}
	}

	if v.SiteMapsConfiguration != nil {
		ok := object.Key("SiteMapsConfiguration")
		if err := awsAwsjson11_serializeDocumentSiteMapsConfiguration(v.SiteMapsConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentUserContext(v *types.UserContext, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DataSourceGroups != nil {
		ok := object.Key("DataSourceGroups")
		if err := awsAwsjson11_serializeDocumentDataSourceGroups(v.DataSourceGroups, ok); err != nil {
			return err
		}
	}

	if v.Groups != nil {
		ok := object.Key("Groups")
		if err := awsAwsjson11_serializeDocumentGroups(v.Groups, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v *types.UserGroupResolutionConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentUserIdentityConfiguration(v *types.UserIdentityConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeDocumentUserTokenConfiguration(v *types.UserTokenConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.JsonTokenTypeConfiguration != nil {
		ok := object.Key("JsonTokenTypeConfiguration")
		if err := awsAwsjson11_serializeDocumentJsonTokenTypeConfiguration(v.JsonTokenTypeConfiguration, ok); err != nil {
			return err
		}
	}

	if v.JwtTokenTypeConfiguration != nil {
		ok := object.Key("JwtTokenTypeConfiguration")
		if err := awsAwsjson11_serializeDocumentJwtTokenTypeConfiguration(v.JwtTokenTypeConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentUserTokenConfigurationList(v []types.UserTokenConfiguration, value smithyjson.Value) error {
	array := value.Array()
	defer array.Close()

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

func awsAwsjson11_serializeDocumentValueImportanceMap(v map[string]int32, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	for key := range v {
		om := object.Key(key)
		om.Integer(v[key])
	}
	return nil
}

func awsAwsjson11_serializeDocumentWebCrawlerConfiguration(v *types.WebCrawlerConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AuthenticationConfiguration != nil {
		ok := object.Key("AuthenticationConfiguration")
		if err := awsAwsjson11_serializeDocumentAuthenticationConfiguration(v.AuthenticationConfiguration, ok); err != nil {
			return err
		}
	}

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

	if v.MaxContentSizePerPageInMegaBytes != nil {
		ok := object.Key("MaxContentSizePerPageInMegaBytes")
		switch {
		case math.IsNaN(float64(*v.MaxContentSizePerPageInMegaBytes)):
			ok.String("NaN")

		case math.IsInf(float64(*v.MaxContentSizePerPageInMegaBytes), 1):
			ok.String("Infinity")

		case math.IsInf(float64(*v.MaxContentSizePerPageInMegaBytes), -1):
			ok.String("-Infinity")

		default:
			ok.Float(*v.MaxContentSizePerPageInMegaBytes)

		}
	}

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

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

	if v.ProxyConfiguration != nil {
		ok := object.Key("ProxyConfiguration")
		if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil {
			return err
		}
	}

	if v.UrlExclusionPatterns != nil {
		ok := object.Key("UrlExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.UrlExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.UrlInclusionPatterns != nil {
		ok := object.Key("UrlInclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.UrlInclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.Urls != nil {
		ok := object.Key("Urls")
		if err := awsAwsjson11_serializeDocumentUrls(v.Urls, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeDocumentWorkDocsConfiguration(v *types.WorkDocsConfiguration, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CrawlComments {
		ok := object.Key("CrawlComments")
		ok.Boolean(v.CrawlComments)
	}

	if v.ExclusionPatterns != nil {
		ok := object.Key("ExclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil {
			return err
		}
	}

	if v.FieldMappings != nil {
		ok := object.Key("FieldMappings")
		if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil {
			return err
		}
	}

	if v.InclusionPatterns != nil {
		ok := object.Key("InclusionPatterns")
		if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil {
			return err
		}
	}

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

	if v.UseChangeLog {
		ok := object.Key("UseChangeLog")
		ok.Boolean(v.UseChangeLog)
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentAssociateEntitiesToExperienceInput(v *AssociateEntitiesToExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.EntityList != nil {
		ok := object.Key("EntityList")
		if err := awsAwsjson11_serializeDocumentAssociateEntityList(v.EntityList, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentAssociatePersonasToEntitiesInput(v *AssociatePersonasToEntitiesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.Personas != nil {
		ok := object.Key("Personas")
		if err := awsAwsjson11_serializeDocumentEntityPersonaConfigurationList(v.Personas, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentBatchDeleteDocumentInput(v *BatchDeleteDocumentInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DataSourceSyncJobMetricTarget != nil {
		ok := object.Key("DataSourceSyncJobMetricTarget")
		if err := awsAwsjson11_serializeDocumentDataSourceSyncJobMetricTarget(v.DataSourceSyncJobMetricTarget, ok); err != nil {
			return err
		}
	}

	if v.DocumentIdList != nil {
		ok := object.Key("DocumentIdList")
		if err := awsAwsjson11_serializeDocumentDocumentIdList(v.DocumentIdList, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentBatchGetDocumentStatusInput(v *BatchGetDocumentStatusInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.DocumentInfoList != nil {
		ok := object.Key("DocumentInfoList")
		if err := awsAwsjson11_serializeDocumentDocumentInfoList(v.DocumentInfoList, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentBatchPutDocumentInput(v *BatchPutDocumentInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CustomDocumentEnrichmentConfiguration != nil {
		ok := object.Key("CustomDocumentEnrichmentConfiguration")
		if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil {
			return err
		}
	}

	if v.Documents != nil {
		ok := object.Key("Documents")
		if err := awsAwsjson11_serializeDocumentDocumentList(v.Documents, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentClearQuerySuggestionsInput(v *ClearQuerySuggestionsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateAccessControlConfigurationInput(v *CreateAccessControlConfigurationInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AccessControlList != nil {
		ok := object.Key("AccessControlList")
		if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil {
			return err
		}
	}

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

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

	if v.HierarchicalAccessControlList != nil {
		ok := object.Key("HierarchicalAccessControlList")
		if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateDataSourceInput(v *CreateDataSourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Configuration != nil {
		ok := object.Key("Configuration")
		if err := awsAwsjson11_serializeDocumentDataSourceConfiguration(v.Configuration, ok); err != nil {
			return err
		}
	}

	if v.CustomDocumentEnrichmentConfiguration != nil {
		ok := object.Key("CustomDocumentEnrichmentConfiguration")
		if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil {
			return err
		}
	}

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

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

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

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

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

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

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

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

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateExperienceInput(v *CreateExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.Configuration != nil {
		ok := object.Key("Configuration")
		if err := awsAwsjson11_serializeDocumentExperienceConfiguration(v.Configuration, ok); err != nil {
			return err
		}
	}

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateFaqInput(v *CreateFaqInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

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

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

	if v.S3Path != nil {
		ok := object.Key("S3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.S3Path, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateIndexInput(v *CreateIndexInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	if v.ServerSideEncryptionConfiguration != nil {
		ok := object.Key("ServerSideEncryptionConfiguration")
		if err := awsAwsjson11_serializeDocumentServerSideEncryptionConfiguration(v.ServerSideEncryptionConfiguration, ok); err != nil {
			return err
		}
	}

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

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

	if v.UserGroupResolutionConfiguration != nil {
		ok := object.Key("UserGroupResolutionConfiguration")
		if err := awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration, ok); err != nil {
			return err
		}
	}

	if v.UserTokenConfigurations != nil {
		ok := object.Key("UserTokenConfigurations")
		if err := awsAwsjson11_serializeDocumentUserTokenConfigurationList(v.UserTokenConfigurations, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateQuerySuggestionsBlockListInput(v *CreateQuerySuggestionsBlockListInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	if v.SourceS3Path != nil {
		ok := object.Key("SourceS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentCreateThesaurusInput(v *CreateThesaurusInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	if v.SourceS3Path != nil {
		ok := object.Key("SourceS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteAccessControlConfigurationInput(v *DeleteAccessControlConfigurationInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(v *DeleteDataSourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteExperienceInput(v *DeleteExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteFaqInput(v *DeleteFaqInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteIndexInput(v *DeleteIndexInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeletePrincipalMappingInput(v *DeletePrincipalMappingInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteQuerySuggestionsBlockListInput(v *DeleteQuerySuggestionsBlockListInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDeleteThesaurusInput(v *DeleteThesaurusInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeAccessControlConfigurationInput(v *DescribeAccessControlConfigurationInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeDataSourceInput(v *DescribeDataSourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeExperienceInput(v *DescribeExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeFaqInput(v *DescribeFaqInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeIndexInput(v *DescribeIndexInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribePrincipalMappingInput(v *DescribePrincipalMappingInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsBlockListInput(v *DescribeQuerySuggestionsBlockListInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsConfigInput(v *DescribeQuerySuggestionsConfigInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDescribeThesaurusInput(v *DescribeThesaurusInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDisassociateEntitiesFromExperienceInput(v *DisassociateEntitiesFromExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.EntityList != nil {
		ok := object.Key("EntityList")
		if err := awsAwsjson11_serializeDocumentDisassociateEntityList(v.EntityList, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentDisassociatePersonasFromEntitiesInput(v *DisassociatePersonasFromEntitiesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.EntityIds != nil {
		ok := object.Key("EntityIds")
		if err := awsAwsjson11_serializeDocumentEntityIdsList(v.EntityIds, ok); err != nil {
			return err
		}
	}

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentGetQuerySuggestionsInput(v *GetQuerySuggestionsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentGetSnapshotsInput(v *GetSnapshotsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListAccessControlConfigurationsInput(v *ListAccessControlConfigurationsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListDataSourcesInput(v *ListDataSourcesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListDataSourceSyncJobsInput(v *ListDataSourceSyncJobsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

	if v.StartTimeFilter != nil {
		ok := object.Key("StartTimeFilter")
		if err := awsAwsjson11_serializeDocumentTimeRange(v.StartTimeFilter, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListEntityPersonasInput(v *ListEntityPersonasInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListExperienceEntitiesInput(v *ListExperienceEntitiesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListExperiencesInput(v *ListExperiencesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListFaqsInput(v *ListFaqsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListGroupsOlderThanOrderingIdInput(v *ListGroupsOlderThanOrderingIdInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListIndicesInput(v *ListIndicesInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListQuerySuggestionsBlockListsInput(v *ListQuerySuggestionsBlockListsInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	return nil
}

func awsAwsjson11_serializeOpDocumentListThesauriInput(v *ListThesauriInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentPutPrincipalMappingInput(v *PutPrincipalMappingInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	if v.GroupMembers != nil {
		ok := object.Key("GroupMembers")
		if err := awsAwsjson11_serializeDocumentGroupMembers(v.GroupMembers, ok); err != nil {
			return err
		}
	}

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentQueryInput(v *QueryInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AttributeFilter != nil {
		ok := object.Key("AttributeFilter")
		if err := awsAwsjson11_serializeDocumentAttributeFilter(v.AttributeFilter, ok); err != nil {
			return err
		}
	}

	if v.DocumentRelevanceOverrideConfigurations != nil {
		ok := object.Key("DocumentRelevanceOverrideConfigurations")
		if err := awsAwsjson11_serializeDocumentDocumentRelevanceOverrideConfigurationList(v.DocumentRelevanceOverrideConfigurations, ok); err != nil {
			return err
		}
	}

	if v.Facets != nil {
		ok := object.Key("Facets")
		if err := awsAwsjson11_serializeDocumentFacetList(v.Facets, ok); err != nil {
			return err
		}
	}

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

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

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

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

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

	if v.RequestedDocumentAttributes != nil {
		ok := object.Key("RequestedDocumentAttributes")
		if err := awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v.RequestedDocumentAttributes, ok); err != nil {
			return err
		}
	}

	if v.SortingConfiguration != nil {
		ok := object.Key("SortingConfiguration")
		if err := awsAwsjson11_serializeDocumentSortingConfiguration(v.SortingConfiguration, ok); err != nil {
			return err
		}
	}

	if v.SpellCorrectionConfiguration != nil {
		ok := object.Key("SpellCorrectionConfiguration")
		if err := awsAwsjson11_serializeDocumentSpellCorrectionConfiguration(v.SpellCorrectionConfiguration, ok); err != nil {
			return err
		}
	}

	if v.UserContext != nil {
		ok := object.Key("UserContext")
		if err := awsAwsjson11_serializeDocumentUserContext(v.UserContext, ok); err != nil {
			return err
		}
	}

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

	return nil
}

func awsAwsjson11_serializeOpDocumentStartDataSourceSyncJobInput(v *StartDataSourceSyncJobInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentStopDataSourceSyncJobInput(v *StopDataSourceSyncJobInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentSubmitFeedbackInput(v *SubmitFeedbackInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.ClickFeedbackItems != nil {
		ok := object.Key("ClickFeedbackItems")
		if err := awsAwsjson11_serializeDocumentClickFeedbackList(v.ClickFeedbackItems, ok); err != nil {
			return err
		}
	}

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

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

	if v.RelevanceFeedbackItems != nil {
		ok := object.Key("RelevanceFeedbackItems")
		if err := awsAwsjson11_serializeDocumentRelevanceFeedbackList(v.RelevanceFeedbackItems, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

	if v.TagKeys != nil {
		ok := object.Key("TagKeys")
		if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateAccessControlConfigurationInput(v *UpdateAccessControlConfigurationInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.AccessControlList != nil {
		ok := object.Key("AccessControlList")
		if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil {
			return err
		}
	}

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

	if v.HierarchicalAccessControlList != nil {
		ok := object.Key("HierarchicalAccessControlList")
		if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil {
			return err
		}
	}

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Configuration != nil {
		ok := object.Key("Configuration")
		if err := awsAwsjson11_serializeDocumentDataSourceConfiguration(v.Configuration, ok); err != nil {
			return err
		}
	}

	if v.CustomDocumentEnrichmentConfiguration != nil {
		ok := object.Key("CustomDocumentEnrichmentConfiguration")
		if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil {
			return err
		}
	}

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

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

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

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

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

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

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

	if v.VpcConfiguration != nil {
		ok := object.Key("VpcConfiguration")
		if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateExperienceInput(v *UpdateExperienceInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.Configuration != nil {
		ok := object.Key("Configuration")
		if err := awsAwsjson11_serializeDocumentExperienceConfiguration(v.Configuration, ok); err != nil {
			return err
		}
	}

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateIndexInput(v *UpdateIndexInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

	if v.CapacityUnits != nil {
		ok := object.Key("CapacityUnits")
		if err := awsAwsjson11_serializeDocumentCapacityUnitsConfiguration(v.CapacityUnits, ok); err != nil {
			return err
		}
	}

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

	if v.DocumentMetadataConfigurationUpdates != nil {
		ok := object.Key("DocumentMetadataConfigurationUpdates")
		if err := awsAwsjson11_serializeDocumentDocumentMetadataConfigurationList(v.DocumentMetadataConfigurationUpdates, ok); err != nil {
			return err
		}
	}

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

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

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

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

	if v.UserGroupResolutionConfiguration != nil {
		ok := object.Key("UserGroupResolutionConfiguration")
		if err := awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration, ok); err != nil {
			return err
		}
	}

	if v.UserTokenConfigurations != nil {
		ok := object.Key("UserTokenConfigurations")
		if err := awsAwsjson11_serializeDocumentUserTokenConfigurationList(v.UserTokenConfigurations, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsBlockListInput(v *UpdateQuerySuggestionsBlockListInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	if v.SourceS3Path != nil {
		ok := object.Key("SourceS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsConfigInput(v *UpdateQuerySuggestionsConfigInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

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

	return nil
}

func awsAwsjson11_serializeOpDocumentUpdateThesaurusInput(v *UpdateThesaurusInput, value smithyjson.Value) error {
	object := value.Object()
	defer object.Close()

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

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

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

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

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

	if v.SourceS3Path != nil {
		ok := object.Key("SourceS3Path")
		if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil {
			return err
		}
	}

	return nil
}
