/* * 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.appconfig.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An object that describes a deployment event. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DeploymentEvent implements Serializable, Cloneable, StructuredPojo { /** ** The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a * percentage update; the start or stop of a bake period; and the start or completion of a rollback. *
*/ private String eventType; /** ** The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. *
*/ private String triggeredBy; /** ** A description of the deployment event. Descriptions include, but are not limited to, the user account or the * Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or * in the case of an internal error, a recommendation to attempt a new deployment. *
*/ private String description; /** ** The list of extensions that were invoked as part of the deployment. *
*/ private java.util.List* The date and time the event occurred. *
*/ private java.util.Date occurredAt; /** ** The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a * percentage update; the start or stop of a bake period; and the start or completion of a rollback. *
* * @param eventType * The type of deployment event. Deployment event types include the start, stop, or completion of a * deployment; a percentage update; the start or stop of a bake period; and the start or completion of a * rollback. * @see DeploymentEventType */ public void setEventType(String eventType) { this.eventType = eventType; } /** ** The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a * percentage update; the start or stop of a bake period; and the start or completion of a rollback. *
* * @return The type of deployment event. Deployment event types include the start, stop, or completion of a * deployment; a percentage update; the start or stop of a bake period; and the start or completion of a * rollback. * @see DeploymentEventType */ public String getEventType() { return this.eventType; } /** ** The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a * percentage update; the start or stop of a bake period; and the start or completion of a rollback. *
* * @param eventType * The type of deployment event. Deployment event types include the start, stop, or completion of a * deployment; a percentage update; the start or stop of a bake period; and the start or completion of a * rollback. * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentEventType */ public DeploymentEvent withEventType(String eventType) { setEventType(eventType); return this; } /** ** The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a * percentage update; the start or stop of a bake period; and the start or completion of a rollback. *
* * @param eventType * The type of deployment event. Deployment event types include the start, stop, or completion of a * deployment; a percentage update; the start or stop of a bake period; and the start or completion of a * rollback. * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentEventType */ public DeploymentEvent withEventType(DeploymentEventType eventType) { this.eventType = eventType.toString(); return this; } /** ** The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. *
* * @param triggeredBy * The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. * @see TriggeredBy */ public void setTriggeredBy(String triggeredBy) { this.triggeredBy = triggeredBy; } /** ** The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. *
* * @return The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. * @see TriggeredBy */ public String getTriggeredBy() { return this.triggeredBy; } /** ** The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. *
* * @param triggeredBy * The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. * @return Returns a reference to this object so that method calls can be chained together. * @see TriggeredBy */ public DeploymentEvent withTriggeredBy(String triggeredBy) { setTriggeredBy(triggeredBy); return this; } /** ** The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. *
* * @param triggeredBy * The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon * CloudWatch alarm, or an internal error. * @return Returns a reference to this object so that method calls can be chained together. * @see TriggeredBy */ public DeploymentEvent withTriggeredBy(TriggeredBy triggeredBy) { this.triggeredBy = triggeredBy.toString(); return this; } /** ** A description of the deployment event. Descriptions include, but are not limited to, the user account or the * Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or * in the case of an internal error, a recommendation to attempt a new deployment. *
* * @param description * A description of the deployment event. Descriptions include, but are not limited to, the user account or * the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the * deployment, or in the case of an internal error, a recommendation to attempt a new deployment. */ public void setDescription(String description) { this.description = description; } /** ** A description of the deployment event. Descriptions include, but are not limited to, the user account or the * Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or * in the case of an internal error, a recommendation to attempt a new deployment. *
* * @return A description of the deployment event. Descriptions include, but are not limited to, the user account or * the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the * deployment, or in the case of an internal error, a recommendation to attempt a new deployment. */ public String getDescription() { return this.description; } /** ** A description of the deployment event. Descriptions include, but are not limited to, the user account or the * Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or * in the case of an internal error, a recommendation to attempt a new deployment. *
* * @param description * A description of the deployment event. Descriptions include, but are not limited to, the user account or * the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the * deployment, or in the case of an internal error, a recommendation to attempt a new deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DeploymentEvent withDescription(String description) { setDescription(description); return this; } /** ** The list of extensions that were invoked as part of the deployment. *
* * @return The list of extensions that were invoked as part of the deployment. */ public java.util.List* The list of extensions that were invoked as part of the deployment. *
* * @param actionInvocations * The list of extensions that were invoked as part of the deployment. */ public void setActionInvocations(java.util.Collection* The list of extensions that were invoked as part of the deployment. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setActionInvocations(java.util.Collection)} or {@link #withActionInvocations(java.util.Collection)} if * you want to override the existing values. *
* * @param actionInvocations * The list of extensions that were invoked as part of the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DeploymentEvent withActionInvocations(ActionInvocation... actionInvocations) { if (this.actionInvocations == null) { setActionInvocations(new java.util.ArrayList* The list of extensions that were invoked as part of the deployment. *
* * @param actionInvocations * The list of extensions that were invoked as part of the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public DeploymentEvent withActionInvocations(java.util.Collection* The date and time the event occurred. *
* * @param occurredAt * The date and time the event occurred. */ public void setOccurredAt(java.util.Date occurredAt) { this.occurredAt = occurredAt; } /** ** The date and time the event occurred. *
* * @return The date and time the event occurred. */ public java.util.Date getOccurredAt() { return this.occurredAt; } /** ** The date and time the event occurred. *
* * @param occurredAt * The date and time the event occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public DeploymentEvent withOccurredAt(java.util.Date occurredAt) { setOccurredAt(occurredAt); 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 (getEventType() != null) sb.append("EventType: ").append(getEventType()).append(","); if (getTriggeredBy() != null) sb.append("TriggeredBy: ").append(getTriggeredBy()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getActionInvocations() != null) sb.append("ActionInvocations: ").append(getActionInvocations()).append(","); if (getOccurredAt() != null) sb.append("OccurredAt: ").append(getOccurredAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeploymentEvent == false) return false; DeploymentEvent other = (DeploymentEvent) obj; if (other.getEventType() == null ^ this.getEventType() == null) return false; if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == false) return false; if (other.getTriggeredBy() == null ^ this.getTriggeredBy() == null) return false; if (other.getTriggeredBy() != null && other.getTriggeredBy().equals(this.getTriggeredBy()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getActionInvocations() == null ^ this.getActionInvocations() == null) return false; if (other.getActionInvocations() != null && other.getActionInvocations().equals(this.getActionInvocations()) == false) return false; if (other.getOccurredAt() == null ^ this.getOccurredAt() == null) return false; if (other.getOccurredAt() != null && other.getOccurredAt().equals(this.getOccurredAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode()); hashCode = prime * hashCode + ((getTriggeredBy() == null) ? 0 : getTriggeredBy().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getActionInvocations() == null) ? 0 : getActionInvocations().hashCode()); hashCode = prime * hashCode + ((getOccurredAt() == null) ? 0 : getOccurredAt().hashCode()); return hashCode; } @Override public DeploymentEvent clone() { try { return (DeploymentEvent) 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.appconfig.model.transform.DeploymentEventMarshaller.getInstance().marshall(this, protocolMarshaller); } }