BlobRetentionPolicy Class
- java.
lang. Object - com.
azure. storage. blob. models. BlobRetentionPolicy
- com.
Implements
public final class BlobRetentionPolicy
implements XmlSerializable<BlobRetentionPolicy>
the retention policy which determines how long the associated data should persist.
Constructor Summary
Constructor | Description |
---|---|
BlobRetentionPolicy() |
Creates an instance of Blob |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Blob |
fromXml(XmlReader xmlReader)
Reads an instance of Blob |
static
Blob |
fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of Blob |
Integer |
getDays()
Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. |
boolean |
isEnabled()
Get the enabled property: Indicates whether a retention policy is enabled for the storage service. |
Blob |
setDays(Integer days)
Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. |
Blob |
setEnabled(boolean enabled)
Set the enabled property: Indicates whether a retention policy is enabled for the storage service. |
Xml |
toXml(XmlWriter xmlWriter) |
Xml |
toXml(XmlWriter xmlWriter, String rootElementName) |
Methods inherited from java.lang.Object
Constructor Details
BlobRetentionPolicy
public BlobRetentionPolicy()
Creates an instance of BlobRetentionPolicy class.
Method Details
fromXml
public static BlobRetentionPolicy fromXml(XmlReader xmlReader)
Reads an instance of BlobRetentionPolicy from the XmlReader.
Parameters:
Returns:
Throws:
fromXml
public static BlobRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of BlobRetentionPolicy from the XmlReader.
Parameters:
Returns:
Throws:
getDays
public Integer getDays()
Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted.
Returns:
isEnabled
public boolean isEnabled()
Get the enabled property: Indicates whether a retention policy is enabled for the storage service.
Returns:
setDays
public BlobRetentionPolicy setDays(Integer days)
Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted.
Parameters:
Returns:
setEnabled
public BlobRetentionPolicy setEnabled(boolean enabled)
Set the enabled property: Indicates whether a retention policy is enabled for the storage service.
Parameters:
Returns:
toXml
toXml
public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)
Parameters:
Throws: