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


package storage

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

type validateOpAbortMultipartUpload struct {
}

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

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

type validateOpCompleteMultipartUpload struct {
}

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

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

type validateOpDeleteBucketCors struct {
}

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

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

type validateOpDeleteBucket struct {
}

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

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

type validateOpDeleteBucketLifecycle struct {
}

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

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

type validateOpDeleteBucketPolicy struct {
}

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

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

type validateOpDeleteBucketTagging struct {
}

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

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

type validateOpDeleteMultipleObjects struct {
}

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

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

type validateOpDeleteObject struct {
}

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

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

type validateOpDeleteObjectTagging struct {
}

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

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

type validateOpGetBucketACL struct {
}

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

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

type validateOpGetBucketConsistency struct {
}

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

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

type validateOpGetBucketCors struct {
}

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

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

type validateOpGetBucket struct {
}

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

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

type validateOpGetBucketLifecycleConfiguration struct {
}

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

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

type validateOpGetBucketObjectVersions struct {
}

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

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

type validateOpGetBucketPolicy struct {
}

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

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

type validateOpGetBucketTagging struct {
}

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

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

type validateOpGetBucketVersion2 struct {
}

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

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

type validateOpGetBucketVersioning struct {
}

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

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

type validateOpGetObjectACL struct {
}

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

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

type validateOpGetObject struct {
}

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

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

type validateOpGetObjectTagging struct {
}

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

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

type validateOpHeadBucket struct {
}

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

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

type validateOpHeadObject struct {
}

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

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

type validateOpInitiateMultipartUpload struct {
}

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

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

type validateOpListMultipartUploads struct {
}

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

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

type validateOpListParts struct {
}

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

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

type validateOpPutBucketConsistency struct {
}

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

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

type validateOpPutBucketCors struct {
}

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

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

type validateOpPutBucket struct {
}

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

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

type validateOpPutBucketLifecycleConfiguration struct {
}

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

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

type validateOpPutBucketPolicy struct {
}

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

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

type validateOpPutBucketTagging struct {
}

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

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

type validateOpPutBucketVersioning struct {
}

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

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

type validateOpPutObjectCopy struct {
}

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

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

type validateOpPutObject struct {
}

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

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

type validateOpPutObjectTagging struct {
}

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

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

type validateOpUploadPartCopy struct {
}

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

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

