com.amazonaws.services.elasticbeanstalk.model.ManagedActionHistoryItem Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticbeanstalk Show documentation
/*
* 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.elasticbeanstalk.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The record of a completed or failed managed action.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ManagedActionHistoryItem implements Serializable, Cloneable {
/**
*
* A unique identifier for the managed action.
*
*/
private String actionId;
/**
*
* The type of the managed action.
*
*/
private String actionType;
/**
*
* A description of the managed action.
*
*/
private String actionDescription;
/**
*
* If the action failed, the type of failure.
*
*/
private String failureType;
/**
*
* The status of the action.
*
*/
private String status;
/**
*
* If the action failed, a description of the failure.
*
*/
private String failureDescription;
/**
*
* The date and time that the action started executing.
*
*/
private java.util.Date executedTime;
/**
*
* The date and time that the action finished executing.
*
*/
private java.util.Date finishedTime;
/**
*
* A unique identifier for the managed action.
*
*
* @param actionId
* A unique identifier for the managed action.
*/
public void setActionId(String actionId) {
this.actionId = actionId;
}
/**
*
* A unique identifier for the managed action.
*
*
* @return A unique identifier for the managed action.
*/
public String getActionId() {
return this.actionId;
}
/**
*
* A unique identifier for the managed action.
*
*
* @param actionId
* A unique identifier for the managed action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedActionHistoryItem withActionId(String actionId) {
setActionId(actionId);
return this;
}
/**
*
* The type of the managed action.
*
*
* @param actionType
* The type of the managed action.
* @see ActionType
*/
public void setActionType(String actionType) {
this.actionType = actionType;
}
/**
*
* The type of the managed action.
*
*
* @return The type of the managed action.
* @see ActionType
*/
public String getActionType() {
return this.actionType;
}
/**
*
* The type of the managed action.
*
*
* @param actionType
* The type of the managed action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionType
*/
public ManagedActionHistoryItem withActionType(String actionType) {
setActionType(actionType);
return this;
}
/**
*
* The type of the managed action.
*
*
* @param actionType
* The type of the managed action.
* @see ActionType
*/
public void setActionType(ActionType actionType) {
withActionType(actionType);
}
/**
*
* The type of the managed action.
*
*
* @param actionType
* The type of the managed action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionType
*/
public ManagedActionHistoryItem withActionType(ActionType actionType) {
this.actionType = actionType.toString();
return this;
}
/**
*
* A description of the managed action.
*
*
* @param actionDescription
* A description of the managed action.
*/
public void setActionDescription(String actionDescription) {
this.actionDescription = actionDescription;
}
/**
*
* A description of the managed action.
*
*
* @return A description of the managed action.
*/
public String getActionDescription() {
return this.actionDescription;
}
/**
*
* A description of the managed action.
*
*
* @param actionDescription
* A description of the managed action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedActionHistoryItem withActionDescription(String actionDescription) {
setActionDescription(actionDescription);
return this;
}
/**
*
* If the action failed, the type of failure.
*
*
* @param failureType
* If the action failed, the type of failure.
* @see FailureType
*/
public void setFailureType(String failureType) {
this.failureType = failureType;
}
/**
*
* If the action failed, the type of failure.
*
*
* @return If the action failed, the type of failure.
* @see FailureType
*/
public String getFailureType() {
return this.failureType;
}
/**
*
* If the action failed, the type of failure.
*
*
* @param failureType
* If the action failed, the type of failure.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FailureType
*/
public ManagedActionHistoryItem withFailureType(String failureType) {
setFailureType(failureType);
return this;
}
/**
*
* If the action failed, the type of failure.
*
*
* @param failureType
* If the action failed, the type of failure.
* @see FailureType
*/
public void setFailureType(FailureType failureType) {
withFailureType(failureType);
}
/**
*
* If the action failed, the type of failure.
*
*
* @param failureType
* If the action failed, the type of failure.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FailureType
*/
public ManagedActionHistoryItem withFailureType(FailureType failureType) {
this.failureType = failureType.toString();
return this;
}
/**
*
* The status of the action.
*
*
* @param status
* The status of the action.
* @see ActionHistoryStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the action.
*
*
* @return The status of the action.
* @see ActionHistoryStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the action.
*
*
* @param status
* The status of the action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionHistoryStatus
*/
public ManagedActionHistoryItem withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the action.
*
*
* @param status
* The status of the action.
* @see ActionHistoryStatus
*/
public void setStatus(ActionHistoryStatus status) {
withStatus(status);
}
/**
*
* The status of the action.
*
*
* @param status
* The status of the action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionHistoryStatus
*/
public ManagedActionHistoryItem withStatus(ActionHistoryStatus status) {
this.status = status.toString();
return this;
}
/**
*
* If the action failed, a description of the failure.
*
*
* @param failureDescription
* If the action failed, a description of the failure.
*/
public void setFailureDescription(String failureDescription) {
this.failureDescription = failureDescription;
}
/**
*
* If the action failed, a description of the failure.
*
*
* @return If the action failed, a description of the failure.
*/
public String getFailureDescription() {
return this.failureDescription;
}
/**
*
* If the action failed, a description of the failure.
*
*
* @param failureDescription
* If the action failed, a description of the failure.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedActionHistoryItem withFailureDescription(String failureDescription) {
setFailureDescription(failureDescription);
return this;
}
/**
*
* The date and time that the action started executing.
*
*
* @param executedTime
* The date and time that the action started executing.
*/
public void setExecutedTime(java.util.Date executedTime) {
this.executedTime = executedTime;
}
/**
*
* The date and time that the action started executing.
*
*
* @return The date and time that the action started executing.
*/
public java.util.Date getExecutedTime() {
return this.executedTime;
}
/**
*
* The date and time that the action started executing.
*
*
* @param executedTime
* The date and time that the action started executing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedActionHistoryItem withExecutedTime(java.util.Date executedTime) {
setExecutedTime(executedTime);
return this;
}
/**
*
* The date and time that the action finished executing.
*
*
* @param finishedTime
* The date and time that the action finished executing.
*/
public void setFinishedTime(java.util.Date finishedTime) {
this.finishedTime = finishedTime;
}
/**
*
* The date and time that the action finished executing.
*
*
* @return The date and time that the action finished executing.
*/
public java.util.Date getFinishedTime() {
return this.finishedTime;
}
/**
*
* The date and time that the action finished executing.
*
*
* @param finishedTime
* The date and time that the action finished executing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedActionHistoryItem withFinishedTime(java.util.Date finishedTime) {
setFinishedTime(finishedTime);
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 (getActionId() != null)
sb.append("ActionId: ").append(getActionId()).append(",");
if (getActionType() != null)
sb.append("ActionType: ").append(getActionType()).append(",");
if (getActionDescription() != null)
sb.append("ActionDescription: ").append(getActionDescription()).append(",");
if (getFailureType() != null)
sb.append("FailureType: ").append(getFailureType()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getFailureDescription() != null)
sb.append("FailureDescription: ").append(getFailureDescription()).append(",");
if (getExecutedTime() != null)
sb.append("ExecutedTime: ").append(getExecutedTime()).append(",");
if (getFinishedTime() != null)
sb.append("FinishedTime: ").append(getFinishedTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ManagedActionHistoryItem == false)
return false;
ManagedActionHistoryItem other = (ManagedActionHistoryItem) obj;
if (other.getActionId() == null ^ this.getActionId() == null)
return false;
if (other.getActionId() != null && other.getActionId().equals(this.getActionId()) == false)
return false;
if (other.getActionType() == null ^ this.getActionType() == null)
return false;
if (other.getActionType() != null && other.getActionType().equals(this.getActionType()) == false)
return false;
if (other.getActionDescription() == null ^ this.getActionDescription() == null)
return false;
if (other.getActionDescription() != null && other.getActionDescription().equals(this.getActionDescription()) == false)
return false;
if (other.getFailureType() == null ^ this.getFailureType() == null)
return false;
if (other.getFailureType() != null && other.getFailureType().equals(this.getFailureType()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getFailureDescription() == null ^ this.getFailureDescription() == null)
return false;
if (other.getFailureDescription() != null && other.getFailureDescription().equals(this.getFailureDescription()) == false)
return false;
if (other.getExecutedTime() == null ^ this.getExecutedTime() == null)
return false;
if (other.getExecutedTime() != null && other.getExecutedTime().equals(this.getExecutedTime()) == false)
return false;
if (other.getFinishedTime() == null ^ this.getFinishedTime() == null)
return false;
if (other.getFinishedTime() != null && other.getFinishedTime().equals(this.getFinishedTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionId() == null) ? 0 : getActionId().hashCode());
hashCode = prime * hashCode + ((getActionType() == null) ? 0 : getActionType().hashCode());
hashCode = prime * hashCode + ((getActionDescription() == null) ? 0 : getActionDescription().hashCode());
hashCode = prime * hashCode + ((getFailureType() == null) ? 0 : getFailureType().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getFailureDescription() == null) ? 0 : getFailureDescription().hashCode());
hashCode = prime * hashCode + ((getExecutedTime() == null) ? 0 : getExecutedTime().hashCode());
hashCode = prime * hashCode + ((getFinishedTime() == null) ? 0 : getFinishedTime().hashCode());
return hashCode;
}
@Override
public ManagedActionHistoryItem clone() {
try {
return (ManagedActionHistoryItem) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}