Class BlobInventoryPolicyFilter
java.lang.Object
com.azure.resourcemanager.storage.models.BlobInventoryPolicyFilter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BlobInventoryPolicyFilter>
public final class BlobInventoryPolicyFilter
extends Object
implements com.azure.json.JsonSerializable<BlobInventoryPolicyFilter>
An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter
properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType
only prefixMatch is applicable and is optional.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BlobInventoryPolicyFilter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the blobTypes property: An array of predefined enum values.Get the creationTime property: This property is used to filter objects based on the object creation time.Get the excludePrefix property: An array of strings with maximum 10 blob prefixes to be excluded from the inventory.static BlobInventoryPolicyFilterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BlobInventoryPolicyFilter from the JsonReader.Get the includeBlobVersions property: Includes blob versions in blob inventory when value is set to true.Get the includeDeleted property: For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'.Get the includeSnapshots property: Includes blob snapshots in blob inventory when value is set to true.Get the prefixMatch property: An array of strings with maximum 10 blob prefixes to be included in the inventory.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBlobTypes(List<String> blobTypes) Set the blobTypes property: An array of predefined enum values.withCreationTime(BlobInventoryCreationTime creationTime) Set the creationTime property: This property is used to filter objects based on the object creation time.withExcludePrefix(List<String> excludePrefix) Set the excludePrefix property: An array of strings with maximum 10 blob prefixes to be excluded from the inventory.withIncludeBlobVersions(Boolean includeBlobVersions) Set the includeBlobVersions property: Includes blob versions in blob inventory when value is set to true.withIncludeDeleted(Boolean includeDeleted) Set the includeDeleted property: For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'.withIncludeSnapshots(Boolean includeSnapshots) Set the includeSnapshots property: Includes blob snapshots in blob inventory when value is set to true.withPrefixMatch(List<String> prefixMatch) Set the prefixMatch property: An array of strings with maximum 10 blob prefixes to be included in the 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
-
BlobInventoryPolicyFilter
public BlobInventoryPolicyFilter()Creates an instance of BlobInventoryPolicyFilter class.
-
-
Method Details
-
prefixMatch
-
withPrefixMatch
Set the prefixMatch property: An array of strings with maximum 10 blob prefixes to be included in the inventory.- Parameters:
prefixMatch- the prefixMatch value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
excludePrefix
-
withExcludePrefix
Set the excludePrefix property: An array of strings with maximum 10 blob prefixes to be excluded from the inventory.- Parameters:
excludePrefix- the excludePrefix value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
blobTypes
-
withBlobTypes
Set the blobTypes property: An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'.- Parameters:
blobTypes- the blobTypes value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
includeBlobVersions
Get the includeBlobVersions property: Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded.- Returns:
- the includeBlobVersions value.
-
withIncludeBlobVersions
Set the includeBlobVersions property: Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded.- Parameters:
includeBlobVersions- the includeBlobVersions value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
includeSnapshots
Get the includeSnapshots property: Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded.- Returns:
- the includeSnapshots value.
-
withIncludeSnapshots
Set the includeSnapshots property: Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded.- Parameters:
includeSnapshots- the includeSnapshots value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
includeDeleted
Get the includeDeleted property: For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded.- Returns:
- the includeDeleted value.
-
withIncludeDeleted
Set the includeDeleted property: For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded.- Parameters:
includeDeleted- the includeDeleted value to set.- Returns:
- the BlobInventoryPolicyFilter object itself.
-
creationTime
Get the creationTime property: This property is used to filter objects based on the object creation time.- Returns:
- the creationTime value.
-
withCreationTime
Set the creationTime property: This property is used to filter objects based on the object creation time.- Parameters:
creationTime- the creationTime value to set.- Returns:
- the BlobInventoryPolicyFilter 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<BlobInventoryPolicyFilter>- Throws:
IOException
-
fromJson
public static BlobInventoryPolicyFilter fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BlobInventoryPolicyFilter from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BlobInventoryPolicyFilter 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 BlobInventoryPolicyFilter.
-