类 CopyObjectRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.bos.model.GenericBucketRequest
-
- com.baidubce.services.bos.model.GenericObjectRequest
-
- com.baidubce.services.bos.model.CopyObjectRequest
-
public class CopyObjectRequest extends GenericObjectRequest
Provides options for copying an Baidu Bos object from a source location to a new destination.All
CopyObjectRequestsmust specify a source bucket and key, along with a destination bucket and key.
-
-
字段概要
-
从类继承的字段 com.baidubce.services.bos.model.GenericObjectRequest
trafficLimitBitPS
-
-
构造器概要
构造器 构造器 说明 CopyObjectRequest(String sourceBucketName, String sourceKey, String bucketName, String key)Constructs a new CopyObjectRequest with only basic options.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetETag()Gets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.StringgetModifiedSinceConstraint()Gets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.ObjectMetadatagetNewObjectMetadata()Gets the optional object metadata to set for the new, copied object.StringgetNoneMatchETagConstraint()Gets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.StringgetSourceBucketName()Gets the name of the bucket containing the source object to be copied.StringgetSourceKey()Gets the source bucket key under which the source object to be copied is stored.StringgetStorageClass()Gets the storageClass of the input file which is to be copyed to Baidu Bos.longgetTrafficLimitBitPS()Gets the limit of put object speed.StringgetUnmodifiedSinceConstraint()Gets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.voidsetETag(String eTag)Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.voidsetModifiedSinceConstraint(String modifiedSinceConstraint)Sets the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.voidsetNewObjectMetadata(ObjectMetadata newObjectMetadata)Sets the object metadata to use for the new, copied object.voidsetNoneMatchETagConstraint(String noneMatchETagConstraint)Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.voidsetSourceBucketName(String sourceBucketName)Sets the name of the bucket containing the source object to be copied.voidsetSourceKey(String sourceKey)Sets the source bucket key under which the source object to be copied is stored.voidsetStorageClass(String storageClass)Sets the storageClass of the input file which is to be copyed to Baidu Bos.voidsetTrafficLimitBitPS(long trafficLimitBitPS)Sets Gets the limit of put object speed.voidsetUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)Sets the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.CopyObjectRequestwithBucketName(String bucketName)Sets the name of the destination bucket which will contain the new, copied object and returns this object, enabling additional method calls to be chained together.CopyObjectRequestwithETag(String eTag)Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.CopyObjectRequestwithKey(String key)Sets the destination bucket key under which the new, copied object will be stored and returns this object, enabling additional method calls can be chained together.CopyObjectRequestwithModifiedSinceConstraint(String modifiedSinceConstraint)Sets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.CopyObjectRequestwithNewObjectMetadata(ObjectMetadata newObjectMetadata)Sets the object metadata to use for the new, copied object and returns this object, enabling additional method calls to be chained together.CopyObjectRequestwithNoMatchingETagConstraint(String noneMatchETagConstraint)Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.CopyObjectRequestwithRequestCredentials(BceCredentials credentials)CopyObjectRequestwithSourceBucketName(String sourceBucketName)Sets the name of the bucket containing the source object to be copied, and returns this object, enabling additional method calls to be chained together.CopyObjectRequestwithSourceKey(String sourceKey)Sets the key in the source bucket under which the source object to be copied is stored and returns this object, enabling additional method calls to be chained together.CopyObjectRequestwithStorageClass(String storageClass)Sets the storageClass of the input file which is to be copyed to Baidu Bos.CopyObjectRequestwithTrafficLimitBitPS(long trafficLimitBitPS)CopyObjectRequestwithUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)Sets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.-
从类继承的方法 com.baidubce.services.bos.model.GenericObjectRequest
getKey, setKey
-
从类继承的方法 com.baidubce.services.bos.model.GenericBucketRequest
getBucketName, setBucketName
-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
构造器详细资料
-
CopyObjectRequest
public CopyObjectRequest(String sourceBucketName, String sourceKey, String bucketName, String key)
Constructs a new CopyObjectRequest with only basic options.- 参数:
sourceBucketName- The name of the Bos bucket containing the object to copy.sourceKey- The source bucket key under which the object to copy is stored.bucketName- The name of the Bos bucket to which the new object will be copied.key- The destination bucket key under which the new object will be copied.
-
-
方法详细资料
-
getSourceBucketName
public String getSourceBucketName()
Gets the name of the bucket containing the source object to be copied.- 返回:
- The name of the bucket containing the source object to be copied.
-
setSourceBucketName
public void setSourceBucketName(String sourceBucketName)
Sets the name of the bucket containing the source object to be copied.- 参数:
sourceBucketName- The name of the bucket containing the source object to be copied.
-
withSourceBucketName
public CopyObjectRequest withSourceBucketName(String sourceBucketName)
Sets the name of the bucket containing the source object to be copied, and returns this object, enabling additional method calls to be chained together.- 参数:
sourceBucketName- The name of the bucket containing the source object to be copied.- 返回:
- This
CopyObjectRequestinstance, enabling additional method calls to be chained together.
-
getSourceKey
public String getSourceKey()
Gets the source bucket key under which the source object to be copied is stored.- 返回:
- The source bucket key under which the source object to be copied is stored.
-
setSourceKey
public void setSourceKey(String sourceKey)
Sets the source bucket key under which the source object to be copied is stored.- 参数:
sourceKey- The source bucket key under which the source object to be copied is stored.
-
withSourceKey
public CopyObjectRequest withSourceKey(String sourceKey)
Sets the key in the source bucket under which the source object to be copied is stored and returns this object, enabling additional method calls to be chained together.- 参数:
sourceKey- The key in the source bucket under which the source object to be copied is stored.- 返回:
- This
CopyObjectRequestinstance, enabling additional method calls to be chained together.
-
withRequestCredentials
public CopyObjectRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
withBucketName
public CopyObjectRequest withBucketName(String bucketName)
Sets the name of the destination bucket which will contain the new, copied object and returns this object, enabling additional method calls to be chained together.- 指定者:
withBucketName在类中GenericBucketRequest- 参数:
bucketName- The name of the destination bucket which will contain the new, copied object.- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
withKey
public CopyObjectRequest withKey(String key)
Sets the destination bucket key under which the new, copied object will be stored and returns this object, enabling additional method calls can be chained together.- 指定者:
withKey在类中GenericObjectRequest- 参数:
key- The destination bucket key under which the new, copied object will be stored.- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getNewObjectMetadata
public ObjectMetadata getNewObjectMetadata()
Gets the optional object metadata to set for the new, copied object.- 返回:
- The object metadata to set for the newly copied object.
Returns
nullif no object metadata has been specified.
-
setNewObjectMetadata
public void setNewObjectMetadata(ObjectMetadata newObjectMetadata)
Sets the object metadata to use for the new, copied object. By default the object metadata from the source object is copied to the destination object, but when setting object metadata with this method, no metadata from the source object is copied. Instead, the new destination object will have the metadata specified with this call.- 参数:
newObjectMetadata- The object metadata to use for the newly copied object.
-
withNewObjectMetadata
public CopyObjectRequest withNewObjectMetadata(ObjectMetadata newObjectMetadata)
Sets the object metadata to use for the new, copied object and returns this object, enabling additional method calls to be chained together. By default, the object metadata from the source object will be copied to the destination object, but if callers set object metadata with this method, it will be used instead.- 参数:
newObjectMetadata- The object metadata to use for the newly copied object.- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getETag
public String getETag()
Gets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.- 返回:
- The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.
-
setETag
public void setETag(String eTag)
Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.- 参数:
eTag- The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.
-
withETag
public CopyObjectRequest withETag(String eTag)
Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.- 参数:
eTag- The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getStorageClass
public String getStorageClass()
Gets the storageClass of the input file which is to be copyed to Baidu Bos.- 返回:
- storageClass The storageClass is an identification that distinguish between infrequent access bos and standard bos.
-
setStorageClass
public void setStorageClass(String storageClass)
Sets the storageClass of the input file which is to be copyed to Baidu Bos.- 参数:
storageClass- The storageClass is an identification that distinguish between infrequent access bos and standard bos.
-
withStorageClass
public CopyObjectRequest withStorageClass(String storageClass)
Sets the storageClass of the input file which is to be copyed to Baidu Bos.- 参数:
storageClass- The StorageClass is an identification that distinguish between infrequent access bos and standard bos.- 返回:
- This CopyObjectRequest, so that additional method calls can be chained together.
-
getUnmodifiedSinceConstraint
public String getUnmodifiedSinceConstraint()
Gets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.- 返回:
- unmodifiedSinceConstraint
-
setUnmodifiedSinceConstraint
public void setUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)
Sets the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.- 参数:
unmodifiedSinceConstraint- the value of the unmodifiedSinceConstraint
-
withUnmodifiedSinceConstraint
public CopyObjectRequest withUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)
Sets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.- 参数:
unmodifiedSinceConstraint- the value of the unmodifiedSinceConstraint- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getModifiedSinceConstraint
public String getModifiedSinceConstraint()
Gets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.- 返回:
- modifiedSinceConstraint
-
setModifiedSinceConstraint
public void setModifiedSinceConstraint(String modifiedSinceConstraint)
Sets the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.- 参数:
modifiedSinceConstraint- the value of the modifiedSinceConstraint
-
withModifiedSinceConstraint
public CopyObjectRequest withModifiedSinceConstraint(String modifiedSinceConstraint)
Sets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.- 参数:
modifiedSinceConstraint- the value of the modifiedSinceConstraint- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getNoneMatchETagConstraint
public String getNoneMatchETagConstraint()
Gets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.- 返回:
- noneMatchETagConstraint
-
setNoneMatchETagConstraint
public void setNoneMatchETagConstraint(String noneMatchETagConstraint)
Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.- 参数:
noneMatchETagConstraint- the constraint value
-
withNoMatchingETagConstraint
public CopyObjectRequest withNoMatchingETagConstraint(String noneMatchETagConstraint)
Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.- 参数:
noneMatchETagConstraint- the constraint value- 返回:
- This
CopyObjectRequest, enabling additional method calls to be chained together.
-
getTrafficLimitBitPS
public long getTrafficLimitBitPS()
Gets the limit of put object speed.- 返回:
- the limit of put object speed. unit: bit/s
-
setTrafficLimitBitPS
public void setTrafficLimitBitPS(long trafficLimitBitPS)
Sets Gets the limit of put object speed. range: 819200 bit/s ~ 838860800 bit/s- 参数:
trafficLimitBitPS- the limit of put object speed. unit: bit/s
-
withTrafficLimitBitPS
public CopyObjectRequest withTrafficLimitBitPS(long trafficLimitBitPS)
- 参数:
trafficLimitBitPS- the limit of put object speed. unit: bit/s, range: 819200 bit/s ~ 838860800 bit/s- 返回:
- This PutObjectRequest, so that additional method calls can be chained together
-
-