com.amazonaws.services.panorama.model.Device 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 device.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Device implements Serializable, Cloneable, StructuredPojo {
/**
*
* The device's maker.
*
*/
private String brand;
/**
*
* When the device was created.
*
*/
private java.util.Date createdTime;
/**
*
* A device's current software.
*
*/
private String currentSoftware;
/**
*
* A description for the device.
*
*/
private String description;
/**
*
* A device's aggregated status. Including the device's connection status, provisioning status, and lease status.
*
*/
private String deviceAggregatedStatus;
/**
*
* The device's ID.
*
*/
private String deviceId;
/**
*
* When the device was updated.
*
*/
private java.util.Date lastUpdatedTime;
/**
*
* A device's latest job. Includes the target image version, and the update job status.
*
*/
private LatestDeviceJob latestDeviceJob;
/**
*
* The device's lease expiration time.
*
*/
private java.util.Date leaseExpirationTime;
/**
*
* The device's name.
*
*/
private String name;
/**
*
* The device's provisioning status.
*
*/
private String provisioningStatus;
/**
*
* The device's tags.
*
*/
private java.util.Map tags;
/**
*
* The device's type.
*
*/
private String type;
/**
*
* The device's maker.
*
*
* @param brand
* The device's maker.
* @see DeviceBrand
*/
public void setBrand(String brand) {
this.brand = brand;
}
/**
*
* The device's maker.
*
*
* @return The device's maker.
* @see DeviceBrand
*/
public String getBrand() {
return this.brand;
}
/**
*
* The device's maker.
*
*
* @param brand
* The device's maker.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceBrand
*/
public Device withBrand(String brand) {
setBrand(brand);
return this;
}
/**
*
* The device's maker.
*
*
* @param brand
* The device's maker.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceBrand
*/
public Device withBrand(DeviceBrand brand) {
this.brand = brand.toString();
return this;
}
/**
*
* When the device was created.
*
*
* @param createdTime
* When the device was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* When the device was created.
*
*
* @return When the device was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* When the device was created.
*
*
* @param createdTime
* When the device was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* A device's current software.
*
*
* @param currentSoftware
* A device's current software.
*/
public void setCurrentSoftware(String currentSoftware) {
this.currentSoftware = currentSoftware;
}
/**
*
* A device's current software.
*
*
* @return A device's current software.
*/
public String getCurrentSoftware() {
return this.currentSoftware;
}
/**
*
* A device's current software.
*
*
* @param currentSoftware
* A device's current software.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withCurrentSoftware(String currentSoftware) {
setCurrentSoftware(currentSoftware);
return this;
}
/**
*
* A description for the device.
*
*
* @param description
* A description for the device.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description for the device.
*
*
* @return A description for the device.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description for the device.
*
*
* @param description
* A description for the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* A device's aggregated status. Including the device's connection status, provisioning status, and lease status.
*
*
* @param deviceAggregatedStatus
* A device's aggregated status. Including the device's connection status, provisioning status, and lease
* status.
* @see DeviceAggregatedStatus
*/
public void setDeviceAggregatedStatus(String deviceAggregatedStatus) {
this.deviceAggregatedStatus = deviceAggregatedStatus;
}
/**
*
* A device's aggregated status. Including the device's connection status, provisioning status, and lease status.
*
*
* @return A device's aggregated status. Including the device's connection status, provisioning status, and lease
* status.
* @see DeviceAggregatedStatus
*/
public String getDeviceAggregatedStatus() {
return this.deviceAggregatedStatus;
}
/**
*
* A device's aggregated status. Including the device's connection status, provisioning status, and lease status.
*
*
* @param deviceAggregatedStatus
* A device's aggregated status. Including the device's connection status, provisioning status, and lease
* status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceAggregatedStatus
*/
public Device withDeviceAggregatedStatus(String deviceAggregatedStatus) {
setDeviceAggregatedStatus(deviceAggregatedStatus);
return this;
}
/**
*
* A device's aggregated status. Including the device's connection status, provisioning status, and lease status.
*
*
* @param deviceAggregatedStatus
* A device's aggregated status. Including the device's connection status, provisioning status, and lease
* status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceAggregatedStatus
*/
public Device withDeviceAggregatedStatus(DeviceAggregatedStatus deviceAggregatedStatus) {
this.deviceAggregatedStatus = deviceAggregatedStatus.toString();
return this;
}
/**
*
* The device's ID.
*
*
* @param deviceId
* The device's ID.
*/
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
/**
*
* The device's ID.
*
*
* @return The device's ID.
*/
public String getDeviceId() {
return this.deviceId;
}
/**
*
* The device's ID.
*
*
* @param deviceId
* The device's ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withDeviceId(String deviceId) {
setDeviceId(deviceId);
return this;
}
/**
*
* When the device was updated.
*
*
* @param lastUpdatedTime
* When the device was updated.
*/
public void setLastUpdatedTime(java.util.Date lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
/**
*
* When the device was updated.
*
*
* @return When the device was updated.
*/
public java.util.Date getLastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
*
* When the device was updated.
*
*
* @param lastUpdatedTime
* When the device was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withLastUpdatedTime(java.util.Date lastUpdatedTime) {
setLastUpdatedTime(lastUpdatedTime);
return this;
}
/**
*
* A device's latest job. Includes the target image version, and the update job status.
*
*
* @param latestDeviceJob
* A device's latest job. Includes the target image version, and the update job status.
*/
public void setLatestDeviceJob(LatestDeviceJob latestDeviceJob) {
this.latestDeviceJob = latestDeviceJob;
}
/**
*
* A device's latest job. Includes the target image version, and the update job status.
*
*
* @return A device's latest job. Includes the target image version, and the update job status.
*/
public LatestDeviceJob getLatestDeviceJob() {
return this.latestDeviceJob;
}
/**
*
* A device's latest job. Includes the target image version, and the update job status.
*
*
* @param latestDeviceJob
* A device's latest job. Includes the target image version, and the update job status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withLatestDeviceJob(LatestDeviceJob latestDeviceJob) {
setLatestDeviceJob(latestDeviceJob);
return this;
}
/**
*
* The device's lease expiration time.
*
*
* @param leaseExpirationTime
* The device's lease expiration time.
*/
public void setLeaseExpirationTime(java.util.Date leaseExpirationTime) {
this.leaseExpirationTime = leaseExpirationTime;
}
/**
*
* The device's lease expiration time.
*
*
* @return The device's lease expiration time.
*/
public java.util.Date getLeaseExpirationTime() {
return this.leaseExpirationTime;
}
/**
*
* The device's lease expiration time.
*
*
* @param leaseExpirationTime
* The device's lease expiration time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withLeaseExpirationTime(java.util.Date leaseExpirationTime) {
setLeaseExpirationTime(leaseExpirationTime);
return this;
}
/**
*
* The device's name.
*
*
* @param name
* The device's name.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The device's name.
*
*
* @return The device's name.
*/
public String getName() {
return this.name;
}
/**
*
* The device's name.
*
*
* @param name
* The device's name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withName(String name) {
setName(name);
return this;
}
/**
*
* The device's provisioning status.
*
*
* @param provisioningStatus
* The device's provisioning status.
* @see DeviceStatus
*/
public void setProvisioningStatus(String provisioningStatus) {
this.provisioningStatus = provisioningStatus;
}
/**
*
* The device's provisioning status.
*
*
* @return The device's provisioning status.
* @see DeviceStatus
*/
public String getProvisioningStatus() {
return this.provisioningStatus;
}
/**
*
* The device's provisioning status.
*
*
* @param provisioningStatus
* The device's provisioning status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceStatus
*/
public Device withProvisioningStatus(String provisioningStatus) {
setProvisioningStatus(provisioningStatus);
return this;
}
/**
*
* The device's provisioning status.
*
*
* @param provisioningStatus
* The device's provisioning status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceStatus
*/
public Device withProvisioningStatus(DeviceStatus provisioningStatus) {
this.provisioningStatus = provisioningStatus.toString();
return this;
}
/**
*
* The device's tags.
*
*
* @return The device's tags.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The device's tags.
*
*
* @param tags
* The device's tags.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The device's tags.
*
*
* @param tags
* The device's tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see Device#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public Device addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Device clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The device's type.
*
*
* @param type
* The device's type.
* @see DeviceType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The device's type.
*
*
* @return The device's type.
* @see DeviceType
*/
public String getType() {
return this.type;
}
/**
*
* The device's type.
*
*
* @param type
* The device's type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceType
*/
public Device withType(String type) {
setType(type);
return this;
}
/**
*
* The device's type.
*
*
* @param type
* The device's type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceType
*/
public Device withType(DeviceType type) {
this.type = type.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 (getBrand() != null)
sb.append("Brand: ").append(getBrand()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getCurrentSoftware() != null)
sb.append("CurrentSoftware: ").append(getCurrentSoftware()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getDeviceAggregatedStatus() != null)
sb.append("DeviceAggregatedStatus: ").append(getDeviceAggregatedStatus()).append(",");
if (getDeviceId() != null)
sb.append("DeviceId: ").append(getDeviceId()).append(",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(",");
if (getLatestDeviceJob() != null)
sb.append("LatestDeviceJob: ").append(getLatestDeviceJob()).append(",");
if (getLeaseExpirationTime() != null)
sb.append("LeaseExpirationTime: ").append(getLeaseExpirationTime()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getProvisioningStatus() != null)
sb.append("ProvisioningStatus: ").append(getProvisioningStatus()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Device == false)
return false;
Device other = (Device) obj;
if (other.getBrand() == null ^ this.getBrand() == null)
return false;
if (other.getBrand() != null && other.getBrand().equals(this.getBrand()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getCurrentSoftware() == null ^ this.getCurrentSoftware() == null)
return false;
if (other.getCurrentSoftware() != null && other.getCurrentSoftware().equals(this.getCurrentSoftware()) == 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.getDeviceAggregatedStatus() == null ^ this.getDeviceAggregatedStatus() == null)
return false;
if (other.getDeviceAggregatedStatus() != null && other.getDeviceAggregatedStatus().equals(this.getDeviceAggregatedStatus()) == 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.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null)
return false;
if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false)
return false;
if (other.getLatestDeviceJob() == null ^ this.getLatestDeviceJob() == null)
return false;
if (other.getLatestDeviceJob() != null && other.getLatestDeviceJob().equals(this.getLatestDeviceJob()) == false)
return false;
if (other.getLeaseExpirationTime() == null ^ this.getLeaseExpirationTime() == null)
return false;
if (other.getLeaseExpirationTime() != null && other.getLeaseExpirationTime().equals(this.getLeaseExpirationTime()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getProvisioningStatus() == null ^ this.getProvisioningStatus() == null)
return false;
if (other.getProvisioningStatus() != null && other.getProvisioningStatus().equals(this.getProvisioningStatus()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBrand() == null) ? 0 : getBrand().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getCurrentSoftware() == null) ? 0 : getCurrentSoftware().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDeviceAggregatedStatus() == null) ? 0 : getDeviceAggregatedStatus().hashCode());
hashCode = prime * hashCode + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode());
hashCode = prime * hashCode + ((getLatestDeviceJob() == null) ? 0 : getLatestDeviceJob().hashCode());
hashCode = prime * hashCode + ((getLeaseExpirationTime() == null) ? 0 : getLeaseExpirationTime().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getProvisioningStatus() == null) ? 0 : getProvisioningStatus().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public Device clone() {
try {
return (Device) 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.DeviceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}