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;
 
 import java.util.List;
 
Container for the parameters of the CompleteMultipartUpload operation.

If you are performing a complete 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, UploadId, PartETags

 
 public class CompleteMultipartUploadRequest extends AmazonWebServiceRequest {

    
The name of the bucket containing the multipart upload to complete
 
     private String bucketName;

    
The key of the multipart upload to complete
 
     private String key;

    
The ID of the multipart upload to complete
 
     private String uploadId;

    
The list of part numbers and ETags to use when completing the multipart upload
 
     private List<PartETagpartETags = new ArrayList<PartETag>();
 
 
     public CompleteMultipartUploadRequest() {}
    
Constructs a new request to complete a multipart upload.

Parameters:
bucketName The name of the bucket containing the multipart upload to complete.
key The key of the multipart upload to complete.
uploadId The ID of the multipart upload to complete.
partETags The list of part numbers and ETags to use when completing the multipart upload.
 
     public CompleteMultipartUploadRequest(String bucketNameString keyString uploadIdList<PartETagpartETags) {
         this. = bucketName;
         this. = key;
         this. = uploadId;
         this. = partETags;
     }


    
Returns the name of the bucket containing the multipart upload to complete.

Returns:
The name of the bucket containing the multipart upload to complete.
 
     public String getBucketName() {
         return ;
     }

    
Sets the name of the bucket containing the multipart upload to complete.

Parameters:
bucketName The name of the bucket containing the multipart upload to complete.
 
     public void setBucketName(String bucketName) {
         this. = bucketName;
     }

    
Sets the name of the bucket containing the multipart upload to complete, and returns this updated CompleteMultipartUploadRequest so that additional method calls can be chained together.

Parameters:
bucketName The name of the bucket containing the multipart upload to complete.
Returns:
The updated CompleteMultipartUploadRequest.
        this. = bucketName;
        return this;
    }

    
Returns the key under which the multipart upload to complete is stored.

Returns:
The key under which the multipart upload to complete is stored.
    public String getKey() {
        return ;
    }

    
Sets the key under which the multipart upload to complete is stored.

Parameters:
key The key under which the multipart upload to complete is stored.
    public void setKey(String key) {
        this. = key;
    }

    
Sets the key under which the multipart upload to complete is stored, and returns this updated CompleteMultipartUploadRequest object so that additional method calls can be chained together.

Parameters:
key The key under which the multipart upload to complete is stored.
Returns:
This updated CompleteMultipartUploadRequest object.
        this. = key;
        return this;
    }

    
Returns the ID of the multipart upload to complete.

Returns:
The ID of the multipart upload to complete.
    public String getUploadId() {
        return ;
    }

    
Sets the ID of the multipart upload to complete.

Parameters:
uploadId The ID of the multipart upload to complete.
    public void setUploadId(String uploadId) {
        this. = uploadId;
    }

    
Sets the ID of the multipart upload to complete, and returns this updated CompleteMultipartUploadRequest object so that additional method calls can be chained together.

Parameters:
uploadId The ID of the multipart upload to complete.
Returns:
This updated CompleteMultipartUploadRequest object.
        this. = uploadId;
        return this;
    }

    
Returns the list of part numbers and ETags that identify the individual parts of the multipart upload to complete.

Returns:
The list of part numbers and ETags that identify the individual parts of the multipart upload to complete.
    public List<PartETaggetPartETags() {
        return ;
    }

    
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete.

Parameters:
partETags The list of part numbers and ETags that identify the individual parts of the multipart upload to complete.
    public void setPartETags(List<PartETagpartETags) {
        this. = partETags;
    }

    
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete, and returns this updated CompleteMultipartUploadRequest object so that additional method calls can be chained.

Parameters:
partETags The list of part numbers and ETags that identify the individual parts of the multipart upload to complete.
Returns:
This updated CompleteMultipartUploadRequest object.
        setPartETags(partETags);
        return this;
    }

    
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete based on the specified results from part uploads.

Parameters:
uploadPartResults The list of results from the individual part uploads in the multipart upload to complete.
Returns:
This updated CompleteMultipartUploadRequest object.
    public CompleteMultipartUploadRequest withPartETags(UploadPartResult... uploadPartResults) {
        for (UploadPartResult result : uploadPartResults) {
            this..add(new PartETag(result.getPartNumber(), result.getETag()));
        }
        return this;
    }

    
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete based on the specified results from part uploads.

Parameters:
uploadPartResultsCollection The list of results from the individual part uploads in the multipart upload to complete.
Returns:
This updated CompleteMultipartUploadRequest object.
    public CompleteMultipartUploadRequest withPartETags(Collection<UploadPartResultuploadPartResultsCollection) {
        for (UploadPartResult result : uploadPartResultsCollection) {
            this..add(new PartETag(result.getPartNumber(), result.getETag()));
        }
        return this;
    }
New to GrepCode? Check out our FAQ X