com.baidubce.services.bos.model
Class InitiateMultipartUploadRequest

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.InitiateMultipartUploadRequest

public class InitiateMultipartUploadRequest
extends GenericObjectRequest

The InitiateMultipartUploadRequest contains the parameters used for the InitiateMultipartUpload method.

Required Parameters: BucketName, Key


Constructor Summary
InitiateMultipartUploadRequest(String bucketName, String key)
          Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key.
 
Method Summary
 ObjectMetadata getObjectMetadata()
          Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.
 void setObjectMetadata(ObjectMetadata objectMetadata)
          Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.
 InitiateMultipartUploadRequest withBucketName(String bucketName)
          Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
 InitiateMultipartUploadRequest withKey(String key)
          Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
 InitiateMultipartUploadRequest withMetadata(ObjectMetadata objectMetadata)
          Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.
 InitiateMultipartUploadRequest withRequestCredentials(BceCredentials credentials)
           
 
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

InitiateMultipartUploadRequest

public InitiateMultipartUploadRequest(String bucketName,
                                      String key)
Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key.

Parameters:
bucketName - The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
key - The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
Method Detail

withRequestCredentials

public InitiateMultipartUploadRequest withRequestCredentials(BceCredentials credentials)
Specified by:
withRequestCredentials in class AbstractBceRequest

withBucketName

public InitiateMultipartUploadRequest withBucketName(String bucketName)
Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.

Returns this updated InitiateMultipartUploadRequest object 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 create the new multipart upload, and hence, the eventual object created from the multipart upload.
Returns:
This updated InitiateMultipartUploadRequest object.

withKey

public InitiateMultipartUploadRequest withKey(String key)
Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.

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

Specified by:
withKey in class GenericObjectRequest
Parameters:
key - The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
Returns:
This updated InitiateMultipartUploadRequest object.

getObjectMetadata

public ObjectMetadata getObjectMetadata()
Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.

Returns:
The additional information about the new object being created, such as content type, content encoding, user metadata, etc.

setObjectMetadata

public void setObjectMetadata(ObjectMetadata objectMetadata)
Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.

Parameters:
objectMetadata - Additional information about the new object being created, such as content type, content encoding, user metadata, etc.

withMetadata

public InitiateMultipartUploadRequest withMetadata(ObjectMetadata objectMetadata)
Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.

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

Parameters:
objectMetadata - Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
Returns:
This updated InitiateMultipartUploadRequest object.


Copyright © 2016. All rights reserved.