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


package devops

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

type validateOpAuthorizeFirewallRules struct {
}

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

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

type validateOpCreateBackupRule struct {
}

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

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

type validateOpCreateFirewallGroup struct {
}

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

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

type validateOpCreateInstance struct {
}

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

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

type validateOpCreateParameterGroup struct {
}

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

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

type validateOpDeleteBackup struct {
}

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

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

type validateOpDeleteBackupRule struct {
}

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

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

type validateOpDeleteFirewallGroup struct {
}

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

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

type validateOpDeleteInstance struct {
}

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

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

type validateOpDeleteParameterGroup struct {
}

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

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

type validateOpExtendDisk struct {
}

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

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

type validateOpGetBackup struct {
}

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

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

type validateOpGetBackupRule struct {
}

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

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

type validateOpGetFirewallGroup struct {
}

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

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

type validateOpGetInstance struct {
}

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

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

type validateOpGetInstanceMetrics struct {
}

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

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

type validateOpGetParameterGroup struct {
}

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

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

type validateOpRebootInstance struct {
}

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

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

type validateOpRestoreInstance struct {
}

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

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

type validateOpRevokeFirewallRules struct {
}

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

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

type validateOpSetupAlert struct {
}

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

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

type validateOpUpdateBackupRule struct {
}

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

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

type validateOpUpdateFirewallGroup struct {
}

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

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

type validateOpUpdateInstance struct {
}

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

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

type validateOpUpdateNetworkInterface struct {
}

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

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

type validateOpUpdateParameterGroup struct {
}

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

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

type validateOpUpgradeInstance struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateRequestRules(v *types.RequestRules) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RequestRules"}
	if len(v.CidrIp) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("CidrIp"))
	}
	if len(v.Protocol) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("Protocol"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpAuthorizeFirewallRulesInput(v *AuthorizeFirewallRulesInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "AuthorizeFirewallRulesInput"}
	if v.FirewallGroupName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("FirewallGroupName"))
	}
	if v.Rules == nil {
	invalidParams.Add(smithy.NewErrParamRequired("Rules"))
	} else if v.Rules != nil {
		if err := validateListOfRequestRules(v.Rules); err != nil {
			invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpCreateBackupRuleInput(v *CreateBackupRuleInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateBackupRuleInput"}
	if v.BackupRuleName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("BackupRuleName"))
	}
	if v.InstanceId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpCreateInstanceInput(v *CreateInstanceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceInput"}
	if v.DiskSize == nil {
	invalidParams.Add(smithy.NewErrParamRequired("DiskSize"))
	}
	if v.FirewallGroupName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("FirewallGroupName"))
	}
	if v.InitialRootPassword == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InitialRootPassword"))
	}
	if v.InstanceId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
	}
	if len(v.InstanceType) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceType"))
	}
	if v.ParameterGroupName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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

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

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

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

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

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

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

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

func validateOpGetInstanceMetricsInput(v *GetInstanceMetricsInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "GetInstanceMetricsInput"}
	if v.EndTime == nil {
	invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
	}
	if v.InstanceId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
	}
	if v.MetricsName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("MetricsName"))
	}
	if v.StartTime == nil {
	invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

func validateOpRestoreInstanceInput(v *RestoreInstanceInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RestoreInstanceInput"}
	if v.BackupId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("BackupId"))
	}
	if v.DiskSize == nil {
	invalidParams.Add(smithy.NewErrParamRequired("DiskSize"))
	}
	if v.FirewallGroupName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("FirewallGroupName"))
	}
	if v.InstanceId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
	}
	if len(v.InstanceType) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceType"))
	}
	if v.ParameterGroupName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpSetupAlertInput(v *SetupAlertInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "SetupAlertInput"}
	if v.InstanceId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
	}
	if v.To == nil {
	invalidParams.Add(smithy.NewErrParamRequired("To"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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

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

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