private static WeeklyScheduleOptions CreateWeeklyScheduleOptions(Microsoft.Azure.Management.Automation.Models.AdvancedSchedule advSchedule) { return(advSchedule == null ? null : new WeeklyScheduleOptions() { DaysOfWeek = advSchedule.WeekDays }); }
/// <summary> /// Initializes a new instance of the ScheduleCreateOrUpdateParameters /// class. /// </summary> /// <param name="name">Gets or sets the name of the Schedule.</param> /// <param name="startTime">Gets or sets the start time of the /// schedule.</param> /// <param name="frequency">Gets or sets the frequency of the schedule. /// Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', /// 'Minute'</param> /// <param name="description">Gets or sets the description of the /// schedule.</param> /// <param name="expiryTime">Gets or sets the end time of the /// schedule.</param> /// <param name="interval">Gets or sets the interval of the /// schedule.</param> /// <param name="timeZone">Gets or sets the time zone of the /// schedule.</param> /// <param name="advancedSchedule">Gets or sets the /// AdvancedSchedule.</param> public ScheduleCreateOrUpdateParameters(string name, System.DateTimeOffset startTime, string frequency, string description = default(string), System.DateTimeOffset?expiryTime = default(System.DateTimeOffset?), object interval = default(object), string timeZone = default(string), AdvancedSchedule advancedSchedule = default(AdvancedSchedule)) { Name = name; Description = description; StartTime = startTime; ExpiryTime = expiryTime; Interval = interval; Frequency = frequency; TimeZone = timeZone; AdvancedSchedule = advancedSchedule; CustomInit(); }
/// <summary> /// Initializes a new instance of the ScheduleProperties class. /// </summary> /// <param name="startTime">Gets or sets the start time of the /// schedule.</param> /// <param name="startTimeOffsetMinutes">Gets the start time's offset /// in minutes.</param> /// <param name="expiryTime">Gets or sets the end time of the /// schedule.</param> /// <param name="expiryTimeOffsetMinutes">Gets or sets the expiry /// time's offset in minutes.</param> /// <param name="isEnabled">Gets or sets a value indicating whether /// this schedule is enabled.</param> /// <param name="nextRun">Gets or sets the next run time of the /// schedule.</param> /// <param name="nextRunOffsetMinutes">Gets or sets the next run time's /// offset in minutes.</param> /// <param name="interval">Gets or sets the interval of the /// schedule.</param> /// <param name="frequency">Gets or sets the frequency of the schedule. /// Possible values include: 'OneTime', 'Day', 'Hour', 'Week', /// 'Month'</param> /// <param name="timeZone">Gets or sets the time zone of the /// schedule.</param> /// <param name="advancedSchedule">Gets or sets the advanced /// schedule.</param> /// <param name="creationTime">Gets or sets the creation time.</param> /// <param name="lastModifiedTime">Gets or sets the last modified /// time.</param> /// <param name="description">Gets or sets the description.</param> public ScheduleProperties(System.DateTimeOffset startTime = default(System.DateTimeOffset), double startTimeOffsetMinutes = default(double), System.DateTimeOffset?expiryTime = default(System.DateTimeOffset?), double expiryTimeOffsetMinutes = default(double), bool?isEnabled = default(bool?), System.DateTimeOffset?nextRun = default(System.DateTimeOffset?), double nextRunOffsetMinutes = default(double), int?interval = default(int?), string frequency = default(string), string timeZone = default(string), AdvancedSchedule advancedSchedule = default(AdvancedSchedule), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string)) { StartTime = startTime; StartTimeOffsetMinutes = startTimeOffsetMinutes; ExpiryTime = expiryTime; ExpiryTimeOffsetMinutes = expiryTimeOffsetMinutes; IsEnabled = isEnabled; NextRun = nextRun; NextRunOffsetMinutes = nextRunOffsetMinutes; Interval = interval; Frequency = frequency; TimeZone = timeZone; AdvancedSchedule = advancedSchedule; CreationTime = creationTime; LastModifiedTime = lastModifiedTime; Description = description; CustomInit(); }
private static MonthlyScheduleOptions CreateMonthlyScheduleOptions( Microsoft.Azure.Management.Automation.Models.AdvancedSchedule advSchedule) { return(advSchedule == null || (advSchedule.MonthDays == null && advSchedule.MonthlyOccurrences == null) ? null : new MonthlyScheduleOptions() { DaysOfMonth = GetDaysOfMonth(advSchedule.MonthDays), DayOfWeek = IsMonthlyOccurrenceNull(advSchedule) ? null : new DayOfWeek() { Day = advSchedule.MonthlyOccurrences.First().Day, Occurrence = GetDayOfWeekOccurrence(advSchedule.MonthlyOccurrences.First().Occurrence) } }); }