/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Kind == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); } if (Group != null) { Group.Validate(); } if (ServiceAccount != null) { ServiceAccount.Validate(); } if (User != null) { User.Validate(); } }