/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (BackupRequestName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BackupRequestName");
     }
     if (StorageAccountUrl == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccountUrl");
     }
     if (BackupSchedule != null)
     {
         BackupSchedule.Validate();
     }
     if (Databases != null)
     {
         foreach (var element in Databases)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (BackupSchedule != null)
     {
         BackupSchedule.Validate();
     }
     if (Databases != null)
     {
         foreach (var element in Databases)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }