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

package codebuild

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

type validateOpBatchDeleteBuilds struct {
}

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

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

type validateOpBatchGetBuildBatches struct {
}

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

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

type validateOpBatchGetBuilds struct {
}

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

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

type validateOpBatchGetProjects struct {
}

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

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

type validateOpBatchGetReportGroups struct {
}

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

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

type validateOpBatchGetReports struct {
}

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

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

type validateOpCreateProject struct {
}

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

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

type validateOpCreateReportGroup struct {
}

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

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

type validateOpCreateWebhook struct {
}

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

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

type validateOpDeleteBuildBatch struct {
}

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

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

type validateOpDeleteProject struct {
}

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

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

type validateOpDeleteReportGroup struct {
}

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

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

type validateOpDeleteReport struct {
}

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

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

type validateOpDeleteResourcePolicy struct {
}

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

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

type validateOpDeleteSourceCredentials struct {
}

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

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

type validateOpDeleteWebhook struct {
}

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

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

type validateOpDescribeCodeCoverages struct {
}

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

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

type validateOpDescribeTestCases struct {
}

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

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

type validateOpGetReportGroupTrend struct {
}

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

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

type validateOpGetResourcePolicy struct {
}

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

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

type validateOpImportSourceCredentials struct {
}

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

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

type validateOpInvalidateProjectCache struct {
}

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

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

type validateOpListBuildsForProject struct {
}

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

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

type validateOpListReportsForReportGroup struct {
}

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

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

type validateOpPutResourcePolicy struct {
}

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

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

type validateOpStartBuildBatch struct {
}

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

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

type validateOpStartBuild struct {
}

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

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

type validateOpStopBuildBatch struct {
}

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

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

type validateOpStopBuild struct {
}

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

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

type validateOpUpdateProject struct {
}

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

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

type validateOpUpdateProjectVisibility struct {
}

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

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

type validateOpUpdateReportGroup struct {
}

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

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

type validateOpUpdateWebhook struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateCloudWatchLogsConfig(v *types.CloudWatchLogsConfig) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLogsConfig"}
	if len(v.Status) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Status"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

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

