Class LegalHoldInner
java.lang.Object
com.azure.resourcemanager.storage.fluent.models.LegalHoldInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LegalHoldInner>
public final class LegalHoldInner
extends Object
implements com.azure.json.JsonSerializable<LegalHoldInner>
The LegalHold property of a blob container.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the allowProtectedAppendWritesAll property: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance.static LegalHoldInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LegalHoldInner from the JsonReader.Get the hasLegalHold property: The hasLegalHold public property is set to true by SRP if there are at least one existing tag.tags()Get the tags property: Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAllowProtectedAppendWritesAll(Boolean allowProtectedAppendWritesAll) Set the allowProtectedAppendWritesAll property: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance.Set the tags property: Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
LegalHoldInner
public LegalHoldInner()Creates an instance of LegalHoldInner class.
-
-
Method Details
-
hasLegalHold
Get the hasLegalHold property: The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.- Returns:
- the hasLegalHold value.
-
tags
Get the tags property: Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Returns:
- the tags value.
-
withTags
Set the tags property: Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Parameters:
tags- the tags value to set.- Returns:
- the LegalHoldInner object itself.
-
allowProtectedAppendWritesAll
Get the allowProtectedAppendWritesAll property: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.- Returns:
- the allowProtectedAppendWritesAll value.
-
withAllowProtectedAppendWritesAll
Set the allowProtectedAppendWritesAll property: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.- Parameters:
allowProtectedAppendWritesAll- the allowProtectedAppendWritesAll value to set.- Returns:
- the LegalHoldInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LegalHoldInner>- Throws:
IOException
-
fromJson
Reads an instance of LegalHoldInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of LegalHoldInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the LegalHoldInner.
-