com.aliyun.oss.model

## 类 DeleteVersionRequest

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

-     public class DeleteVersionRequest
      extends GenericRequest

  Provides options for deleting a specific version of an object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.

  Because deleting an object version is permanent and irreversible, it is a privileged operation that only the owner of the bucket containing the version may perform.

  An owner can only delete a version of an object if the owner has enabled versioning for their bucket. For more information about enabling versioning for a bucket, see `OSS#setBucketVersioning(SetBucketVersioningRequest)`.

  Note: When attempting to delete an object that does not exist, OSS returns a success message, not an error message.

- - ### 字段概要

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

      `NOOP`

  - ### 构造器概要

    构造器
    构造器和说明
    `DeleteVersionRequest(String bucketName, String key, String versionId)` Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key.

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getVersionId()` Gets the version ID uniquely identifying which version of the object to delete.
    `void` | `setVersionId(String versionId)` Sets the version ID uniquely identifying which version of the object to delete.
    `DeleteVersionRequest` | `withVersionId(String versionId)` Sets the version ID uniquely identifying which version of the object to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.

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

      `getBucketName, getKey, getRequestPayer, setBucketName, setKey, setRequestPayer, withBucketName, withKey, withRequestPayer`

    - ### 从类继承的方法 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`

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

    - #### DeleteVersionRequest

          public DeleteVersionRequest(String bucketName,
                              String key,
                              String versionId)

      Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key.
      参数:
        `bucketName` - The name of the bucket containing the version to delete.
        `key` - The key of the object version to delete.
        `versionId` - The version ID identifying the version to delete.
      另请参阅:
        `DeleteVersionRequest#DeleteVersionRequest(String, String, String, MultiFactorAuthentication)`

  - ### 方法详细资料

    - #### getVersionId

          public String getVersionId()

      Gets the version ID uniquely identifying which version of the object to delete.
      覆盖:
        `getVersionId` 在类中 `GenericRequest`
      返回:
        The version ID uniquely identifying which version of the object to delete.
      另请参阅:
        `setVersionId(String)`, `withVersionId(String)`

    - #### setVersionId

          public void setVersionId(String versionId)

      Sets the version ID uniquely identifying which version of the object to delete.
      覆盖:
        `setVersionId` 在类中 `GenericRequest`
      参数:
        `versionId` - The version ID uniquely identifying which version of the object to delete.
      另请参阅:
        `getVersionId()`, `withVersionId(String)`

    - #### withVersionId

          public DeleteVersionRequest withVersionId(String versionId)

      Sets the version ID uniquely identifying which version of the object to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
      覆盖:
        `withVersionId` 在类中 `GenericRequest`
      参数:
        `versionId` - The version ID uniquely identifying which version of the object to delete.
      返回:
        This `DeleteVersionRequest`, enabling additional method calls to be chained together.
      另请参阅:
        `getVersionId()`, `setVersionId(String)`

Copyright © 2020. All Rights Reserved.