TableServiceRetentionPolicy Class

  • java.lang.Object
    • com.azure.data.tables.models.TableServiceRetentionPolicy

Implements

public final class TableServiceRetentionPolicy
implements XmlSerializable<TableServiceRetentionPolicy>

The retention policy.

Constructor Summary

Constructor Description
TableServiceRetentionPolicy()

Creates an instance of TableServiceRetentionPolicy class.

Method Summary

Modifier and Type Method and Description
static TableServiceRetentionPolicy fromXml(XmlReader xmlReader)

Reads an instance of TableServiceRetentionPolicy from the XmlReader.

static TableServiceRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName)

Reads an instance of TableServiceRetentionPolicy from the XmlReader.

Integer getDaysToRetain()

Get the daysToRetain 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 service.

TableServiceRetentionPolicy setDaysToRetain(Integer daysToRetain)

Set the daysToRetain property: Indicates the number of days that metrics or logging or soft-deleted data should be retained.

TableServiceRetentionPolicy setEnabled(boolean enabled)

Set the enabled property: Indicates whether a retention policy is enabled for the service.

XmlWriter toXml(XmlWriter xmlWriter)
XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Methods inherited from java.lang.Object

Constructor Details

TableServiceRetentionPolicy

public TableServiceRetentionPolicy()

Creates an instance of TableServiceRetentionPolicy class.

Method Details

fromXml

public static TableServiceRetentionPolicy fromXml(XmlReader xmlReader)

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(XmlReader xmlReader, String rootElementName)

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.

getDaysToRetain

public Integer 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.

isEnabled

public boolean isEnabled()

Get the enabled property: Indicates whether a retention policy is enabled for the service.

Returns:

the enabled value.

setDaysToRetain

public TableServiceRetentionPolicy setDaysToRetain(Integer daysToRetain)

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.

setEnabled

public TableServiceRetentionPolicy setEnabled(boolean enabled)

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.

toXml

public XmlWriter toXml(XmlWriter xmlWriter)

Parameters:

xmlWriter

Throws:

toXml

public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Parameters:

xmlWriter
rootElementName

Throws:

Applies to