Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. Code generated by Microsoft (R) AutoRest Code Generator.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */
package com.microsoft.azure.management.appservice; import org.joda.time.DateTime; import com.fasterxml.jackson.annotation.JsonProperty;
Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy.
/** * Description of a backup schedule. Describes how often should be the backup * performed and what should be the retention policy. */
public class BackupSchedule {
How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day).
/** * How often the backup should be executed (e.g. for weekly backup, this * should be set to 7 and FrequencyUnit should be set to Day). */
@JsonProperty(value = "frequencyInterval", required = true) private int frequencyInterval;
The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'.
/** * The unit of time for how often the backup should be executed (e.g. for * weekly backup, this should be set to Day and FrequencyInterval should be * set to 7). Possible values include: 'Day', 'Hour'. */
@JsonProperty(value = "frequencyUnit", required = true) private FrequencyUnit frequencyUnit;
True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
/** * True if the retention policy should always keep at least one backup in * the storage account, regardless how old it is; false otherwise. */
@JsonProperty(value = "keepAtLeastOneBackup", required = true) private boolean keepAtLeastOneBackup;
After how many days backups should be deleted.
/** * After how many days backups should be deleted. */
@JsonProperty(value = "retentionPeriodInDays", required = true) private int retentionPeriodInDays;
When the schedule should start working.
/** * When the schedule should start working. */
@JsonProperty(value = "startTime") private DateTime startTime;
Last time when this schedule was triggered.
/** * Last time when this schedule was triggered. */
@JsonProperty(value = "lastExecutionTime", access = JsonProperty.Access.WRITE_ONLY) private DateTime lastExecutionTime;
Get how often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day).
Returns:the frequencyInterval value
/** * Get how often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day). * * @return the frequencyInterval value */
public int frequencyInterval() { return this.frequencyInterval; }
Set how often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day).
Params:
  • frequencyInterval – the frequencyInterval value to set
Returns:the BackupSchedule object itself.
/** * Set how often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day). * * @param frequencyInterval the frequencyInterval value to set * @return the BackupSchedule object itself. */
public BackupSchedule withFrequencyInterval(int frequencyInterval) { this.frequencyInterval = frequencyInterval; return this; }
Get the unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'.
Returns:the frequencyUnit value
/** * Get the unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'. * * @return the frequencyUnit value */
public FrequencyUnit frequencyUnit() { return this.frequencyUnit; }
Set the unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'.
Params:
  • frequencyUnit – the frequencyUnit value to set
Returns:the BackupSchedule object itself.
/** * Set the unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'. * * @param frequencyUnit the frequencyUnit value to set * @return the BackupSchedule object itself. */
public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit) { this.frequencyUnit = frequencyUnit; return this; }
Get true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
Returns:the keepAtLeastOneBackup value
/** * Get true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. * * @return the keepAtLeastOneBackup value */
public boolean keepAtLeastOneBackup() { return this.keepAtLeastOneBackup; }
Set true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
Params:
  • keepAtLeastOneBackup – the keepAtLeastOneBackup value to set
Returns:the BackupSchedule object itself.
/** * Set true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. * * @param keepAtLeastOneBackup the keepAtLeastOneBackup value to set * @return the BackupSchedule object itself. */
public BackupSchedule withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup) { this.keepAtLeastOneBackup = keepAtLeastOneBackup; return this; }
Get after how many days backups should be deleted.
Returns:the retentionPeriodInDays value
/** * Get after how many days backups should be deleted. * * @return the retentionPeriodInDays value */
public int retentionPeriodInDays() { return this.retentionPeriodInDays; }
Set after how many days backups should be deleted.
Params:
  • retentionPeriodInDays – the retentionPeriodInDays value to set
Returns:the BackupSchedule object itself.
/** * Set after how many days backups should be deleted. * * @param retentionPeriodInDays the retentionPeriodInDays value to set * @return the BackupSchedule object itself. */
public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays) { this.retentionPeriodInDays = retentionPeriodInDays; return this; }
Get when the schedule should start working.
Returns:the startTime value
/** * Get when the schedule should start working. * * @return the startTime value */
public DateTime startTime() { return this.startTime; }
Set when the schedule should start working.
Params:
  • startTime – the startTime value to set
Returns:the BackupSchedule object itself.
/** * Set when the schedule should start working. * * @param startTime the startTime value to set * @return the BackupSchedule object itself. */
public BackupSchedule withStartTime(DateTime startTime) { this.startTime = startTime; return this; }
Get last time when this schedule was triggered.
Returns:the lastExecutionTime value
/** * Get last time when this schedule was triggered. * * @return the lastExecutionTime value */
public DateTime lastExecutionTime() { return this.lastExecutionTime; } }