Class BlobInventoryPolicyRule
java.lang.Object
com.azure.resourcemanager.storage.models.BlobInventoryPolicyRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BlobInventoryPolicyRule>
public final class BlobInventoryPolicyRule
extends Object
implements com.azure.json.JsonSerializable<BlobInventoryPolicyRule>
An object that wraps the blob inventory rule. Each rule is uniquely defined by name.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BlobInventoryPolicyRule class. -
Method Summary
Modifier and TypeMethodDescriptionGet the definition property: An object that defines the blob inventory policy rule.Get the destination property: Container name where blob inventory files are stored.booleanenabled()Get the enabled property: Rule is enabled when set to true.static BlobInventoryPolicyRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BlobInventoryPolicyRule from the JsonReader.name()Get the name property: A rule name can contain any combination of alpha numeric characters.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDefinition(BlobInventoryPolicyDefinition definition) Set the definition property: An object that defines the blob inventory policy rule.withDestination(String destination) Set the destination property: Container name where blob inventory files are stored.withEnabled(boolean enabled) Set the enabled property: Rule is enabled when set to true.Set the name property: A rule name can contain any combination of alpha numeric characters.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
-
BlobInventoryPolicyRule
public BlobInventoryPolicyRule()Creates an instance of BlobInventoryPolicyRule class.
-
-
Method Details
-
enabled
public boolean enabled()Get the enabled property: Rule is enabled when set to true.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Rule is enabled when set to true.- Parameters:
enabled- the enabled value to set.- Returns:
- the BlobInventoryPolicyRule object itself.
-
name
Get the name property: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.- Returns:
- the name value.
-
withName
Set the name property: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.- Parameters:
name- the name value to set.- Returns:
- the BlobInventoryPolicyRule object itself.
-
destination
Get the destination property: Container name where blob inventory files are stored. Must be pre-created.- Returns:
- the destination value.
-
withDestination
Set the destination property: Container name where blob inventory files are stored. Must be pre-created.- Parameters:
destination- the destination value to set.- Returns:
- the BlobInventoryPolicyRule object itself.
-
definition
Get the definition property: An object that defines the blob inventory policy rule.- Returns:
- the definition value.
-
withDefinition
Set the definition property: An object that defines the blob inventory policy rule.- Parameters:
definition- the definition value to set.- Returns:
- the BlobInventoryPolicyRule 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<BlobInventoryPolicyRule>- Throws:
IOException
-
fromJson
public static BlobInventoryPolicyRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BlobInventoryPolicyRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BlobInventoryPolicyRule 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 BlobInventoryPolicyRule.
-