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

package chimesdkidentity

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

type validateOpCreateAppInstanceAdmin struct {
}

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

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

type validateOpCreateAppInstanceBot struct {
}

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

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

type validateOpCreateAppInstance struct {
}

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

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

type validateOpCreateAppInstanceUser struct {
}

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

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

type validateOpDeleteAppInstanceAdmin struct {
}

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

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

type validateOpDeleteAppInstanceBot struct {
}

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

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

type validateOpDeleteAppInstance struct {
}

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

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

type validateOpDeleteAppInstanceUser struct {
}

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

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

type validateOpDeregisterAppInstanceUserEndpoint struct {
}

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

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

type validateOpDescribeAppInstanceAdmin struct {
}

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

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

type validateOpDescribeAppInstanceBot struct {
}

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

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

type validateOpDescribeAppInstance struct {
}

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

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

type validateOpDescribeAppInstanceUserEndpoint struct {
}

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

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

type validateOpDescribeAppInstanceUser struct {
}

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

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

type validateOpGetAppInstanceRetentionSettings struct {
}

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

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

type validateOpListAppInstanceAdmins struct {
}

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

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

type validateOpListAppInstanceBots struct {
}

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

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

type validateOpListAppInstanceUserEndpoints struct {
}

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

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

type validateOpListAppInstanceUsers struct {
}

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

func (m *validateOpListAppInstanceUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*ListAppInstanceUsersInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpListAppInstanceUsersInput(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 validateOpPutAppInstanceRetentionSettings struct {
}

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

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

type validateOpPutAppInstanceUserExpirationSettings struct {
}

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

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

type validateOpRegisterAppInstanceUserEndpoint struct {
}

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

func (m *validateOpRegisterAppInstanceUserEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
	input, ok := in.Parameters.(*RegisterAppInstanceUserEndpointInput)
	if !ok {
		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
	}
	if err := validateOpRegisterAppInstanceUserEndpointInput(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 validateOpUpdateAppInstanceBot struct {
}

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

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

type validateOpUpdateAppInstance struct {
}

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

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

type validateOpUpdateAppInstanceUserEndpoint struct {
}

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

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

type validateOpUpdateAppInstanceUser struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func addOpRegisterAppInstanceUserEndpointValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpRegisterAppInstanceUserEndpoint{}, 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 addOpUpdateAppInstanceBotValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpUpdateAppInstanceBot{}, middleware.After)
}

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

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

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

func validateConfiguration(v *types.Configuration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "Configuration"}
	if v.Lex == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Lex"))
	} else if v.Lex != nil {
		if err := validateLexConfiguration(v.Lex); err != nil {
			invalidParams.AddNested("Lex", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateEndpointAttributes(v *types.EndpointAttributes) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "EndpointAttributes"}
	if v.DeviceToken == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DeviceToken"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateExpirationSettings(v *types.ExpirationSettings) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ExpirationSettings"}
	if v.ExpirationDays == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ExpirationDays"))
	}
	if len(v.ExpirationCriterion) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("ExpirationCriterion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateInvokedBy(v *types.InvokedBy) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "InvokedBy"}
	if len(v.StandardMessages) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("StandardMessages"))
	}
	if len(v.TargetedMessages) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("TargetedMessages"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateLexConfiguration(v *types.LexConfiguration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "LexConfiguration"}
	if v.InvokedBy != nil {
		if err := validateInvokedBy(v.InvokedBy); err != nil {
			invalidParams.AddNested("InvokedBy", err.(smithy.InvalidParamsError))
		}
	}
	if v.LexBotAliasArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("LexBotAliasArn"))
	}
	if v.LocaleId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("LocaleId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateTag(v *types.Tag) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "Tag"}
	if v.Key == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Key"))
	}
	if v.Value == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Value"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceAdminInput"}
	if v.AppInstanceAdminArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn"))
	}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateAppInstanceBotInput(v *CreateAppInstanceBotInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceBotInput"}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if v.ClientRequestToken == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
	}
	if v.Tags != nil {
		if err := validateTagList(v.Tags); err != nil {
			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
		}
	}
	if v.Configuration == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Configuration"))
	} else if v.Configuration != nil {
		if err := validateConfiguration(v.Configuration); err != nil {
			invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateAppInstanceInput(v *CreateAppInstanceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceInput"}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.ClientRequestToken == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
	}
	if v.Tags != nil {
		if err := validateTagList(v.Tags); err != nil {
			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateAppInstanceUserInput(v *CreateAppInstanceUserInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceUserInput"}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if v.AppInstanceUserId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserId"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.ClientRequestToken == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
	}
	if v.Tags != nil {
		if err := validateTagList(v.Tags); err != nil {
			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
		}
	}
	if v.ExpirationSettings != nil {
		if err := validateExpirationSettings(v.ExpirationSettings); err != nil {
			invalidParams.AddNested("ExpirationSettings", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteAppInstanceAdminInput(v *DeleteAppInstanceAdminInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceAdminInput"}
	if v.AppInstanceAdminArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn"))
	}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

func validateOpDeregisterAppInstanceUserEndpointInput(v *DeregisterAppInstanceUserEndpointInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeregisterAppInstanceUserEndpointInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if v.EndpointId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("EndpointId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDescribeAppInstanceAdminInput(v *DescribeAppInstanceAdminInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceAdminInput"}
	if v.AppInstanceAdminArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn"))
	}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

func validateOpDescribeAppInstanceUserEndpointInput(v *DescribeAppInstanceUserEndpointInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceUserEndpointInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if v.EndpointId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("EndpointId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

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

func validateOpListAppInstanceUsersInput(v *ListAppInstanceUsersInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListAppInstanceUsersInput"}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	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 validateOpPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutAppInstanceRetentionSettingsInput"}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if v.AppInstanceRetentionSettings == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceRetentionSettings"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpPutAppInstanceUserExpirationSettingsInput(v *PutAppInstanceUserExpirationSettingsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutAppInstanceUserExpirationSettingsInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if v.ExpirationSettings != nil {
		if err := validateExpirationSettings(v.ExpirationSettings); err != nil {
			invalidParams.AddNested("ExpirationSettings", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpRegisterAppInstanceUserEndpointInput(v *RegisterAppInstanceUserEndpointInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RegisterAppInstanceUserEndpointInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if len(v.Type) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Type"))
	}
	if v.ResourceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
	}
	if v.EndpointAttributes == nil {
		invalidParams.Add(smithy.NewErrParamRequired("EndpointAttributes"))
	} else if v.EndpointAttributes != nil {
		if err := validateEndpointAttributes(v.EndpointAttributes); err != nil {
			invalidParams.AddNested("EndpointAttributes", err.(smithy.InvalidParamsError))
		}
	}
	if v.ClientRequestToken == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
	}
	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"))
	} else if v.Tags != nil {
		if err := validateTagList(v.Tags); err != nil {
			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
		}
	}
	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 validateOpUpdateAppInstanceBotInput(v *UpdateAppInstanceBotInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceBotInput"}
	if v.AppInstanceBotArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceBotArn"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.Metadata == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Metadata"))
	}
	if v.Configuration != nil {
		if err := validateConfiguration(v.Configuration); err != nil {
			invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateAppInstanceInput(v *UpdateAppInstanceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceInput"}
	if v.AppInstanceArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.Metadata == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Metadata"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateAppInstanceUserEndpointInput(v *UpdateAppInstanceUserEndpointInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceUserEndpointInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if v.EndpointId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("EndpointId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceUserInput"}
	if v.AppInstanceUserArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn"))
	}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.Metadata == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Metadata"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}
