Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *  http://aws.amazon.com/apache2.0
   *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;
 
The InitiateMultipartUploadRequest contains the parameters used for the InitiateMultipartUpload method.

If you are initiating multipart upload for KMS-encrypted objects, you need to specify the correct region of the bucket on your client and configure AWS Signature Version 4 for added security. For more information on how to do this, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify -signature-version

Required Parameters: BucketName, Key

 
         implements SSECustomerKeyProviderSSEAwsKeyManagementParamsProvider {
    
The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
 
     private String bucketName;

    
The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
 
     private String key;

    
Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
 
     public ObjectMetadata objectMetadata;

    
An optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.
 
     private CannedAccessControlList cannedACL;

    
An optional access control list to apply to the new upload. If specified, cannedAcl will be ignored.
 
     private AccessControlList accessControlList;

    
The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.
 
     private StorageClass storageClass;

    
The optional redirect location for the new object.
 
     private String redirectLocation;

    
The optional customer-provided server-side encryption key to use to encrypt the upload being started.
 
     private SSECustomerKey sseCustomerKey;

    
The optional AWS Key Management system parameters to be used to encrypt the the object on the server side.
 
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.
    public InitiateMultipartUploadRequest(String bucketNameString key) {
        this. = bucketName;
        this. = key;
    }

    
Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key, and with the additional specified object metadata.

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.
objectMetadata Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
    public InitiateMultipartUploadRequest(String bucketNameString keyObjectMetadata objectMetadata) {
        this. = bucketName;
        this. = key;
        this. = objectMetadata;
    }


    
Returns the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.

Returns:
The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
    public String getBucketName() {
        return ;
    }

    
Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.

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.
    public void setBucketName(String bucketName) {
        this. = 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.

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.
        this. = bucketName;
        return this;
    }

    
Returns the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.

Returns:
The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
    public String getKey() {
        return ;
    }

    
Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.

Parameters:
key The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
    public void setKey(String key) {
        this. = 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.

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.
        this. = key;
        return this;
    }

    
Returns the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.

Returns:
The optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.
See also:
CannedAccessControlList
        return ;
    }

    
Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.

Parameters:
cannedACL The canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.
See also:
CannedAccessControlList
    public void setCannedACL(CannedAccessControlList cannedACL) {
        this. = cannedACL;
    }

    
Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.

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

Parameters:
acl The optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.
Returns:
This updated InitiateMultipartUploadRequest object.
        this. = acl;
        return this;
    }

    
Returns the optional access control list for the new upload. If specified, cannedAcl will be ignored.
        return ;
    }

    
Sets the optional access control list for the new upload. If specified, cannedAcl will be ignored.

Parameters:
accessControlList The access control list for the new upload.
    public void setAccessControlList(AccessControlList accessControlList) {
        this. = accessControlList;
    }

    
Sets the optional access control list for the new upload. If specified, cannedAcl will be ignored. Returns this InitiateMultipartUploadRequest, enabling additional method calls to be chained together.

Parameters:
accessControlList The access control list for the new upload.
        setAccessControlList(accessControlList);
        return this;
    }

    
Returns the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.

If not specified, the default is StorageClass.Standard.

Returns:
The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.
See also:
StorageClass
    public StorageClass getStorageClass() {
        return ;
    }

    
Sets the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.

If not specified, the default is StorageClass.Standard.

Parameters:
storageClass The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.
See also:
StorageClass
    public void setStorageClass(StorageClass storageClass) {
        this. = storageClass;
    }

    
Sets the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.

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

Parameters:
storageClass The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.
Returns:
This updated InitiateMultipartUploadRequest object.
        this. = storageClass;
        return this;
    }
    public InitiateMultipartUploadRequest withStorageClass(String storageClass) {
        if (storageClass != null)
            this. = StorageClass.fromValue(storageClass);
        else
            this. = null;
        return this;
    }

    
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.
    public ObjectMetadata getObjectMetadata() {
        return ;
    }

    
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.
    public void setObjectMetadata(ObjectMetadata objectMetadata) {
        this. = 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.
        setObjectMetadata(objectMetadata);
        return this;
    }

    
Sets the optional redirect location for the new object.

Parameters:
redirectLocation The redirect location for the new object.
    public void setRedirectLocation(String redirectLocation) {
        this. = redirectLocation;
    }

    
Gets the optional redirect location for the new object.
    public String getRedirectLocation() {
        return this.;
    }

    
Sets the optional redirect location for the new object. Returns this InitiateMultipartUploadRequest, enabling additional method calls to be chained together.

Parameters:
redirectLocation The redirect location for the new object.
    public InitiateMultipartUploadRequest withRedirectLocation(String redirectLocation) {
        this. = redirectLocation;
        return this;
    }
    @Override
    public SSECustomerKey getSSECustomerKey() {
        return ;
    }

    
Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started.

Parameters:
sseKey The optional customer-provided server-side encryption key to use to encrypt the upload being started.
    public void setSSECustomerKey(SSECustomerKey sseKey) {
        if (sseKey != null && this. != null) {
            throw new IllegalArgumentException(
                "Either SSECustomerKey or SSEAwsKeyManagementParams must not be set at the same time.");
        }
        this. = sseKey;
    }

    
Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started, and returns the updated InitiateMultipartUploadRequest so that additional method calls may be chained together.

Parameters:
sseKey The optional customer-provided server-side encryption key to use to encrypt the upload being started.
Returns:
The updated request object, so that additional method calls can be chained together.
        setSSECustomerKey(sseKey);
        return this;
    }

    
Returns the AWS Key Management System parameters used to encrypt the object on server side.
    @Override
        return ;
    }

    
Sets the AWS Key Management System parameters used to encrypt the object on server side.
        if (params != null && this. != null) {
            throw new IllegalArgumentException(
                "Either SSECustomerKey or SSEAwsKeyManagementParams must not be set at the same time.");
        }
        this. = params;
    }

    
Sets the AWS Key Management System parameters used to encrypt the object on server side.

Returns:
returns the update InitiateMultipartUploadRequest
            SSEAwsKeyManagementParams sseAwsKeyManagementParams) {
        setSSEAwsKeyManagementParams(sseAwsKeyManagementParams);
        return this;
    }
New to GrepCode? Check out our FAQ X