com.aliyun.oss.model

## 类 VersionListing

- java.lang.Object
- - com.aliyun.oss.model.GenericResult
  - - com.aliyun.oss.model.VersionListing

-     public class VersionListing
      extends GenericResult

  Contains the results of listing the versions in an OSS bucket, including a list of `OSSVersionSummary` objects describing each version, information describing if this is a complete or partial listing, and the original request parameters.
  另请参阅:
    `OSS.listVersions(String, String)`, `OSS.listVersions(ListVersionsRequest)`

- - ### 构造器概要

    构造器
    构造器和说明
    `VersionListing()`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getBucketName()` Gets the name of the OSS bucket containing the versions listed in this `VersionListing`.
    `List<String>` | `getCommonPrefixes()` Gets the common prefixes included in this version listing.
    `String` | `getDelimiter()` Gets the value of the `delimiter` parameter used to request this version listing.
    `String` | `getEncodingType()` Gets the encoding type used by OSS to encode object key names in the XML response.
    `String` | `getKeyMarker()` The key marker parameter originally used to request this version listing, or `null` if no key marker was specified.
    `int` | `getMaxKeys()` Gets the value of the `maxKeys` parameter used to request this version listing.
    `String` | `getNextKeyMarker()` Gets the key marker to use in the next `listVersions` request in order to obtain the next page of results.
    `String` | `getNextVersionIdMarker()` Gets the version ID marker to use in the next `listVersions` request in order to obtain the next page of results.
    `String` | `getPrefix()` The prefix parameter originally used to request this version listing, or `null` if no prefix was specified.
    `String` | `getVersionIdMarker()` Gets the value of the version ID marker parameter used to request this version listing.
    `List<OSSVersionSummary>` | `getVersionSummaries()` Gets the list of version summaries describing the versions stored in the associated OSS bucket.
    `boolean` | `isTruncated()` Gets whether or not the version listing is complete, indicating if additional calls to OSS are needed to obtain complete version listing results.
    `void` | `setBucketName(String bucketName)` For internal use only.
    `void` | `setCommonPrefixes(List<String> commonPrefixes)` For internal use only.
    `void` | `setDelimiter(String delimiter)` For internal use only.
    `void` | `setEncodingType(String encodingType)` For internal use only.
    `void` | `setKeyMarker(String keyMarker)` For internal use only.
    `void` | `setMaxKeys(int maxKeys)` For internal use only.
    `void` | `setNextKeyMarker(String marker)` For internal use only.
    `void` | `setNextVersionIdMarker(String marker)` For internal use only.
    `void` | `setPrefix(String prefix)` For internal use only.
    `void` | `setTruncated(boolean isTruncated)` For internal use only.
    `void` | `setVersionIdMarker(String versionIdMarker)` For internal use only.
    `void` | `setVersionSummaries(List<OSSVersionSummary> versionSummaries)` For internal use only.

    - ### 从类继承的方法 com.aliyun.oss.model.GenericResult

      `getClientCRC, getRequestId, getResponse, getServerCRC, setClientCRC, setRequestId, setResponse, setServerCRC`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### VersionListing

          public VersionListing()

  - ### 方法详细资料

    - #### getVersionSummaries

          public List<OSSVersionSummary> getVersionSummaries()

      Gets the list of version summaries describing the versions stored in the associated OSS bucket. Callers should remember that listings for large buckets can be truncated for performance reasons, so callers might need to make additional calls to `OSS.listVersions(ListVersionsRequest)` to get additional results. Callers should always check `isTruncated()` to determine if a listing is truncated or not.
      返回:
        A list of the version summaries describing the versions stored in the associated OSS bucket.

    - #### setVersionSummaries

          public void setVersionSummaries(List<OSSVersionSummary> versionSummaries)

      For internal use only. Sets the list of version summaries describing the versions stored in the associated OSS bucket.
      参数:
        `versionSummaries` - The version summaries describing the versions stored in the associated OSS bucket.

    - #### getCommonPrefixes

          public List<String> getCommonPrefixes()

      Gets the common prefixes included in this version listing. Common prefixes are only present if a delimiter was specified in the original request.

      Each common prefix represents a set of keys in the OSS bucket that have been condensed and omitted from the version summary results. This allows applications to organize and browse their keys hierarchically, similar to how a file system organizes files into directories.

      For example, consider a bucket that contains the keys:

      - "foo/bar/baz"
      - "foo/bar/bash"
      - "foo/bar/bang"
      - "foo/boo"
      If calling `listVersions` with a prefix value of "foo/" and a delimiter value of "/" on this bucket, the returned `VersionListing` will contain one entry in the common prefixes list ("foo/bar/") and none of the keys beginning with that common prefix will be included in the version summaries list.
      返回:
        The list of common prefixes included in this version listing. Returns an empty list if no common prefixes are found.

    - #### setCommonPrefixes

          public void setCommonPrefixes(List<String> commonPrefixes)

      For internal use only. Sets the common prefixes for this version listing, representing the key prefixes that were rolled up because of the request's delimiter parameter.
      参数:
        `commonPrefixes` - The common prefixes for this version listing.

    - #### getBucketName

          public String getBucketName()

      Gets the name of the OSS bucket containing the versions listed in this `VersionListing`.
      返回:
        The name of the OSS bucket containing the versions listed in this OSSVersionListing.

    - #### setBucketName

          public void setBucketName(String bucketName)

      For internal use only. Sets the name of the OSS bucket containing the versions listed in this OSSVersionListing.
      参数:
        `bucketName` - The name of the OSS bucket containing the versions listed in this OSSVersionListing.

    - #### getPrefix

          public String getPrefix()

      The prefix parameter originally used to request this version listing, or `null` if no prefix was specified. All object keys included in this version listing start with the specified prefix.
      返回:
        The prefix parameter originally used to request this version listing, or `null` if no prefix was specified.

    - #### setPrefix

          public void setPrefix(String prefix)

      For internal use only. Sets the prefix parameter originally used to request this version listing.
      参数:
        `prefix` - The prefix parameter originally used to request this version listing.

    - #### getKeyMarker

          public String getKeyMarker()

      The key marker parameter originally used to request this version listing, or `null` if no key marker was specified. If specified, all object keys included in this version listing will occur lexically (alphabetically) after the specified key marker.
      返回:
        The key marker parameter originally used to request this version listing, or `null` if no key marker was specified.

    - #### setKeyMarker

          public void setKeyMarker(String keyMarker)

      For internal use only. Sets the key marker parameter originally used to request this version listing.
      参数:
        `keyMarker` - The key marker parameter originally used to request this version listing.

    - #### getVersionIdMarker

          public String getVersionIdMarker()

      Gets the value of the version ID marker parameter used to request this version listing. Returns `null` if no version ID marker was otherwise specified.
      返回:
        The version ID marker parameter originally used to request this version listing. Returns `null` if no version ID marker otherwise was specified.

    - #### setVersionIdMarker

          public void setVersionIdMarker(String versionIdMarker)

      For internal use only. Sets the version ID marker parameter originally used to request this version listing.
      参数:
        `versionIdMarker` - The version ID marker parameter originally used to request this version listing.

    - #### getMaxKeys

          public int getMaxKeys()

      Gets the value of the `maxKeys` parameter used to request this version listing. Returns the default `maxKeys` value provided by OSS if no parameter value was otherwise specified.

      The `maxKeys` parameter limits the number of versions included in this version listing. A version listing will never contain more versions than indicated by `maxKeys` , but can contain less.

      返回:
        The value of the `maxKeys` parameter used to request this version listing. Returns the default `maxKeys` value provided by OSS if no parameter value was otherwise specified.

    - #### setMaxKeys

          public void setMaxKeys(int maxKeys)

      For internal use only. Sets the maxKeys parameter originally used to request this object listing, or the default maxKeys applied by OSS if the requester didn't specify a value.
      参数:
        `maxKeys` - The maxKeys parameter originally used to request this version listing, or the default maxKeys value applied by OSS if the requester didn't specify a value.

    - #### getDelimiter

          public String getDelimiter()

      Gets the value of the `delimiter` parameter used to request this version listing. Returns `null` if no parameter value was otherwise specified.

      The delimiter value allows callers to condense OSS keys into common prefix listings. For example, if a caller specifies a delimiter of "/" (a common used value for delimiter), then any keys that contain a common prefix between the start of the key and the first occurrence of "/" will not be included in the list of object summaries; instead, the common prefixes list will have one entry for the common prefix.

      返回:
        The delimiter parameter originally used to request this version listing, or `null` if none was specified.

    - #### setDelimiter

          public void setDelimiter(String delimiter)

      For internal use only. Sets the delimiter parameter originally used to request this version listing.
      参数:
        `delimiter` - The delimiter parameter originally used to request this version listing.

    - #### getNextKeyMarker

          public String getNextKeyMarker()

      Gets the key marker to use in the next `listVersions` request in order to obtain the next page of results. Returns `null` if the version listing is not truncated. For truncated requests, this value is equal to the greatest (lexicographically) value of the object keys included in this listing.
      返回:
        The key marker to use in the next `listVersions` request in order to obtain the next page of results. Returns `null` if the version listing is not truncated.
      另请参阅:
        `isTruncated()`

    - #### setNextKeyMarker

          public void setNextKeyMarker(String marker)

      For internal use only. Sets the key marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.
      参数:
        `marker` - The key marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.

    - #### getNextVersionIdMarker

          public String getNextVersionIdMarker()

      Gets the version ID marker to use in the next `listVersions` request in order to obtain the next page of results. Returns `null` if the version listing is not truncated.
      返回:
        The version ID marker to use in the next `listVersions` request in order to see the next page of results. Returns `null` if the version listing is not truncated.
      另请参阅:
        `isTruncated()`

    - #### setNextVersionIdMarker

          public void setNextVersionIdMarker(String marker)

      For internal use only. Sets the version ID marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.
      参数:
        `marker` - The version ID marker to use in the next listVersions request in order to obtain the next page of results for a truncated version listing.

    - #### isTruncated

          public boolean isTruncated()

      Gets whether or not the version listing is complete, indicating if additional calls to OSS are needed to obtain complete version listing results.
      返回:
        The value `true` if this version listing is not complete, indicating additional calls to OSS are needed to obtain complete version listing results. Returns the value `false` if otherwise.

    - #### setTruncated

          public void setTruncated(boolean isTruncated)

      For internal use only. Sets the truncated property for this version listing, indicating if this is a complete listing or not and whether the caller needs to make additional calls to OSS to get more version summaries.
      参数:
        `isTruncated` - True if this version listing is not complete and the caller needs to make additional OSS calls to get additional version summaries.

    - #### getEncodingType

          public String getEncodingType()

      Gets the encoding type used by OSS to encode object key names in the XML response. If you specify `encodingType` request parameter, OSS includes this element in the response, and returns encoded key name values in the following response elements: `KeyMarker, NextKeyMarker, Prefix, Key, Delimiter`.
      返回:
        `Null` if `encodingType` is not specified in the request parameter.

    - #### setEncodingType

          public void setEncodingType(String encodingType)

      For internal use only. Sets the encoding type used by OSS to encode object key names in the XML response.
      参数:
        `encodingType` - `Null` if `encodingType` is not specified in the request parameter.

Copyright © 2020. All Rights Reserved.