// 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 *CreateProjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"}
	if s.DatasetName == nil {
		invalidParams.Add(request.NewErrParamRequired("DatasetName"))
	}
	if s.DatasetName != nil && len(*s.DatasetName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
	}
	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.RecipeName == nil {
		invalidParams.Add(request.NewErrParamRequired("RecipeName"))
	}
	if s.RecipeName != nil && len(*s.RecipeName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("RecipeName", 1))
	}
	if s.RoleArn == nil {
		invalidParams.Add(request.NewErrParamRequired("RoleArn"))
	}
	if s.RoleArn != nil && len(*s.RoleArn) < 20 {
		invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
	}
	if s.Tags != nil && len(s.Tags) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
	}
	if s.Sample != nil {
		if err := s.Sample.Validate(); err != nil {
			invalidParams.AddNested("Sample", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * CreateProjectInput ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . DatasetName == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . DatasetName != nil && len ( * s . DatasetName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . Name == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Name != nil && len ( * s . Name ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . RecipeName == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . RecipeName != nil && len ( * s . RecipeName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . RoleArn == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . RoleArn != nil && len ( * s . RoleArn ) < 20 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 20 ) ) } if s . Tags != nil && len ( s . Tags ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . Sample != nil { if err := s . Sample . 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 .