com.obs.services.model

## 类 RestoreObjectsRequest

- java.lang.Object
- - com.obs.services.model.GenericRequest
  - - com.obs.services.model.AbstractBulkRequest
    - - com.obs.services.model.RestoreObjectsRequest

-     public class RestoreObjectsRequest
      extends AbstractBulkRequest

  Request parameters of restoring Archive objects in a batch. The "prefix" and "keyAndVersions" parameters cannot be set in the same request. If both parameters are empty, all Archive objects in the bucket are restored.

- - ### 字段概要

    - ### 从类继承的字段 com.obs.services.model.AbstractBulkRequest

      `bucketName, listener, taskProgressInterval, taskQueueNum, taskThreadNum`

  - ### 构造器概要

    构造器
    构造器和说明
    `RestoreObjectsRequest()`
    `RestoreObjectsRequest(String bucketName)` Constructor
    `RestoreObjectsRequest(String bucketName, int days, RestoreTierEnum tier)` Constructor

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `KeyAndVersion` | `addKeyAndVersion(String objectKey)` Add an object to be restored.
    `KeyAndVersion` | `addKeyAndVersion(String objectKey, String versionId)` Add an object to be restored.
    `TaskCallback<RestoreObjectResult,RestoreObjectRequest>` | `getCallback()` Obtain the callback object of a batch task.
    `int` | `getDays()` Obtain the retention period of the restored objects.
    `List<KeyAndVersion>` | `getKeyAndVersions()` Obtain the list of objects to be restored.
    `String` | `getPrefix()` Obtain the name prefix of the objects to be restored in a batch.
    `RestoreTierEnum` | `getRestoreTier()` Obtain the restore option.
    `boolean` | `isVersionRestored()` Obtain whether to restore all versions of Archive objects.
    `void` | `setCallback(TaskCallback<RestoreObjectResult,RestoreObjectRequest> callback)` Set the callback object of a batch task.
    `void` | `setDays(int days)` Set the retention period of the restored objects.
    `void` | `setKeyAndVersions(List<KeyAndVersion> keyAndVersions)` Set the list of objects to be restored.
    `void` | `setPrefix(String prefix)` Set the name prefix of the objects to be restored in a batch.
    `void` | `setRestoreTier(RestoreTierEnum tier)` Set the restore option.
    `void` | `setVersionRestored(boolean versionRestored)` Set whether to restore all versions of Archive objects.
    `String` | `toString()`

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

      `getBucketName, getProgressInterval, getProgressListener, getTaskQueueNum, getTaskThreadNum, setBucketName, setProgressInterval, setProgressListener, setTaskQueueNum, setTaskThreadNum`

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

      `isRequesterPays, setRequesterPays`

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

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

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

    - #### RestoreObjectsRequest

          public RestoreObjectsRequest()

    - #### RestoreObjectsRequest

          public RestoreObjectsRequest(String bucketName)

      Constructor
      参数:
        `bucketName` - Bucket name

    - #### RestoreObjectsRequest

          public RestoreObjectsRequest(String bucketName,
                                       int days,
                                       RestoreTierEnum tier)

      Constructor
      参数:
        `bucketName` - Bucket name
        `days` - Retention period of the restored objects
        `tier` - Restore option

  - ### 方法详细资料

    - #### getDays

          public int getDays()

      Obtain the retention period of the restored objects. The value ranges from 1 to 30 (in days).
      返回:
        Retention period of the restored objects

    - #### setDays

          public void setDays(int days)

      Set the retention period of the restored objects. The value ranges from 1 to 30 (in days).
      参数:
        `days` - Retention period of the restored objects

    - #### getRestoreTier

          public RestoreTierEnum getRestoreTier()

      Obtain the restore option.
      返回:
        Restore option

    - #### setRestoreTier

          public void setRestoreTier(RestoreTierEnum tier)

      Set the restore option.
      参数:
        `tier` - Restore option

    - #### setPrefix

          public void setPrefix(String prefix)

      Set the name prefix of the objects to be restored in a batch.
      参数:
        `prefix` - Object name prefix

    - #### getPrefix

          public String getPrefix()

      Obtain the name prefix of the objects to be restored in a batch.
      返回:
        Object name prefix

    - #### isVersionRestored

          public boolean isVersionRestored()

      Obtain whether to restore all versions of Archive objects. The default value is "false", indicating that only latest versions of Archive objects are restored.
      返回:
        Identifier of version restore

    - #### setVersionRestored

          public void setVersionRestored(boolean versionRestored)

      Set whether to restore all versions of Archive objects.
      参数:
        `versionRestored` - Identifier of version restore

    - #### setKeyAndVersions

          public void setKeyAndVersions(List<KeyAndVersion> keyAndVersions)

      Set the list of objects to be restored.
      参数:
        `keyAndVersions` - List of objects to be restored

    - #### getKeyAndVersions

          public List<KeyAndVersion> getKeyAndVersions()

      Obtain the list of objects to be restored.
      返回:
        List of objects to be restored

    - #### addKeyAndVersion

          public KeyAndVersion addKeyAndVersion(String objectKey,
                                                String versionId)

      Add an object to be restored.
      参数:
        `objectKey` - Object name
        `versionId` - Object version
      返回:
        Object that has been added to be restored

    - #### addKeyAndVersion

          public KeyAndVersion addKeyAndVersion(String objectKey)

      Add an object to be restored.
      参数:
        `objectKey` - Object name
      返回:
        Object that has been added to be restored

    - #### getCallback

          public TaskCallback<RestoreObjectResult,RestoreObjectRequest> getCallback()

      Obtain the callback object of a batch task.
      返回:
        Callback object

    - #### setCallback

          public void setCallback(TaskCallback<RestoreObjectResult,RestoreObjectRequest> callback)

      Set the callback object of a batch task.
      参数:
        `callback` - Callback object

    - #### toString

          public String toString()

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

Copyright © 2021. All rights reserved.