Class BlobInventoryPolicySchema
java.lang.Object
com.azure.resourcemanager.storage.models.BlobInventoryPolicySchema
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BlobInventoryPolicySchema>
public final class BlobInventoryPolicySchema
extends Object
implements com.azure.json.JsonSerializable<BlobInventoryPolicySchema>
The storage account blob inventory policy rules.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BlobInventoryPolicySchema class. -
Method Summary
Modifier and TypeMethodDescriptionGet the destination property: Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'.booleanenabled()Get the enabled property: Policy is enabled if set to true.static BlobInventoryPolicySchemafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BlobInventoryPolicySchema from the JsonReader.rules()Get the rules property: The storage account blob inventory policy rules.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The valid value is Inventory.voidvalidate()Validates the instance.withEnabled(boolean enabled) Set the enabled property: Policy is enabled if set to true.withRules(List<BlobInventoryPolicyRule> rules) Set the rules property: The storage account blob inventory policy rules.withType(InventoryRuleType type) Set the type property: The valid value is Inventory.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
-
BlobInventoryPolicySchema
public BlobInventoryPolicySchema()Creates an instance of BlobInventoryPolicySchema class.
-
-
Method Details
-
enabled
public boolean enabled()Get the enabled property: Policy is enabled if set to true.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Policy is enabled if set to true.- Parameters:
enabled- the enabled value to set.- Returns:
- the BlobInventoryPolicySchema object itself.
-
destination
Get the destination property: Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'.- Returns:
- the destination value.
-
type
Get the type property: The valid value is Inventory.- Returns:
- the type value.
-
withType
Set the type property: The valid value is Inventory.- Parameters:
type- the type value to set.- Returns:
- the BlobInventoryPolicySchema object itself.
-
rules
Get the rules property: The storage account blob inventory policy rules. The rule is applied when it is enabled.- Returns:
- the rules value.
-
withRules
Set the rules property: The storage account blob inventory policy rules. The rule is applied when it is enabled.- Parameters:
rules- the rules value to set.- Returns:
- the BlobInventoryPolicySchema 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<BlobInventoryPolicySchema>- Throws:
IOException
-
fromJson
public static BlobInventoryPolicySchema fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BlobInventoryPolicySchema from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BlobInventoryPolicySchema 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 BlobInventoryPolicySchema.
-