// 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 *UnshareTarget) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UnshareTarget"}
	if s.Id == nil {
		invalidParams.Add(request.NewErrParamRequired("Id"))
	}
	if s.Id != nil && len(*s.Id) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Id", 1))
	}
	if s.Type == nil {
		invalidParams.Add(request.NewErrParamRequired("Type"))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * UnshareTarget ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . Id == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Id != nil && len ( * s . Id ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . Type == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } 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 .