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.codedeploy.model;
 

Information about the location of application artifacts that are stored in Amazon S3.

 
 public class S3Location implements SerializableCloneable {

    
The name of the Amazon S3 bucket where the application revision is stored.
 
     private String bucket;

    
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
 
     private String key;

    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Constraints:
Allowed Values: tar, tgz, zip

 
     private String bundleType;

    
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

 
     private String version;

    
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

 
     private String eTag;

    
The name of the Amazon S3 bucket where the application revision is stored.

Returns:
The name of the Amazon S3 bucket where the application revision is stored.
 
     public String getBucket() {
         return ;
     }
    
    
The name of the Amazon S3 bucket where the application revision is stored.

Parameters:
bucket The name of the Amazon S3 bucket where the application revision is stored.
 
     public void setBucket(String bucket) {
         this. = bucket;
     }
    
    
The name of the Amazon S3 bucket where the application revision is stored.

Returns a reference to this object so that method calls can be chained together.

Parameters:
bucket The name of the Amazon S3 bucket where the application revision is stored.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public S3Location withBucket(String bucket) {
         this. = bucket;
        return this;
    }

    
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

Returns:
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
    public String getKey() {
        return ;
    }
    
    
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

Parameters:
key The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
    public void setKey(String key) {
        this. = key;
    }
    
    
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

Returns a reference to this object so that method calls can be chained together.

Parameters:
key The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
Returns:
A reference to this updated object so that method calls can be chained together.
    public S3Location withKey(String key) {
        this. = key;
        return this;
    }

    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Constraints:
Allowed Values: tar, tgz, zip

Returns:
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.
See also:
BundleType
    public String getBundleType() {
        return ;
    }
    
    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Constraints:
Allowed Values: tar, tgz, zip

Parameters:
bundleType The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.
See also:
BundleType
    public void setBundleType(String bundleType) {
        this. = bundleType;
    }
    
    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: tar, tgz, zip

Parameters:
bundleType The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
BundleType
    public S3Location withBundleType(String bundleType) {
        this. = bundleType;
        return this;
    }

    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Constraints:
Allowed Values: tar, tgz, zip

Parameters:
bundleType The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.
See also:
BundleType
    public void setBundleType(BundleType bundleType) {
        this. = bundleType.toString();
    }
    
    
The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: tar, tgz, zip

Parameters:
bundleType The file type of the application revision. Must be one of the following:
  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
BundleType
    public S3Location withBundleType(BundleType bundleType) {
        this. = bundleType.toString();
        return this;
    }

    
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

Returns:
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

    public String getVersion() {
        return ;
    }
    
    
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

Parameters:
version A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

    public void setVersion(String version) {
        this. = version;
    }
    
    
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

Returns a reference to this object so that method calls can be chained together.

Parameters:
version A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

Returns:
A reference to this updated object so that method calls can be chained together.
    public S3Location withVersion(String version) {
        this. = version;
        return this;
    }

    
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

Returns:
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

    public String getETag() {
        return ;
    }
    
    
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

Parameters:
eTag The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

    public void setETag(String eTag) {
        this. = eTag;
    }
    
    
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

Returns a reference to this object so that method calls can be chained together.

Parameters:
eTag The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

Returns:
A reference to this updated object so that method calls can be chained together.
    public S3Location withETag(String eTag) {
        this. = eTag;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getBucket() != nullsb.append("Bucket: " + getBucket() + ",");
        if (getKey() != nullsb.append("Key: " + getKey() + ",");
        if (getBundleType() != nullsb.append("BundleType: " + getBundleType() + ",");
        if (getVersion() != nullsb.append("Version: " + getVersion() + ",");
        if (getETag() != nullsb.append("ETag: " + getETag() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getBucket() == null) ? 0 : getBucket().hashCode()); 
        hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); 
        hashCode = prime * hashCode + ((getBundleType() == null) ? 0 : getBundleType().hashCode()); 
        hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); 
        hashCode = prime * hashCode + ((getETag() == null) ? 0 : getETag().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof S3Location == falsereturn false;
        S3Location other = (S3Location)obj;
        
        if (other.getBucket() == null ^ this.getBucket() == nullreturn false;
        if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == falsereturn false
        if (other.getKey() == null ^ this.getKey() == nullreturn false;
        if (other.getKey() != null && other.getKey().equals(this.getKey()) == falsereturn false
        if (other.getBundleType() == null ^ this.getBundleType() == nullreturn false;
        if (other.getBundleType() != null && other.getBundleType().equals(this.getBundleType()) == falsereturn false
        if (other.getVersion() == null ^ this.getVersion() == nullreturn false;
        if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == falsereturn false
        if (other.getETag() == null ^ this.getETag() == nullreturn false;
        if (other.getETag() != null && other.getETag().equals(this.getETag()) == falsereturn false
        return true;
    }
    
    @Override
    public S3Location clone() {
        try {
            return (S3Locationsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X