Package com.azure.data.tables.models
Class TableServiceRetentionPolicy
java.lang.Object
com.azure.data.tables.models.TableServiceRetentionPolicy
- All Implemented Interfaces:
com.azure.xml.XmlSerializable<TableServiceRetentionPolicy>
public final class TableServiceRetentionPolicy
extends Object
implements com.azure.xml.XmlSerializable<TableServiceRetentionPolicy>
The retention policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of TableServiceRetentionPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic TableServiceRetentionPolicy
fromXml
(com.azure.xml.XmlReader xmlReader) Reads an instance of TableServiceRetentionPolicy from the XmlReader.static TableServiceRetentionPolicy
Reads an instance of TableServiceRetentionPolicy from the XmlReader.Get the daysToRetain property: Indicates the number of days that metrics or logging or soft-deleted data should be retained.boolean
Get the enabled property: Indicates whether a retention policy is enabled for the service.setDaysToRetain
(Integer daysToRetain) Set the daysToRetain property: Indicates the number of days that metrics or logging or soft-deleted data should be retained.setEnabled
(boolean enabled) Set the enabled property: Indicates whether a retention policy is enabled for the service.com.azure.xml.XmlWriter
toXml
(com.azure.xml.XmlWriter xmlWriter) com.azure.xml.XmlWriter
-
Constructor Details
-
TableServiceRetentionPolicy
public TableServiceRetentionPolicy()Creates an instance of TableServiceRetentionPolicy class.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Get the enabled property: Indicates whether a retention policy is enabled for the service.- Returns:
- the enabled value.
-
setEnabled
Set the enabled property: Indicates whether a retention policy is enabled for the service.- Parameters:
enabled
- the enabled value to set.- Returns:
- the TableServiceRetentionPolicy object itself.
-
getDaysToRetain
Get the daysToRetain 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:
- the daysToRetain value.
-
setDaysToRetain
Set the daysToRetain 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:
daysToRetain
- the daysToRetain value to set.- Returns:
- the TableServiceRetentionPolicy object itself.
-
toXml
- Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<TableServiceRetentionPolicy>
- Throws:
XMLStreamException
-
toXml
public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter, String rootElementName) throws XMLStreamException - Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<TableServiceRetentionPolicy>
- Throws:
XMLStreamException
-
fromXml
public static TableServiceRetentionPolicy fromXml(com.azure.xml.XmlReader xmlReader) throws XMLStreamException Reads an instance of TableServiceRetentionPolicy from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.- Returns:
- An instance of TableServiceRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
XMLStreamException
- If an error occurs while reading the TableServiceRetentionPolicy.
-
fromXml
public static TableServiceRetentionPolicy fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException Reads an instance of TableServiceRetentionPolicy from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.rootElementName
- Optional root element name to override the default defined by the model. Used to support cases where the model can deserialize from different root element names.- Returns:
- An instance of TableServiceRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
XMLStreamException
- If an error occurs while reading the TableServiceRetentionPolicy.
-