
com.amazonaws.services.iotsitewise.model.UpdateAssetModelRequest Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateAssetModelRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the asset model to update.
*
*/
private String assetModelId;
/**
*
* A unique, friendly name for the asset model.
*
*/
private String assetModelName;
/**
*
* A description for the asset model.
*
*/
private String assetModelDescription;
/**
*
* The updated property definitions of the asset model. For more information, see Asset properties in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*/
private java.util.List assetModelProperties;
/**
*
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be
* children of any other assets created from this asset model. For more information, see Asset hierarchies in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*/
private java.util.List assetModelHierarchies;
/**
*
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the composite model
* supports. Use composite asset models to define alarms on this asset model.
*
*/
private java.util.List assetModelCompositeModels;
/**
*
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse
* this client token if a new idempotent request is required.
*
*/
private String clientToken;
/**
*
* The ID of the asset model to update.
*
*
* @param assetModelId
* The ID of the asset model to update.
*/
public void setAssetModelId(String assetModelId) {
this.assetModelId = assetModelId;
}
/**
*
* The ID of the asset model to update.
*
*
* @return The ID of the asset model to update.
*/
public String getAssetModelId() {
return this.assetModelId;
}
/**
*
* The ID of the asset model to update.
*
*
* @param assetModelId
* The ID of the asset model to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelId(String assetModelId) {
setAssetModelId(assetModelId);
return this;
}
/**
*
* A unique, friendly name for the asset model.
*
*
* @param assetModelName
* A unique, friendly name for the asset model.
*/
public void setAssetModelName(String assetModelName) {
this.assetModelName = assetModelName;
}
/**
*
* A unique, friendly name for the asset model.
*
*
* @return A unique, friendly name for the asset model.
*/
public String getAssetModelName() {
return this.assetModelName;
}
/**
*
* A unique, friendly name for the asset model.
*
*
* @param assetModelName
* A unique, friendly name for the asset model.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelName(String assetModelName) {
setAssetModelName(assetModelName);
return this;
}
/**
*
* A description for the asset model.
*
*
* @param assetModelDescription
* A description for the asset model.
*/
public void setAssetModelDescription(String assetModelDescription) {
this.assetModelDescription = assetModelDescription;
}
/**
*
* A description for the asset model.
*
*
* @return A description for the asset model.
*/
public String getAssetModelDescription() {
return this.assetModelDescription;
}
/**
*
* A description for the asset model.
*
*
* @param assetModelDescription
* A description for the asset model.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelDescription(String assetModelDescription) {
setAssetModelDescription(assetModelDescription);
return this;
}
/**
*
* The updated property definitions of the asset model. For more information, see Asset properties in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @return The updated property definitions of the asset model. For more information, see Asset
* properties in the IoT SiteWise User Guide.
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
*/
public java.util.List getAssetModelProperties() {
return assetModelProperties;
}
/**
*
* The updated property definitions of the asset model. For more information, see Asset properties in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @param assetModelProperties
* The updated property definitions of the asset model. For more information, see Asset
* properties in the IoT SiteWise User Guide.
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
*/
public void setAssetModelProperties(java.util.Collection assetModelProperties) {
if (assetModelProperties == null) {
this.assetModelProperties = null;
return;
}
this.assetModelProperties = new java.util.ArrayList(assetModelProperties);
}
/**
*
* The updated property definitions of the asset model. For more information, see Asset properties in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetModelProperties(java.util.Collection)} or {@link #withAssetModelProperties(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param assetModelProperties
* The updated property definitions of the asset model. For more information, see Asset
* properties in the IoT SiteWise User Guide.
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelProperties(AssetModelProperty... assetModelProperties) {
if (this.assetModelProperties == null) {
setAssetModelProperties(new java.util.ArrayList(assetModelProperties.length));
}
for (AssetModelProperty ele : assetModelProperties) {
this.assetModelProperties.add(ele);
}
return this;
}
/**
*
* The updated property definitions of the asset model. For more information, see Asset properties in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @param assetModelProperties
* The updated property definitions of the asset model. For more information, see Asset
* properties in the IoT SiteWise User Guide.
*
* You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelProperties(java.util.Collection assetModelProperties) {
setAssetModelProperties(assetModelProperties);
return this;
}
/**
*
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be
* children of any other assets created from this asset model. For more information, see Asset hierarchies in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @return The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose
* assets can be children of any other assets created from this asset model. For more information, see Asset
* hierarchies in the IoT SiteWise User Guide.
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
*/
public java.util.List getAssetModelHierarchies() {
return assetModelHierarchies;
}
/**
*
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be
* children of any other assets created from this asset model. For more information, see Asset hierarchies in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @param assetModelHierarchies
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets
* can be children of any other assets created from this asset model. For more information, see Asset
* hierarchies in the IoT SiteWise User Guide.
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
*/
public void setAssetModelHierarchies(java.util.Collection assetModelHierarchies) {
if (assetModelHierarchies == null) {
this.assetModelHierarchies = null;
return;
}
this.assetModelHierarchies = new java.util.ArrayList(assetModelHierarchies);
}
/**
*
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be
* children of any other assets created from this asset model. For more information, see Asset hierarchies in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetModelHierarchies(java.util.Collection)} or
* {@link #withAssetModelHierarchies(java.util.Collection)} if you want to override the existing values.
*
*
* @param assetModelHierarchies
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets
* can be children of any other assets created from this asset model. For more information, see Asset
* hierarchies in the IoT SiteWise User Guide.
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelHierarchies(AssetModelHierarchy... assetModelHierarchies) {
if (this.assetModelHierarchies == null) {
setAssetModelHierarchies(new java.util.ArrayList(assetModelHierarchies.length));
}
for (AssetModelHierarchy ele : assetModelHierarchies) {
this.assetModelHierarchies.add(ele);
}
return this;
}
/**
*
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be
* children of any other assets created from this asset model. For more information, see Asset hierarchies in
* the IoT SiteWise User Guide.
*
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise
* User Guide.
*
*
* @param assetModelHierarchies
* The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets
* can be children of any other assets created from this asset model. For more information, see Asset
* hierarchies in the IoT SiteWise User Guide.
*
* You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT
* SiteWise User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelHierarchies(java.util.Collection assetModelHierarchies) {
setAssetModelHierarchies(assetModelHierarchies);
return this;
}
/**
*
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the composite model
* supports. Use composite asset models to define alarms on this asset model.
*
*
* @return The composite asset models that are part of this asset model. Composite asset models are asset models
* that contain specific properties. Each composite model has a type that defines the properties that the
* composite model supports. Use composite asset models to define alarms on this asset model.
*/
public java.util.List getAssetModelCompositeModels() {
return assetModelCompositeModels;
}
/**
*
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the composite model
* supports. Use composite asset models to define alarms on this asset model.
*
*
* @param assetModelCompositeModels
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the
* composite model supports. Use composite asset models to define alarms on this asset model.
*/
public void setAssetModelCompositeModels(java.util.Collection assetModelCompositeModels) {
if (assetModelCompositeModels == null) {
this.assetModelCompositeModels = null;
return;
}
this.assetModelCompositeModels = new java.util.ArrayList(assetModelCompositeModels);
}
/**
*
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the composite model
* supports. Use composite asset models to define alarms on this asset model.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssetModelCompositeModels(java.util.Collection)} or
* {@link #withAssetModelCompositeModels(java.util.Collection)} if you want to override the existing values.
*
*
* @param assetModelCompositeModels
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the
* composite model supports. Use composite asset models to define alarms on this asset model.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelCompositeModels(AssetModelCompositeModel... assetModelCompositeModels) {
if (this.assetModelCompositeModels == null) {
setAssetModelCompositeModels(new java.util.ArrayList(assetModelCompositeModels.length));
}
for (AssetModelCompositeModel ele : assetModelCompositeModels) {
this.assetModelCompositeModels.add(ele);
}
return this;
}
/**
*
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the composite model
* supports. Use composite asset models to define alarms on this asset model.
*
*
* @param assetModelCompositeModels
* The composite asset models that are part of this asset model. Composite asset models are asset models that
* contain specific properties. Each composite model has a type that defines the properties that the
* composite model supports. Use composite asset models to define alarms on this asset model.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withAssetModelCompositeModels(java.util.Collection assetModelCompositeModels) {
setAssetModelCompositeModels(assetModelCompositeModels);
return this;
}
/**
*
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse
* this client token if a new idempotent request is required.
*
*
* @param clientToken
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't
* reuse this client token if a new idempotent request is required.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse
* this client token if a new idempotent request is required.
*
*
* @return A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't
* reuse this client token if a new idempotent request is required.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse
* this client token if a new idempotent request is required.
*
*
* @param clientToken
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't
* reuse this client token if a new idempotent request is required.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssetModelRequest withClientToken(String clientToken) {
setClientToken(clientToken);
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 (getAssetModelId() != null)
sb.append("AssetModelId: ").append(getAssetModelId()).append(",");
if (getAssetModelName() != null)
sb.append("AssetModelName: ").append(getAssetModelName()).append(",");
if (getAssetModelDescription() != null)
sb.append("AssetModelDescription: ").append(getAssetModelDescription()).append(",");
if (getAssetModelProperties() != null)
sb.append("AssetModelProperties: ").append(getAssetModelProperties()).append(",");
if (getAssetModelHierarchies() != null)
sb.append("AssetModelHierarchies: ").append(getAssetModelHierarchies()).append(",");
if (getAssetModelCompositeModels() != null)
sb.append("AssetModelCompositeModels: ").append(getAssetModelCompositeModels()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateAssetModelRequest == false)
return false;
UpdateAssetModelRequest other = (UpdateAssetModelRequest) obj;
if (other.getAssetModelId() == null ^ this.getAssetModelId() == null)
return false;
if (other.getAssetModelId() != null && other.getAssetModelId().equals(this.getAssetModelId()) == false)
return false;
if (other.getAssetModelName() == null ^ this.getAssetModelName() == null)
return false;
if (other.getAssetModelName() != null && other.getAssetModelName().equals(this.getAssetModelName()) == false)
return false;
if (other.getAssetModelDescription() == null ^ this.getAssetModelDescription() == null)
return false;
if (other.getAssetModelDescription() != null && other.getAssetModelDescription().equals(this.getAssetModelDescription()) == false)
return false;
if (other.getAssetModelProperties() == null ^ this.getAssetModelProperties() == null)
return false;
if (other.getAssetModelProperties() != null && other.getAssetModelProperties().equals(this.getAssetModelProperties()) == false)
return false;
if (other.getAssetModelHierarchies() == null ^ this.getAssetModelHierarchies() == null)
return false;
if (other.getAssetModelHierarchies() != null && other.getAssetModelHierarchies().equals(this.getAssetModelHierarchies()) == false)
return false;
if (other.getAssetModelCompositeModels() == null ^ this.getAssetModelCompositeModels() == null)
return false;
if (other.getAssetModelCompositeModels() != null && other.getAssetModelCompositeModels().equals(this.getAssetModelCompositeModels()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAssetModelId() == null) ? 0 : getAssetModelId().hashCode());
hashCode = prime * hashCode + ((getAssetModelName() == null) ? 0 : getAssetModelName().hashCode());
hashCode = prime * hashCode + ((getAssetModelDescription() == null) ? 0 : getAssetModelDescription().hashCode());
hashCode = prime * hashCode + ((getAssetModelProperties() == null) ? 0 : getAssetModelProperties().hashCode());
hashCode = prime * hashCode + ((getAssetModelHierarchies() == null) ? 0 : getAssetModelHierarchies().hashCode());
hashCode = prime * hashCode + ((getAssetModelCompositeModels() == null) ? 0 : getAssetModelCompositeModels().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
return hashCode;
}
@Override
public UpdateAssetModelRequest clone() {
return (UpdateAssetModelRequest) super.clone();
}
}