ImmutableStorageAccount Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.ImmutableStorageAccount

Implements

public final class ImmutableStorageAccount
implements JsonSerializable<ImmutableStorageAccount>

This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.

Constructor Summary

Constructor Description
ImmutableStorageAccount()

Creates an instance of ImmutableStorageAccount class.

Method Summary

Modifier and Type Method and Description
Boolean enabled()

Get the enabled property: A boolean flag which enables account-level immutability.

static ImmutableStorageAccount fromJson(JsonReader jsonReader)

Reads an instance of ImmutableStorageAccount from the JsonReader.

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.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ImmutableStorageAccount withEnabled(Boolean enabled)

Set the enabled property: A boolean flag which enables account-level immutability.

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.

Methods inherited from java.lang.Object

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.

fromJson

public static ImmutableStorageAccount fromJson(JsonReader jsonReader)

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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

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.

Applies to