// 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 *CreateDirectoryInput) Validate() error {
	invalidParams := aws.ErrInvalidParams{Context: "CreateDirectoryInput"}
	if s.Name == nil {
		invalidParams.Add(aws.NewErrParamRequired("Name"))
	}
	if s.Password == nil {
		invalidParams.Add(aws.NewErrParamRequired("Password"))
	}
	if len(s.Size) == 0 {
		invalidParams.Add(aws.NewErrParamRequired("Size"))
	}
	if s.VpcSettings != nil {
		if err := s.VpcSettings.Validate(); err != nil {
			invalidParams.AddNested("VpcSettings", err.(aws.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * CreateDirectoryInput ) Validate ( ) error { invalidParams := aws . ErrInvalidParams { Context : " " } if s . Name == nil { invalidParams . Add ( aws . NewErrParamRequired ( " " ) ) } if s . Password == nil { invalidParams . Add ( aws . NewErrParamRequired ( " " ) ) } if len ( s . Size ) == 0 { invalidParams . Add ( aws . NewErrParamRequired ( " " ) ) } if s . VpcSettings != nil { if err := s . VpcSettings . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( aws . 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 .