com.amazonaws.services.panorama.model.DeviceJob Maven / Gradle / Ivy
Show all versions of aws-java-sdk-panorama 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.panorama.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A job that runs on a device.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeviceJob implements Serializable, Cloneable, StructuredPojo {
/**
*
* When the job was created.
*
*/
private java.util.Date createdTime;
/**
*
* The ID of the target device.
*
*/
private String deviceId;
/**
*
* The name of the target device
*
*/
private String deviceName;
/**
*
* The job's ID.
*
*/
private String jobId;
/**
*
* The job's type.
*
*/
private String jobType;
/**
*
* When the job was created.
*
*
* @param createdTime
* When the job was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* When the job was created.
*
*
* @return When the job was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* When the job was created.
*
*
* @param createdTime
* When the job was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeviceJob withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* The ID of the target device.
*
*
* @param deviceId
* The ID of the target device.
*/
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
/**
*
* The ID of the target device.
*
*
* @return The ID of the target device.
*/
public String getDeviceId() {
return this.deviceId;
}
/**
*
* The ID of the target device.
*
*
* @param deviceId
* The ID of the target device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeviceJob withDeviceId(String deviceId) {
setDeviceId(deviceId);
return this;
}
/**
*
* The name of the target device
*
*
* @param deviceName
* The name of the target device
*/
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
/**
*
* The name of the target device
*
*
* @return The name of the target device
*/
public String getDeviceName() {
return this.deviceName;
}
/**
*
* The name of the target device
*
*
* @param deviceName
* The name of the target device
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeviceJob withDeviceName(String deviceName) {
setDeviceName(deviceName);
return this;
}
/**
*
* The job's ID.
*
*
* @param jobId
* The job's ID.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
*
* The job's ID.
*
*
* @return The job's ID.
*/
public String getJobId() {
return this.jobId;
}
/**
*
* The job's ID.
*
*
* @param jobId
* The job's ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeviceJob withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
*
* The job's type.
*
*
* @param jobType
* The job's type.
* @see JobType
*/
public void setJobType(String jobType) {
this.jobType = jobType;
}
/**
*
* The job's type.
*
*
* @return The job's type.
* @see JobType
*/
public String getJobType() {
return this.jobType;
}
/**
*
* The job's type.
*
*
* @param jobType
* The job's type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobType
*/
public DeviceJob withJobType(String jobType) {
setJobType(jobType);
return this;
}
/**
*
* The job's type.
*
*
* @param jobType
* The job's type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobType
*/
public DeviceJob withJobType(JobType jobType) {
this.jobType = jobType.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 (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getDeviceId() != null)
sb.append("DeviceId: ").append(getDeviceId()).append(",");
if (getDeviceName() != null)
sb.append("DeviceName: ").append(getDeviceName()).append(",");
if (getJobId() != null)
sb.append("JobId: ").append(getJobId()).append(",");
if (getJobType() != null)
sb.append("JobType: ").append(getJobType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DeviceJob == false)
return false;
DeviceJob other = (DeviceJob) obj;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getDeviceId() == null ^ this.getDeviceId() == null)
return false;
if (other.getDeviceId() != null && other.getDeviceId().equals(this.getDeviceId()) == false)
return false;
if (other.getDeviceName() == null ^ this.getDeviceName() == null)
return false;
if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false)
return false;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getJobType() == null ^ this.getJobType() == null)
return false;
if (other.getJobType() != null && other.getJobType().equals(this.getJobType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode + ((getJobType() == null) ? 0 : getJobType().hashCode());
return hashCode;
}
@Override
public DeviceJob clone() {
try {
return (DeviceJob) 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.panorama.model.transform.DeviceJobMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}