
com.amazonaws.services.proton.model.ComponentSummary 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 component resource.
*
*
* For more information about components, see Proton components in the Proton
* User Guide.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ComponentSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the component.
*
*/
private String arn;
/**
*
* The time when the component was created.
*
*/
private java.util.Date createdAt;
/**
*
* The component deployment status.
*
*/
private String deploymentStatus;
/**
*
* The message associated with the component deployment status.
*
*/
private String deploymentStatusMessage;
/**
*
* The name of the Proton environment that this component is associated with.
*
*/
private String environmentName;
/**
*
* The ID of the last attempted deployment of this component.
*
*/
private String lastAttemptedDeploymentId;
/**
*
* The time when a deployment of the component was last attempted.
*
*/
private java.util.Date lastDeploymentAttemptedAt;
/**
*
* The time when the component was last deployed successfully.
*
*/
private java.util.Date lastDeploymentSucceededAt;
/**
*
* The time when the component was last modified.
*
*/
private java.util.Date lastModifiedAt;
/**
*
* The ID of the last successful deployment of this component.
*
*/
private String lastSucceededDeploymentId;
/**
*
* The name of the component.
*
*/
private String name;
/**
*
* The name of the service instance that this component is attached to. Provided when a component is attached to a
* service instance.
*
*/
private String serviceInstanceName;
/**
*
* The name of the service that serviceInstanceName
is associated with. Provided when a component is
* attached to a service instance.
*
*/
private String serviceName;
/**
*
* The Amazon Resource Name (ARN) of the component.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the component.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the component.
*
*
* @return The Amazon Resource Name (ARN) of the component.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the component.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The time when the component was created.
*
*
* @param createdAt
* The time when the component was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The time when the component was created.
*
*
* @return The time when the component was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The time when the component was created.
*
*
* @param createdAt
* The time when the component was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The component deployment status.
*
*
* @param deploymentStatus
* The component deployment status.
* @see DeploymentStatus
*/
public void setDeploymentStatus(String deploymentStatus) {
this.deploymentStatus = deploymentStatus;
}
/**
*
* The component deployment status.
*
*
* @return The component deployment status.
* @see DeploymentStatus
*/
public String getDeploymentStatus() {
return this.deploymentStatus;
}
/**
*
* The component deployment status.
*
*
* @param deploymentStatus
* The component deployment status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentStatus
*/
public ComponentSummary withDeploymentStatus(String deploymentStatus) {
setDeploymentStatus(deploymentStatus);
return this;
}
/**
*
* The component deployment status.
*
*
* @param deploymentStatus
* The component deployment status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentStatus
*/
public ComponentSummary withDeploymentStatus(DeploymentStatus deploymentStatus) {
this.deploymentStatus = deploymentStatus.toString();
return this;
}
/**
*
* The message associated with the component deployment status.
*
*
* @param deploymentStatusMessage
* The message associated with the component deployment status.
*/
public void setDeploymentStatusMessage(String deploymentStatusMessage) {
this.deploymentStatusMessage = deploymentStatusMessage;
}
/**
*
* The message associated with the component deployment status.
*
*
* @return The message associated with the component deployment status.
*/
public String getDeploymentStatusMessage() {
return this.deploymentStatusMessage;
}
/**
*
* The message associated with the component deployment status.
*
*
* @param deploymentStatusMessage
* The message associated with the component deployment status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withDeploymentStatusMessage(String deploymentStatusMessage) {
setDeploymentStatusMessage(deploymentStatusMessage);
return this;
}
/**
*
* The name of the Proton environment that this component is associated with.
*
*
* @param environmentName
* The name of the Proton environment that this component is associated with.
*/
public void setEnvironmentName(String environmentName) {
this.environmentName = environmentName;
}
/**
*
* The name of the Proton environment that this component is associated with.
*
*
* @return The name of the Proton environment that this component is associated with.
*/
public String getEnvironmentName() {
return this.environmentName;
}
/**
*
* The name of the Proton environment that this component is associated with.
*
*
* @param environmentName
* The name of the Proton environment that this component is associated with.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withEnvironmentName(String environmentName) {
setEnvironmentName(environmentName);
return this;
}
/**
*
* The ID of the last attempted deployment of this component.
*
*
* @param lastAttemptedDeploymentId
* The ID of the last attempted deployment of this component.
*/
public void setLastAttemptedDeploymentId(String lastAttemptedDeploymentId) {
this.lastAttemptedDeploymentId = lastAttemptedDeploymentId;
}
/**
*
* The ID of the last attempted deployment of this component.
*
*
* @return The ID of the last attempted deployment of this component.
*/
public String getLastAttemptedDeploymentId() {
return this.lastAttemptedDeploymentId;
}
/**
*
* The ID of the last attempted deployment of this component.
*
*
* @param lastAttemptedDeploymentId
* The ID of the last attempted deployment of this component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withLastAttemptedDeploymentId(String lastAttemptedDeploymentId) {
setLastAttemptedDeploymentId(lastAttemptedDeploymentId);
return this;
}
/**
*
* The time when a deployment of the component was last attempted.
*
*
* @param lastDeploymentAttemptedAt
* The time when a deployment of the component was last attempted.
*/
public void setLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) {
this.lastDeploymentAttemptedAt = lastDeploymentAttemptedAt;
}
/**
*
* The time when a deployment of the component was last attempted.
*
*
* @return The time when a deployment of the component was last attempted.
*/
public java.util.Date getLastDeploymentAttemptedAt() {
return this.lastDeploymentAttemptedAt;
}
/**
*
* The time when a deployment of the component was last attempted.
*
*
* @param lastDeploymentAttemptedAt
* The time when a deployment of the component was last attempted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withLastDeploymentAttemptedAt(java.util.Date lastDeploymentAttemptedAt) {
setLastDeploymentAttemptedAt(lastDeploymentAttemptedAt);
return this;
}
/**
*
* The time when the component was last deployed successfully.
*
*
* @param lastDeploymentSucceededAt
* The time when the component was last deployed successfully.
*/
public void setLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) {
this.lastDeploymentSucceededAt = lastDeploymentSucceededAt;
}
/**
*
* The time when the component was last deployed successfully.
*
*
* @return The time when the component was last deployed successfully.
*/
public java.util.Date getLastDeploymentSucceededAt() {
return this.lastDeploymentSucceededAt;
}
/**
*
* The time when the component was last deployed successfully.
*
*
* @param lastDeploymentSucceededAt
* The time when the component was last deployed successfully.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withLastDeploymentSucceededAt(java.util.Date lastDeploymentSucceededAt) {
setLastDeploymentSucceededAt(lastDeploymentSucceededAt);
return this;
}
/**
*
* The time when the component was last modified.
*
*
* @param lastModifiedAt
* The time when the component was last modified.
*/
public void setLastModifiedAt(java.util.Date lastModifiedAt) {
this.lastModifiedAt = lastModifiedAt;
}
/**
*
* The time when the component was last modified.
*
*
* @return The time when the component was last modified.
*/
public java.util.Date getLastModifiedAt() {
return this.lastModifiedAt;
}
/**
*
* The time when the component was last modified.
*
*
* @param lastModifiedAt
* The time when the component was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withLastModifiedAt(java.util.Date lastModifiedAt) {
setLastModifiedAt(lastModifiedAt);
return this;
}
/**
*
* The ID of the last successful deployment of this component.
*
*
* @param lastSucceededDeploymentId
* The ID of the last successful deployment of this component.
*/
public void setLastSucceededDeploymentId(String lastSucceededDeploymentId) {
this.lastSucceededDeploymentId = lastSucceededDeploymentId;
}
/**
*
* The ID of the last successful deployment of this component.
*
*
* @return The ID of the last successful deployment of this component.
*/
public String getLastSucceededDeploymentId() {
return this.lastSucceededDeploymentId;
}
/**
*
* The ID of the last successful deployment of this component.
*
*
* @param lastSucceededDeploymentId
* The ID of the last successful deployment of this component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withLastSucceededDeploymentId(String lastSucceededDeploymentId) {
setLastSucceededDeploymentId(lastSucceededDeploymentId);
return this;
}
/**
*
* The name of the component.
*
*
* @param name
* The name of the component.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the component.
*
*
* @return The name of the component.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the component.
*
*
* @param name
* The name of the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The name of the service instance that this component is attached to. Provided when a component is attached to a
* service instance.
*
*
* @param serviceInstanceName
* The name of the service instance that this component is attached to. Provided when a component is attached
* to a service instance.
*/
public void setServiceInstanceName(String serviceInstanceName) {
this.serviceInstanceName = serviceInstanceName;
}
/**
*
* The name of the service instance that this component is attached to. Provided when a component is attached to a
* service instance.
*
*
* @return The name of the service instance that this component is attached to. Provided when a component is
* attached to a service instance.
*/
public String getServiceInstanceName() {
return this.serviceInstanceName;
}
/**
*
* The name of the service instance that this component is attached to. Provided when a component is attached to a
* service instance.
*
*
* @param serviceInstanceName
* The name of the service instance that this component is attached to. Provided when a component is attached
* to a service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withServiceInstanceName(String serviceInstanceName) {
setServiceInstanceName(serviceInstanceName);
return this;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Provided when a component is
* attached to a service instance.
*
*
* @param serviceName
* The name of the service that serviceInstanceName
is associated with. Provided when a
* component is attached to a service instance.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Provided when a component is
* attached to a service instance.
*
*
* @return The name of the service that serviceInstanceName
is associated with. Provided when a
* component is attached to a service instance.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Provided when a component is
* attached to a service instance.
*
*
* @param serviceName
* The name of the service that serviceInstanceName
is associated with. Provided when a
* component is attached to a service instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ComponentSummary withServiceName(String serviceName) {
setServiceName(serviceName);
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 (getLastModifiedAt() != null)
sb.append("LastModifiedAt: ").append(getLastModifiedAt()).append(",");
if (getLastSucceededDeploymentId() != null)
sb.append("LastSucceededDeploymentId: ").append(getLastSucceededDeploymentId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getServiceInstanceName() != null)
sb.append("ServiceInstanceName: ").append(getServiceInstanceName()).append(",");
if (getServiceName() != null)
sb.append("ServiceName: ").append(getServiceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ComponentSummary == false)
return false;
ComponentSummary other = (ComponentSummary) 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.getLastModifiedAt() == null ^ this.getLastModifiedAt() == null)
return false;
if (other.getLastModifiedAt() != null && other.getLastModifiedAt().equals(this.getLastModifiedAt()) == 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.getServiceInstanceName() == null ^ this.getServiceInstanceName() == null)
return false;
if (other.getServiceInstanceName() != null && other.getServiceInstanceName().equals(this.getServiceInstanceName()) == false)
return false;
if (other.getServiceName() == null ^ this.getServiceName() == null)
return false;
if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == 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 + ((getLastModifiedAt() == null) ? 0 : getLastModifiedAt().hashCode());
hashCode = prime * hashCode + ((getLastSucceededDeploymentId() == null) ? 0 : getLastSucceededDeploymentId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getServiceInstanceName() == null) ? 0 : getServiceInstanceName().hashCode());
hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
return hashCode;
}
@Override
public ComponentSummary clone() {
try {
return (ComponentSummary) 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.ComponentSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}