com.obs.services.model

## 类 SetObjectMetadataRequest

- java.lang.Object
- - com.obs.services.model.GenericRequest
  - - com.obs.services.model.SetObjectMetadataRequest

-     public class SetObjectMetadataRequest
      extends GenericRequest

  Parameters in a request for setting object properties

- - ### 构造器概要

    构造器
    构造器和说明
    `SetObjectMetadataRequest()`
    `SetObjectMetadataRequest(String bucketName, String objectKey)` Constructor
    `SetObjectMetadataRequest(String bucketName, String objectKey, String versionId)` Constructor

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addAllUserMetadata(Map<String,String> userMetadata)` Add customized metadata for a group of objects.
    `void` | `addUserMetadata(String key, String value)` Add customized metadata for an object.
    `String` | `getBucketName()` Obtain the bucket name.
    `String` | `getCacheControl()` Obtain the rewritten "Cache-Control" header in the response.
    `String` | `getContentDisposition()` Obtain the rewritten "Content-Disposition" header in the response.
    `String` | `getContentEncoding()` Obtain the rewritten "Content-Encoding" header in the response.
    `String` | `getContentLanguage()` Obtain the rewritten "Content-Language" header in the response.
    `String` | `getContentType()` Obtain the rewritten "Content-Type" header in the response.
    `String` | `getExpires()` Obtain the rewritten "Expires" header in the response.
    `Map<String,String>` | `getMetadata()`
    `String` | `getObjectKey()` Obtain the object name.
    `StorageClassEnum` | `getObjectStorageClass()` Obtain the object storage class.
    `Object` | `getUserMetadata(String key)` Obtain the customized metadata of an object.
    `String` | `getVersionId()` Obtain the object version ID.
    `String` | `getWebSiteRedirectLocation()` Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
    `boolean` | `isRemoveUnset()` Specify whether to delete not specified properties.
    `void` | `setBucketName(String bucketName)` Set the bucket name.
    `void` | `setCacheControl(String cacheControl)` Rewrite the "Cache-Control" header in the response.
    `void` | `setContentDisposition(String contentDisposition)` Rewrite the "Content-Disposition" header in the response.
    `void` | `setContentEncoding(String contentEncoding)` Rewrite the "Content-Encoding" header in the response.
    `void` | `setContentLanguage(String contentLanguage)` Rewrite the "Content-Language" header in the response.
    `void` | `setContentType(String contentType)` Rewrite the "Content-Type" header in the response.
    `void` | `setExpires(String expires)` Rewrite the "Expires" header in the response.
    `void` | `setObjectKey(String objectKey)` Set the object name.
    `void` | `setObjectStorageClass(StorageClassEnum storageClass)` Set the object storage class.
    `void` | `setRemoveUnset(boolean removeUnset)` Specify whether to delete not specified properties.
    `void` | `setVersionId(String versionId)` Set the version ID of the object.
    `void` | `setWebSiteRedirectLocation(String webSiteRedirectLocation)` Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
    `String` | `toString()`

    - ### 从类继承的方法 com.obs.services.model.GenericRequest

      `isRequesterPays, setRequesterPays`

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

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

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

    - #### SetObjectMetadataRequest

          public SetObjectMetadataRequest()

    - #### SetObjectMetadataRequest

          public SetObjectMetadataRequest(String bucketName,
                                          String objectKey)

      Constructor
      参数:
        `bucketName` - Bucket name
        `objectKey` - Object name

    - #### SetObjectMetadataRequest

          public SetObjectMetadataRequest(String bucketName,
                                          String objectKey,
                                          String versionId)

      Constructor
      参数:
        `bucketName` - Bucket name
        `objectKey` - Object name
        `versionId` - Version ID of the object

  - ### 方法详细资料

    - #### getBucketName

          public String getBucketName()

      Obtain the bucket name.
      返回:
        Bucket name

    - #### setBucketName

          public void setBucketName(String bucketName)

      Set the bucket name.
      参数:
        `bucketName` - Bucket name

    - #### getObjectKey

          public String getObjectKey()

      Obtain the object name.
      返回:
        Object name

    - #### setObjectKey

          public void setObjectKey(String objectKey)

      Set the object name.
      参数:
        `objectKey` - Object name

    - #### getVersionId

          public String getVersionId()

      Obtain the object version ID.
      返回:
        Version ID of the object

    - #### setVersionId

          public void setVersionId(String versionId)

      Set the version ID of the object.
      参数:
        `versionId` - Version ID of the object

    - #### getWebSiteRedirectLocation

          public String getWebSiteRedirectLocation()

      Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
      返回:
        Redirection link

    - #### setWebSiteRedirectLocation

          public void setWebSiteRedirectLocation(String webSiteRedirectLocation)

      Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
      参数:
        `webSiteRedirectLocation` - Redirection link

    - #### getObjectStorageClass

          public StorageClassEnum getObjectStorageClass()

      Obtain the object storage class.
      返回:
        Object storage class

    - #### setObjectStorageClass

          public void setObjectStorageClass(StorageClassEnum storageClass)

      Set the object storage class.
      参数:
        `storageClass` - Object storage class

    - #### isRemoveUnset

          public boolean isRemoveUnset()

      Specify whether to delete not specified properties. The default value is "false." true: Use properties set in the request parameters to overwrite the existing property values. Properties not specified in the request will be deleted. false: Use properties set in the request parameters to overwrite the existing property values. For properties not specified in the request, their existing values are retained.
      返回:
        Identifier specifying whether to delete not specified properties

    - #### setRemoveUnset

          public void setRemoveUnset(boolean removeUnset)

      Specify whether to delete not specified properties.
      参数:
        `removeUnset` - Identifier specifying whether to delete not specified properties

    - #### addUserMetadata

          public void addUserMetadata(String key,
                                      String value)

      Add customized metadata for an object.
      参数:
        `key` - Keyword of the customized metadata
        `value` - Value of the customized metadata

    - #### addAllUserMetadata

          public void addAllUserMetadata(Map<String,String> userMetadata)

      Add customized metadata for a group of objects.
      参数:
        `userMetadata` - Customized metadata for a group of objects

    - #### getUserMetadata

          public Object getUserMetadata(String key)

      Obtain the customized metadata of an object.
      参数:
        `key` - Keyword of the customized metadata
      返回:
        Value of the customized metadata

    - #### getContentType

          public String getContentType()

      Obtain the rewritten "Content-Type" header in the response.
      返回:
        "Content-Type" header in the response

    - #### setContentType

          public void setContentType(String contentType)

      Rewrite the "Content-Type" header in the response.
      参数:
        `contentType` - "Content-Type" header in the response

    - #### getContentLanguage

          public String getContentLanguage()

      Obtain the rewritten "Content-Language" header in the response.
      返回:
        "Content-Language" header in the response

    - #### setContentLanguage

          public void setContentLanguage(String contentLanguage)

      Rewrite the "Content-Language" header in the response.
      参数:
        `contentLanguage` - "Content-Language" header in the response

    - #### getExpires

          public String getExpires()

      Obtain the rewritten "Expires" header in the response.
      返回:
        "Expires" header in the response

    - #### setExpires

          public void setExpires(String expires)

      Rewrite the "Expires" header in the response.
      参数:
        `expires` - Rewritten "Expires" header in the response

    - #### getCacheControl

          public String getCacheControl()

      Obtain the rewritten "Cache-Control" header in the response.
      返回:
        "Cache-Control" header in the response

    - #### setCacheControl

          public void setCacheControl(String cacheControl)

      Rewrite the "Cache-Control" header in the response.
      参数:
        `cacheControl` - "Cache-Control" header in the response

    - #### getContentDisposition

          public String getContentDisposition()

      Obtain the rewritten "Content-Disposition" header in the response.
      返回:
        "Content-Disposition" header in the response

    - #### setContentDisposition

          public void setContentDisposition(String contentDisposition)

      Rewrite the "Content-Disposition" header in the response.
      参数:
        `contentDisposition` - "Content-Disposition" header in the response

    - #### getContentEncoding

          public String getContentEncoding()

      Obtain the rewritten "Content-Encoding" header in the response.
      返回:
        "Content-Encoding" header in the response

    - #### setContentEncoding

          public void setContentEncoding(String contentEncoding)

      Rewrite the "Content-Encoding" header in the response.
      参数:
        `contentEncoding` - "Content-Encoding" header in the response

    - #### getMetadata

          public Map<String,String> getMetadata()

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `GenericRequest`

Copyright © 2021. All rights reserved.