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

package neptunedata

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

type validateOpCancelGremlinQuery struct {
}

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

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

type validateOpCancelLoaderJob struct {
}

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

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

type validateOpCancelMLDataProcessingJob struct {
}

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

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

type validateOpCancelMLModelTrainingJob struct {
}

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

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

type validateOpCancelMLModelTransformJob struct {
}

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

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

type validateOpCancelOpenCypherQuery struct {
}

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

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

type validateOpDeleteMLEndpoint struct {
}

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

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

type validateOpExecuteFastReset struct {
}

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

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

type validateOpExecuteGremlinExplainQuery struct {
}

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

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

type validateOpExecuteGremlinProfileQuery struct {
}

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

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

type validateOpExecuteGremlinQuery struct {
}

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

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

type validateOpExecuteOpenCypherExplainQuery struct {
}

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

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

type validateOpExecuteOpenCypherQuery struct {
}

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

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

type validateOpGetGremlinQueryStatus struct {
}

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

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

type validateOpGetLoaderJobStatus struct {
}

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

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

type validateOpGetMLDataProcessingJob struct {
}

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

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

type validateOpGetMLEndpoint struct {
}

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

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

type validateOpGetMLModelTrainingJob struct {
}

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

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

type validateOpGetMLModelTransformJob struct {
}

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

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

type validateOpGetOpenCypherQueryStatus struct {
}

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

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

type validateOpStartLoaderJob struct {
}

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

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

type validateOpStartMLDataProcessingJob struct {
}

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

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

type validateOpStartMLModelTrainingJob struct {
}

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

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

type validateOpStartMLModelTransformJob struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateOpExecuteFastResetInput(v *ExecuteFastResetInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ExecuteFastResetInput"}
	if len(v.Action) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Action"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

func validateOpExecuteOpenCypherExplainQueryInput(v *ExecuteOpenCypherExplainQueryInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ExecuteOpenCypherExplainQueryInput"}
	if v.OpenCypherQuery == nil {
		invalidParams.Add(smithy.NewErrParamRequired("OpenCypherQuery"))
	}
	if len(v.ExplainMode) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("ExplainMode"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

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

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

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

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

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

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

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

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

func validateOpStartLoaderJobInput(v *StartLoaderJobInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartLoaderJobInput"}
	if v.Source == nil {
		invalidParams.Add(smithy.NewErrParamRequired("Source"))
	}
	if len(v.Format) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("Format"))
	}
	if len(v.S3BucketRegion) == 0 {
		invalidParams.Add(smithy.NewErrParamRequired("S3BucketRegion"))
	}
	if v.IamRoleArn == nil {
		invalidParams.Add(smithy.NewErrParamRequired("IamRoleArn"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpStartMLDataProcessingJobInput(v *StartMLDataProcessingJobInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartMLDataProcessingJobInput"}
	if v.InputDataS3Location == nil {
		invalidParams.Add(smithy.NewErrParamRequired("InputDataS3Location"))
	}
	if v.ProcessedDataS3Location == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ProcessedDataS3Location"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpStartMLModelTrainingJobInput(v *StartMLModelTrainingJobInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartMLModelTrainingJobInput"}
	if v.DataProcessingJobId == nil {
		invalidParams.Add(smithy.NewErrParamRequired("DataProcessingJobId"))
	}
	if v.TrainModelS3Location == nil {
		invalidParams.Add(smithy.NewErrParamRequired("TrainModelS3Location"))
	}
	if v.CustomModelTrainingParameters != nil {
		if err := validateCustomModelTrainingParameters(v.CustomModelTrainingParameters); err != nil {
			invalidParams.AddNested("CustomModelTrainingParameters", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}

func validateOpStartMLModelTransformJobInput(v *StartMLModelTransformJobInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "StartMLModelTransformJobInput"}
	if v.ModelTransformOutputS3Location == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ModelTransformOutputS3Location"))
	}
	if v.CustomModelTransformParameters != nil {
		if err := validateCustomModelTransformParameters(v.CustomModelTransformParameters); err != nil {
			invalidParams.AddNested("CustomModelTransformParameters", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}