func validateLogsConfig(v *types.LogsConfig) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "LogsConfig"}
	if v.CloudWatchLogs != nil {
		if err := validateCloudWatchLogsConfig(v.CloudWatchLogs); err != nil {
			invalidParams.AddNested("CloudWatchLogs", err.(smithy.InvalidParamsError))
		}
	}
	if v.S3Logs != nil {
		if err := validateS3LogsConfig(v.S3Logs); err != nil {
			invalidParams.AddNested("S3Logs", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

func validateProjectEnvironment(v *types.ProjectEnvironment) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ProjectEnvironment"}
	if len(v.Type) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Type"))
	}
	if v.Image == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Image"))
	}
	if len(v.ComputeType) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("ComputeType"))
	}
	if v.EnvironmentVariables != nil {
		if err := validateEnvironmentVariables(v.EnvironmentVariables); err != nil {
			invalidParams.AddNested("EnvironmentVariables", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistryCredential != nil {
		if err := validateRegistryCredential(v.RegistryCredential); err != nil {
			invalidParams.AddNested("RegistryCredential", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateProjectSource(v *types.ProjectSource) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ProjectSource"}
	if len(v.Type) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Type"))
	}
	if v.GitSubmodulesConfig != nil {
		if err := validateGitSubmodulesConfig(v.GitSubmodulesConfig); err != nil {
			invalidParams.AddNested("GitSubmodulesConfig", err.(smithy.InvalidParamsError))
		}
	}
	if v.Auth != nil {
		if err := validateSourceAuth(v.Auth); err != nil {
			invalidParams.AddNested("Auth", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateProjectSourceVersion(v *types.ProjectSourceVersion) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ProjectSourceVersion"}
	if v.SourceIdentifier == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier"))
	}
	if v.SourceVersion == nil {
		invalidParams.Add(smithy.NewErrParamRequired("SourceVersion"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateRegistryCredential(v *types.RegistryCredential) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RegistryCredential"}
	if v.Credential == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Credential"))
	}
	if len(v.CredentialProvider) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("CredentialProvider"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateS3LogsConfig(v *types.S3LogsConfig) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "S3LogsConfig"}
	if len(v.Status) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Status"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateWebhookFilter(v *types.WebhookFilter) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "WebhookFilter"}
	if len(v.Type) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Type"))
	}
	if v.Pattern == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Pattern"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

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

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

func validateOpCreateProjectInput(v *CreateProjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateProjectInput"}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.Source == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Source"))
	} else if v.Source != nil {
		if err := validateProjectSource(v.Source); err != nil {
			invalidParams.AddNested("Source", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySources != nil {
		if err := validateProjectSources(v.SecondarySources); err != nil {
			invalidParams.AddNested("SecondarySources", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySourceVersions != nil {
		if err := validateProjectSecondarySourceVersions(v.SecondarySourceVersions); err != nil {
			invalidParams.AddNested("SecondarySourceVersions", err.(smithy.InvalidParamsError))
		}
	}
	if v.Artifacts == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Artifacts"))
	} else if v.Artifacts != nil {
		if err := validateProjectArtifacts(v.Artifacts); err != nil {
			invalidParams.AddNested("Artifacts", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondaryArtifacts != nil {
		if err := validateProjectArtifactsList(v.SecondaryArtifacts); err != nil {
			invalidParams.AddNested("SecondaryArtifacts", err.(smithy.InvalidParamsError))
		}
	}
	if v.Cache != nil {
		if err := validateProjectCache(v.Cache); err != nil {
			invalidParams.AddNested("Cache", err.(smithy.InvalidParamsError))
		}
	}
	if v.Environment == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Environment"))
	} else if v.Environment != nil {
		if err := validateProjectEnvironment(v.Environment); err != nil {
			invalidParams.AddNested("Environment", err.(smithy.InvalidParamsError))
		}
	}
	if v.ServiceRole == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ServiceRole"))
	}
	if v.LogsConfig != nil {
		if err := validateLogsConfig(v.LogsConfig); err != nil {
			invalidParams.AddNested("LogsConfig", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpCreateWebhookInput(v *CreateWebhookInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateWebhookInput"}
	if v.ProjectName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectName"))
	}
	if v.FilterGroups != nil {
		if err := validateFilterGroups(v.FilterGroups); err != nil {
			invalidParams.AddNested("FilterGroups", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

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

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

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

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

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

func validateOpGetReportGroupTrendInput(v *GetReportGroupTrendInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetReportGroupTrendInput"}
	if v.ReportGroupArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ReportGroupArn"))
	}
	if len(v.TrendField) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("TrendField"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpImportSourceCredentialsInput(v *ImportSourceCredentialsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ImportSourceCredentialsInput"}
	if v.Token == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Token"))
	}
	if len(v.ServerType) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("ServerType"))
	}
	if len(v.AuthType) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("AuthType"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

func validateOpStartBuildBatchInput(v *StartBuildBatchInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartBuildBatchInput"}
	if v.ProjectName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectName"))
	}
	if v.SecondarySourcesOverride != nil {
		if err := validateProjectSources(v.SecondarySourcesOverride); err != nil {
			invalidParams.AddNested("SecondarySourcesOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySourcesVersionOverride != nil {
		if err := validateProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride); err != nil {
			invalidParams.AddNested("SecondarySourcesVersionOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.ArtifactsOverride != nil {
		if err := validateProjectArtifacts(v.ArtifactsOverride); err != nil {
			invalidParams.AddNested("ArtifactsOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondaryArtifactsOverride != nil {
		if err := validateProjectArtifactsList(v.SecondaryArtifactsOverride); err != nil {
			invalidParams.AddNested("SecondaryArtifactsOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.EnvironmentVariablesOverride != nil {
		if err := validateEnvironmentVariables(v.EnvironmentVariablesOverride); err != nil {
			invalidParams.AddNested("EnvironmentVariablesOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SourceAuthOverride != nil {
		if err := validateSourceAuth(v.SourceAuthOverride); err != nil {
			invalidParams.AddNested("SourceAuthOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.GitSubmodulesConfigOverride != nil {
		if err := validateGitSubmodulesConfig(v.GitSubmodulesConfigOverride); err != nil {
			invalidParams.AddNested("GitSubmodulesConfigOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.CacheOverride != nil {
		if err := validateProjectCache(v.CacheOverride); err != nil {
			invalidParams.AddNested("CacheOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.LogsConfigOverride != nil {
		if err := validateLogsConfig(v.LogsConfigOverride); err != nil {
			invalidParams.AddNested("LogsConfigOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistryCredentialOverride != nil {
		if err := validateRegistryCredential(v.RegistryCredentialOverride); err != nil {
			invalidParams.AddNested("RegistryCredentialOverride", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpStartBuildInput(v *StartBuildInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartBuildInput"}
	if v.ProjectName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectName"))
	}
	if v.SecondarySourcesOverride != nil {
		if err := validateProjectSources(v.SecondarySourcesOverride); err != nil {
			invalidParams.AddNested("SecondarySourcesOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySourcesVersionOverride != nil {
		if err := validateProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride); err != nil {
			invalidParams.AddNested("SecondarySourcesVersionOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.ArtifactsOverride != nil {
		if err := validateProjectArtifacts(v.ArtifactsOverride); err != nil {
			invalidParams.AddNested("ArtifactsOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondaryArtifactsOverride != nil {
		if err := validateProjectArtifactsList(v.SecondaryArtifactsOverride); err != nil {
			invalidParams.AddNested("SecondaryArtifactsOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.EnvironmentVariablesOverride != nil {
		if err := validateEnvironmentVariables(v.EnvironmentVariablesOverride); err != nil {
			invalidParams.AddNested("EnvironmentVariablesOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.SourceAuthOverride != nil {
		if err := validateSourceAuth(v.SourceAuthOverride); err != nil {
			invalidParams.AddNested("SourceAuthOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.GitSubmodulesConfigOverride != nil {
		if err := validateGitSubmodulesConfig(v.GitSubmodulesConfigOverride); err != nil {
			invalidParams.AddNested("GitSubmodulesConfigOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.CacheOverride != nil {
		if err := validateProjectCache(v.CacheOverride); err != nil {
			invalidParams.AddNested("CacheOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.LogsConfigOverride != nil {
		if err := validateLogsConfig(v.LogsConfigOverride); err != nil {
			invalidParams.AddNested("LogsConfigOverride", err.(smithy.InvalidParamsError))
		}
	}
	if v.RegistryCredentialOverride != nil {
		if err := validateRegistryCredential(v.RegistryCredentialOverride); err != nil {
			invalidParams.AddNested("RegistryCredentialOverride", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

func validateOpUpdateProjectInput(v *UpdateProjectInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"}
	if v.Name == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Name"))
	}
	if v.Source != nil {
		if err := validateProjectSource(v.Source); err != nil {
			invalidParams.AddNested("Source", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySources != nil {
		if err := validateProjectSources(v.SecondarySources); err != nil {
			invalidParams.AddNested("SecondarySources", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondarySourceVersions != nil {
		if err := validateProjectSecondarySourceVersions(v.SecondarySourceVersions); err != nil {
			invalidParams.AddNested("SecondarySourceVersions", err.(smithy.InvalidParamsError))
		}
	}
	if v.Artifacts != nil {
		if err := validateProjectArtifacts(v.Artifacts); err != nil {
			invalidParams.AddNested("Artifacts", err.(smithy.InvalidParamsError))
		}
	}
	if v.SecondaryArtifacts != nil {
		if err := validateProjectArtifactsList(v.SecondaryArtifacts); err != nil {
			invalidParams.AddNested("SecondaryArtifacts", err.(smithy.InvalidParamsError))
		}
	}
	if v.Cache != nil {
		if err := validateProjectCache(v.Cache); err != nil {
			invalidParams.AddNested("Cache", err.(smithy.InvalidParamsError))
		}
	}
	if v.Environment != nil {
		if err := validateProjectEnvironment(v.Environment); err != nil {
			invalidParams.AddNested("Environment", err.(smithy.InvalidParamsError))
		}
	}
	if v.LogsConfig != nil {
		if err := validateLogsConfig(v.LogsConfig); err != nil {
			invalidParams.AddNested("LogsConfig", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpUpdateProjectVisibilityInput(v *UpdateProjectVisibilityInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectVisibilityInput"}
	if v.ProjectArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectArn"))
	}
	if len(v.ProjectVisibility) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectVisibility"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

func validateOpUpdateWebhookInput(v *UpdateWebhookInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UpdateWebhookInput"}
	if v.ProjectName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProjectName"))
	}
	if v.FilterGroups != nil {
		if err := validateFilterGroups(v.FilterGroups); err != nil {
			invalidParams.AddNested("FilterGroups", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}
