예제 #1
0
 /// <summary>
 /// Initializes a new instance of the BackupScheduleInner class.
 /// </summary>
 /// <param name="scheduleRecurrence">The schedule recurrence.</param>
 /// <param name="backupType">The type of backup which needs to be
 /// taken. Possible values include: 'LocalSnapshot',
 /// 'CloudSnapshot'</param>
 /// <param name="retentionCount">The number of backups to be
 /// retained.</param>
 /// <param name="startTime">The start time of the schedule.</param>
 /// <param name="scheduleStatus">The schedule status. Possible values
 /// include: 'Enabled', 'Disabled'</param>
 /// <param name="id">The path ID that uniquely identifies the
 /// object.</param>
 /// <param name="name">The name of the object.</param>
 /// <param name="type">The hierarchical type of the object.</param>
 /// <param name="kind">The Kind of the object. Currently only
 /// Series8000 is supported. Possible values include:
 /// 'Series8000'</param>
 /// <param name="lastSuccessfulRun">The last successful backup run
 /// which was triggered for the schedule.</param>
 public BackupScheduleInner(ScheduleRecurrence scheduleRecurrence, BackupType backupType, long retentionCount, System.DateTime startTime, ScheduleStatus scheduleStatus, string id = default(string), string name = default(string), string type = default(string), Kind?kind = default(Kind?), System.DateTime?lastSuccessfulRun = default(System.DateTime?))
     : base(id, name, type, kind)
 {
     ScheduleRecurrence = scheduleRecurrence;
     BackupType         = backupType;
     RetentionCount     = retentionCount;
     StartTime          = startTime;
     ScheduleStatus     = scheduleStatus;
     LastSuccessfulRun  = lastSuccessfulRun;
     CustomInit();
 }
예제 #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ScheduleRecurrence == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ScheduleRecurrence");
     }
     if (ScheduleRecurrence != null)
     {
         ScheduleRecurrence.Validate();
     }
 }