Partager via


BackupPolicy Class

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

Implements

public class BackupPolicy
implements JsonSerializable<BackupPolicy>

The object representing the policy for taking backups on an account.

Constructor Summary

Constructor Description
BackupPolicy()

Creates an instance of BackupPolicy class.

Method Summary

Modifier and Type Method and Description
static BackupPolicy fromJson(JsonReader jsonReader)

Reads an instance of BackupPolicy from the JsonReader.

BackupPolicyMigrationState migrationState()

Get the migrationState property: The object representing the state of the migration between the backup policies.

JsonWriter toJson(JsonWriter jsonWriter)
BackupPolicyType type()

Get the type property: Describes the mode of backups.

void validate()

Validates the instance.

BackupPolicy withMigrationState(BackupPolicyMigrationState migrationState)

Set the migrationState property: The object representing the state of the migration between the backup policies.

Methods inherited from java.lang.Object

Constructor Details

BackupPolicy

public BackupPolicy()

Creates an instance of BackupPolicy class.

Method Details

fromJson

public static BackupPolicy fromJson(JsonReader jsonReader)

Reads an instance of BackupPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BackupPolicy 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 BackupPolicy.

migrationState

public BackupPolicyMigrationState migrationState()

Get the migrationState property: The object representing the state of the migration between the backup policies.

Returns:

the migrationState value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public BackupPolicyType type()

Get the type property: Describes the mode of backups.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withMigrationState

public BackupPolicy withMigrationState(BackupPolicyMigrationState migrationState)

Set the migrationState property: The object representing the state of the migration between the backup policies.

Parameters:

migrationState - the migrationState value to set.

Returns:

the BackupPolicy object itself.

Applies to