public class CopyPartRequest extends CosServiceRequest implements Serializable
Constructor and Description |
---|
CopyPartRequest() |
Modifier and Type | Method and Description |
---|---|
String |
getDestinationBucketName()
Gets the destination bucket name which will contain the new, copied object.
|
String |
getDestinationKey()
Gets the destination bucket key under which the new, copied object will be stored.
|
SSECustomerKey |
getDestinationSSECustomerKey() |
Long |
getFirstByte()
Returns the optional start range to copy from the source object.
|
Long |
getLastByte()
Returns the optional zero-based byte offset to stop copying the source.
|
List<String> |
getMatchingETagConstraints()
Gets the optional list of ETag constraints that, when present, must include a match
for the source object's current ETag in order for the copy object request to be executed.
|
Date |
getModifiedSinceConstraint()
Gets the optional modified constraint that restricts this request to executing only if the
source object has been modified after the specified date.
|
List<String> |
getNonmatchingETagConstraints()
Gets the optional list of ETag constraints that, when present, must not include a
match for the source object's current ETag in order for the copy object request to be
executed.
|
int |
getPartNumber()
Returns the part number describing this part's position relative to the other parts in the
multipart upload.
|
String |
getSourceAppid() |
String |
getSourceBucketName()
Gets the name of the bucket containing the source object to be copied.
|
Region |
getSourceBucketRegion() |
EndpointBuilder |
getSourceEndpointBuilder() |
String |
getSourceKey()
Gets the source bucket key under which the source object to be copied is stored.
|
SSECustomerKey |
getSourceSSECustomerKey() |
String |
getSourceVersionId()
Gets the version ID specifying which version of the source object to copy.
|
Date |
getUnmodifiedSinceConstraint()
Gets the optional unmodified constraint that restricts this request to executing only if the
source object has not been modified after the specified date.
|
String |
getUploadId()
Returns the ID of the existing, initiated multipart upload with which this new part will be
associated.
|
void |
setDestinationBucketName(String destinationBucketName)
Sets the destination bucket name which will contain the new, copied object.
|
void |
setDestinationKey(String destinationKey)
Sets the destination bucket key under which the new, copied object will be stored.
|
void |
setDestinationSSECustomerKey(SSECustomerKey destinationSSECustomerKey) |
void |
setFirstByte(Long firstByte)
Sets the optional zero-based byte offset to begin copying the source object.
|
void |
setLastByte(Long lastByte)
Sets the optional zero-based byte offset to stop copying the source.
|
void |
setMatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that, when present, must include a match
for the source object's current ETag in order for the copy object request to be executed.
|
void |
setModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the
source object has been modified after the specified date.
|
void |
setNonmatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that, when present, must not include a
match for the source object's current ETag in order for the copy object request to be
executed.
|
void |
setPartNumber(int partNumber)
Sets the part number describing this part's position relative to the other parts in the
multipart upload.
|
void |
setSourceAppid(String sourceAppid) |
void |
setSourceBucketName(String sourceBucketName)
Sets the name of the bucket containing the source object to be copied.
|
void |
setSourceBucketRegion(Region sourceBucketRegion) |
void |
setSourceEndpointBuilder(EndpointBuilder sourceEndpointBuilder) |
void |
setSourceKey(String sourceKey)
Sets the source bucket key under which the source object to be copied is stored.
|
void |
setSourceSSECustomerKey(SSECustomerKey sourceSSECustomerKey) |
void |
setSourceVersionId(String sourceVersionId)
Sets the optional version ID specifying which version of the source object to copy.
|
void |
setUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the
source object has not been modified after the specified date.
|
void |
setUploadId(String uploadId)
Sets the ID of the existing, initiated multipart upload with which this new part will be
associated.
|
CopyPartRequest |
withDestinationBucketName(String destinationBucketName)
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.
|
CopyPartRequest |
withDestinationKey(String destinationKey)
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.
|
CopyPartRequest |
withFirstByte(Long firstByte)
Sets the optional zero-based byte offset to begin copying the source object.
|
CopyPartRequest |
withLastByte(Long lastByte)
Sets the optional zero-based byte offset to stop copying the source.
|
CopyPartRequest |
withMatchingETagConstraint(String eTag)
Adds a single ETag constraint to this request and returns this object, enabling additional
method calls to be chained together.
|
CopyPartRequest |
withMatchingETagConstraints(List<String> eTagList)
Fluent API for
setMatchingETagConstraints(List) . |
CopyPartRequest |
withModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the
source object has been modified after the specified date.
|
CopyPartRequest |
withNonmatchingETagConstraint(String eTag)
Adds a single ETag constraint to this request and returns this object, enabling additional
method calls to be chained together.
|
CopyPartRequest |
withNonmatchingETagConstraints(List<String> eTagList)
Fluent API for
setNonmatchingETagConstraints(List) . |
CopyPartRequest |
withPartNumber(int partNumber)
Sets the part number describing this part's position relative to the other parts in the
multipart upload.
|
CopyPartRequest |
withSourceAppid(String sourceAppid) |
CopyPartRequest |
withSourceBucketName(String sourceBucketName)
Sets the name of the bucket containing the source object to be copied.
|
CopyPartRequest |
withSourceBucketRegion(Region sourceBucketRegion) |
CopyPartRequest |
withSourceEndpointBuilder(EndpointBuilder sourceEndpointBuilder) |
CopyPartRequest |
withSourceKey(String sourceKey)
Sets the source bucket key under which the source object to be copied is stored.
|
CopyPartRequest |
withSourceVersionId(String sourceVersionId)
Sets the optional version ID specifying which version of the source object to copy.
|
CopyPartRequest |
withUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the
source object has not been modified after the specified date.
|
CopyPartRequest |
withUploadId(String uploadId)
Sets the ID of the existing, initiated multipart upload with which this new part will be
associated.
|
clone, copyBaseTo, getCiSpecialEndParameter, getCloneRoot, getCloneSource, getCosCredentials, getCustomQueryParameters, getCustomRequestHeaders, getFixedEndpointAddr, getGeneralProgressListener, getReadLimit, getRequestClientOptions, putCustomQueryParameter, putCustomRequestHeader, setCiSpecialEndParameter, setCosCredentials, setFixedEndpointAddr, setGeneralProgressListener, withGeneralProgressListener
public String getUploadId()
public void setUploadId(String uploadId)
uploadId
- the ID of the existing, initiated multipart upload with which this new part
will be associated.public CopyPartRequest withUploadId(String uploadId)
uploadId
- the ID of the existing, initiated multipart upload with which this new part
will be associated.CopyPartRequest
, enabling additional method calls to be chained
together.public int getPartNumber()
public void setPartNumber(int partNumber)
partNumber
- the part number describing this part's position relative to the other parts
in the multipart upload. Part number must be between 1 and 10,000 (inclusive).public CopyPartRequest withPartNumber(int partNumber)
partNumber
- the part number describing this part's position relative to the other parts
in the multipart upload. Part number must be between 1 and 10,000 (inclusive).CopyPartRequest
, enabling additional method calls to be chained
together.public String getSourceAppid()
public void setSourceAppid(String sourceAppid)
public CopyPartRequest withSourceAppid(String sourceAppid)
public Region getSourceBucketRegion()
public void setSourceBucketRegion(Region sourceBucketRegion)
public CopyPartRequest withSourceBucketRegion(Region sourceBucketRegion)
public String getSourceBucketName()
setSourceBucketName(String sourceBucketName)
public void setSourceBucketName(String sourceBucketName)
sourceBucketName
- The name of the bucket containing the source object to be copied.getSourceBucketName()
public CopyPartRequest withSourceBucketName(String sourceBucketName)
sourceBucketName
- The name of the bucket containing the source object to be copied.CopyPartRequest
, enabling additional method calls to be chained
together.getSourceBucketName()
public String getSourceKey()
setSourceKey(String sourceKey)
public void setSourceKey(String sourceKey)
sourceKey
- The source bucket key under which the source object to be copied is stored.setSourceKey(String sourceKey)
public CopyPartRequest withSourceKey(String sourceKey)
sourceKey
- The source bucket key under which the source object to be copied is stored.CopyPartRequest
, enabling additional method calls to be chained
together.setSourceKey(String sourceKey)
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 Constants#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.
For more information about enabling versioning for a bucket, see
COS#setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
Constants#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 Constants#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.
For more information about enabling versioning for a bucket, see
COS#setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
sourceVersionId
- The optional version ID specifying which version of the source object
to copy.public CopyPartRequest withSourceVersionId(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 Constants#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.
For more information about enabling versioning for a bucket, see
COS#setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
sourceVersionId
- The optional version ID specifying which version of the source object
to copy.CopyPartRequest
, enabling additional method calls to be chained
together.public String getDestinationBucketName()
setDestinationBucketName(String destinationBucketName)
public void setDestinationBucketName(String destinationBucketName)
destinationBucketName
- The name of the destination bucket which will contain the new,
copied object.getDestinationBucketName()
public CopyPartRequest withDestinationBucketName(String destinationBucketName)
destinationBucketName
- The name of the destination bucket which will contain the new,
copied object.CopyPartRequest
, enabling additional method calls to be chained
together.public String getDestinationKey()
setDestinationKey(String destinationKey)
public void setDestinationKey(String destinationKey)
destinationKey
- The destination bucket key under which the new, copied object will be
stored.getDestinationKey()
public CopyPartRequest withDestinationKey(String destinationKey)
destinationKey
- The destination bucket key under which the new, copied object will be
stored.CopyPartRequest
, enabling additional method calls to be chained
together.public SSECustomerKey getSourceSSECustomerKey()
public void setSourceSSECustomerKey(SSECustomerKey sourceSSECustomerKey)
public SSECustomerKey getDestinationSSECustomerKey()
public void setDestinationSSECustomerKey(SSECustomerKey destinationSSECustomerKey)
public Long getFirstByte()
public void setFirstByte(Long firstByte)
firstByte
- the optional zero-based byte offset to begin copying the source object.public CopyPartRequest withFirstByte(Long firstByte)
firstByte
- the optional zero-based byte offset to begin copying the source object.CopyPartRequest
, enabling additional method calls to be chained
together.public Long getLastByte()
public void setLastByte(Long lastByte)
public CopyPartRequest withLastByte(Long lastByte)
CopyPartRequest
, enabling additional method calls to be chained
together.public List<String> getMatchingETagConstraints()
Gets the optional list of ETag constraints that, when present, must include a match for the source object's current ETag in order for the copy object request to be executed. Only one ETag in the list needs to match for the request to be executed by COS.
Matching ETag constraints may be used with the unmodified since constraint, but not with any other type of constraint.
public void setMatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that, when present, must include a match for the source object's current ETag in order for the copy object request to be executed. If none of the specified ETags match the source object's current ETag, the copy object operation will be aborted. Only one ETag in the list needs to match for the request to be executed by COS.
Matching ETag constraints may be used with the unmodified since constraint, but not with any other type of constraint.
eTagList
- The optional list of ETag constraints that must include a match for the
source object's current ETag in order for this request to be executed.public CopyPartRequest withMatchingETagConstraints(List<String> eTagList)
setMatchingETagConstraints(List)
.public CopyPartRequest withMatchingETagConstraint(String eTag)
Adds a single ETag constraint to this request and returns this object, enabling additional method calls to be chained together. Multiple ETag constraints can be added to a request, but one must match the source object's current ETag in order for the copy object request to be executed. If none of the ETag constraints added to this request match the source object's current ETag, the copy object operation will be aborted.
Matching ETag constraints may be used with the unmodified since constraint, but not with any other type of constraint.
eTag
- The matching ETag constraint to add to this request.CopyPartRequest
, enabling additional method calls to be chained
together.public List<String> getNonmatchingETagConstraints()
Gets the optional list of ETag constraints that, when present, must not include a match for the source object's current ETag in order for the copy object request to be executed. If any entry in the non-matching ETag constraint list matches the source object's current ETag, this copy request will not be executed by COS.
Non-matching ETag constraints may be used with the modified since constraint, but not with any other type of constraint.
public void setNonmatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that, when present, must not include a match for the source object's current ETag in order for the copy object request to be executed. If any entry in the non-matching ETag constraint list matches the source object's current ETag, this copy request will not be executed by COS.
Non-matching ETag constraints may be used with the modified since constraint, but not with any other type of constraint.
eTagList
- The list of ETag constraints that, when present, must not include a
match for the source object's current ETag in order for this request to be executed.public CopyPartRequest withNonmatchingETagConstraints(List<String> eTagList)
setNonmatchingETagConstraints(List)
.public CopyPartRequest withNonmatchingETagConstraint(String eTag)
Adds a single ETag constraint to this request and returns this object, enabling additional method calls to be chained together. Multiple ETag constraints can be added to a request, but all ETag constraints must not match the source object's current ETag in order for the copy object request to be executed. If any entry in the non-matching ETag constraint list matches the source object's current ETag, this copy request will not be executed by COS.
Non-matching ETag constraints may be used with the modified since constraint, but not with any other type of constraint.
eTag
- The non-matching ETag constraint to add to this request.CopyPartRequest
, enabling additional method calls to be chained
together.public Date getUnmodifiedSinceConstraint()
Gets the optional unmodified constraint that restricts this request to executing only if the source object has not been modified after the specified date.
The unmodified since constraint may be used with matching ETag constraints, but not with any other type of constraint.
public void setUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the source object has not been modified after the specified date.
The unmodified constraint may be used with matching ETag constraints, but not with any other type of constraint.
Note that COS will ignore any dates occurring in the future.
date
- The unmodified constraint that restricts this request to executing only if the
source object has not been modified after this date.public CopyPartRequest withUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the source object has not been modified after the specified date. Returns this object, enabling additional method calls to be chained together.
The unmodified constraint may be used with matching ETag constraints, but not with any other type of constraint.
Note that COS will ignore any dates occurring in the future.
date
- The unmodified constraint that restricts this request to executing only if the
source object has not been modified after this date.CopyPartRequest
, enabling additional method calls to be chained
together.public Date getModifiedSinceConstraint()
Gets the optional modified constraint that restricts this request to executing only if the source object has been modified after the specified date.
The modified constraint may be used with non-matching ETag constraints, but not with any other type of constraint.
public void setModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the source object has been modified after the specified date.
The modified constraint may be used with non-matching ETag constraints, but not with any other type of constraint.
Note that COS will ignore any dates occurring in the future.
date
- The modified constraint that restricts this request to executing only if the
source object has been modified after the specified date.public CopyPartRequest withModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the source object has been modified after the specified date. Returns this object, enabling additional method calls to be chained together.
The modified constraint may be used with non-matching ETag constraints, but not with any other type of constraint.
Note that COS will ignore any dates occurring in the future.
date
- The modified constraint that restricts this request to executing only if the
source object has been modified after the specified date.CopyPartRequest
, enabling additional method calls to be chained
together.public EndpointBuilder getSourceEndpointBuilder()
public void setSourceEndpointBuilder(EndpointBuilder sourceEndpointBuilder)
public CopyPartRequest withSourceEndpointBuilder(EndpointBuilder sourceEndpointBuilder)
Copyright © 2023. All rights reserved.