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

package wisdom

import (
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/wisdom/types"
	smithy "github.com/aws/smithy-go"
	"github.com/aws/smithy-go/middleware"
)

type validateOpCreateAssistantAssociation struct {
}

func (*validateOpCreateAssistantAssociation) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpCreateAssistantAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*CreateAssistantAssociationInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpCreateAssistantAssociationInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpCreateAssistant struct {
}

func (*validateOpCreateAssistant) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpCreateAssistant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*CreateAssistantInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpCreateAssistantInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpCreateContent struct {
}

func (*validateOpCreateContent) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpCreateContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*CreateContentInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpCreateContentInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpCreateKnowledgeBase struct {
}

func (*validateOpCreateKnowledgeBase) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpCreateKnowledgeBase) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*CreateKnowledgeBaseInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpCreateKnowledgeBaseInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpCreateSession struct {
}

func (*validateOpCreateSession) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpCreateSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*CreateSessionInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpCreateSessionInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpDeleteAssistantAssociation struct {
}

func (*validateOpDeleteAssistantAssociation) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpDeleteAssistantAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*DeleteAssistantAssociationInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpDeleteAssistantAssociationInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpDeleteAssistant struct {
}

func (*validateOpDeleteAssistant) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpDeleteAssistant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*DeleteAssistantInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpDeleteAssistantInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpDeleteContent struct {
}

func (*validateOpDeleteContent) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpDeleteContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*DeleteContentInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpDeleteContentInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpDeleteKnowledgeBase struct {
}

func (*validateOpDeleteKnowledgeBase) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpDeleteKnowledgeBase) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*DeleteKnowledgeBaseInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpDeleteKnowledgeBaseInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetAssistantAssociation struct {
}

func (*validateOpGetAssistantAssociation) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetAssistantAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetAssistantAssociationInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetAssistantAssociationInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetAssistant struct {
}

func (*validateOpGetAssistant) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetAssistant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetAssistantInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetAssistantInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetContent struct {
}

func (*validateOpGetContent) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetContentInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetContentInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetContentSummary struct {
}

func (*validateOpGetContentSummary) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetContentSummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetContentSummaryInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetContentSummaryInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetKnowledgeBase struct {
}

func (*validateOpGetKnowledgeBase) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetKnowledgeBase) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetKnowledgeBaseInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetKnowledgeBaseInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetRecommendations struct {
}

func (*validateOpGetRecommendations) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetRecommendations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetRecommendationsInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetRecommendationsInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpGetSession struct {
}

func (*validateOpGetSession) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpGetSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*GetSessionInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpGetSessionInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpListAssistantAssociations struct {
}

func (*validateOpListAssistantAssociations) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpListAssistantAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*ListAssistantAssociationsInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpListAssistantAssociationsInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpListContents struct {
}

func (*validateOpListContents) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpListContents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*ListContentsInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpListContentsInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpListTagsForResource struct {
}

func (*validateOpListTagsForResource) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*ListTagsForResourceInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpListTagsForResourceInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpNotifyRecommendationsReceived struct {
}

func (*validateOpNotifyRecommendationsReceived) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpNotifyRecommendationsReceived) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*NotifyRecommendationsReceivedInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpNotifyRecommendationsReceivedInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpQueryAssistant struct {
}

func (*validateOpQueryAssistant) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpQueryAssistant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*QueryAssistantInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpQueryAssistantInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpRemoveKnowledgeBaseTemplateUri struct {
}

func (*validateOpRemoveKnowledgeBaseTemplateUri) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpRemoveKnowledgeBaseTemplateUri) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*RemoveKnowledgeBaseTemplateUriInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpRemoveKnowledgeBaseTemplateUriInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpSearchContent struct {
}

func (*validateOpSearchContent) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpSearchContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*SearchContentInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpSearchContentInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpSearchSessions struct {
}

func (*validateOpSearchSessions) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpSearchSessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*SearchSessionsInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpSearchSessionsInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpStartContentUpload struct {
}

func (*validateOpStartContentUpload) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpStartContentUpload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*StartContentUploadInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpStartContentUploadInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpTagResource struct {
}

func (*validateOpTagResource) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*TagResourceInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpTagResourceInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpUntagResource struct {
}

