public class ListVersionsRequest extends CosServiceRequest implements Serializable
| 构造器和说明 |
|---|
ListVersionsRequest()
Constructs a new
ListVersionsRequest object. |
ListVersionsRequest(String bucketName,
String prefix,
String keyMarker,
String versionIdMarker,
String delimiter,
Integer maxResults)
Constructs a new
ListVersionsRequest object and initializes all required and optional
fields. |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getBucketName()
Gets the name of the COS bucket whose versions are to be listed.
|
String |
getDelimiter()
Gets the optional delimiter parameter that causes keys that contain the same string between
the prefix and the first occurrence of the delimiter to be combined into a single result
element in the
VersionListing.getCommonPrefixes() list. |
String |
getEncodingType()
Gets the optional
encodingType parameter indicating the encoding method to be
applied on the response. |
String |
getKeyMarker()
Gets the optional
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results. |
Integer |
getMaxResults()
Gets the optional
maxResults parameter indicating the maximum number of results
to include in the response. |
String |
getPrefix()
Gets the optional prefix parameter restricting the response to keys that begin with the
specified prefix.
|
String |
getVersionIdMarker()
Gets the optional
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results. |
void |
setBucketName(String bucketName)
Sets the name of the COS bucket whose versions are to be listed.
|
void |
setDelimiter(String delimiter)
Sets the optional delimiter parameter that causes keys that contain the same string between
the prefix and the first occurrence of the delimiter to be combined into a single result
element in the
VersionListing.getCommonPrefixes() list. |
void |
setEncodingType(String encodingType)
Sets the optional
encodingType parameter indicating the encoding method to be
applied on the response. |
void |
setKeyMarker(String keyMarker)
Sets the optional
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results. |
void |
setMaxResults(Integer maxResults)
Sets the optional
maxResults parameter indicating the maximum number of results
to include in the response. |
void |
setPrefix(String prefix)
Sets the optional prefix parameter restricting the response to keys that begin with the
specified prefix.
|
void |
setVersionIdMarker(String versionIdMarker)
Sets the optional
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results. |
ListVersionsRequest |
withBucketName(String bucketName)
Sets the name of the COS bucket whose versions are to be listed.
|
ListVersionsRequest |
withDelimiter(String delimiter)
Sets the optional delimiter parameter that causes keys that contain the same string between
the prefix and the first occurrence of the delimiter to be combined into a single result
element in the
VersionListing.getCommonPrefixes() list. |
ListVersionsRequest |
withEncodingType(String encodingType)
Sets the optional
encodingType parameter indicating the encoding method to be
applied on the response. |
ListVersionsRequest |
withKeyMarker(String keyMarker)
Sets the optional
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results. |
ListVersionsRequest |
withMaxResults(Integer maxResults)
Sets the optional
maxResults parameter indicating the maximum number of results
to include in the response. |
ListVersionsRequest |
withPrefix(String prefix)
Sets the optional prefix parameter restricting the response to keys that begin with the
specified prefix.
|
ListVersionsRequest |
withVersionIdMarker(String versionIdMarker)
Sets the optional
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results. |
clone, copyBaseTo, getCloneRoot, getCloneSource, getCosCredentials, getCustomQueryParameters, getCustomRequestHeaders, getFixedEndpointAddr, getGeneralProgressListener, getReadLimit, getRequestClientOptions, putCustomQueryParameter, putCustomRequestHeader, setCosCredentials, setFixedEndpointAddr, setGeneralProgressListener, withGeneralProgressListenerpublic ListVersionsRequest()
ListVersionsRequest object. The caller must populate the fields
before the request is executed.public ListVersionsRequest(String bucketName, String prefix, String keyMarker, String versionIdMarker, String delimiter, Integer maxResults)
ListVersionsRequest object and initializes all required and optional
fields.bucketName - The name of the bucket whose versions are to be listed.prefix - The prefix restricting what keys will be listed.keyMarker - The key marker indicating where results should begin.versionIdMarker - The version ID marker indicating where results should begin.delimiter - The delimiter for condensing common prefixes in returned results.maxResults - The maximum number of results to return.ListVersionsRequest()public String getBucketName()
setBucketName(String),
withBucketName(String)public void setBucketName(String bucketName)
bucketName - The name of the COS bucket whose versions are to be listed.getBucketName(),
withBucketName(String)public ListVersionsRequest withBucketName(String bucketName)
ListVersionsRequest, enabling additional method calls to be chained together.bucketName - The name of the COS bucket whose versions are to be listed.ListVersionsRequest, enabling additional method calls to be chained
together.getBucketName(),
setBucketName(String)public String getPrefix()
setPrefix(String),
withPrefix(String)public void setPrefix(String prefix)
prefix - The optional prefix parameter restricting the response to keys that begin with
the specified prefix.getPrefix(),
withPrefix(String)public ListVersionsRequest withPrefix(String prefix)
ListVersionsRequest, enabling additional method calls
to be chained together.prefix - The optional prefix parameter restricting the response to keys that begin with
the specified prefix.ListVersionsRequest, enabling additional method calls to be chained
together.getPrefix(),
setPrefix(String)public String getKeyMarker()
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results. Results are always ordered first
lexicographically (i.e. alphabetically) and then from most recent version to least recent
version.
If a keyMarker is used without a version ID marker, results begin immediately
after that key's last version. When a keyMarker is used with a version ID
marker, results begin immediately after the version with the specified key and version ID.
keyMarker parameter indicating where in the sorted list of
all versions in the specified bucket to begin returning results.setKeyMarker(String),
withKeyMarker(String)public void setKeyMarker(String keyMarker)
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results.keyMarker - The optional keyMarker parameter indicating where in the sorted
list of all versions in the specified bucket to begin returning results.getKeyMarker(),
withKeyMarker(String)public ListVersionsRequest withKeyMarker(String keyMarker)
keyMarker parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results. Returns this
ListVersionsRequest, enabling additional method calls to be chained together.keyMarker - The optional keyMarker parameter indicating where in the sorted
list of all versions in the specified bucket to begin returning results.ListVersionsRequest, enabling additional method calls to be chained
together.getKeyMarker(),
setKeyMarker(String)public String getVersionIdMarker()
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results. Results are always
ordered first lexicographically (i.e. alphabetically) and then from most recent version to
least recent version.
A key marker must be specified when specifying a versionIdMarker. Results begin
immediately after the version with the specified key and version ID.
versionIdMarker parameter indicating where in the sorted
list of all versions in the specified bucket to begin returning results.setVersionIdMarker(String),
withVersionIdMarker(String)public void setVersionIdMarker(String versionIdMarker)
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results.versionIdMarker - The optional versionIdMarker parameter indicating where
in the sorted list of all versions in the specified bucket to begin returning results.getVersionIdMarker(),
withVersionIdMarker(String)public ListVersionsRequest withVersionIdMarker(String versionIdMarker)
versionIdMarker parameter indicating where in the sorted list
of all versions in the specified bucket to begin returning results. Returns this
ListVersionsRequest, enabling additional method calls to be chained together.versionIdMarker - The optional versionIdMarker parameter indicating where
in the sorted list of all versions in the specified bucket to begin returning results.ListVersionsRequest, enabling additional method calls to be chained
together.getVersionIdMarker(),
setVersionIdMarker(String)public String getDelimiter()
VersionListing.getCommonPrefixes() list. These combined keys are not
returned elsewhere in the response.
The most commonly used delimiter is "/", which simulates a hierarchical organization similar to a file system directory structure.
VersionListing.getCommonPrefixes() list.setDelimiter(String),
withDelimiter(String)public void setDelimiter(String delimiter)
VersionListing.getCommonPrefixes() list.delimiter - The optional delimiter parameter that causes keys that contain the same
string between the prefix and the first occurrence of the delimiter to be combined
into a single result element in the VersionListing.getCommonPrefixes() list.getDelimiter(),
withDelimiter(String)public ListVersionsRequest withDelimiter(String delimiter)
VersionListing.getCommonPrefixes() list. Returns this
ListVersionsRequest, enabling additional method calls to be chained together.delimiter - The optional delimiter parameter that causes keys that contain the same
string between the prefix and the first occurrence of the delimiter to be combined
into a single result element in the VersionListing.getCommonPrefixes() list.ListVersionsRequest, enabling additional method calls to be chained
together.getDelimiter(),
setDelimiter(String)public Integer getMaxResults()
maxResults parameter indicating the maximum number of results
to include in the response. COS might return fewer than this, but will never return more.
Even if maxResults is not specified, COS will limit the number of results in the
response.maxResults parameter indicating the maximum number of
resultssetMaxResults(Integer),
withMaxResults(Integer)public void setMaxResults(Integer maxResults)
maxResults parameter indicating the maximum number of results
to include in the response.maxResults - The optional maxResults parameter indicating the maximum
number of results to include in the response.getMaxResults(),
withMaxResults(Integer)public ListVersionsRequest withMaxResults(Integer maxResults)
maxResults parameter indicating the maximum number of results
to include in the response. Returns this ListVersionsRequest, enabling additional
method calls to be chained together.maxResults - The optional maxResults parameter indicating the maximum
number of results to include in the response.ListVersionsRequest, enabling additional method calls to be chained
together.getMaxResults(),
setMaxResults(Integer)public String getEncodingType()
encodingType parameter indicating the encoding method to be
applied on the response.public void setEncodingType(String encodingType)
encodingType parameter indicating the encoding method to be
applied on the response. An object key can contain any Unicode character; however, XML 1.0
parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For
characters that are not supported in XML 1.0, you can add this parameter to request that COS
encode the keys in the response.encodingType - The encoding method to be applied on the response. Valid values: null
(not encoded) or "url".public ListVersionsRequest withEncodingType(String encodingType)
encodingType parameter indicating the encoding method to be
applied on the response. An object key can contain any Unicode character; however, XML 1.0
parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For
characters that are not supported in XML 1.0, you can add this parameter to request that COS
encode the keys in the response. Returns this ListVersionsRequest, enabling
additional method calls to be chained together.encodingType - The encoding method to be applied on the response. Valid values: null
(not encoded) or "url".Copyright © 2022. All rights reserved.