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

package route53domains

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

type validateOpAcceptDomainTransferFromAnotherAwsAccount struct {
}

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

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

type validateOpAssociateDelegationSignerToDomain struct {
}

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

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

type validateOpCancelDomainTransferToAnotherAwsAccount struct {
}

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

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

type validateOpCheckDomainAvailability struct {
}

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

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

type validateOpCheckDomainTransferability struct {
}

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

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

type validateOpDeleteDomain struct {
}

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

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

type validateOpDeleteTagsForDomain struct {
}

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

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

type validateOpDisableDomainAutoRenew struct {
}

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

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

type validateOpDisableDomainTransferLock struct {
}

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

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

type validateOpDisassociateDelegationSignerFromDomain struct {
}

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

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

type validateOpEnableDomainAutoRenew struct {
}

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

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

type validateOpEnableDomainTransferLock struct {
}

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

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

type validateOpGetDomainDetail struct {
}

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

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

type validateOpGetDomainSuggestions struct {
}

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

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

type validateOpGetOperationDetail struct {
}

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

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

type validateOpListDomains struct {
}

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

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

type validateOpListTagsForDomain struct {
}

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

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

type validateOpPushDomain struct {
}

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

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

type validateOpRegisterDomain struct {
}

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

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

type validateOpRejectDomainTransferFromAnotherAwsAccount struct {
}

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

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

type validateOpRenewDomain struct {
}

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

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

type validateOpResendOperationAuthorization struct {
}

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

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

type validateOpRetrieveDomainAuthCode struct {
}

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

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

type validateOpTransferDomain struct {
}

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

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

type validateOpTransferDomainToAnotherAwsAccount struct {
}

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

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

type validateOpUpdateDomainContact struct {
}

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

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

type validateOpUpdateDomainContactPrivacy struct {
}

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

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

type validateOpUpdateDomainNameservers struct {
}

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

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

type validateOpUpdateTagsForDomain struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateContactDetail(v *types.ContactDetail) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ContactDetail"}
	if v.ExtraParams != nil {
		if err := validateExtraParamList(v.ExtraParams); err != nil {
			invalidParams.AddNested("ExtraParams", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

func validateFilterCondition(v *types.FilterCondition) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "FilterCondition"}
	if len(v.Name) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if len(v.Operator) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Operator"))
	}
	if v.Values == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Values"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

func validateSortCondition(v *types.SortCondition) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SortCondition"}
	if len(v.Name) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if len(v.SortOrder) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("SortOrder"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpAcceptDomainTransferFromAnotherAwsAccountInput(v *AcceptDomainTransferFromAnotherAwsAccountInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AcceptDomainTransferFromAnotherAwsAccountInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.Password == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Password"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpAssociateDelegationSignerToDomainInput(v *AssociateDelegationSignerToDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AssociateDelegationSignerToDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.SigningAttributes == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SigningAttributes"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

func validateOpDeleteTagsForDomainInput(v *DeleteTagsForDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsForDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.TagsToDelete == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TagsToDelete"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

func validateOpDisassociateDelegationSignerFromDomainInput(v *DisassociateDelegationSignerFromDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DisassociateDelegationSignerFromDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.Id == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Id"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

func validateOpGetDomainSuggestionsInput(v *GetDomainSuggestionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetDomainSuggestionsInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.OnlyAvailable == nil {
		invalidParams.Add(smithy.NewErrParamRequired("OnlyAvailable"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpListDomainsInput(v *ListDomainsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListDomainsInput"}
	if v.FilterConditions != nil {
		if err := validateFilterConditions(v.FilterConditions); err != nil {
			invalidParams.AddNested("FilterConditions", err.(smithy.InvalidParamsError))
		}
	}
	if v.SortCondition != nil {
		if err := validateSortCondition(v.SortCondition); err != nil {
			invalidParams.AddNested("SortCondition", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpPushDomainInput(v *PushDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PushDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.Target == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Target"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpRegisterDomainInput(v *RegisterDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RegisterDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.DurationInYears == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DurationInYears"))
	}
	if v.AdminContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AdminContact"))
	} else if v.AdminContact != nil {
		if err := validateContactDetail(v.AdminContact); err != nil {
			invalidParams.AddNested("AdminContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistrantContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("RegistrantContact"))
	} else if v.RegistrantContact != nil {
		if err := validateContactDetail(v.RegistrantContact); err != nil {
			invalidParams.AddNested("RegistrantContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.TechContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TechContact"))
	} else if v.TechContact != nil {
		if err := validateContactDetail(v.TechContact); err != nil {
			invalidParams.AddNested("TechContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.BillingContact != nil {
		if err := validateContactDetail(v.BillingContact); err != nil {
			invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

func validateOpTransferDomainInput(v *TransferDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "TransferDomainInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.Nameservers != nil {
		if err := validateNameserverList(v.Nameservers); err != nil {
			invalidParams.AddNested("Nameservers", err.(smithy.InvalidParamsError))
		}
	}
	if v.AdminContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AdminContact"))
	} else if v.AdminContact != nil {
		if err := validateContactDetail(v.AdminContact); err != nil {
			invalidParams.AddNested("AdminContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistrantContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("RegistrantContact"))
	} else if v.RegistrantContact != nil {
		if err := validateContactDetail(v.RegistrantContact); err != nil {
			invalidParams.AddNested("RegistrantContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.TechContact == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TechContact"))
	} else if v.TechContact != nil {
		if err := validateContactDetail(v.TechContact); err != nil {
			invalidParams.AddNested("TechContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.BillingContact != nil {
		if err := validateContactDetail(v.BillingContact); err != nil {
			invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpTransferDomainToAnotherAwsAccountInput(v *TransferDomainToAnotherAwsAccountInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "TransferDomainToAnotherAwsAccountInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.AccountId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateDomainContactInput(v *UpdateDomainContactInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateDomainContactInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.AdminContact != nil {
		if err := validateContactDetail(v.AdminContact); err != nil {
			invalidParams.AddNested("AdminContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistrantContact != nil {
		if err := validateContactDetail(v.RegistrantContact); err != nil {
			invalidParams.AddNested("RegistrantContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.TechContact != nil {
		if err := validateContactDetail(v.TechContact); err != nil {
			invalidParams.AddNested("TechContact", err.(smithy.InvalidParamsError))
		}
	}
	if v.Consent != nil {
		if err := validateConsent(v.Consent); err != nil {
			invalidParams.AddNested("Consent", err.(smithy.InvalidParamsError))
		}
	}
	if v.BillingContact != nil {
		if err := validateContactDetail(v.BillingContact); err != nil {
			invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpUpdateDomainNameserversInput(v *UpdateDomainNameserversInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateDomainNameserversInput"}
	if v.DomainName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DomainName"))
	}
	if v.Nameservers == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Nameservers"))
	} else if v.Nameservers != nil {
		if err := validateNameserverList(v.Nameservers); err != nil {
			invalidParams.AddNested("Nameservers", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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