
com.amazonaws.services.proton.model.ServiceInstanceSummary Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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;
/**
*
* Summary data of an Proton service instance resource.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ServiceInstanceSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the service instance.
*
*/
private String arn;
/**
*
* The time when the service instance was created.
*
*/
private java.util.Date createdAt;
/**
*
* The service instance deployment status.
*
*/
private String deploymentStatus;
/**
*
* A service instance deployment status message.
*
*/
private String deploymentStatusMessage;
/**
*
* The name of the environment that the service instance was deployed into.
*
*/
private String environmentName;
/**
*
* The ID of the last attempted deployment of this service instance.
*
*/
private String lastAttemptedDeploymentId;
/**
*
* The time when a deployment of the service was last attempted.
*
*/
private java.util.Date lastDeploymentAttemptedAt;
/**
*
* The time when the service was last deployed successfully.
*
*/
private java.util.Date lastDeploymentSucceededAt;
/**
*
* The ID of the last successful deployment of this service instance.
*
*/
private String lastSucceededDeploymentId;
/**
*
* The name of the service instance.
*
*/
private String name;
/**
*
* The name of the service that the service instance belongs to.
*
*/
private String serviceName;
/**
*
* The service instance template major version.
*
*/
private String templateMajorVersion;
/**
*
* The service instance template minor version.
*
*/
private String templateMinorVersion;
/**
*
* The name of the service template.
*
*/
private String templateName;
/**
*
* The Amazon Resource Name (ARN) of the service instance.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the service instance.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the service instance.
*
*
* @return The Amazon Resource Name (ARN) of the service instance.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the service instance.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The time when the service instance was created.
*
*
* @param createdAt
* The time when the service instance was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The time when the service instance was created.
*
*
* @return The time when the service instance was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The time when the service instance was created.
*
*
* @param createdAt
* The time when the service instance was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The service instance deployment status.
*
*
* @param deploymentStatus
* The service instance deployment status.
* @see DeploymentStatus
*/
public void setDeploymentStatus(String deploymentStatus) {
this.deploymentStatus = deploymentStatus;
}
/**
*
* The service instance deployment status.
*
*
* @return The service instance deployment status.
* @see DeploymentStatus
*/
public String getDeploymentStatus() {
return this.deploymentStatus;
}
/**
*
* The service instance deployment status.
*
*
* @param deploymentStatus
* The service instance deployment status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentStatus
*/
public ServiceInstanceSummary withDeploymentStatus(String deploymentStatus) {
setDeploymentStatus(deploymentStatus);
return this;
}
/**
*
* The service instance deployment status.
*
*
* @param deploymentStatus
* The service instance deployment status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentStatus
*/
public ServiceInstanceSummary withDeploymentStatus(DeploymentStatus deploymentStatus) {
this.deploymentStatus = deploymentStatus.toString();
return this;
}
/**
*
* A service instance deployment status message.
*
*
* @param deploymentStatusMessage
* A service instance deployment status message.
*/
public void setDeploymentStatusMessage(String deploymentStatusMessage) {
this.deploymentStatusMessage = deploymentStatusMessage;
}
/**
*
* A service instance deployment status message.
*
*
* @return A service instance deployment status message.
*/
public String getDeploymentStatusMessage() {
return this.deploymentStatusMessage;
}
/**
*
* A service instance deployment status message.
*
*
* @param deploymentStatusMessage
* A service instance deployment status message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withDeploymentStatusMessage(String deploymentStatusMessage) {
setDeploymentStatusMessage(deploymentStatusMessage);
return this;
}
/**
*
* The name of the environment that the service instance was deployed into.
*
*
* @param environmentName
* The name of the environment that the service instance was deployed into.
*/
public void setEnvironmentName(String environmentName) {
this.environmentName = environmentName;
}
/**
*
* The name of the environment that the service instance was deployed into.
*
*
* @return The name of the environment that the service instance was deployed into.
*/
public String getEnvironmentName() {
return this.environmentName;
}
/**
*
* The name of the environment that the service instance was deployed into.
*
*
* @param environmentName
* The name of the environment that the service instance was deployed into.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withEnvironmentName(String environmentName) {
setEnvironmentName(environmentName);
return this;
}
/**
*
* The ID of the last attempted deployment of this service instance.
*
*
* @param lastAttemptedDeploymentId
* The ID of the last attempted deployment of this service instance.
*/
public void setLastAttemptedDeploymentId(String lastAttemptedDeploymentId) {
this.lastAttemptedDeploymentId = lastAttemptedDeploymentId;
}
/**
*
* The ID of the last attempted deployment of this service instance.
*
*
* @return The ID of the last attempted deployment of this service instance.
*/
public String getLastAttemptedDeploymentId() {
return this.lastAttemptedDeploymentId;
}
/**
*
* The ID of the last attempted deployment of this service instance.
*
*
* @param lastAttemptedDeploymentId
* The ID of the last attempted deployment of this service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withLastAttemptedDeploymentId(String lastAttemptedDeploymentId) {
setLastAttemptedDeploymentId(lastAttemptedDeploymentId);
return this;
}
/**
*
* The time when a deployment of the service was last attempted.
*
*
* @param lastDeploymentAttemptedAt
* The time when a deployment of the service was last attempted.
*/
public void setLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) {
this.lastDeploymentAttemptedAt = lastDeploymentAttemptedAt;
}
/**
*
* The time when a deployment of the service was last attempted.
*
*
* @return The time when a deployment of the service was last attempted.
*/
public java.util.Date getLastDeploymentAttemptedAt() {
return this.lastDeploymentAttemptedAt;
}
/**
*
* The time when a deployment of the service was last attempted.
*
*
* @param lastDeploymentAttemptedAt
* The time when a deployment of the service was last attempted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) {
setLastDeploymentAttemptedAt(lastDeploymentAttemptedAt);
return this;
}
/**
*
* The time when the service was last deployed successfully.
*
*
* @param lastDeploymentSucceededAt
* The time when the service was last deployed successfully.
*/
public void setLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) {
this.lastDeploymentSucceededAt = lastDeploymentSucceededAt;
}
/**
*
* The time when the service was last deployed successfully.
*
*
* @return The time when the service was last deployed successfully.
*/
public java.util.Date getLastDeploymentSucceededAt() {
return this.lastDeploymentSucceededAt;
}
/**
*
* The time when the service was last deployed successfully.
*
*
* @param lastDeploymentSucceededAt
* The time when the service was last deployed successfully.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) {
setLastDeploymentSucceededAt(lastDeploymentSucceededAt);
return this;
}
/**
*
* The ID of the last successful deployment of this service instance.
*
*
* @param lastSucceededDeploymentId
* The ID of the last successful deployment of this service instance.
*/
public void setLastSucceededDeploymentId(String lastSucceededDeploymentId) {
this.lastSucceededDeploymentId = lastSucceededDeploymentId;
}
/**
*
* The ID of the last successful deployment of this service instance.
*
*
* @return The ID of the last successful deployment of this service instance.
*/
public String getLastSucceededDeploymentId() {
return this.lastSucceededDeploymentId;
}
/**
*
* The ID of the last successful deployment of this service instance.
*
*
* @param lastSucceededDeploymentId
* The ID of the last successful deployment of this service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withLastSucceededDeploymentId(String lastSucceededDeploymentId) {
setLastSucceededDeploymentId(lastSucceededDeploymentId);
return this;
}
/**
*
* The name of the service instance.
*
*
* @param name
* The name of the service instance.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the service instance.
*
*
* @return The name of the service instance.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the service instance.
*
*
* @param name
* The name of the service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The name of the service that the service instance belongs to.
*
*
* @param serviceName
* The name of the service that the service instance belongs to.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* The name of the service that the service instance belongs to.
*
*
* @return The name of the service that the service instance belongs to.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* The name of the service that the service instance belongs to.
*
*
* @param serviceName
* The name of the service that the service instance belongs to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withServiceName(String serviceName) {
setServiceName(serviceName);
return this;
}
/**
*
* The service instance template major version.
*
*
* @param templateMajorVersion
* The service instance template major version.
*/
public void setTemplateMajorVersion(String templateMajorVersion) {
this.templateMajorVersion = templateMajorVersion;
}
/**
*
* The service instance template major version.
*
*
* @return The service instance template major version.
*/
public String getTemplateMajorVersion() {
return this.templateMajorVersion;
}
/**
*
* The service instance template major version.
*
*
* @param templateMajorVersion
* The service instance template major version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withTemplateMajorVersion(String templateMajorVersion) {
setTemplateMajorVersion(templateMajorVersion);
return this;
}
/**
*
* The service instance template minor version.
*
*
* @param templateMinorVersion
* The service instance template minor version.
*/
public void setTemplateMinorVersion(String templateMinorVersion) {
this.templateMinorVersion = templateMinorVersion;
}
/**
*
* The service instance template minor version.
*
*
* @return The service instance template minor version.
*/
public String getTemplateMinorVersion() {
return this.templateMinorVersion;
}
/**
*
* The service instance template minor version.
*
*
* @param templateMinorVersion
* The service instance template minor version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary withTemplateMinorVersion(String templateMinorVersion) {
setTemplateMinorVersion(templateMinorVersion);
return this;
}
/**
*
* The name of the service template.
*
*
* @param templateName
* The name of the service template.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* The name of the service template.
*
*
* @return The name of the service template.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* The name of the service template.
*
*
* @param templateName
* The name of the service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceInstanceSummary 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 (getEnvironmentName() != null)
sb.append("EnvironmentName: ").append(getEnvironmentName()).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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getServiceName() != null)
sb.append("ServiceName: ").append(getServiceName()).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 ServiceInstanceSummary == false)
return false;
ServiceInstanceSummary other = (ServiceInstanceSummary) 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.getEnvironmentName() == null ^ this.getEnvironmentName() == null)
return false;
if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == 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.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getServiceName() == null ^ this.getServiceName() == null)
return false;
if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == 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 + ((getEnvironmentName() == null) ? 0 : getEnvironmentName().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 + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().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 ServiceInstanceSummary clone() {
try {
return (ServiceInstanceSummary) 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.ServiceInstanceSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}