Class PeriodicModeBackupPolicy

java.lang.Object
com.azure.resourcemanager.cosmos.models.BackupPolicy
com.azure.resourcemanager.cosmos.models.PeriodicModeBackupPolicy
All Implemented Interfaces:
com.azure.json.JsonSerializable<BackupPolicy>

public final class PeriodicModeBackupPolicy extends BackupPolicy
The object representing periodic mode backup policy.
  • Constructor Details

    • PeriodicModeBackupPolicy

      public PeriodicModeBackupPolicy()
      Creates an instance of PeriodicModeBackupPolicy class.
  • Method Details

    • type

      public BackupPolicyType type()
      Get the type property: Describes the mode of backups.
      Overrides:
      type in class BackupPolicy
      Returns:
      the type value.
    • periodicModeProperties

      public PeriodicModeProperties periodicModeProperties()
      Get the periodicModeProperties property: Configuration values for periodic mode backup.
      Returns:
      the periodicModeProperties value.
    • withPeriodicModeProperties

      public PeriodicModeBackupPolicy withPeriodicModeProperties(PeriodicModeProperties periodicModeProperties)
      Set the periodicModeProperties property: Configuration values for periodic mode backup.
      Parameters:
      periodicModeProperties - the periodicModeProperties value to set.
      Returns:
      the PeriodicModeBackupPolicy object itself.
    • withMigrationState

      public PeriodicModeBackupPolicy withMigrationState(BackupPolicyMigrationState migrationState)
      Set the migrationState property: The object representing the state of the migration between the backup policies.
      Overrides:
      withMigrationState in class BackupPolicy
      Parameters:
      migrationState - the migrationState value to set.
      Returns:
      the BackupPolicy object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class BackupPolicy
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BackupPolicy>
      Overrides:
      toJson in class BackupPolicy
      Throws:
      IOException
    • fromJson

      public static PeriodicModeBackupPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PeriodicModeBackupPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PeriodicModeBackupPolicy 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 PeriodicModeBackupPolicy.