Package com.azure.storage.queue.models
Class QueueAccessPolicy
java.lang.Object
com.azure.storage.queue.models.QueueAccessPolicy
- All Implemented Interfaces:
com.azure.xml.XmlSerializable<QueueAccessPolicy>
public final class QueueAccessPolicy
extends Object
implements com.azure.xml.XmlSerializable<QueueAccessPolicy>
An Access policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueueAccessPolicy
fromXml
(com.azure.xml.XmlReader xmlReader) Reads an instance of QueueAccessPolicy from the XmlReader.static QueueAccessPolicy
Reads an instance of QueueAccessPolicy from the XmlReader.Get the expiresOn property: the date-time the policy expires.Get the permissions property: the permissions for the acl policy.Get the startsOn property: the date-time the policy is active.setExpiresOn
(OffsetDateTime expiresOn) Set the expiresOn property: the date-time the policy expires.setPermissions
(String permissions) Set the permissions property: the permissions for the acl policy.setStartsOn
(OffsetDateTime startsOn) Set the startsOn property: the date-time the policy is active.com.azure.xml.XmlWriter
toXml
(com.azure.xml.XmlWriter xmlWriter) com.azure.xml.XmlWriter
-
Constructor Details
-
QueueAccessPolicy
public QueueAccessPolicy()Creates an instance of QueueAccessPolicy class.
-
-
Method Details
-
getStartsOn
Get the startsOn property: the date-time the policy is active.- Returns:
- the startsOn value.
-
setStartsOn
Set the startsOn property: the date-time the policy is active.- Parameters:
startsOn
- the startsOn value to set.- Returns:
- the QueueAccessPolicy object itself.
-
getExpiresOn
Get the expiresOn property: the date-time the policy expires.- Returns:
- the expiresOn value.
-
setExpiresOn
Set the expiresOn property: the date-time the policy expires.- Parameters:
expiresOn
- the expiresOn value to set.- Returns:
- the QueueAccessPolicy object itself.
-
getPermissions
Get the permissions property: the permissions for the acl policy.- Returns:
- the permissions value.
-
setPermissions
Set the permissions property: the permissions for the acl policy.- Parameters:
permissions
- the permissions value to set.- Returns:
- the QueueAccessPolicy object itself.
-
toXml
- Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<QueueAccessPolicy>
- 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<QueueAccessPolicy>
- Throws:
XMLStreamException
-
fromXml
public static QueueAccessPolicy fromXml(com.azure.xml.XmlReader xmlReader) throws XMLStreamException Reads an instance of QueueAccessPolicy from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.- Returns:
- An instance of QueueAccessPolicy 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 QueueAccessPolicy.
-
fromXml
public static QueueAccessPolicy fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException Reads an instance of QueueAccessPolicy 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 QueueAccessPolicy 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 QueueAccessPolicy.
-