public class CopyObjectRequest extends GenericObjectRequest
All CopyObjectRequests must specify a source bucket and key, along with a destination bucket and key.
| Constructor and Description |
|---|
CopyObjectRequest(String sourceBucketName,
String sourceKey,
String bucketName,
String key)
Constructs a new CopyObjectRequest with only basic options.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
ObjectMetadata |
getNewObjectMetadata()
Gets the optional object metadata to set for the new, copied object.
|
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.
|
String |
getSourceBucketName()
Gets the name of the bucket containing the source object to be copied.
|
String |
getSourceKey()
Gets the source bucket key under which the source object to be copied is stored.
|
String |
getStorageClass()
Gets the storageClass of the input file which is to be copyed to Baidu Bos.
|
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.
|
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.
|
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.
|
void |
setNewObjectMetadata(ObjectMetadata newObjectMetadata)
Sets the object metadata to use for the new, copied object.
|
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.
|
void |
setSourceBucketName(String sourceBucketName)
Sets the name of the bucket containing the source object to be copied.
|
void |
setSourceKey(String sourceKey)
Sets the source bucket key under which the source object to be copied is stored.
|
void |
setStorageClass(String storageClass)
Sets the storageClass of the input file which is to be copyed to Baidu Bos.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
CopyObjectRequest |
withRequestCredentials(BceCredentials credentials) |
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.
|
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.
|
CopyObjectRequest |
withStorageClass(String storageClass)
Sets the storageClass of the input file which is to be copyed to Baidu Bos.
|
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.
|
getKey, setKeygetBucketName, setBucketNamegetRequestCredentials, setRequestCredentialspublic CopyObjectRequest(String sourceBucketName, String sourceKey, String bucketName, String key)
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.public String getSourceBucketName()
public void setSourceBucketName(String sourceBucketName)
sourceBucketName - The name of the bucket containing the source object to be copied.public CopyObjectRequest withSourceBucketName(String sourceBucketName)
sourceBucketName - The name of the bucket containing the source object to be copied.CopyObjectRequest instance,
enabling additional method calls to be chained together.public String getSourceKey()
public void setSourceKey(String sourceKey)
sourceKey - The source bucket key under which the source object to be copied is stored.public CopyObjectRequest withSourceKey(String sourceKey)
sourceKey - The key in the source bucket under which the source object to be copied is stored.CopyObjectRequest instance, enabling additional method calls to be chained together.public CopyObjectRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestpublic CopyObjectRequest withBucketName(String bucketName)
withBucketName in class GenericBucketRequestbucketName - The name of the destination bucket which will contain the new, copied object.CopyObjectRequest, enabling additional method calls to be chained together.public CopyObjectRequest withKey(String key)
withKey in class GenericObjectRequestkey - The destination bucket key under which the new, copied object will be stored.CopyObjectRequest, enabling additional method calls to be chained together.public ObjectMetadata getNewObjectMetadata()
null if no object metadata has been specified.public void setNewObjectMetadata(ObjectMetadata newObjectMetadata)
newObjectMetadata - The object metadata to use for the newly copied object.public CopyObjectRequest withNewObjectMetadata(ObjectMetadata newObjectMetadata)
newObjectMetadata - The object metadata to use for the newly copied object.CopyObjectRequest, enabling additional method calls to be chained together.public String getETag()
public void setETag(String eTag)
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.public CopyObjectRequest withETag(String eTag)
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.CopyObjectRequest, enabling additional method calls to be chained together.public String getStorageClass()
public void setStorageClass(String storageClass)
storageClass - The storageClass is an identification that distinguish between infrequent access bos
and standard bos.public CopyObjectRequest withStorageClass(String storageClass)
storageClass - The StorageClass is an identification that distinguish between infrequent access bos
and standard bos.public String getUnmodifiedSinceConstraint()
public void setUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)
unmodifiedSinceConstraint - the value of the unmodifiedSinceConstraintpublic CopyObjectRequest withUnmodifiedSinceConstraint(String unmodifiedSinceConstraint)
unmodifiedSinceConstraint - the value of the unmodifiedSinceConstraintCopyObjectRequest, enabling additional method calls to be chained together.public String getModifiedSinceConstraint()
public void setModifiedSinceConstraint(String modifiedSinceConstraint)
modifiedSinceConstraint - the value of the modifiedSinceConstraintpublic CopyObjectRequest withModifiedSinceConstraint(String modifiedSinceConstraint)
modifiedSinceConstraint - the value of the modifiedSinceConstraintCopyObjectRequest, enabling additional method calls to be chained together.public String getNoneMatchETagConstraint()
public void setNoneMatchETagConstraint(String noneMatchETagConstraint)
noneMatchETagConstraint - the constraint valuepublic CopyObjectRequest withNoMatchingETagConstraint(String noneMatchETagConstraint)
noneMatchETagConstraint - the constraint valueCopyObjectRequest, enabling additional method calls to be chained together.Copyright © 2020. All rights reserved.