com.amazonaws.services.snowdevicemanagement.model.ExecutionSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-snowdevicemanagement 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.snowdevicemanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The summary of a task execution on a specified device.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ExecutionSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the execution.
*
*/
private String executionId;
/**
*
* The ID of the managed device that the task is being executed on.
*
*/
private String managedDeviceId;
/**
*
* The state of the execution.
*
*/
private String state;
/**
*
* The ID of the task.
*
*/
private String taskId;
/**
*
* The ID of the execution.
*
*
* @param executionId
* The ID of the execution.
*/
public void setExecutionId(String executionId) {
this.executionId = executionId;
}
/**
*
* The ID of the execution.
*
*
* @return The ID of the execution.
*/
public String getExecutionId() {
return this.executionId;
}
/**
*
* The ID of the execution.
*
*
* @param executionId
* The ID of the execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionSummary withExecutionId(String executionId) {
setExecutionId(executionId);
return this;
}
/**
*
* The ID of the managed device that the task is being executed on.
*
*
* @param managedDeviceId
* The ID of the managed device that the task is being executed on.
*/
public void setManagedDeviceId(String managedDeviceId) {
this.managedDeviceId = managedDeviceId;
}
/**
*
* The ID of the managed device that the task is being executed on.
*
*
* @return The ID of the managed device that the task is being executed on.
*/
public String getManagedDeviceId() {
return this.managedDeviceId;
}
/**
*
* The ID of the managed device that the task is being executed on.
*
*
* @param managedDeviceId
* The ID of the managed device that the task is being executed on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionSummary withManagedDeviceId(String managedDeviceId) {
setManagedDeviceId(managedDeviceId);
return this;
}
/**
*
* The state of the execution.
*
*
* @param state
* The state of the execution.
* @see ExecutionState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the execution.
*
*
* @return The state of the execution.
* @see ExecutionState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the execution.
*
*
* @param state
* The state of the execution.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExecutionState
*/
public ExecutionSummary withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the execution.
*
*
* @param state
* The state of the execution.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExecutionState
*/
public ExecutionSummary withState(ExecutionState state) {
this.state = state.toString();
return this;
}
/**
*
* The ID of the task.
*
*
* @param taskId
* The ID of the task.
*/
public void setTaskId(String taskId) {
this.taskId = taskId;
}
/**
*
* The ID of the task.
*
*
* @return The ID of the task.
*/
public String getTaskId() {
return this.taskId;
}
/**
*
* The ID of the task.
*
*
* @param taskId
* The ID of the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionSummary withTaskId(String taskId) {
setTaskId(taskId);
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 (getExecutionId() != null)
sb.append("ExecutionId: ").append(getExecutionId()).append(",");
if (getManagedDeviceId() != null)
sb.append("ManagedDeviceId: ").append(getManagedDeviceId()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getTaskId() != null)
sb.append("TaskId: ").append(getTaskId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ExecutionSummary == false)
return false;
ExecutionSummary other = (ExecutionSummary) obj;
if (other.getExecutionId() == null ^ this.getExecutionId() == null)
return false;
if (other.getExecutionId() != null && other.getExecutionId().equals(this.getExecutionId()) == false)
return false;
if (other.getManagedDeviceId() == null ^ this.getManagedDeviceId() == null)
return false;
if (other.getManagedDeviceId() != null && other.getManagedDeviceId().equals(this.getManagedDeviceId()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getTaskId() == null ^ this.getTaskId() == null)
return false;
if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getExecutionId() == null) ? 0 : getExecutionId().hashCode());
hashCode = prime * hashCode + ((getManagedDeviceId() == null) ? 0 : getManagedDeviceId().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
return hashCode;
}
@Override
public ExecutionSummary clone() {
try {
return (ExecutionSummary) 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.snowdevicemanagement.model.transform.ExecutionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}