Class LastAccessTimeTrackingPolicy
java.lang.Object
com.azure.resourcemanager.storage.models.LastAccessTimeTrackingPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LastAccessTimeTrackingPolicy>
public final class LastAccessTimeTrackingPolicy
extends Object
implements com.azure.json.JsonSerializable<LastAccessTimeTrackingPolicy>
The blob service properties for Last access time based tracking policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of LastAccessTimeTrackingPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionblobType()Get the blobType property: An array of predefined supported blob types.booleanenable()Get the enable property: When set to true last access time based tracking is enabled.static LastAccessTimeTrackingPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LastAccessTimeTrackingPolicy from the JsonReader.name()Get the name property: Name of the policy.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the trackingGranularityInDays property: The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1.voidvalidate()Validates the instance.withBlobType(List<String> blobType) Set the blobType property: An array of predefined supported blob types.withEnable(boolean enable) Set the enable property: When set to true last access time based tracking is enabled.Set the name property: Name of the policy.withTrackingGranularityInDays(Integer trackingGranularityInDays) Set the trackingGranularityInDays property: The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1.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
-
LastAccessTimeTrackingPolicy
public LastAccessTimeTrackingPolicy()Creates an instance of LastAccessTimeTrackingPolicy class.
-
-
Method Details
-
enable
public boolean enable()Get the enable property: When set to true last access time based tracking is enabled.- Returns:
- the enable value.
-
withEnable
Set the enable property: When set to true last access time based tracking is enabled.- Parameters:
enable- the enable value to set.- Returns:
- the LastAccessTimeTrackingPolicy object itself.
-
name
Get the name property: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only.- Returns:
- the name value.
-
withName
Set the name property: Name of the policy. The valid value is AccessTimeTracking. This field is currently read only.- Parameters:
name- the name value to set.- Returns:
- the LastAccessTimeTrackingPolicy object itself.
-
trackingGranularityInDays
Get the trackingGranularityInDays property: The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1.- Returns:
- the trackingGranularityInDays value.
-
withTrackingGranularityInDays
public LastAccessTimeTrackingPolicy withTrackingGranularityInDays(Integer trackingGranularityInDays) Set the trackingGranularityInDays property: The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1.- Parameters:
trackingGranularityInDays- the trackingGranularityInDays value to set.- Returns:
- the LastAccessTimeTrackingPolicy object itself.
-
blobType
Get the blobType property: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only.- Returns:
- the blobType value.
-
withBlobType
Set the blobType property: An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only.- Parameters:
blobType- the blobType value to set.- Returns:
- the LastAccessTimeTrackingPolicy 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<LastAccessTimeTrackingPolicy>- Throws:
IOException
-
fromJson
public static LastAccessTimeTrackingPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of LastAccessTimeTrackingPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of LastAccessTimeTrackingPolicy 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 LastAccessTimeTrackingPolicy.
-