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


package devopsrunner

import (
	"context"
	"fmt"
	"github.com/aws/smithy-go/middleware"
	smithy "github.com/aws/smithy-go"
)

type validateOpCreateRunner struct {
}

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

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

type validateOpCreateRunnerParameterGroup struct {
}

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

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

type validateOpDeleteRunner struct {
}

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

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

type validateOpDeleteRunnerParameterGroup struct {
}

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

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

type validateOpGetRunner struct {
}

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

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

type validateOpGetRunnerMetrics struct {
}

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

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

type validateOpGetRunnerParameterGroup struct {
}

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

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

type validateOpListRunnerRegistrations struct {
}

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

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

type validateOpModifyRunnerInstanceType struct {
}

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

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

type validateOpRegisterRunner struct {
}

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

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

type validateOpSetupRunnerAlert struct {
}

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

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

type validateOpUnregisterRunner struct {
}

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

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

type validateOpUpdateRunner struct {
}

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

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

type validateOpUpdateRunnerParameterGroup struct {
}

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

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

type validateOpUpdateRunnerParameter struct {
}

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

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

type validateOpUpdateRunnerRegistration struct {
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func validateOpCreateRunnerInput(v *CreateRunnerInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CreateRunnerInput"}
	if len(v.InstanceType) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceType"))
	}
	if v.RunnerName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("RunnerName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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

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

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

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

func validateOpModifyRunnerInstanceTypeInput(v *ModifyRunnerInstanceTypeInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "ModifyRunnerInstanceTypeInput"}
	if len(v.InstanceType) == 0 {
	invalidParams.Add(smithy.NewErrParamRequired("InstanceType"))
	}
	if v.RunnerName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("RunnerName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

func validateOpRegisterRunnerInput(v *RegisterRunnerInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "RegisterRunnerInput"}
	if v.AuthenticationToken == nil {
	invalidParams.Add(smithy.NewErrParamRequired("AuthenticationToken"))
	}
	if v.GitlabUrl == nil {
	invalidParams.Add(smithy.NewErrParamRequired("GitlabUrl"))
	}
	if v.RunnerName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("RunnerName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

func validateOpUnregisterRunnerInput(v *UnregisterRunnerInput) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "UnregisterRunnerInput"}
	if v.RegistrationId == nil {
	invalidParams.Add(smithy.NewErrParamRequired("RegistrationId"))
	}
	if v.RunnerName == nil {
	invalidParams.Add(smithy.NewErrParamRequired("RunnerName"))
	}
	if invalidParams.Len() > 0 {
	return invalidParams
	} else {
	return nil
	}
}

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

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

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

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