BackupSchedule Class
- java.
lang. Object - com.
azure. resourcemanager. cosmos. models. BackupSchedule
- com.
Implements
public final class BackupSchedule
implements JsonSerializable<BackupSchedule>
The BackupSchedule model.
Constructor Summary
| Constructor | Description |
|---|---|
| BackupSchedule() |
Creates an instance of Backup |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
cronExpression()
Get the cron |
|
static
Backup |
fromJson(JsonReader jsonReader)
Reads an instance of Backup |
| Integer |
retentionInHours()
Get the retention |
| String |
scheduleName()
Get the schedule |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Backup |
withCronExpression(String cronExpression)
Set the cron |
|
Backup |
withRetentionInHours(Integer retentionInHours)
Set the retention |
|
Backup |
withScheduleName(String scheduleName)
Set the schedule |
Methods inherited from java.lang.Object
Constructor Details
BackupSchedule
public BackupSchedule()
Creates an instance of BackupSchedule class.
Method Details
cronExpression
public String cronExpression()
Get the cronExpression property: The cron expression that defines when you want to back up your data.
Returns:
fromJson
public static BackupSchedule fromJson(JsonReader jsonReader)
Reads an instance of BackupSchedule from the JsonReader.
Parameters:
Returns:
Throws:
retentionInHours
public Integer retentionInHours()
Get the retentionInHours property: The retention period (hours) of the backups. If you want to retain data forever, set retention to 0.
Returns:
scheduleName
public String scheduleName()
Get the scheduleName property: The unique identifier of backup schedule.
Returns:
toJson
validate
public void validate()
Validates the instance.
withCronExpression
public BackupSchedule withCronExpression(String cronExpression)
Set the cronExpression property: The cron expression that defines when you want to back up your data.
Parameters:
Returns:
withRetentionInHours
public BackupSchedule withRetentionInHours(Integer retentionInHours)
Set the retentionInHours property: The retention period (hours) of the backups. If you want to retain data forever, set retention to 0.
Parameters:
Returns:
withScheduleName
public BackupSchedule withScheduleName(String scheduleName)
Set the scheduleName property: The unique identifier of backup schedule.
Parameters:
Returns: