// 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.
// Validate inspects the fields of the type to determine if they are valid .
func (s *UpdateDatasetInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateDatasetInput"}
	if s.Input == nil {
		invalidParams.Add(request.NewErrParamRequired("Input"))
	}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.FormatOptions != nil {
		if err := s.FormatOptions.Validate(); err != nil {
			invalidParams.AddNested("FormatOptions", err.(request.ErrInvalidParams))
		}
	}
	if s.Input != nil {
		if err := s.Input.Validate(); err != nil {
			invalidParams.AddNested("Input", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * UpdateDatasetInput ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . Input == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Name == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Name != nil && len ( * s . Name ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . FormatOptions != nil { if err := s . FormatOptions . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . Input != nil { if err := s . Input . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , 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 .