/*
* Copyright 2018-2023 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.iotsitewise.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeAssetResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the asset.
*
*/
private String assetId;
/**
*
* The ARN of the asset,
* which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*
*/
private String assetArn;
/**
*
* The name of the asset.
*
*/
private String assetName;
/**
*
* The ID of the asset model that was used to create the asset.
*
*/
private String assetModelId;
/**
*
* The list of asset properties for the asset.
*
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*
*/
private java.util.List assetProperties;
/**
*
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*
*/
private java.util.List assetHierarchies;
/**
*
* The composite models for the asset.
*
*/
private java.util.List assetCompositeModels;
/**
*
* The date the asset was created, in Unix epoch time.
*
*/
private java.util.Date assetCreationDate;
/**
*
* The date the asset was last updated, in Unix epoch time.
*
*/
private java.util.Date assetLastUpdateDate;
/**
*
* The current status of the asset, which contains a state and any error message.
*
*/
private AssetStatus assetStatus;
/**
*
* A description for the asset.
*
*/
private String assetDescription;
/**
*
* The ID of the asset.
*
*
* @param assetId
* The ID of the asset.
*/
public void setAssetId(String assetId) {
this.assetId = assetId;
}
/**
*
* The ID of the asset.
*
*
* @return The ID of the asset.
*/
public String getAssetId() {
return this.assetId;
}
/**
*
* The ID of the asset.
*
*
* @param assetId
* The ID of the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetId(String assetId) {
setAssetId(assetId);
return this;
}
/**
*
* The ARN of the asset,
* which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*
*
* @param assetArn
* The ARN of the
* asset, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*/
public void setAssetArn(String assetArn) {
this.assetArn = assetArn;
}
/**
*
* The ARN of the asset,
* which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*
*
* @return The ARN of the
* asset, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*/
public String getAssetArn() {
return this.assetArn;
}
/**
*
* The ARN of the asset,
* which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
*
*
* @param assetArn
* The ARN of the
* asset, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetArn(String assetArn) {
setAssetArn(assetArn);
return this;
}
/**
*
* The name of the asset.
*
*
* @param assetName
* The name of the asset.
*/
public void setAssetName(String assetName) {
this.assetName = assetName;
}
/**
*
* The name of the asset.
*
*
* @return The name of the asset.
*/
public String getAssetName() {
return this.assetName;
}
/**
*
* The name of the asset.
*
*
* @param assetName
* The name of the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetName(String assetName) {
setAssetName(assetName);
return this;
}
/**
*
* The ID of the asset model that was used to create the asset.
*
*
* @param assetModelId
* The ID of the asset model that was used to create the asset.
*/
public void setAssetModelId(String assetModelId) {
this.assetModelId = assetModelId;
}
/**
*
* The ID of the asset model that was used to create the asset.
*
*
* @return The ID of the asset model that was used to create the asset.
*/
public String getAssetModelId() {
return this.assetModelId;
}
/**
*
* The ID of the asset model that was used to create the asset.
*
*
* @param assetModelId
* The ID of the asset model that was used to create the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetModelId(String assetModelId) {
setAssetModelId(assetModelId);
return this;
}
/**
*
* The list of asset properties for the asset.
*
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*
*
* @return The list of asset properties for the asset.
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*/
public java.util.List getAssetProperties() {
return assetProperties;
}
/**
*
* The list of asset properties for the asset.
*
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*
*
* @param assetProperties
* The list of asset properties for the asset.
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*/
public void setAssetProperties(java.util.Collection assetProperties) {
if (assetProperties == null) {
this.assetProperties = null;
return;
}
this.assetProperties = new java.util.ArrayList(assetProperties);
}
/**
*
* The list of asset properties for the asset.
*
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetProperties(java.util.Collection)} or {@link #withAssetProperties(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param assetProperties
* The list of asset properties for the asset.
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetProperties(AssetProperty... assetProperties) {
if (this.assetProperties == null) {
setAssetProperties(new java.util.ArrayList(assetProperties.length));
}
for (AssetProperty ele : assetProperties) {
this.assetProperties.add(ele);
}
return this;
}
/**
*
* The list of asset properties for the asset.
*
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
*
*
* @param assetProperties
* The list of asset properties for the asset.
*
* This object doesn't include properties that you define in composite models. You can find composite model
* properties in the assetCompositeModels
object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetProperties(java.util.Collection assetProperties) {
setAssetProperties(assetProperties);
return this;
}
/**
*
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*
*
* @return A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*/
public java.util.List getAssetHierarchies() {
return assetHierarchies;
}
/**
*
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*
*
* @param assetHierarchies
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*/
public void setAssetHierarchies(java.util.Collection assetHierarchies) {
if (assetHierarchies == null) {
this.assetHierarchies = null;
return;
}
this.assetHierarchies = new java.util.ArrayList(assetHierarchies);
}
/**
*
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetHierarchies(java.util.Collection)} or {@link #withAssetHierarchies(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param assetHierarchies
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetHierarchies(AssetHierarchy... assetHierarchies) {
if (this.assetHierarchies == null) {
setAssetHierarchies(new java.util.ArrayList(assetHierarchies.length));
}
for (AssetHierarchy ele : assetHierarchies) {
this.assetHierarchies.add(ele);
}
return this;
}
/**
*
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
*
*
* @param assetHierarchies
* A list of asset hierarchies that each contain a hierarchyId
. A hierarchy specifies allowed
* parent/child asset relationships.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetHierarchies(java.util.Collection assetHierarchies) {
setAssetHierarchies(assetHierarchies);
return this;
}
/**
*
* The composite models for the asset.
*
*
* @return The composite models for the asset.
*/
public java.util.List getAssetCompositeModels() {
return assetCompositeModels;
}
/**
*
* The composite models for the asset.
*
*
* @param assetCompositeModels
* The composite models for the asset.
*/
public void setAssetCompositeModels(java.util.Collection assetCompositeModels) {
if (assetCompositeModels == null) {
this.assetCompositeModels = null;
return;
}
this.assetCompositeModels = new java.util.ArrayList(assetCompositeModels);
}
/**
*
* The composite models for the asset.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetCompositeModels(java.util.Collection)} or {@link #withAssetCompositeModels(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param assetCompositeModels
* The composite models for the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetCompositeModels(AssetCompositeModel... assetCompositeModels) {
if (this.assetCompositeModels == null) {
setAssetCompositeModels(new java.util.ArrayList(assetCompositeModels.length));
}
for (AssetCompositeModel ele : assetCompositeModels) {
this.assetCompositeModels.add(ele);
}
return this;
}
/**
*
* The composite models for the asset.
*
*
* @param assetCompositeModels
* The composite models for the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetCompositeModels(java.util.Collection assetCompositeModels) {
setAssetCompositeModels(assetCompositeModels);
return this;
}
/**
*
* The date the asset was created, in Unix epoch time.
*
*
* @param assetCreationDate
* The date the asset was created, in Unix epoch time.
*/
public void setAssetCreationDate(java.util.Date assetCreationDate) {
this.assetCreationDate = assetCreationDate;
}
/**
*
* The date the asset was created, in Unix epoch time.
*
*
* @return The date the asset was created, in Unix epoch time.
*/
public java.util.Date getAssetCreationDate() {
return this.assetCreationDate;
}
/**
*
* The date the asset was created, in Unix epoch time.
*
*
* @param assetCreationDate
* The date the asset was created, in Unix epoch time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetCreationDate(java.util.Date assetCreationDate) {
setAssetCreationDate(assetCreationDate);
return this;
}
/**
*
* The date the asset was last updated, in Unix epoch time.
*
*
* @param assetLastUpdateDate
* The date the asset was last updated, in Unix epoch time.
*/
public void setAssetLastUpdateDate(java.util.Date assetLastUpdateDate) {
this.assetLastUpdateDate = assetLastUpdateDate;
}
/**
*
* The date the asset was last updated, in Unix epoch time.
*
*
* @return The date the asset was last updated, in Unix epoch time.
*/
public java.util.Date getAssetLastUpdateDate() {
return this.assetLastUpdateDate;
}
/**
*
* The date the asset was last updated, in Unix epoch time.
*
*
* @param assetLastUpdateDate
* The date the asset was last updated, in Unix epoch time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetLastUpdateDate(java.util.Date assetLastUpdateDate) {
setAssetLastUpdateDate(assetLastUpdateDate);
return this;
}
/**
*
* The current status of the asset, which contains a state and any error message.
*
*
* @param assetStatus
* The current status of the asset, which contains a state and any error message.
*/
public void setAssetStatus(AssetStatus assetStatus) {
this.assetStatus = assetStatus;
}
/**
*
* The current status of the asset, which contains a state and any error message.
*
*
* @return The current status of the asset, which contains a state and any error message.
*/
public AssetStatus getAssetStatus() {
return this.assetStatus;
}
/**
*
* The current status of the asset, which contains a state and any error message.
*
*
* @param assetStatus
* The current status of the asset, which contains a state and any error message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetStatus(AssetStatus assetStatus) {
setAssetStatus(assetStatus);
return this;
}
/**
*
* A description for the asset.
*
*
* @param assetDescription
* A description for the asset.
*/
public void setAssetDescription(String assetDescription) {
this.assetDescription = assetDescription;
}
/**
*
* A description for the asset.
*
*
* @return A description for the asset.
*/
public String getAssetDescription() {
return this.assetDescription;
}
/**
*
* A description for the asset.
*
*
* @param assetDescription
* A description for the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAssetResult withAssetDescription(String assetDescription) {
setAssetDescription(assetDescription);
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 (getAssetId() != null)
sb.append("AssetId: ").append(getAssetId()).append(",");
if (getAssetArn() != null)
sb.append("AssetArn: ").append(getAssetArn()).append(",");
if (getAssetName() != null)
sb.append("AssetName: ").append(getAssetName()).append(",");
if (getAssetModelId() != null)
sb.append("AssetModelId: ").append(getAssetModelId()).append(",");
if (getAssetProperties() != null)
sb.append("AssetProperties: ").append(getAssetProperties()).append(",");
if (getAssetHierarchies() != null)
sb.append("AssetHierarchies: ").append(getAssetHierarchies()).append(",");
if (getAssetCompositeModels() != null)
sb.append("AssetCompositeModels: ").append(getAssetCompositeModels()).append(",");
if (getAssetCreationDate() != null)
sb.append("AssetCreationDate: ").append(getAssetCreationDate()).append(",");
if (getAssetLastUpdateDate() != null)
sb.append("AssetLastUpdateDate: ").append(getAssetLastUpdateDate()).append(",");
if (getAssetStatus() != null)
sb.append("AssetStatus: ").append(getAssetStatus()).append(",");
if (getAssetDescription() != null)
sb.append("AssetDescription: ").append(getAssetDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeAssetResult == false)
return false;
DescribeAssetResult other = (DescribeAssetResult) obj;
if (other.getAssetId() == null ^ this.getAssetId() == null)
return false;
if (other.getAssetId() != null && other.getAssetId().equals(this.getAssetId()) == false)
return false;
if (other.getAssetArn() == null ^ this.getAssetArn() == null)
return false;
if (other.getAssetArn() != null && other.getAssetArn().equals(this.getAssetArn()) == false)
return false;
if (other.getAssetName() == null ^ this.getAssetName() == null)
return false;
if (other.getAssetName() != null && other.getAssetName().equals(this.getAssetName()) == false)
return false;
if (other.getAssetModelId() == null ^ this.getAssetModelId() == null)
return false;
if (other.getAssetModelId() != null && other.getAssetModelId().equals(this.getAssetModelId()) == false)
return false;
if (other.getAssetProperties() == null ^ this.getAssetProperties() == null)
return false;
if (other.getAssetProperties() != null && other.getAssetProperties().equals(this.getAssetProperties()) == false)
return false;
if (other.getAssetHierarchies() == null ^ this.getAssetHierarchies() == null)
return false;
if (other.getAssetHierarchies() != null && other.getAssetHierarchies().equals(this.getAssetHierarchies()) == false)
return false;
if (other.getAssetCompositeModels() == null ^ this.getAssetCompositeModels() == null)
return false;
if (other.getAssetCompositeModels() != null && other.getAssetCompositeModels().equals(this.getAssetCompositeModels()) == false)
return false;
if (other.getAssetCreationDate() == null ^ this.getAssetCreationDate() == null)
return false;
if (other.getAssetCreationDate() != null && other.getAssetCreationDate().equals(this.getAssetCreationDate()) == false)
return false;
if (other.getAssetLastUpdateDate() == null ^ this.getAssetLastUpdateDate() == null)
return false;
if (other.getAssetLastUpdateDate() != null && other.getAssetLastUpdateDate().equals(this.getAssetLastUpdateDate()) == false)
return false;
if (other.getAssetStatus() == null ^ this.getAssetStatus() == null)
return false;
if (other.getAssetStatus() != null && other.getAssetStatus().equals(this.getAssetStatus()) == false)
return false;
if (other.getAssetDescription() == null ^ this.getAssetDescription() == null)
return false;
if (other.getAssetDescription() != null && other.getAssetDescription().equals(this.getAssetDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAssetId() == null) ? 0 : getAssetId().hashCode());
hashCode = prime * hashCode + ((getAssetArn() == null) ? 0 : getAssetArn().hashCode());
hashCode = prime * hashCode + ((getAssetName() == null) ? 0 : getAssetName().hashCode());
hashCode = prime * hashCode + ((getAssetModelId() == null) ? 0 : getAssetModelId().hashCode());
hashCode = prime * hashCode + ((getAssetProperties() == null) ? 0 : getAssetProperties().hashCode());
hashCode = prime * hashCode + ((getAssetHierarchies() == null) ? 0 : getAssetHierarchies().hashCode());
hashCode = prime * hashCode + ((getAssetCompositeModels() == null) ? 0 : getAssetCompositeModels().hashCode());
hashCode = prime * hashCode + ((getAssetCreationDate() == null) ? 0 : getAssetCreationDate().hashCode());
hashCode = prime * hashCode + ((getAssetLastUpdateDate() == null) ? 0 : getAssetLastUpdateDate().hashCode());
hashCode = prime * hashCode + ((getAssetStatus() == null) ? 0 : getAssetStatus().hashCode());
hashCode = prime * hashCode + ((getAssetDescription() == null) ? 0 : getAssetDescription().hashCode());
return hashCode;
}
@Override
public DescribeAssetResult clone() {
try {
return (DescribeAssetResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}