All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codedeploy.model.S3Location Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CodeDeploy module holds the client classes that are used for communicating with AWS CodeDeploy Service

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2010-2016 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;

import java.io.Serializable;

/**
 * 

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

*/ public class S3Location implements Serializable, Cloneable { /** *

* 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.
  • *
*/ 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. *

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

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

* * @return The name of the Amazon S3 bucket where the application revision * is stored. */ public String getBucket() { return this.bucket; } /** *

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

* * @param bucket * The name of the Amazon S3 bucket where the application revision is * stored. * @return Returns a reference to this object so that method calls can be * chained together. */ public S3Location withBucket(String bucket) { setBucket(bucket); return this; } /** *

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

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

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

* * @return The name of the Amazon S3 object that represents the bundled * artifacts for the application revision. */ public String getKey() { return this.key; } /** *

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

* * @param key * The name of the Amazon S3 object that represents the bundled * artifacts for the application revision. * @return Returns a reference to this object so that method calls can be * chained together. */ public S3Location withKey(String key) { setKey(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.
  • *
* * @param 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 BundleType */ public void setBundleType(String bundleType) { this.bundleType = 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.
    • *
    * * @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.
    • * @see BundleType */ public String getBundleType() { return 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.
      • *
      * * @param 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.
      • * @return Returns a reference to this object so that method calls can be * chained together. * @see BundleType */ public S3Location withBundleType(String bundleType) { setBundleType(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.
        • *
        * * @param 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 BundleType */ public void setBundleType(BundleType bundleType) { this.bundleType = 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.
          • *
          * * @param 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.
          • * @return Returns a reference to this object so that method calls can be * chained together. * @see BundleType */ public S3Location withBundleType(BundleType bundleType) { setBundleType(bundleType); 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. *

            * * @param 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 = 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. *

            * * @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. */ public String getVersion() { return 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. *

            * * @param 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. * @return Returns a reference to this object so that method calls can be * chained together. */ public S3Location withVersion(String version) { setVersion(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. *

            * * @param 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 = 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. *

            * * @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. */ public String getETag() { return 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. *

            * * @param 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. * @return Returns a reference to this object so that method calls can be * chained together. */ public S3Location withETag(String eTag) { setETag(eTag); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBucket() != null) sb.append("Bucket: " + getBucket() + ","); if (getKey() != null) sb.append("Key: " + getKey() + ","); if (getBundleType() != null) sb.append("BundleType: " + getBundleType() + ","); if (getVersion() != null) sb.append("Version: " + getVersion() + ","); if (getETag() != null) sb.append("ETag: " + getETag()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3Location == false) return false; S3Location other = (S3Location) obj; if (other.getBucket() == null ^ this.getBucket() == null) return false; if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false) return false; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getBundleType() == null ^ this.getBundleType() == null) return false; if (other.getBundleType() != null && other.getBundleType().equals(this.getBundleType()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getETag() == null ^ this.getETag() == null) return false; if (other.getETag() != null && other.getETag().equals(this.getETag()) == false) return false; return true; } @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 S3Location clone() { try { return (S3Location) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy