Class LegalHoldProperties
java.lang.Object
com.azure.resourcemanager.storage.models.LegalHoldProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LegalHoldProperties>
public final class LegalHoldProperties
extends Object
implements com.azure.json.JsonSerializable<LegalHoldProperties>
The LegalHold property of a blob container.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LegalHoldPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LegalHoldProperties 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.Get the protectedAppendWritesHistory property: Protected append blob writes history.tags()Get the tags property: The list of LegalHold tags of a blob container.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withProtectedAppendWritesHistory(ProtectedAppendWritesHistory protectedAppendWritesHistory) Set the protectedAppendWritesHistory property: Protected append blob writes history.withTags(List<TagProperty> tags) Set the tags property: The list of LegalHold tags of a blob container.Methods inherited from class 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
-
LegalHoldProperties
public LegalHoldProperties()Creates an instance of LegalHoldProperties 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: The list of LegalHold tags of a blob container.- Returns:
- the tags value.
-
withTags
Set the tags property: The list of LegalHold tags of a blob container.- Parameters:
tags- the tags value to set.- Returns:
- the LegalHoldProperties object itself.
-
protectedAppendWritesHistory
Get the protectedAppendWritesHistory property: Protected append blob writes history.- Returns:
- the protectedAppendWritesHistory value.
-
withProtectedAppendWritesHistory
public LegalHoldProperties withProtectedAppendWritesHistory(ProtectedAppendWritesHistory protectedAppendWritesHistory) Set the protectedAppendWritesHistory property: Protected append blob writes history.- Parameters:
protectedAppendWritesHistory- the protectedAppendWritesHistory value to set.- Returns:
- the LegalHoldProperties 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<LegalHoldProperties>- Throws:
IOException
-
fromJson
Reads an instance of LegalHoldProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of LegalHoldProperties 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 LegalHoldProperties.
-