type validateOpUploadPart struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateRequestCompleteMultipartUpload(v *types.RequestCompleteMultipartUpload) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestCompleteMultipartUpload"}
	if v.ListOfRequestPart == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListOfRequestPart"))
	} else if v.ListOfRequestPart != nil {
		if err := validateListOfRequestPart(v.ListOfRequestPart); err != nil {
			invalidParams.AddNested("ListOfRequestPart", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateRequestCORSConfiguration(v *types.RequestCORSConfiguration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestCORSConfiguration"}
	if v.ListOfRequestCORSRule == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListOfRequestCORSRule"))
	} else if v.ListOfRequestCORSRule != nil {
		if err := validateListOfRequestCORSRule(v.ListOfRequestCORSRule); err != nil {
			invalidParams.AddNested("ListOfRequestCORSRule", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateRequestCORSRule(v *types.RequestCORSRule) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestCORSRule"}
	if v.AllowedOrigin == nil {
	invalidParams.Add(smithy.NewErrParamRequired("AllowedOrigin"))
	}
	if v.ListOfRequestAllowedMethod == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListOfRequestAllowedMethod"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateRequestDelete(v *types.RequestDelete) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestDelete"}
	if v.ListOfRequestObject == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListOfRequestObject"))
	} else if v.ListOfRequestObject != nil {
		if err := validateListOfRequestObject(v.ListOfRequestObject); err != nil {
			invalidParams.AddNested("ListOfRequestObject", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateRequestLifecycleConfiguration(v *types.RequestLifecycleConfiguration) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestLifecycleConfiguration"}
	if v.ListOfRequestRule == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListOfRequestRule"))
	} else if v.ListOfRequestRule != nil {
		if err := validateListOfRequestRule(v.ListOfRequestRule); err != nil {
			invalidParams.AddNested("ListOfRequestRule", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateRequestPart(v *types.RequestPart) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestPart"}
	if v.ETag == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ETag"))
	}
	if v.PartNumber == nil {
	invalidParams.Add(smithy.NewErrParamRequired("PartNumber"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpAbortMultipartUploadInput(v *AbortMultipartUploadInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AbortMultipartUploadInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.UploadId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpCompleteMultipartUploadInput(v *CompleteMultipartUploadInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CompleteMultipartUploadInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.CompleteMultipartUpload == nil {
	invalidParams.Add(smithy.NewErrParamRequired("CompleteMultipartUpload"))
	} else if v.CompleteMultipartUpload != nil {
		if err := validateRequestCompleteMultipartUpload(v.CompleteMultipartUpload); err != nil {
			invalidParams.AddNested("CompleteMultipartUpload", err.(smithy.InvalidParamsError))
		}
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.UploadId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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

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

func validateOpDeleteMultipleObjectsInput(v *DeleteMultipleObjectsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteMultipleObjectsInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.ContentMd5 == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ContentMd5"))
	}
	if v.Delete == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Delete"))
	} else if v.Delete != nil {
		if err := validateRequestDelete(v.Delete); err != nil {
			invalidParams.AddNested("Delete", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpDeleteObjectInput(v *DeleteObjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpDeleteObjectTaggingInput(v *DeleteObjectTaggingInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectTaggingInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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

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

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

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

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

func validateOpGetBucketVersion2Input(v *GetBucketVersion2Input) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetBucketVersion2Input"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.ListType == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ListType"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpGetObjectACLInput(v *GetObjectACLInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetObjectACLInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpGetObjectInput(v *GetObjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetObjectInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpGetObjectTaggingInput(v *GetObjectTaggingInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetObjectTaggingInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpHeadObjectInput(v *HeadObjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "HeadObjectInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpInitiateMultipartUploadInput(v *InitiateMultipartUploadInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "InitiateMultipartUploadInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpListPartsInput(v *ListPartsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ListPartsInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.UploadId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpPutBucketConsistencyInput(v *PutBucketConsistencyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutBucketConsistencyInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if len(v.XNtapSgConsistency) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("XNtapSgConsistency"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpPutBucketCorsInput(v *PutBucketCorsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutBucketCorsInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.CORSConfiguration == nil {
	invalidParams.Add(smithy.NewErrParamRequired("CORSConfiguration"))
	} else if v.CORSConfiguration != nil {
		if err := validateRequestCORSConfiguration(v.CORSConfiguration); err != nil {
			invalidParams.AddNested("CORSConfiguration", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpPutBucketLifecycleConfigurationInput(v *PutBucketLifecycleConfigurationInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutBucketLifecycleConfigurationInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.LifecycleConfiguration == nil {
	invalidParams.Add(smithy.NewErrParamRequired("LifecycleConfiguration"))
	} else if v.LifecycleConfiguration != nil {
		if err := validateRequestLifecycleConfiguration(v.LifecycleConfiguration); err != nil {
			invalidParams.AddNested("LifecycleConfiguration", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

func validateOpPutObjectCopyInput(v *PutObjectCopyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutObjectCopyInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.XAmzCopySource == nil {
	invalidParams.Add(smithy.NewErrParamRequired("XAmzCopySource"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpPutObjectInput(v *PutObjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutObjectInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpPutObjectTaggingInput(v *PutObjectTaggingInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "PutObjectTaggingInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpUploadPartCopyInput(v *UploadPartCopyInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UploadPartCopyInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.PartNumber == nil {
	invalidParams.Add(smithy.NewErrParamRequired("PartNumber"))
	}
	if v.UploadId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if v.XAmzCopySource == nil {
	invalidParams.Add(smithy.NewErrParamRequired("XAmzCopySource"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpUploadPartInput(v *UploadPartInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UploadPartInput"}
	if v.Bucket == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
	}
	if v.Object == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Object"))
	}
	if v.PartNumber == nil {
	invalidParams.Add(smithy.NewErrParamRequired("PartNumber"))
	}
	if v.UploadId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}
