类 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.
  • 字段详细资料

  • 构造器详细资料

    • 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
    • RestoreObjectsRequest

      public RestoreObjectsRequest(String bucketName, int days, RestoreTierEnum tier, String encodingType)
      Constructor
      参数:
      bucketName - Bucket name
      days - Retention period of the restored objects
      tier - Restore option
      encodingType - The encoding type use for encode objectKey.
  • 方法详细资料

    • 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

      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
    • setEncodingType

      public void setEncodingType(String encodingType)
      Set the encoding type that used for encode objectkey
      参数:
      encodingType - could chose url.
    • getEncodingType

      public String getEncodingType()
      Obtain the list of to-be-deleted objects.
      返回:
      List of to-be-deleted objects
    • toString

      public String toString()
      覆盖:
      toString 在类中 GenericRequest