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

package codeartifact

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

type validateOpAssociateExternalConnection struct {
}

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

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

type validateOpCopyPackageVersions struct {
}

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

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

type validateOpCreateDomain struct {
}

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

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

type validateOpCreateRepository struct {
}

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

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

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

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

type validateOpDeletePackageVersions struct {
}

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

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

type validateOpDeleteRepository struct {
}

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

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

type validateOpDeleteRepositoryPermissionsPolicy struct {
}

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

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

type validateOpDescribeDomain struct {
}

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

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

type validateOpDescribePackage struct {
}

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

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

type validateOpDescribePackageVersion struct {
}

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

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

type validateOpDescribeRepository struct {
}

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

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

type validateOpDisassociateExternalConnection struct {
}

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

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

type validateOpDisposePackageVersions struct {
}

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

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

type validateOpGetAuthorizationToken struct {
}

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

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

type validateOpGetDomainPermissionsPolicy struct {
}

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

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

type validateOpGetPackageVersionAsset struct {
}

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

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

type validateOpGetPackageVersionReadme struct {
}

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

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

type validateOpGetRepositoryEndpoint struct {
}

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

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

type validateOpGetRepositoryPermissionsPolicy struct {
}

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

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

type validateOpListPackages struct {
}

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

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

type validateOpListPackageVersionAssets struct {
}

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

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

type validateOpListPackageVersionDependencies struct {
}

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

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

type validateOpListPackageVersions struct {
}

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

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

type validateOpListRepositoriesInDomain struct {
}

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

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

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

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

type validateOpPutPackageOriginConfiguration struct {
}

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

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

type validateOpPutRepositoryPermissionsPolicy struct {
}

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

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

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

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

type validateOpUpdateRepository struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func addOpPutRepositoryPermissionsPolicyValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpPutRepositoryPermissionsPolicy{}, 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 addOpUpdatePackageVersionsStatusValidationMiddleware(stack *middleware.Stack) error {
	return stack.Initialize.Add(&validateOpUpdatePackageVersionsStatus{}, middleware.After)
}

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

func validatePackageOriginRestrictions(v *types.PackageOriginRestrictions) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PackageOriginRestrictions"}
	if len(v.Publish) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Publish"))
	}
	if len(v.Upstream) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Upstream"))
	}
	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 validateUpstreamRepository(v *types.UpstreamRepository) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpstreamRepository"}
	if v.RepositoryName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpAssociateExternalConnectionInput(v *AssociateExternalConnectionInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AssociateExternalConnectionInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if v.ExternalConnection == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ExternalConnection"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCopyPackageVersionsInput(v *CopyPackageVersionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CopyPackageVersionsInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.SourceRepository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SourceRepository"))
	}
	if v.DestinationRepository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DestinationRepository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpCreateDomainInput(v *CreateDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateDomainInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	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 validateOpCreateRepositoryInput(v *CreateRepositoryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateRepositoryInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if v.Upstreams != nil {
		if err := validateUpstreamRepositoryList(v.Upstreams); err != nil {
			invalidParams.AddNested("Upstreams", err.(smithy.InvalidParamsError))
		}
	}
	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 validateOpDeleteDomainInput(v *DeleteDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteDomainInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpDeletePackageVersionsInput(v *DeletePackageVersionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeletePackageVersionsInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.Versions == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Versions"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteRepositoryInput(v *DeleteRepositoryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteRepositoryInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDeleteRepositoryPermissionsPolicyInput(v *DeleteRepositoryPermissionsPolicyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteRepositoryPermissionsPolicyInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpDescribePackageInput(v *DescribePackageInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DescribePackageInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDescribePackageVersionInput(v *DescribePackageVersionInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DescribePackageVersionInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.PackageVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PackageVersion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDescribeRepositoryInput(v *DescribeRepositoryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DescribeRepositoryInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDisassociateExternalConnectionInput(v *DisassociateExternalConnectionInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DisassociateExternalConnectionInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if v.ExternalConnection == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ExternalConnection"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpDisposePackageVersionsInput(v *DisposePackageVersionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DisposePackageVersionsInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.Versions == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Versions"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

func validateOpGetPackageVersionAssetInput(v *GetPackageVersionAssetInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetPackageVersionAssetInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.PackageVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PackageVersion"))
	}
	if v.Asset == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Asset"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetPackageVersionReadmeInput(v *GetPackageVersionReadmeInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetPackageVersionReadmeInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.PackageVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PackageVersion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetRepositoryEndpointInput(v *GetRepositoryEndpointInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetRepositoryEndpointInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpGetRepositoryPermissionsPolicyInput(v *GetRepositoryPermissionsPolicyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetRepositoryPermissionsPolicyInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListPackagesInput(v *ListPackagesInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListPackagesInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListPackageVersionAssetsInput(v *ListPackageVersionAssetsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListPackageVersionAssetsInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.PackageVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PackageVersion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListPackageVersionDependenciesInput(v *ListPackageVersionDependenciesInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListPackageVersionDependenciesInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.PackageVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PackageVersion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListPackageVersionsInput(v *ListPackageVersionsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListPackageVersionsInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpListRepositoriesInDomainInput(v *ListRepositoriesInDomainInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListRepositoriesInDomainInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	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 validateOpPutDomainPermissionsPolicyInput(v *PutDomainPermissionsPolicyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutDomainPermissionsPolicyInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.PolicyDocument == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpPutPackageOriginConfigurationInput(v *PutPackageOriginConfigurationInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutPackageOriginConfigurationInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.Restrictions == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Restrictions"))
	} else if v.Restrictions != nil {
		if err := validatePackageOriginRestrictions(v.Restrictions); err != nil {
			invalidParams.AddNested("Restrictions", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpPutRepositoryPermissionsPolicyInput(v *PutRepositoryPermissionsPolicyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutRepositoryPermissionsPolicyInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if v.PolicyDocument == nil {
		invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument"))
	}
	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 validateOpUpdatePackageVersionsStatusInput(v *UpdatePackageVersionsStatusInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdatePackageVersionsStatusInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if v.Package == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Package"))
	}
	if v.Versions == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Versions"))
	}
	if len(v.TargetStatus) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("TargetStatus"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateRepositoryInput(v *UpdateRepositoryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateRepositoryInput"}
	if v.Domain == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Domain"))
	}
	if v.Repository == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Repository"))
	}
	if v.Upstreams != nil {
		if err := validateUpstreamRepositoryList(v.Upstreams); err != nil {
			invalidParams.AddNested("Upstreams", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}
