func (s *RegisterTaskDefinitionInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"}
	if s.ContainerDefinitions == nil {
		invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions"))
	}
	if s.Family == nil {
		invalidParams.Add(request.NewErrParamRequired("Family"))
	}
	if s.ContainerDefinitions != nil {
		for i, v := range s.ContainerDefinitions {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.InferenceAccelerators != nil {
		for i, v := range s.InferenceAccelerators {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InferenceAccelerators", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.ProxyConfiguration != nil {
		if err := s.ProxyConfiguration.Validate(); err != nil {
			invalidParams.AddNested("ProxyConfiguration", err.(request.ErrInvalidParams))
		}
	}
	if s.Tags != nil {
		for i, v := range s.Tags {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func (s *RegisterTaskDefinitionInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"}
	if s.ContainerDefinitions == nil {
		invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions"))
	}
	if s.Family == nil {
		invalidParams.Add(request.NewErrParamRequired("Family"))
	}
	if s.ContainerDefinitions != nil {
		for i, v := range s.ContainerDefinitions {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.InferenceAccelerators != nil {
		for i, v := range s.InferenceAccelerators {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InferenceAccelerators", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.ProxyConfiguration != nil {
		if err := s.ProxyConfiguration.Validate(); err != nil {
			invalidParams.AddNested("ProxyConfiguration", err.(request.ErrInvalidParams))
		}
	}
	if s.Tags != nil {
		for i, v := range s.Tags {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * RegisterTaskDefinitionInput ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . ContainerDefinitions == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Family == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . ContainerDefinitions != nil { for i , v := range s . ContainerDefinitions { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if s . InferenceAccelerators != nil { for i , v := range s . InferenceAccelerators { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if s . ProxyConfiguration != nil { if err := s . ProxyConfiguration . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . Tags != nil { for i , v := range s . Tags { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .