Class BackupSchedule
- java.lang.Object
-
- com.azure.resourcemanager.appservice.models.BackupSchedule
-
public final class BackupSchedule extends Object
Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy.
-
-
Constructor Summary
Constructors Constructor Description BackupSchedule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfrequencyInterval()Get the frequencyInterval property: How often the backup should be executed (e.g.FrequencyUnitfrequencyUnit()Get the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.booleankeepAtLeastOneBackup()Get the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.OffsetDateTimelastExecutionTime()Get the lastExecutionTime property: Last time when this schedule was triggered.intretentionPeriodInDays()Get the retentionPeriodInDays property: After how many days backups should be deleted.OffsetDateTimestartTime()Get the startTime property: When the schedule should start working.voidvalidate()Validates the instance.BackupSchedulewithFrequencyInterval(int frequencyInterval)Set the frequencyInterval property: How often the backup should be executed (e.g.BackupSchedulewithFrequencyUnit(FrequencyUnit frequencyUnit)Set the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.BackupSchedulewithKeepAtLeastOneBackup(boolean keepAtLeastOneBackup)Set the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.BackupSchedulewithRetentionPeriodInDays(int retentionPeriodInDays)Set the retentionPeriodInDays property: After how many days backups should be deleted.BackupSchedulewithStartTime(OffsetDateTime startTime)Set the startTime property: When the schedule should start working.
-
-
-
Method Detail
-
frequencyInterval
public int frequencyInterval()
Get the frequencyInterval property: 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.
-
withFrequencyInterval
public BackupSchedule withFrequencyInterval(int frequencyInterval)
Set the frequencyInterval property: 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).- Parameters:
frequencyInterval- the frequencyInterval value to set.- Returns:
- the BackupSchedule object itself.
-
frequencyUnit
public FrequencyUnit frequencyUnit()
Get the frequencyUnit property: 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).- Returns:
- the frequencyUnit value.
-
withFrequencyUnit
public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit)
Set the frequencyUnit property: 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).- Parameters:
frequencyUnit- the frequencyUnit value to set.- Returns:
- the BackupSchedule object itself.
-
keepAtLeastOneBackup
public boolean keepAtLeastOneBackup()
Get the keepAtLeastOneBackup property: 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.
-
withKeepAtLeastOneBackup
public BackupSchedule withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup)
Set the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.- Parameters:
keepAtLeastOneBackup- the keepAtLeastOneBackup value to set.- Returns:
- the BackupSchedule object itself.
-
retentionPeriodInDays
public int retentionPeriodInDays()
Get the retentionPeriodInDays property: After how many days backups should be deleted.- Returns:
- the retentionPeriodInDays value.
-
withRetentionPeriodInDays
public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays)
Set the retentionPeriodInDays property: After how many days backups should be deleted.- Parameters:
retentionPeriodInDays- the retentionPeriodInDays value to set.- Returns:
- the BackupSchedule object itself.
-
startTime
public OffsetDateTime startTime()
Get the startTime property: When the schedule should start working.- Returns:
- the startTime value.
-
withStartTime
public BackupSchedule withStartTime(OffsetDateTime startTime)
Set the startTime property: When the schedule should start working.- Parameters:
startTime- the startTime value to set.- Returns:
- the BackupSchedule object itself.
-
lastExecutionTime
public OffsetDateTime lastExecutionTime()
Get the lastExecutionTime property: Last time when this schedule was triggered.- Returns:
- the lastExecutionTime value.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-