com.aliyun.oss.model

## 类 ListObjectsV2Request

- java.lang.Object
- - com.aliyun.oss.model.WebServiceRequest
  - - com.aliyun.oss.model.GenericRequest
    - - com.aliyun.oss.model.ListObjectsV2Request

-     public class ListObjectsV2Request
      extends GenericRequest

  This is the request class to list objects under a bucket.

- - ### 字段概要

    - ### 从类继承的字段 com.aliyun.oss.model.WebServiceRequest

      `NOOP`

  - ### 构造器概要

    构造器
    构造器和说明
    `ListObjectsV2Request()`
    `ListObjectsV2Request(String bucketName)` Constructs a new `ListObjectsRequest` object and initializes the bucketName parameter.
    `ListObjectsV2Request(String bucketName, String prefix)` Constructs a new `ListObjectsRequest` object and initializes the bucketName and prefix parameters.
    `ListObjectsV2Request(String bucketName, String prefix, String continuationToken, String startAfter, String delimiter, Integer maxKeys, String encodingType, boolean fetchOwner)` Constructs a new `ListObjectsRequest` object and initializes all optional parameters.

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getContinuationToken()` Gets the optional continuation token.
    `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 `ListObjectsV2Result.getCommonPrefixes()` list.
    `String` | `getEncodingType()` Gets the optional encodingType parameter indicating the encoding method to be applied on the response.
    `Integer` | `getMaxKeys()` Gets the optional parameter indicating the maximum number of keys to include in the response.
    `String` | `getPrefix()` Gets the optional prefix parameter and restricts the response to keys that begin with the specified prefix.
    `String` | `getStartAfter()` Returns optional parameter indicating where you want OSS to start the object listing from.
    `boolean` | `isFetchOwner()` Returns if fetch owner is set.
    `void` | `setContinuationToken(String continuationToken)` Sets the optional continuation token.
    `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 `ListObjectsV2Result.getCommonPrefixes()` list.
    `void` | `setEncodingType(String encodingType)` Sets the optional parameter indicating the encoding method to be applied on the response.
    `void` | `setFetchOwner(boolean fetchOwner)` Sets the optional fetch owner flag.
    `void` | `setMaxKeys(Integer maxKeys)` Sets the optional parameter indicating the maximum number of keys 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` | `setStartAfter(String startAfter)` Sets the optional parameter indicating where you want OSS to start the object listing from.
    `ListObjectsV2Request` | `withBucketName(String bucketName)`
    `ListObjectsV2Request` | `withContinuationToken(String continuationToken)` Sets the optional continuation token.
    `ListObjectsV2Request` | `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 rolled up into a single result element in the `ListObjectsV2Result.getCommonPrefixes()` list.
    `ListObjectsV2Request` | `withEncodingType(String encodingType)` Sets the optional parameter indicating the encoding method to be applied on the response.
    `ListObjectsV2Request` | `withFetchOwner(boolean fetchOwner)` Sets the optional fetch owner flag.
    `ListObjectsV2Request` | `withMaxKeys(Integer maxKeys)` Sets the optional parameter indicating the maximum number of keys to include in the response.
    `ListObjectsV2Request` | `withPrefix(String prefix)` Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix.
    `ListObjectsV2Request` | `withStartAfter(String startAfter)` Sets the optional parameter indicating where you want OSS to start the object listing from.

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

      `getBucketName, getKey, getRequestPayer, getVersionId, setBucketName, setKey, setRequestPayer, setVersionId, withKey, withRequestPayer, withVersionId`

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

      `addAdditionalHeaderName, addHeader, addParameter, getAdditionalHeaderNames, getHeaders, getParameters, getProgressListener, isLogEnabled, setAdditionalHeaderNames, setHeaders, setLogEnabled, setParameters, setProgressListener, withProgressListener`

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

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

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

    - #### ListObjectsV2Request

          public ListObjectsV2Request()

    - #### ListObjectsV2Request

          public ListObjectsV2Request(String bucketName)

      Constructs a new `ListObjectsRequest` object and initializes the bucketName parameter.
      参数:
        `bucketName` - The bucket name.

    - #### ListObjectsV2Request

          public ListObjectsV2Request(String bucketName,
                              String prefix)

      Constructs a new `ListObjectsRequest` object and initializes the bucketName and prefix parameters.
      参数:
        `bucketName` - The bucket name.
        `prefix` - The prefix restricting the objects listing.

    - #### ListObjectsV2Request

          public ListObjectsV2Request(String bucketName,
                              String prefix,
                              String continuationToken,
                              String startAfter,
                              String delimiter,
                              Integer maxKeys,
                              String encodingType,
                              boolean fetchOwner)

      Constructs a new `ListObjectsRequest` object and initializes all optional parameters.
      参数:
        `bucketName` - The bucket name.
        `prefix` - The prefix restricting the objects listing.
        `continuationToken` - The continuation token allows list to be continued from a specific point. It values the last result `ListObjectsV2Result.getNextContinuationToken()`.
        `startAfter` - Where you want oss to start the object listing from.
        `delimiter` - The delimiter for condensing common prefixes in the returned listing results.
        `maxKeys` - The maximum number of results to return.
        `encodingType` - the encoding method to be applied on the response.
        `fetchOwner` - Whether to get the owner filed in the response or not.

  - ### 方法详细资料

    - #### withBucketName

          public ListObjectsV2Request withBucketName(String bucketName)

      覆盖:
        `withBucketName` 在类中 `GenericRequest`
      参数:
        `bucketName` - The name of the bucket that you want to listing.
      返回:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.

    - #### getDelimiter

          public 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 `ListObjectsV2Result.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.
      返回:
        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 `ListObjectsV2Result.getCommonPrefixes()` list.

    - #### setDelimiter

          public 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 `ListObjectsV2Result.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 `ListObjectsV2Result.getCommonPrefixes()` list.

    - #### withDelimiter

          public ListObjectsV2Request 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 rolled up into a single result element in the `ListObjectsV2Result.getCommonPrefixes()` list. Returns this `ListObjectsRequest`, 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 rolled up into a single result element in the `ListObjectsV2Result.getCommonPrefixes()` list.
      返回:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.

    - #### getEncodingType

          public String getEncodingType()

      Gets the optional encodingType parameter indicating the encoding method to be applied on the response.
      返回:
        The encoding method to be applied on the response.

    - #### setEncodingType

          public void setEncodingType(String encodingType)

      Sets the optional 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 OSS encode the keys in the response.
      参数:
        `encodingType` - The encoding method to be applied on the response. Valid values: null (not encoded) or "url".

    - #### withEncodingType

          public ListObjectsV2Request withEncodingType(String encodingType)

      Sets the optional 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 OSS encode the keys in the response. Returns this `ListObjectsV2Request`, 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".

    - #### getMaxKeys

          public Integer getMaxKeys()

      Gets the optional parameter indicating the maximum number of keys to include in the response. OSS might return fewer keys than specified, but will never return more. Even if the optional parameter is not specified, OSS will limit the number of results in the response.
      返回:
        The optional parameter indicating the maximum number of keys to include in the response.

    - #### setMaxKeys

          public void setMaxKeys(Integer maxKeys)

      Sets the optional parameter indicating the maximum number of keys to include in the response.
      参数:
        `maxKeys` - The optional parameter indicating the maximum number of keys to include in the response.

    - #### withMaxKeys

          public ListObjectsV2Request withMaxKeys(Integer maxKeys)

      Sets the optional parameter indicating the maximum number of keys to include in the response. Returns this `ListObjectsV2Request`, enabling additional method calls to be chained together.
      参数:
        `maxKeys` - The optional parameter indicating the maximum number of keys to include in the response.
      返回:
        This `ListObjectsV2Request`, enabling additional method calls to be chained together.
      另请参阅:
        `getMaxKeys()`, `setMaxKeys(Integer)`

    - #### getPrefix

          public String getPrefix()

      Gets the optional prefix parameter and restricts the response to keys that begin with the specified prefix. Use prefixes to separate a bucket into different sets of keys, similar to how a file system organizes files into directories.
      返回:
        The optional prefix parameter restricting the response to keys that begin with the specified prefix.

    - #### setPrefix

          public void setPrefix(String prefix)

      Sets the optional prefix parameter, restricting the response to keys that begin with the specified prefix.
      参数:
        `prefix` - The optional prefix parameter, restricting the response to keys that begin with the specified prefix.

    - #### withPrefix

          public ListObjectsV2Request withPrefix(String prefix)

      Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix. Returns this `ListObjectsV2Request`, enabling additional method calls to be chained together.
      参数:
        `prefix` - The optional prefix parameter restricting the response to keys that begin with the specified prefix.
      返回:
        This `ListObjectsV2Request`, enabling additional method calls to be chained together.

    - #### getContinuationToken

          public String getContinuationToken()

      Gets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.
      返回:
        The optional continuation token associated with this request.

    - #### setContinuationToken

          public void setContinuationToken(String continuationToken)

      Sets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.
      参数:
        `continuationToken` - The optional continuation token to associate with this request.

    - #### withContinuationToken

          public ListObjectsV2Request withContinuationToken(String continuationToken)

      Sets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.
      参数:
        `continuationToken` - The optional continuation token to associate with this request.
      返回:
        This `ListObjectsV2Request`, enabling additional method calls to be chained together.

    - #### isFetchOwner

          public boolean isFetchOwner()

      Returns if fetch owner is set. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included.
      返回:
        whether fetchOwner is set

    - #### setFetchOwner

          public void setFetchOwner(boolean fetchOwner)

      Sets the optional fetch owner flag. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included.
      参数:
        `fetchOwner` - Set to true if the owner field should be included in results

    - #### withFetchOwner

          public ListObjectsV2Request withFetchOwner(boolean fetchOwner)

      Sets the optional fetch owner flag. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included in `OSSObjectSummary`.
      参数:
        `fetchOwner` - Set to true if the owner field should be included in results
      返回:
        This `ListObjectsV2Request`, enabling additional method calls to be chained together.

    - #### getStartAfter

          public String getStartAfter()

      Returns optional parameter indicating where you want OSS to start the object listing from. This can be any key in the bucket.
      返回:
        the optional startAfter parameter

    - #### setStartAfter

          public void setStartAfter(String startAfter)

      Sets the optional parameter indicating where you want OSS to start the object listing from. This can be any key in the bucket.
      参数:
        `startAfter` - The optional startAfter parameter. This can be any key in the bucket.

    - #### withStartAfter

          public ListObjectsV2Request withStartAfter(String startAfter)

      Sets the optional parameter indicating where you want OSS to start the object listing from. This can be any key in the bucket.
      参数:
        `startAfter` - The optional startAfter parameter.
      返回:
        This `ListObjectsV2Request`, enabling additional method calls to be chained together.

Copyright © 2020. All Rights Reserved.