BackupSchedule Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.BackupSchedule

Implements

public final class BackupSchedule
implements JsonSerializable<BackupSchedule>

The BackupSchedule model.

Constructor Summary

Constructor Description
BackupSchedule()

Creates an instance of BackupSchedule class.

Method Summary

Modifier and Type Method and Description
String cronExpression()

Get the cronExpression property: The cron expression that defines when you want to back up your data.

static BackupSchedule fromJson(JsonReader jsonReader)

Reads an instance of BackupSchedule from the JsonReader.

Integer retentionInHours()

Get the retentionInHours property: The retention period (hours) of the backups.

String scheduleName()

Get the scheduleName property: The unique identifier of backup schedule.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

BackupSchedule withCronExpression(String cronExpression)

Set the cronExpression property: The cron expression that defines when you want to back up your data.

BackupSchedule withRetentionInHours(Integer retentionInHours)

Set the retentionInHours property: The retention period (hours) of the backups.

BackupSchedule withScheduleName(String scheduleName)

Set the scheduleName property: The unique identifier of backup 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:

the cronExpression value.

fromJson

public static BackupSchedule fromJson(JsonReader jsonReader)

Reads an instance of BackupSchedule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BackupSchedule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the BackupSchedule.

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:

the retentionInHours value.

scheduleName

public String scheduleName()

Get the scheduleName property: The unique identifier of backup schedule.

Returns:

the scheduleName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

cronExpression - the cronExpression value to set.

Returns:

the BackupSchedule object itself.

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:

retentionInHours - the retentionInHours value to set.

Returns:

the BackupSchedule object itself.

withScheduleName

public BackupSchedule withScheduleName(String scheduleName)

Set the scheduleName property: The unique identifier of backup schedule.

Parameters:

scheduleName - the scheduleName value to set.

Returns:

the BackupSchedule object itself.

Applies to