/* * Copyright 2018-2023 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.proton.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Detailed data of an Proton service instance pipeline resource. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ServicePipeline implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the service pipeline. *

*/ private String arn; /** *

* The time when the service pipeline was created. *

*/ private java.util.Date createdAt; /** *

* The deployment status of the service pipeline. *

*/ private String deploymentStatus; /** *

* A service pipeline deployment status message. *

*/ private String deploymentStatusMessage; /** *

* The ID of the last attempted deployment of this service pipeline. *

*/ private String lastAttemptedDeploymentId; /** *

* The time when a deployment of the service pipeline was last attempted. *

*/ private java.util.Date lastDeploymentAttemptedAt; /** *

* The time when the service pipeline was last deployed successfully. *

*/ private java.util.Date lastDeploymentSucceededAt; /** *

* The ID of the last successful deployment of this service pipeline. *

*/ private String lastSucceededDeploymentId; /** *

* The service spec that was used to create the service pipeline. *

*/ private String spec; /** *

* The major version of the service template that was used to create the service pipeline. *

*/ private String templateMajorVersion; /** *

* The minor version of the service template that was used to create the service pipeline. *

*/ private String templateMinorVersion; /** *

* The name of the service template that was used to create the service pipeline. *

*/ private String templateName; /** *

* The Amazon Resource Name (ARN) of the service pipeline. *

* * @param arn * The Amazon Resource Name (ARN) of the service pipeline. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) of the service pipeline. *

* * @return The Amazon Resource Name (ARN) of the service pipeline. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) of the service pipeline. *

* * @param arn * The Amazon Resource Name (ARN) of the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withArn(String arn) { setArn(arn); return this; } /** *

* The time when the service pipeline was created. *

* * @param createdAt * The time when the service pipeline was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The time when the service pipeline was created. *

* * @return The time when the service pipeline was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The time when the service pipeline was created. *

* * @param createdAt * The time when the service pipeline was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The deployment status of the service pipeline. *

* * @param deploymentStatus * The deployment status of the service pipeline. * @see DeploymentStatus */ public void setDeploymentStatus(String deploymentStatus) { this.deploymentStatus = deploymentStatus; } /** *

* The deployment status of the service pipeline. *

* * @return The deployment status of the service pipeline. * @see DeploymentStatus */ public String getDeploymentStatus() { return this.deploymentStatus; } /** *

* The deployment status of the service pipeline. *

* * @param deploymentStatus * The deployment status of the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentStatus */ public ServicePipeline withDeploymentStatus(String deploymentStatus) { setDeploymentStatus(deploymentStatus); return this; } /** *

* The deployment status of the service pipeline. *

* * @param deploymentStatus * The deployment status of the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentStatus */ public ServicePipeline withDeploymentStatus(DeploymentStatus deploymentStatus) { this.deploymentStatus = deploymentStatus.toString(); return this; } /** *

* A service pipeline deployment status message. *

* * @param deploymentStatusMessage * A service pipeline deployment status message. */ public void setDeploymentStatusMessage(String deploymentStatusMessage) { this.deploymentStatusMessage = deploymentStatusMessage; } /** *

* A service pipeline deployment status message. *

* * @return A service pipeline deployment status message. */ public String getDeploymentStatusMessage() { return this.deploymentStatusMessage; } /** *

* A service pipeline deployment status message. *

* * @param deploymentStatusMessage * A service pipeline deployment status message. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withDeploymentStatusMessage(String deploymentStatusMessage) { setDeploymentStatusMessage(deploymentStatusMessage); return this; } /** *

* The ID of the last attempted deployment of this service pipeline. *

* * @param lastAttemptedDeploymentId * The ID of the last attempted deployment of this service pipeline. */ public void setLastAttemptedDeploymentId(String lastAttemptedDeploymentId) { this.lastAttemptedDeploymentId = lastAttemptedDeploymentId; } /** *

* The ID of the last attempted deployment of this service pipeline. *

* * @return The ID of the last attempted deployment of this service pipeline. */ public String getLastAttemptedDeploymentId() { return this.lastAttemptedDeploymentId; } /** *

* The ID of the last attempted deployment of this service pipeline. *

* * @param lastAttemptedDeploymentId * The ID of the last attempted deployment of this service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withLastAttemptedDeploymentId(String lastAttemptedDeploymentId) { setLastAttemptedDeploymentId(lastAttemptedDeploymentId); return this; } /** *

* The time when a deployment of the service pipeline was last attempted. *

* * @param lastDeploymentAttemptedAt * The time when a deployment of the service pipeline was last attempted. */ public void setLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) { this.lastDeploymentAttemptedAt = lastDeploymentAttemptedAt; } /** *

* The time when a deployment of the service pipeline was last attempted. *

* * @return The time when a deployment of the service pipeline was last attempted. */ public java.util.Date getLastDeploymentAttemptedAt() { return this.lastDeploymentAttemptedAt; } /** *

* The time when a deployment of the service pipeline was last attempted. *

* * @param lastDeploymentAttemptedAt * The time when a deployment of the service pipeline was last attempted. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) { setLastDeploymentAttemptedAt(lastDeploymentAttemptedAt); return this; } /** *

* The time when the service pipeline was last deployed successfully. *

* * @param lastDeploymentSucceededAt * The time when the service pipeline was last deployed successfully. */ public void setLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) { this.lastDeploymentSucceededAt = lastDeploymentSucceededAt; } /** *

* The time when the service pipeline was last deployed successfully. *

* * @return The time when the service pipeline was last deployed successfully. */ public java.util.Date getLastDeploymentSucceededAt() { return this.lastDeploymentSucceededAt; } /** *

* The time when the service pipeline was last deployed successfully. *

* * @param lastDeploymentSucceededAt * The time when the service pipeline was last deployed successfully. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) { setLastDeploymentSucceededAt(lastDeploymentSucceededAt); return this; } /** *

* The ID of the last successful deployment of this service pipeline. *

* * @param lastSucceededDeploymentId * The ID of the last successful deployment of this service pipeline. */ public void setLastSucceededDeploymentId(String lastSucceededDeploymentId) { this.lastSucceededDeploymentId = lastSucceededDeploymentId; } /** *

* The ID of the last successful deployment of this service pipeline. *

* * @return The ID of the last successful deployment of this service pipeline. */ public String getLastSucceededDeploymentId() { return this.lastSucceededDeploymentId; } /** *

* The ID of the last successful deployment of this service pipeline. *

* * @param lastSucceededDeploymentId * The ID of the last successful deployment of this service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withLastSucceededDeploymentId(String lastSucceededDeploymentId) { setLastSucceededDeploymentId(lastSucceededDeploymentId); return this; } /** *

* The service spec that was used to create the service pipeline. *

* * @param spec * The service spec that was used to create the service pipeline. */ public void setSpec(String spec) { this.spec = spec; } /** *

* The service spec that was used to create the service pipeline. *

* * @return The service spec that was used to create the service pipeline. */ public String getSpec() { return this.spec; } /** *

* The service spec that was used to create the service pipeline. *

* * @param spec * The service spec that was used to create the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withSpec(String spec) { setSpec(spec); return this; } /** *

* The major version of the service template that was used to create the service pipeline. *

* * @param templateMajorVersion * The major version of the service template that was used to create the service pipeline. */ public void setTemplateMajorVersion(String templateMajorVersion) { this.templateMajorVersion = templateMajorVersion; } /** *

* The major version of the service template that was used to create the service pipeline. *

* * @return The major version of the service template that was used to create the service pipeline. */ public String getTemplateMajorVersion() { return this.templateMajorVersion; } /** *

* The major version of the service template that was used to create the service pipeline. *

* * @param templateMajorVersion * The major version of the service template that was used to create the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withTemplateMajorVersion(String templateMajorVersion) { setTemplateMajorVersion(templateMajorVersion); return this; } /** *

* The minor version of the service template that was used to create the service pipeline. *

* * @param templateMinorVersion * The minor version of the service template that was used to create the service pipeline. */ public void setTemplateMinorVersion(String templateMinorVersion) { this.templateMinorVersion = templateMinorVersion; } /** *

* The minor version of the service template that was used to create the service pipeline. *

* * @return The minor version of the service template that was used to create the service pipeline. */ public String getTemplateMinorVersion() { return this.templateMinorVersion; } /** *

* The minor version of the service template that was used to create the service pipeline. *

* * @param templateMinorVersion * The minor version of the service template that was used to create the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withTemplateMinorVersion(String templateMinorVersion) { setTemplateMinorVersion(templateMinorVersion); return this; } /** *

* The name of the service template that was used to create the service pipeline. *

* * @param templateName * The name of the service template that was used to create the service pipeline. */ public void setTemplateName(String templateName) { this.templateName = templateName; } /** *

* The name of the service template that was used to create the service pipeline. *

* * @return The name of the service template that was used to create the service pipeline. */ public String getTemplateName() { return this.templateName; } /** *

* The name of the service template that was used to create the service pipeline. *

* * @param templateName * The name of the service template that was used to create the service pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ServicePipeline withTemplateName(String templateName) { setTemplateName(templateName); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getDeploymentStatus() != null) sb.append("DeploymentStatus: ").append(getDeploymentStatus()).append(","); if (getDeploymentStatusMessage() != null) sb.append("DeploymentStatusMessage: ").append("***Sensitive Data Redacted***").append(","); if (getLastAttemptedDeploymentId() != null) sb.append("LastAttemptedDeploymentId: ").append(getLastAttemptedDeploymentId()).append(","); if (getLastDeploymentAttemptedAt() != null) sb.append("LastDeploymentAttemptedAt: ").append(getLastDeploymentAttemptedAt()).append(","); if (getLastDeploymentSucceededAt() != null) sb.append("LastDeploymentSucceededAt: ").append(getLastDeploymentSucceededAt()).append(","); if (getLastSucceededDeploymentId() != null) sb.append("LastSucceededDeploymentId: ").append(getLastSucceededDeploymentId()).append(","); if (getSpec() != null) sb.append("Spec: ").append("***Sensitive Data Redacted***").append(","); if (getTemplateMajorVersion() != null) sb.append("TemplateMajorVersion: ").append(getTemplateMajorVersion()).append(","); if (getTemplateMinorVersion() != null) sb.append("TemplateMinorVersion: ").append(getTemplateMinorVersion()).append(","); if (getTemplateName() != null) sb.append("TemplateName: ").append(getTemplateName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServicePipeline == false) return false; ServicePipeline other = (ServicePipeline) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getDeploymentStatus() == null ^ this.getDeploymentStatus() == null) return false; if (other.getDeploymentStatus() != null && other.getDeploymentStatus().equals(this.getDeploymentStatus()) == false) return false; if (other.getDeploymentStatusMessage() == null ^ this.getDeploymentStatusMessage() == null) return false; if (other.getDeploymentStatusMessage() != null && other.getDeploymentStatusMessage().equals(this.getDeploymentStatusMessage()) == false) return false; if (other.getLastAttemptedDeploymentId() == null ^ this.getLastAttemptedDeploymentId() == null) return false; if (other.getLastAttemptedDeploymentId() != null && other.getLastAttemptedDeploymentId().equals(this.getLastAttemptedDeploymentId()) == false) return false; if (other.getLastDeploymentAttemptedAt() == null ^ this.getLastDeploymentAttemptedAt() == null) return false; if (other.getLastDeploymentAttemptedAt() != null && other.getLastDeploymentAttemptedAt().equals(this.getLastDeploymentAttemptedAt()) == false) return false; if (other.getLastDeploymentSucceededAt() == null ^ this.getLastDeploymentSucceededAt() == null) return false; if (other.getLastDeploymentSucceededAt() != null && other.getLastDeploymentSucceededAt().equals(this.getLastDeploymentSucceededAt()) == false) return false; if (other.getLastSucceededDeploymentId() == null ^ this.getLastSucceededDeploymentId() == null) return false; if (other.getLastSucceededDeploymentId() != null && other.getLastSucceededDeploymentId().equals(this.getLastSucceededDeploymentId()) == false) return false; if (other.getSpec() == null ^ this.getSpec() == null) return false; if (other.getSpec() != null && other.getSpec().equals(this.getSpec()) == false) return false; if (other.getTemplateMajorVersion() == null ^ this.getTemplateMajorVersion() == null) return false; if (other.getTemplateMajorVersion() != null && other.getTemplateMajorVersion().equals(this.getTemplateMajorVersion()) == false) return false; if (other.getTemplateMinorVersion() == null ^ this.getTemplateMinorVersion() == null) return false; if (other.getTemplateMinorVersion() != null && other.getTemplateMinorVersion().equals(this.getTemplateMinorVersion()) == false) return false; if (other.getTemplateName() == null ^ this.getTemplateName() == null) return false; if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getDeploymentStatus() == null) ? 0 : getDeploymentStatus().hashCode()); hashCode = prime * hashCode + ((getDeploymentStatusMessage() == null) ? 0 : getDeploymentStatusMessage().hashCode()); hashCode = prime * hashCode + ((getLastAttemptedDeploymentId() == null) ? 0 : getLastAttemptedDeploymentId().hashCode()); hashCode = prime * hashCode + ((getLastDeploymentAttemptedAt() == null) ? 0 : getLastDeploymentAttemptedAt().hashCode()); hashCode = prime * hashCode + ((getLastDeploymentSucceededAt() == null) ? 0 : getLastDeploymentSucceededAt().hashCode()); hashCode = prime * hashCode + ((getLastSucceededDeploymentId() == null) ? 0 : getLastSucceededDeploymentId().hashCode()); hashCode = prime * hashCode + ((getSpec() == null) ? 0 : getSpec().hashCode()); hashCode = prime * hashCode + ((getTemplateMajorVersion() == null) ? 0 : getTemplateMajorVersion().hashCode()); hashCode = prime * hashCode + ((getTemplateMinorVersion() == null) ? 0 : getTemplateMinorVersion().hashCode()); hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); return hashCode; } @Override public ServicePipeline clone() { try { return (ServicePipeline) 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.proton.model.transform.ServicePipelineMarshaller.getInstance().marshall(this, protocolMarshaller); } }