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 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

      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.
    • 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.
    • 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.
    • toXml

      public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter) throws XMLStreamException
      Specified by:
      toXml in interface com.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 interface com.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.