com.amazonaws.services.codedeploy.model.RevisionLocation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codedeploy Show documentation
/*
* Copyright 2017-2022 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;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the location of an application revision.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RevisionLocation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*/
private String revisionType;
/**
*
* Information about the location of a revision stored in Amazon S3.
*
*/
private S3Location s3Location;
/**
*
* Information about the location of application artifacts stored in GitHub.
*
*/
private GitHubLocation gitHubLocation;
/**
*
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
*
*/
private RawString string;
/**
*
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or
* YAML and stored as a RawString.
*
*/
private AppSpecContent appSpecContent;
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*
* @param revisionType
* The type of application revision:
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an
* AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
* @see RevisionLocationType
*/
public void setRevisionType(String revisionType) {
this.revisionType = revisionType;
}
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*
* @return The type of application revision:
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for
* an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
* @see RevisionLocationType
*/
public String getRevisionType() {
return this.revisionType;
}
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*
* @param revisionType
* The type of application revision:
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an
* AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RevisionLocationType
*/
public RevisionLocation withRevisionType(String revisionType) {
setRevisionType(revisionType);
return this;
}
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*
* @param revisionType
* The type of application revision:
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an
* AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
* @see RevisionLocationType
*/
public void setRevisionType(RevisionLocationType revisionType) {
withRevisionType(revisionType);
}
/**
*
* The type of application revision:
*
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an AWS
* Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
*
*
* @param revisionType
* The type of application revision:
*
* -
*
* S3: An application revision stored in Amazon S3.
*
*
* -
*
* GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
*
*
* -
*
* String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
*
*
* -
*
* AppSpecContent: An AppSpecContent
object that contains the contents of an AppSpec file for an
* AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RevisionLocationType
*/
public RevisionLocation withRevisionType(RevisionLocationType revisionType) {
this.revisionType = revisionType.toString();
return this;
}
/**
*
* Information about the location of a revision stored in Amazon S3.
*
*
* @param s3Location
* Information about the location of a revision stored in Amazon S3.
*/
public void setS3Location(S3Location s3Location) {
this.s3Location = s3Location;
}
/**
*
* Information about the location of a revision stored in Amazon S3.
*
*
* @return Information about the location of a revision stored in Amazon S3.
*/
public S3Location getS3Location() {
return this.s3Location;
}
/**
*
* Information about the location of a revision stored in Amazon S3.
*
*
* @param s3Location
* Information about the location of a revision stored in Amazon S3.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RevisionLocation withS3Location(S3Location s3Location) {
setS3Location(s3Location);
return this;
}
/**
*
* Information about the location of application artifacts stored in GitHub.
*
*
* @param gitHubLocation
* Information about the location of application artifacts stored in GitHub.
*/
public void setGitHubLocation(GitHubLocation gitHubLocation) {
this.gitHubLocation = gitHubLocation;
}
/**
*
* Information about the location of application artifacts stored in GitHub.
*
*
* @return Information about the location of application artifacts stored in GitHub.
*/
public GitHubLocation getGitHubLocation() {
return this.gitHubLocation;
}
/**
*
* Information about the location of application artifacts stored in GitHub.
*
*
* @param gitHubLocation
* Information about the location of application artifacts stored in GitHub.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RevisionLocation withGitHubLocation(GitHubLocation gitHubLocation) {
setGitHubLocation(gitHubLocation);
return this;
}
/**
*
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
*
*
* @param string
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
*/
@Deprecated
public void setString(RawString string) {
this.string = string;
}
/**
*
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
*
*
* @return Information about the location of an AWS Lambda deployment revision stored as a RawString.
*/
@Deprecated
public RawString getString() {
return this.string;
}
/**
*
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
*
*
* @param string
* Information about the location of an AWS Lambda deployment revision stored as a RawString.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public RevisionLocation withString(RawString string) {
setString(string);
return this;
}
/**
*
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or
* YAML and stored as a RawString.
*
*
* @param appSpecContent
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as
* JSON or YAML and stored as a RawString.
*/
public void setAppSpecContent(AppSpecContent appSpecContent) {
this.appSpecContent = appSpecContent;
}
/**
*
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or
* YAML and stored as a RawString.
*
*
* @return The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as
* JSON or YAML and stored as a RawString.
*/
public AppSpecContent getAppSpecContent() {
return this.appSpecContent;
}
/**
*
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or
* YAML and stored as a RawString.
*
*
* @param appSpecContent
* The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as
* JSON or YAML and stored as a RawString.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RevisionLocation withAppSpecContent(AppSpecContent appSpecContent) {
setAppSpecContent(appSpecContent);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getRevisionType() != null)
sb.append("RevisionType: ").append(getRevisionType()).append(",");
if (getS3Location() != null)
sb.append("S3Location: ").append(getS3Location()).append(",");
if (getGitHubLocation() != null)
sb.append("GitHubLocation: ").append(getGitHubLocation()).append(",");
if (getString() != null)
sb.append("String: ").append(getString()).append(",");
if (getAppSpecContent() != null)
sb.append("AppSpecContent: ").append(getAppSpecContent());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RevisionLocation == false)
return false;
RevisionLocation other = (RevisionLocation) obj;
if (other.getRevisionType() == null ^ this.getRevisionType() == null)
return false;
if (other.getRevisionType() != null && other.getRevisionType().equals(this.getRevisionType()) == false)
return false;
if (other.getS3Location() == null ^ this.getS3Location() == null)
return false;
if (other.getS3Location() != null && other.getS3Location().equals(this.getS3Location()) == false)
return false;
if (other.getGitHubLocation() == null ^ this.getGitHubLocation() == null)
return false;
if (other.getGitHubLocation() != null && other.getGitHubLocation().equals(this.getGitHubLocation()) == false)
return false;
if (other.getString() == null ^ this.getString() == null)
return false;
if (other.getString() != null && other.getString().equals(this.getString()) == false)
return false;
if (other.getAppSpecContent() == null ^ this.getAppSpecContent() == null)
return false;
if (other.getAppSpecContent() != null && other.getAppSpecContent().equals(this.getAppSpecContent()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRevisionType() == null) ? 0 : getRevisionType().hashCode());
hashCode = prime * hashCode + ((getS3Location() == null) ? 0 : getS3Location().hashCode());
hashCode = prime * hashCode + ((getGitHubLocation() == null) ? 0 : getGitHubLocation().hashCode());
hashCode = prime * hashCode + ((getString() == null) ? 0 : getString().hashCode());
hashCode = prime * hashCode + ((getAppSpecContent() == null) ? 0 : getAppSpecContent().hashCode());
return hashCode;
}
@Override
public RevisionLocation clone() {
try {
return (RevisionLocation) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.codedeploy.model.transform.RevisionLocationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}