func (*validateOpUntagResource) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*UntagResourceInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpUntagResourceInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpUpdateContent struct {
}

func (*validateOpUpdateContent) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpUpdateContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*UpdateContentInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpUpdateContentInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

type validateOpUpdateKnowledgeBaseTemplateUri struct {
}

func (*validateOpUpdateKnowledgeBaseTemplateUri) ID() string {
	return "OperationInputValidation"
}

func (m *validateOpUpdateKnowledgeBaseTemplateUri) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*UpdateKnowledgeBaseTemplateUriInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpUpdateKnowledgeBaseTemplateUriInput(input); err != nil {
		return out, metadata, err
	}
	return next.HandleInitialize(ctx, in)
}

func addOpCreateAssistantAssociationValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpCreateAssistantAssociation{}, middleware.After)
}

func addOpCreateAssistantValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpCreateAssistant{}, middleware.After)
}

func addOpCreateContentValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpCreateContent{}, middleware.After)
}

func addOpCreateKnowledgeBaseValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpCreateKnowledgeBase{}, middleware.After)
}

func addOpCreateSessionValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpCreateSession{}, middleware.After)
}

func addOpDeleteAssistantAssociationValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpDeleteAssistantAssociation{}, middleware.After)
}

func addOpDeleteAssistantValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpDeleteAssistant{}, middleware.After)
}

func addOpDeleteContentValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpDeleteContent{}, middleware.After)
}

func addOpDeleteKnowledgeBaseValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpDeleteKnowledgeBase{}, middleware.After)
}

func addOpGetAssistantAssociationValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetAssistantAssociation{}, middleware.After)
}

func addOpGetAssistantValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetAssistant{}, middleware.After)
}

func addOpGetContentValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetContent{}, middleware.After)
}

func addOpGetContentSummaryValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetContentSummary{}, middleware.After)
}

func addOpGetKnowledgeBaseValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetKnowledgeBase{}, middleware.After)
}

func addOpGetRecommendationsValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetRecommendations{}, middleware.After)
}

func addOpGetSessionValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpGetSession{}, middleware.After)
}

func addOpListAssistantAssociationsValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpListAssistantAssociations{}, middleware.After)
}

func addOpListContentsValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpListContents{}, middleware.After)
}

func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
}

func addOpNotifyRecommendationsReceivedValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpNotifyRecommendationsReceived{}, middleware.After)
}

func addOpQueryAssistantValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpQueryAssistant{}, middleware.After)
}

func addOpRemoveKnowledgeBaseTemplateUriValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpRemoveKnowledgeBaseTemplateUri{}, middleware.After)
}

func addOpSearchContentValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpSearchContent{}, middleware.After)
}

func addOpSearchSessionsValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpSearchSessions{}, middleware.After)
}

func addOpStartContentUploadValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpStartContentUpload{}, middleware.After)
}

func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
}

func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
}

func addOpUpdateContentValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpUpdateContent{}, middleware.After)
}

func addOpUpdateKnowledgeBaseTemplateUriValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpUpdateKnowledgeBaseTemplateUri{}, middleware.After)
}

func validateAppIntegrationsConfiguration(v *types.AppIntegrationsConfiguration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AppIntegrationsConfiguration"}
	if v.AppIntegrationArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppIntegrationArn"))
	}
	if v.ObjectFields == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ObjectFields"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateFilter(v *types.Filter) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "Filter"}
	if len(v.Field) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Field"))
	}
	if len(v.Operator) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Operator"))
	}
	if v.Value == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Value"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateFilterList(v []types.Filter) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "FilterList"}
	for i := range v {
		if err := validateFilter(&v[i]); err != nil {
			invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateSearchExpression(v *types.SearchExpression) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SearchExpression"}
	if v.Filters == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Filters"))
	} else if v.Filters != nil {
		if err := validateFilterList(v.Filters); err != nil {
			invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateSourceConfiguration(v types.SourceConfiguration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SourceConfiguration"}
	switch uv := v.(type) {
	case *types.SourceConfigurationMemberAppIntegrations:
		if err := validateAppIntegrationsConfiguration(&uv.Value); err != nil {
			invalidParams.AddNested("[appIntegrations]", err.(smithy.InvalidParamsError))
		}

	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateAssistantAssociationInput(v *CreateAssistantAssociationInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAssistantAssociationInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if len(v.AssociationType) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("AssociationType"))
	}
	if v.Association == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Association"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateAssistantInput(v *CreateAssistantInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAssistantInput"}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if len(v.Type) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Type"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateContentInput(v *CreateContentInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateContentInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.UploadId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateKnowledgeBaseInput(v *CreateKnowledgeBaseInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateKnowledgeBaseInput"}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if len(v.KnowledgeBaseType) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseType"))
	}
	if v.SourceConfiguration != nil {
		if err := validateSourceConfiguration(v.SourceConfiguration); err != nil {
			invalidParams.AddNested("SourceConfiguration", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateSessionInput(v *CreateSessionInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateSessionInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteAssistantAssociationInput(v *DeleteAssistantAssociationInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteAssistantAssociationInput"}
	if v.AssistantAssociationId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantAssociationId"))
	}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteAssistantInput(v *DeleteAssistantInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteAssistantInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteContentInput(v *DeleteContentInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteContentInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.ContentId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ContentId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteKnowledgeBaseInput(v *DeleteKnowledgeBaseInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteKnowledgeBaseInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetAssistantAssociationInput(v *GetAssistantAssociationInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetAssistantAssociationInput"}
	if v.AssistantAssociationId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantAssociationId"))
	}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetAssistantInput(v *GetAssistantInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetAssistantInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetContentInput(v *GetContentInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetContentInput"}
	if v.ContentId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ContentId"))
	}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetContentSummaryInput(v *GetContentSummaryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetContentSummaryInput"}
	if v.ContentId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ContentId"))
	}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetKnowledgeBaseInput(v *GetKnowledgeBaseInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetKnowledgeBaseInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetRecommendationsInput(v *GetRecommendationsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetRecommendationsInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.SessionId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SessionId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetSessionInput(v *GetSessionInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetSessionInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.SessionId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SessionId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListAssistantAssociationsInput(v *ListAssistantAssociationsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListAssistantAssociationsInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListContentsInput(v *ListContentsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListContentsInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"}
	if v.ResourceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpNotifyRecommendationsReceivedInput(v *NotifyRecommendationsReceivedInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "NotifyRecommendationsReceivedInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.SessionId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SessionId"))
	}
	if v.RecommendationIds == nil {
		invalidParams.Add(smithy.NewErrParamRequired("RecommendationIds"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpQueryAssistantInput(v *QueryAssistantInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "QueryAssistantInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.QueryText == nil {
		invalidParams.Add(smithy.NewErrParamRequired("QueryText"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpRemoveKnowledgeBaseTemplateUriInput(v *RemoveKnowledgeBaseTemplateUriInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RemoveKnowledgeBaseTemplateUriInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpSearchContentInput(v *SearchContentInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SearchContentInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.SearchExpression == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SearchExpression"))
	} else if v.SearchExpression != nil {
		if err := validateSearchExpression(v.SearchExpression); err != nil {
			invalidParams.AddNested("SearchExpression", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpSearchSessionsInput(v *SearchSessionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SearchSessionsInput"}
	if v.AssistantId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AssistantId"))
	}
	if v.SearchExpression == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SearchExpression"))
	} else if v.SearchExpression != nil {
		if err := validateSearchExpression(v.SearchExpression); err != nil {
			invalidParams.AddNested("SearchExpression", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpStartContentUploadInput(v *StartContentUploadInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartContentUploadInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.ContentType == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ContentType"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpTagResourceInput(v *TagResourceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"}
	if v.ResourceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
	}
	if v.Tags == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Tags"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUntagResourceInput(v *UntagResourceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"}
	if v.ResourceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
	}
	if v.TagKeys == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateContentInput(v *UpdateContentInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateContentInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.ContentId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ContentId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateKnowledgeBaseTemplateUriInput(v *UpdateKnowledgeBaseTemplateUriInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateKnowledgeBaseTemplateUriInput"}
	if v.KnowledgeBaseId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("KnowledgeBaseId"))
	}
	if v.TemplateUri == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TemplateUri"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}
