Class ImmutableStorageAccount

java.lang.Object
com.azure.resourcemanager.storage.models.ImmutableStorageAccount
All Implemented Interfaces:
com.azure.json.JsonSerializable<ImmutableStorageAccount>

public final class ImmutableStorageAccount extends Object implements com.azure.json.JsonSerializable<ImmutableStorageAccount>
This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.
  • Constructor Details

    • ImmutableStorageAccount

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

    • enabled

      public Boolean enabled()
      Get the enabled property: A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.
      Returns:
      the enabled value.
    • withEnabled

      public ImmutableStorageAccount withEnabled(Boolean enabled)
      Set the enabled property: A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.
      Parameters:
      enabled - the enabled value to set.
      Returns:
      the ImmutableStorageAccount object itself.
    • immutabilityPolicy

      public AccountImmutabilityPolicyProperties immutabilityPolicy()
      Get the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.
      Returns:
      the immutabilityPolicy value.
    • withImmutabilityPolicy

      public ImmutableStorageAccount withImmutabilityPolicy(AccountImmutabilityPolicyProperties immutabilityPolicy)
      Set the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.
      Parameters:
      immutabilityPolicy - the immutabilityPolicy value to set.
      Returns:
      the ImmutableStorageAccount object itself.
    • validate

      public void validate()
      Validates the instance.
      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<ImmutableStorageAccount>
      Throws:
      IOException
    • fromJson

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