com.baidubce.services.bos.model
Class RestoreObjectRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bos.model.GenericBucketRequest
          extended by com.baidubce.services.bos.model.GenericObjectRequest
              extended by com.baidubce.services.bos.model.RestoreObjectRequest

public class RestoreObjectRequest
extends GenericObjectRequest

Restore object request for restoring archive object


Constructor Summary
RestoreObjectRequest(String bucketName, String key)
          Sets the bucket and key of RestoreObjectRequest
 
Method Summary
 Integer getRestoreDays()
          Gets the restore days for this request
 String getRestoreTier()
          Get the restore tier used in this request
 void setRestoreDays(Integer restoreDays)
          Sets the restore days for this request
 void setRestoreTier(String restoreTier)
          Set the restore tier used in this request
 RestoreObjectRequest withBucketName(String bucketName)
          Sets the name of the bucket in which to restore object, and hence, the eventual object restored from RestoreObjectRequest.
 RestoreObjectRequest withKey(String key)
          Sets the key by which to restore, and hence, the eventual object restored from RestoreObjectRequest.
 RestoreObjectRequest withRequestCredentials(BceCredentials credentials)
          Sets the optional credentials to use for this request, overriding the default credentials set at the client level.
 RestoreObjectRequest withRestoreDays(Integer restoreDays)
          Sets the restore days for this request
 RestoreObjectRequest withRestoreTier(String restoreTier)
          Set the restore tier used in this request
 
Methods inherited from class com.baidubce.services.bos.model.GenericObjectRequest
getKey, setKey
 
Methods inherited from class com.baidubce.services.bos.model.GenericBucketRequest
getBucketName, setBucketName
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestoreObjectRequest

public RestoreObjectRequest(String bucketName,
                            String key)
Sets the bucket and key of RestoreObjectRequest

Parameters:
bucketName - The name of the bucket in which to restore object
key - The key by which to be restored
Method Detail

withKey

public RestoreObjectRequest withKey(String key)
Sets the key by which to restore, and hence, the eventual object restored from RestoreObjectRequest.

Returns this updated RestoreObjectRequest so that additional method calls can be chained together.

Specified by:
withKey in class GenericObjectRequest
Parameters:
key - The key by which to be restored
Returns:
This updated RestoreObjectRequest object.

withBucketName

public RestoreObjectRequest withBucketName(String bucketName)
Sets the name of the bucket in which to restore object, and hence, the eventual object restored from RestoreObjectRequest.

Returns this updated RestoreObjectRequest so that additional method calls can be chained together.

Specified by:
withBucketName in class GenericBucketRequest
Parameters:
bucketName - The name of the bucket in which to restore object
Returns:
This updated RestoreObjectRequest object.

withRequestCredentials

public RestoreObjectRequest withRequestCredentials(BceCredentials credentials)
Sets the optional credentials to use for this request, overriding the default credentials set at the client level.

Specified by:
withRequestCredentials in class AbstractBceRequest
Parameters:
credentials - The optional BCE security credentials to use for this request, overriding the default credentials set at the client level.

getRestoreDays

public Integer getRestoreDays()
Gets the restore days for this request

Returns:
restoreDays Days kept after restoring object

setRestoreDays

public void setRestoreDays(Integer restoreDays)
Sets the restore days for this request

Parameters:
restoreDays - Days kept after restoring object

withRestoreDays

public RestoreObjectRequest withRestoreDays(Integer restoreDays)
Sets the restore days for this request

Parameters:
restoreDays - Days kept after restoring object
Returns:
This RestoreObjectRequest, so that additional method calls to be chained together.

getRestoreTier

public String getRestoreTier()
Get the restore tier used in this request

Returns:
restoreTier The restore tier used in restoring object

setRestoreTier

public void setRestoreTier(String restoreTier)
Set the restore tier used in this request

Parameters:
restoreTier - The restore tier used in restoring object

withRestoreTier

public RestoreObjectRequest withRestoreTier(String restoreTier)
Set the restore tier used in this request

Parameters:
restoreTier - The restore tier used in restoring object
Returns:
This RestoreObjectRequest, so that additional method calls to be chained together.


Copyright © 2020. All rights reserved.