Class ShareMetrics
java.lang.Object
com.azure.storage.file.share.models.ShareMetrics
- All Implemented Interfaces:
com.azure.xml.XmlSerializable<ShareMetrics>
public final class ShareMetrics
extends Object
implements com.azure.xml.XmlSerializable<ShareMetrics>
Storage Analytics metrics for file service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ShareMetrics
fromXml
(com.azure.xml.XmlReader xmlReader) Reads an instance of ShareMetrics from the XmlReader.static ShareMetrics
Reads an instance of ShareMetrics from the XmlReader.Get the retentionPolicy property: The retention policy.Get the version property: The version of Storage Analytics to configure.boolean
Get the enabled property: Indicates whether metrics are enabled for the File service.Get the includeApis property: Indicates whether metrics should generate summary statistics for called API operations.setEnabled
(boolean enabled) Set the enabled property: Indicates whether metrics are enabled for the File service.setIncludeApis
(Boolean includeApis) Set the includeApis property: Indicates whether metrics should generate summary statistics for called API operations.setRetentionPolicy
(ShareRetentionPolicy retentionPolicy) Set the retentionPolicy property: The retention policy.setVersion
(String version) Set the version property: The version of Storage Analytics to configure.com.azure.xml.XmlWriter
toXml
(com.azure.xml.XmlWriter xmlWriter) com.azure.xml.XmlWriter
-
Constructor Details
-
ShareMetrics
public ShareMetrics()Creates an instance of ShareMetrics class.
-
-
Method Details
-
getVersion
Get the version property: The version of Storage Analytics to configure.- Returns:
- the version value.
-
setVersion
Set the version property: The version of Storage Analytics to configure.- Parameters:
version
- the version value to set.- Returns:
- the ShareMetrics object itself.
-
isEnabled
public boolean isEnabled()Get the enabled property: Indicates whether metrics are enabled for the File service.- Returns:
- the enabled value.
-
setEnabled
Set the enabled property: Indicates whether metrics are enabled for the File service.- Parameters:
enabled
- the enabled value to set.- Returns:
- the ShareMetrics object itself.
-
isIncludeApis
Get the includeApis property: Indicates whether metrics should generate summary statistics for called API operations.- Returns:
- the includeApis value.
-
setIncludeApis
Set the includeApis property: Indicates whether metrics should generate summary statistics for called API operations.- Parameters:
includeApis
- the includeApis value to set.- Returns:
- the ShareMetrics object itself.
-
getRetentionPolicy
Get the retentionPolicy property: The retention policy.- Returns:
- the retentionPolicy value.
-
toXml
- Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<ShareMetrics>
- 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<ShareMetrics>
- Throws:
XMLStreamException
-
fromXml
Reads an instance of ShareMetrics from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.- Returns:
- An instance of ShareMetrics 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 ShareMetrics.
-
fromXml
public static ShareMetrics fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException Reads an instance of ShareMetrics 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 ShareMetrics 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 ShareMetrics.
-