public class CopyObjectRequest extends WebServiceRequest
NOOP
构造器和说明 |
---|
CopyObjectRequest(String sourceBucketName,
String sourceKey,
String destinationBucketName,
String destinationKey)
Constructor
|
CopyObjectRequest(String sourceBucketName,
String sourceKey,
String sourceVersionId,
String destinationBucketName,
String destinationKey)
Constructs a new
CopyObjectRequest with basic options, providing
an OSS version ID identifying the specific version of the source object
to copy. |
限定符和类型 | 方法和说明 |
---|---|
void |
clearMatchingETagConstraints() |
void |
clearNonmatchingETagConstraints() |
String |
getDestinationBucketName()
Gets the target bucket name.
|
String |
getDestinationKey()
Gets the target object key.
|
List<String> |
getMatchingETagConstraints()
Gets the ETag matching constraints.
|
Date |
getModifiedSinceConstraint()
Gets the modified since constraint.
|
ObjectMetadata |
getNewObjectMetadata()
Gets target object's
ObjectMetadata . |
List<String> |
getNonmatchingEtagConstraints()
Gets the ETag non-matching constraints.
|
Payer |
getRequestPayer()
*
Gets the one who pays for the request
|
String |
getServerSideEncryption()
Gets the target object's server side encryption algorithm.
|
String |
getServerSideEncryptionKeyId()
Gets the target object's server side encryption key ID.
|
String |
getSourceBucketName()
Gets the source bucket name.
|
String |
getSourceKey()
Gets the source object key.
|
String |
getSourceVersionId()
Gets the version ID specifying which version of the source
object to copy.
|
Date |
getUnmodifiedSinceConstraint()
Gets the unmodified since constraint.
|
void |
setDestinationBucketName(String destinationBucketName)
Sets the target bucket name.
|
void |
setDestinationKey(String destinationKey)
Gets the target object key.
|
void |
setMatchingETagConstraints(List<String> matchingETagConstraints)
Sets the ETag matching constraints.
|
void |
setModifiedSinceConstraint(Date modifiedSinceConstraint)
Sets the modified since constraint.
|
void |
setNewObjectMetadata(ObjectMetadata newObjectMetadata)
Sets target object's
ObjectMetadata . |
void |
setNonmatchingETagConstraints(List<String> nonmatchingEtagConstraints)
Sets the ETag non-matching constraints.
|
void |
setRequestPayer(Payer payer)
*
Sets the one who pays for the request
The Third party should set request payer when requesting resources.
|
void |
setServerSideEncryption(String serverSideEncryption)
Sets the target object's server side encryption algorithm.
|
void |
setServerSideEncryptionKeyId(String serverSideEncryptionKeyId)
Sets the target object's server side encryption key ID.
|
void |
setSourceBucketName(String sourceBucketName)
Sets the source bucket name.
|
void |
setSourceKey(String sourceKey)
Sets the source object key.
|
void |
setSourceVersionId(String sourceVersionId)
Sets the optional version ID specifying which version of the source
object to copy.
|
void |
setUnmodifiedSinceConstraint(Date unmodifiedSinceConstraint)
Sets the unmodified since constraint (optional).
|
public CopyObjectRequest(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey)
sourceBucketName
- Source bucket name.sourceKey
- Source key.destinationBucketName
- Target bucket name.destinationKey
- Target key.public CopyObjectRequest(String sourceBucketName, String sourceKey, String sourceVersionId, String destinationBucketName, String destinationKey)
Constructs a new CopyObjectRequest
with basic options, providing
an OSS version ID identifying the specific version of the source object
to copy.
sourceBucketName
- The name of the OSS bucket containing the object to copy.sourceKey
- The key in the source bucket under which the object to copy is
stored.sourceVersionId
- The OSS version ID which uniquely identifies a specific version
of the source object to copy.destinationBucketName
- The name of the OSS bucket in which the new object will be
copied.destinationKey
- The key in the destination bucket under which the new object
will be copied.public String getSourceBucketName()
public void setSourceBucketName(String sourceBucketName)
sourceBucketName
- Source bucket name.public String getSourceKey()
public void setSourceKey(String sourceKey)
sourceKey
- Source object key.public String getSourceVersionId()
Gets the version ID specifying which version of the source object to copy. If not specified, the most recent version of the source object will be copied.
Objects created before enabling versioning or when versioning is
suspended are given the default null
version ID (see
OSSConstants#NULL_VERSION_ID
). Note that the
null
version ID is a valid version ID and is not the
same as not having a version ID.
OSSConstants#NULL_VERSION_ID
,
setSourceVersionId(String sourceVersionId)
public void setSourceVersionId(String sourceVersionId)
Sets the optional version ID specifying which version of the source object to copy. If not specified, the most recent version of the source object will be copied.
Objects created before enabling versioning or when versioning is
suspended are given the default null
version ID (see
OSSConstants#NULL_VERSION_ID
). Note that the
null
version ID is a valid version ID and is not the
same as not having a version ID.
sourceVersionId
- The optional version ID specifying which version of the
source object to copy.public String getDestinationBucketName()
public void setDestinationBucketName(String destinationBucketName)
destinationBucketName
- Target bucket name.public String getDestinationKey()
public void setDestinationKey(String destinationKey)
destinationKey
- Target object key.public ObjectMetadata getNewObjectMetadata()
ObjectMetadata
.ObjectMetadata
.public void setNewObjectMetadata(ObjectMetadata newObjectMetadata)
ObjectMetadata
. Optional.newObjectMetadata
- Target Object ObjectMetadata
.public List<String> getMatchingETagConstraints()
public void setMatchingETagConstraints(List<String> matchingETagConstraints)
matchingETagConstraints
- ETag matching constraints.public void clearMatchingETagConstraints()
public List<String> getNonmatchingEtagConstraints()
public void setNonmatchingETagConstraints(List<String> nonmatchingEtagConstraints)
nonmatchingEtagConstraints
- ETag non-matching sontraints.public void clearNonmatchingETagConstraints()
public Date getUnmodifiedSinceConstraint()
public void setUnmodifiedSinceConstraint(Date unmodifiedSinceConstraint)
unmodifiedSinceConstraint
- The time threshold. If it's same or later than the actual
modified time, copy the file.public Date getModifiedSinceConstraint()
public void setModifiedSinceConstraint(Date modifiedSinceConstraint)
modifiedSinceConstraint
- The time threshold. If it's earlier than the actual modified
time, copy the file.public String getServerSideEncryption()
public void setServerSideEncryption(String serverSideEncryption)
serverSideEncryption
- Server side encryption algorithm,null if no encryption.public String getServerSideEncryptionKeyId()
public void setServerSideEncryptionKeyId(String serverSideEncryptionKeyId)
serverSideEncryptionKeyId
- Server side encryption key ID,null if no encryption key ID.public void setRequestPayer(Payer payer)
Sets the one who pays for the request The Third party should set request payer when requesting resources.
payer
- The one who pays for the requestpublic Payer getRequestPayer()
Gets the one who pays for the request
Copyright © 2019. All Rights Reserved.