Class ListSharesOptions
java.lang.Object
com.azure.storage.file.share.models.ListSharesOptions
A set of options for selecting shares from Storage File service.
-
Providing
prefix
will filter selections toshares
that that begin with the prefix. -
Providing
maxResultsPerPage
will limit the number ofshares
returned in a single page. -
Setting
includeMetadata
to true will include the metadata of eachshare
, if falseShareItem.getMetadata()
metadata} for each share will benull
. -
Setting
includeSnapshots
to true will include snapshots of eachshare
, the snapshot will be included as separate items in the response and will be identifiable byShareItem.getSnapshot()
snapshot} having a value. The base share will containnull
for the snapshot. -
Setting
includeDeleted
to true will include deletedshares
, the deleted shares will be included as separate items in the response and will be identifiable byShareItem.isDeleted()
having atrue
value.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
setIncludeDeleted
(boolean includeDeleted) Sets the status of including deleted shares when listing sharessetIncludeMetadata
(boolean includeMetadata) Sets the status of including share metadata when listing shares If listing snapshots as well this will also determine if the snapshots have their metadata included as well.setIncludeSnapshots
(boolean includeSnapshots) Sets the status of including share snapshots when listing sharessetMaxResultsPerPage
(Integer maxResultsPerPage) Sets the maximum number of shares to include in a single response.Sets the prefix that a share must match to be included in the listing.
-
Constructor Details
-
ListSharesOptions
public ListSharesOptions()
-
-
Method Details
-
setPrefix
Sets the prefix that a share must match to be included in the listing.- Parameters:
prefix
- The prefix that shares must start with to pass the filter- Returns:
- An updated ListSharesOptions object
-
getPrefix
- Returns:
- the prefix that a share must match to be included in the listing
-
setMaxResultsPerPage
Sets the maximum number of shares to include in a single response.- Parameters:
maxResultsPerPage
- Maximum number of shares to include in a single response. This value must be between 1 and 5000.- Returns:
- An updated ListSharesOptions object
-
getMaxResultsPerPage
- Returns:
- the maximum number of shares to inlcude in a single response
-
setIncludeMetadata
Sets the status of including share metadata when listing shares If listing snapshots as well this will also determine if the snapshots have their metadata included as well.- Parameters:
includeMetadata
- Flag indicating if metadata should be including in the listing- Returns:
- An updated ListSharesOptions object
-
isIncludeMetadata
public boolean isIncludeMetadata()- Returns:
- the status of include share metadata when listing shares
-
setIncludeSnapshots
Sets the status of including share snapshots when listing shares- Parameters:
includeSnapshots
- Flag indicating if snapshots should be included in the listing- Returns:
- An updated ListSharesOptions object
-
isIncludeSnapshots
public boolean isIncludeSnapshots()- Returns:
- the status of including share snapshots when listing shares
-
setIncludeDeleted
Sets the status of including deleted shares when listing shares- Parameters:
includeDeleted
- Flag indicating if deleted shares should be included in the listing- Returns:
- An updated ListSharesOptions object
-
isIncludeDeleted
public boolean isIncludeDeleted()- Returns:
- the status of including deleted shares when listing shares
-