共用方式為


ShareAccessPolicy Class

  • java.lang.Object
    • com.azure.storage.file.share.models.ShareAccessPolicy

Implements

public final class ShareAccessPolicy
implements XmlSerializable<ShareAccessPolicy>

An Access policy.

Constructor Summary

Constructor Description
ShareAccessPolicy()

Creates an instance of ShareAccessPolicy class.

Method Summary

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

Reads an instance of ShareAccessPolicy from the XmlReader.

static ShareAccessPolicy fromXml(XmlReader xmlReader, String rootElementName)

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

ShareAccessPolicy setExpiresOn(OffsetDateTime expiresOn)

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

ShareAccessPolicy setPermissions(String permissions)

Set the permissions property: The permissions for the ACL policy.

ShareAccessPolicy 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

ShareAccessPolicy

public ShareAccessPolicy()

Creates an instance of ShareAccessPolicy class.

Method Details

fromXml

public static ShareAccessPolicy fromXml(XmlReader xmlReader)

Reads an instance of ShareAccessPolicy from the XmlReader.

Parameters:

xmlReader - The XmlReader being read.

Returns:

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

fromXml

public static ShareAccessPolicy fromXml(XmlReader xmlReader, String rootElementName)

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

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 ShareAccessPolicy setExpiresOn(OffsetDateTime expiresOn)

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

Parameters:

expiresOn - the expiresOn value to set.

Returns:

the ShareAccessPolicy object itself.

setPermissions

public ShareAccessPolicy setPermissions(String permissions)

Set the permissions property: The permissions for the ACL policy.

Parameters:

permissions - the permissions value to set.

Returns:

the ShareAccessPolicy object itself.

setStartsOn

public ShareAccessPolicy setStartsOn(OffsetDateTime startsOn)

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

Parameters:

startsOn - the startsOn value to set.

Returns:

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