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;
 

Request object containing all the options for restoring an object, which was transitioned to the Amazon Glacier from S3 when it was expired.

All RestoreObjectRequest must specify a bucket name and key, along with expiration time.

 
 public class RestoreObjectRequest extends AmazonWebServiceRequest {

    
The time, in days, between when an object is restored to the bucket and when it expires.
 
     private int expirationInDays;

    
The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
 
     private String bucketName;

    
The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
 
     private String key;

    
Optional version ID specifying which version of the object to restore. If not specified, the most recent version will be restored.

For more information about enabling versioning for a bucket, see AmazonS3#setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest ). For more information about enabling lifecycle versioning for a bucket, see AmazonS3#setBucketLifecycleConfiguration(SetBucketLifecycleConfigurationRequest ).

 
     private String versionId;

    

Constructs a new RestoreObjectRequest.

Parameters:
bucketName The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
key The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
See also:
RestoreObjectRequest.RestoreObjectRequest(java.lang.String,java.lang.String,int)
 
     public RestoreObjectRequest(String bucketNameString key) {
         this(bucketNamekey, -1);
     }

    

Constructs a new RestoreObjectRequest.

Parameters:
bucketName The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
key The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
expirationInDays The time, in days, between when an object is restored to the bucket and when it expires
See also:
RestoreObjectRequest.RestoreObjectRequest(java.lang.String,java.lang.String)
 
     public RestoreObjectRequest(String bucketNameString keyint expirationInDays) {
         this. = bucketName;
        this. = key;
        this. = expirationInDays;
    }

    
Returns the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.

    public String getBucketName() {
        return ;
    }

    
Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier, and returns a reference to this object(RestoreObjectRequest) for method chaining.

    public RestoreObjectRequest withBucketName(String bucketName) {
        this. = bucketName;
        return this;
    }

    
Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.

    public void setBucketName(String bucketName) {
        this. = bucketName;
    }

    
Gets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.

    public String getKey() {
        return ;
    }

    
Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.

    public void setKey(String key) {
        this. = key;
    }

    
Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier. returns a reference to this object(RestoreObjectRequest) for method chaining.

    public RestoreObjectRequest withKey(String key) {
        this. = key;
        return this;
    }

    
Returns the id of the version to be restored.
    public String getVersionId() {
        return ;
    }

    
Sets the id of the version to be restored.
    public void setVersionId(String versionId) {
        this. = versionId;
    }

    
Sets the id of the version to be restored and returns a reference to this object for method chaining.
    public RestoreObjectRequest withVersionId(String versionId) {
        this. = versionId;
        return this;
    }

    
Sets the time, in days, between when an object is uploaded to the bucket and when it expires.
    public void setExpirationInDays(int expirationInDays) {
        this. = expirationInDays;
    }

    
Returns the time in days from an object's creation to its expiration.
    public int getExpirationInDays() {
        return ;
    }

    
Sets the time, in days, between when an object is uploaded to the bucket and when it expires, and returns a reference to this object(RestoreObjectRequest) for method chaining.
    public RestoreObjectRequest withExpirationInDays(int expirationInDays) {
        this. = expirationInDays;
        return this;
    }
New to GrepCode? Check out our FAQ X