com.amazonaws.services.iotwireless.model.GetWirelessGatewayTaskResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotwireless 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.iotwireless.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetWirelessGatewayTaskResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the wireless gateway.
*
*/
private String wirelessGatewayId;
/**
*
* The ID of the WirelessGatewayTask.
*
*/
private String wirelessGatewayTaskDefinitionId;
/**
*
* The date and time when the most recent uplink was received.
*
*
*
* This value is only valid for 3 months.
*
*
*/
private String lastUplinkReceivedAt;
/**
*
* The date and time when the task was created.
*
*/
private String taskCreatedAt;
/**
*
* The status of the request.
*
*/
private String status;
/**
*
* The ID of the wireless gateway.
*
*
* @param wirelessGatewayId
* The ID of the wireless gateway.
*/
public void setWirelessGatewayId(String wirelessGatewayId) {
this.wirelessGatewayId = wirelessGatewayId;
}
/**
*
* The ID of the wireless gateway.
*
*
* @return The ID of the wireless gateway.
*/
public String getWirelessGatewayId() {
return this.wirelessGatewayId;
}
/**
*
* The ID of the wireless gateway.
*
*
* @param wirelessGatewayId
* The ID of the wireless gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetWirelessGatewayTaskResult withWirelessGatewayId(String wirelessGatewayId) {
setWirelessGatewayId(wirelessGatewayId);
return this;
}
/**
*
* The ID of the WirelessGatewayTask.
*
*
* @param wirelessGatewayTaskDefinitionId
* The ID of the WirelessGatewayTask.
*/
public void setWirelessGatewayTaskDefinitionId(String wirelessGatewayTaskDefinitionId) {
this.wirelessGatewayTaskDefinitionId = wirelessGatewayTaskDefinitionId;
}
/**
*
* The ID of the WirelessGatewayTask.
*
*
* @return The ID of the WirelessGatewayTask.
*/
public String getWirelessGatewayTaskDefinitionId() {
return this.wirelessGatewayTaskDefinitionId;
}
/**
*
* The ID of the WirelessGatewayTask.
*
*
* @param wirelessGatewayTaskDefinitionId
* The ID of the WirelessGatewayTask.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetWirelessGatewayTaskResult withWirelessGatewayTaskDefinitionId(String wirelessGatewayTaskDefinitionId) {
setWirelessGatewayTaskDefinitionId(wirelessGatewayTaskDefinitionId);
return this;
}
/**
*
* The date and time when the most recent uplink was received.
*
*
*
* This value is only valid for 3 months.
*
*
*
* @param lastUplinkReceivedAt
* The date and time when the most recent uplink was received.
*
* This value is only valid for 3 months.
*
*/
public void setLastUplinkReceivedAt(String lastUplinkReceivedAt) {
this.lastUplinkReceivedAt = lastUplinkReceivedAt;
}
/**
*
* The date and time when the most recent uplink was received.
*
*
*
* This value is only valid for 3 months.
*
*
*
* @return The date and time when the most recent uplink was received.
*
* This value is only valid for 3 months.
*
*/
public String getLastUplinkReceivedAt() {
return this.lastUplinkReceivedAt;
}
/**
*
* The date and time when the most recent uplink was received.
*
*
*
* This value is only valid for 3 months.
*
*
*
* @param lastUplinkReceivedAt
* The date and time when the most recent uplink was received.
*
* This value is only valid for 3 months.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetWirelessGatewayTaskResult withLastUplinkReceivedAt(String lastUplinkReceivedAt) {
setLastUplinkReceivedAt(lastUplinkReceivedAt);
return this;
}
/**
*
* The date and time when the task was created.
*
*
* @param taskCreatedAt
* The date and time when the task was created.
*/
public void setTaskCreatedAt(String taskCreatedAt) {
this.taskCreatedAt = taskCreatedAt;
}
/**
*
* The date and time when the task was created.
*
*
* @return The date and time when the task was created.
*/
public String getTaskCreatedAt() {
return this.taskCreatedAt;
}
/**
*
* The date and time when the task was created.
*
*
* @param taskCreatedAt
* The date and time when the task was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetWirelessGatewayTaskResult withTaskCreatedAt(String taskCreatedAt) {
setTaskCreatedAt(taskCreatedAt);
return this;
}
/**
*
* The status of the request.
*
*
* @param status
* The status of the request.
* @see WirelessGatewayTaskStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the request.
*
*
* @return The status of the request.
* @see WirelessGatewayTaskStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the request.
*
*
* @param status
* The status of the request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WirelessGatewayTaskStatus
*/
public GetWirelessGatewayTaskResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the request.
*
*
* @param status
* The status of the request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WirelessGatewayTaskStatus
*/
public GetWirelessGatewayTaskResult withStatus(WirelessGatewayTaskStatus status) {
this.status = status.toString();
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 (getWirelessGatewayId() != null)
sb.append("WirelessGatewayId: ").append(getWirelessGatewayId()).append(",");
if (getWirelessGatewayTaskDefinitionId() != null)
sb.append("WirelessGatewayTaskDefinitionId: ").append(getWirelessGatewayTaskDefinitionId()).append(",");
if (getLastUplinkReceivedAt() != null)
sb.append("LastUplinkReceivedAt: ").append(getLastUplinkReceivedAt()).append(",");
if (getTaskCreatedAt() != null)
sb.append("TaskCreatedAt: ").append(getTaskCreatedAt()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetWirelessGatewayTaskResult == false)
return false;
GetWirelessGatewayTaskResult other = (GetWirelessGatewayTaskResult) obj;
if (other.getWirelessGatewayId() == null ^ this.getWirelessGatewayId() == null)
return false;
if (other.getWirelessGatewayId() != null && other.getWirelessGatewayId().equals(this.getWirelessGatewayId()) == false)
return false;
if (other.getWirelessGatewayTaskDefinitionId() == null ^ this.getWirelessGatewayTaskDefinitionId() == null)
return false;
if (other.getWirelessGatewayTaskDefinitionId() != null
&& other.getWirelessGatewayTaskDefinitionId().equals(this.getWirelessGatewayTaskDefinitionId()) == false)
return false;
if (other.getLastUplinkReceivedAt() == null ^ this.getLastUplinkReceivedAt() == null)
return false;
if (other.getLastUplinkReceivedAt() != null && other.getLastUplinkReceivedAt().equals(this.getLastUplinkReceivedAt()) == false)
return false;
if (other.getTaskCreatedAt() == null ^ this.getTaskCreatedAt() == null)
return false;
if (other.getTaskCreatedAt() != null && other.getTaskCreatedAt().equals(this.getTaskCreatedAt()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getWirelessGatewayId() == null) ? 0 : getWirelessGatewayId().hashCode());
hashCode = prime * hashCode + ((getWirelessGatewayTaskDefinitionId() == null) ? 0 : getWirelessGatewayTaskDefinitionId().hashCode());
hashCode = prime * hashCode + ((getLastUplinkReceivedAt() == null) ? 0 : getLastUplinkReceivedAt().hashCode());
hashCode = prime * hashCode + ((getTaskCreatedAt() == null) ? 0 : getTaskCreatedAt().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
return hashCode;
}
@Override
public GetWirelessGatewayTaskResult clone() {
try {
return (GetWirelessGatewayTaskResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}