BlobAccessPolicy Class

  • java.lang.Object
    • com.azure.storage.blob.models.BlobAccessPolicy

Implements

public final class BlobAccessPolicy
implements XmlSerializable<BlobAccessPolicy>

An Access policy.

Constructor Summary

Constructor Description
BlobAccessPolicy()

Creates an instance of BlobAccessPolicy class.

Method Summary

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

Reads an instance of BlobAccessPolicy from the XmlReader.

static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName)

Reads an instance of BlobAccessPolicy from the XmlReader.

OffsetDateTime getExpiresOn()

Get the expiresOn property: the date-time the policy expires.

String getPermissions()

Get the permissions property: the permissions for the acl policy.

OffsetDateTime getStartsOn()

Get the startsOn property: the date-time the policy is active.

BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn)

Set the expiresOn property: the date-time the policy expires.

BlobAccessPolicy setPermissions(String permissions)

Set the permissions property: the permissions for the acl policy.

BlobAccessPolicy setStartsOn(OffsetDateTime startsOn)

Set the startsOn property: the date-time the policy is active.

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

Methods inherited from java.lang.Object

Constructor Details

BlobAccessPolicy

public BlobAccessPolicy()

Creates an instance of BlobAccessPolicy class.

Method Details

fromXml

public static BlobAccessPolicy fromXml(XmlReader xmlReader)

Reads an instance of BlobAccessPolicy from the XmlReader.

Parameters:

xmlReader - The XmlReader being read.

Returns:

An instance of BlobAccessPolicy 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 BlobAccessPolicy.

fromXml

public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName)

Reads an instance of BlobAccessPolicy 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 BlobAccessPolicy 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 BlobAccessPolicy.

getExpiresOn

public OffsetDateTime getExpiresOn()

Get the expiresOn property: the date-time the policy expires.

Returns:

the expiresOn value.

getPermissions

public String getPermissions()

Get the permissions property: the permissions for the acl policy.

Returns:

the permissions value.

getStartsOn

public OffsetDateTime getStartsOn()

Get the startsOn property: the date-time the policy is active.

Returns:

the startsOn value.

setExpiresOn

public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn)

Set the expiresOn property: the date-time the policy expires.

Parameters:

expiresOn - the expiresOn value to set.

Returns:

the BlobAccessPolicy object itself.

setPermissions

public BlobAccessPolicy setPermissions(String permissions)

Set the permissions property: the permissions for the acl policy.

Parameters:

permissions - the permissions value to set.

Returns:

the BlobAccessPolicy object itself.

setStartsOn

public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn)

Set the startsOn property: the date-time the policy is active.

Parameters:

startsOn - the startsOn value to set.

Returns:

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