/* * 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.iottwinmaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An object that contains response data from a property definition request. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PropertyDefinitionResponse implements Serializable, Cloneable, StructuredPojo { /** ** An object that contains information about the data type. *
*/ private DataType dataType; /** ** A Boolean value that specifies whether the property consists of time series data. *
*/ private Boolean isTimeSeries; /** ** A Boolean value that specifies whether the property is required in an entity. *
*/ private Boolean isRequiredInEntity; /** ** A Boolean value that specifies whether the property ID comes from an external data store. *
*/ private Boolean isExternalId; /** ** A Boolean value that specifies whether the property is stored externally. *
*/ private Boolean isStoredExternally; /** ** A Boolean value that specifies whether the property definition is imported from an external data store. *
*/ private Boolean isImported; /** ** A Boolean value that specifies whether the property definition can be updated. *
*/ private Boolean isFinal; /** ** A Boolean value that specifies whether the property definition is inherited from a parent entity. *
*/ private Boolean isInherited; /** ** An object that contains the default value. *
*/ private DataValue defaultValue; /** ** A mapping that specifies configuration information about the property. *
*/ private java.util.Map* A friendly name for the property. *
*/ private String displayName; /** ** An object that contains information about the data type. *
* * @param dataType * An object that contains information about the data type. */ public void setDataType(DataType dataType) { this.dataType = dataType; } /** ** An object that contains information about the data type. *
* * @return An object that contains information about the data type. */ public DataType getDataType() { return this.dataType; } /** ** An object that contains information about the data type. *
* * @param dataType * An object that contains information about the data type. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withDataType(DataType dataType) { setDataType(dataType); return this; } /** ** A Boolean value that specifies whether the property consists of time series data. *
* * @param isTimeSeries * A Boolean value that specifies whether the property consists of time series data. */ public void setIsTimeSeries(Boolean isTimeSeries) { this.isTimeSeries = isTimeSeries; } /** ** A Boolean value that specifies whether the property consists of time series data. *
* * @return A Boolean value that specifies whether the property consists of time series data. */ public Boolean getIsTimeSeries() { return this.isTimeSeries; } /** ** A Boolean value that specifies whether the property consists of time series data. *
* * @param isTimeSeries * A Boolean value that specifies whether the property consists of time series data. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsTimeSeries(Boolean isTimeSeries) { setIsTimeSeries(isTimeSeries); return this; } /** ** A Boolean value that specifies whether the property consists of time series data. *
* * @return A Boolean value that specifies whether the property consists of time series data. */ public Boolean isTimeSeries() { return this.isTimeSeries; } /** ** A Boolean value that specifies whether the property is required in an entity. *
* * @param isRequiredInEntity * A Boolean value that specifies whether the property is required in an entity. */ public void setIsRequiredInEntity(Boolean isRequiredInEntity) { this.isRequiredInEntity = isRequiredInEntity; } /** ** A Boolean value that specifies whether the property is required in an entity. *
* * @return A Boolean value that specifies whether the property is required in an entity. */ public Boolean getIsRequiredInEntity() { return this.isRequiredInEntity; } /** ** A Boolean value that specifies whether the property is required in an entity. *
* * @param isRequiredInEntity * A Boolean value that specifies whether the property is required in an entity. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsRequiredInEntity(Boolean isRequiredInEntity) { setIsRequiredInEntity(isRequiredInEntity); return this; } /** ** A Boolean value that specifies whether the property is required in an entity. *
* * @return A Boolean value that specifies whether the property is required in an entity. */ public Boolean isRequiredInEntity() { return this.isRequiredInEntity; } /** ** A Boolean value that specifies whether the property ID comes from an external data store. *
* * @param isExternalId * A Boolean value that specifies whether the property ID comes from an external data store. */ public void setIsExternalId(Boolean isExternalId) { this.isExternalId = isExternalId; } /** ** A Boolean value that specifies whether the property ID comes from an external data store. *
* * @return A Boolean value that specifies whether the property ID comes from an external data store. */ public Boolean getIsExternalId() { return this.isExternalId; } /** ** A Boolean value that specifies whether the property ID comes from an external data store. *
* * @param isExternalId * A Boolean value that specifies whether the property ID comes from an external data store. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsExternalId(Boolean isExternalId) { setIsExternalId(isExternalId); return this; } /** ** A Boolean value that specifies whether the property ID comes from an external data store. *
* * @return A Boolean value that specifies whether the property ID comes from an external data store. */ public Boolean isExternalId() { return this.isExternalId; } /** ** A Boolean value that specifies whether the property is stored externally. *
* * @param isStoredExternally * A Boolean value that specifies whether the property is stored externally. */ public void setIsStoredExternally(Boolean isStoredExternally) { this.isStoredExternally = isStoredExternally; } /** ** A Boolean value that specifies whether the property is stored externally. *
* * @return A Boolean value that specifies whether the property is stored externally. */ public Boolean getIsStoredExternally() { return this.isStoredExternally; } /** ** A Boolean value that specifies whether the property is stored externally. *
* * @param isStoredExternally * A Boolean value that specifies whether the property is stored externally. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsStoredExternally(Boolean isStoredExternally) { setIsStoredExternally(isStoredExternally); return this; } /** ** A Boolean value that specifies whether the property is stored externally. *
* * @return A Boolean value that specifies whether the property is stored externally. */ public Boolean isStoredExternally() { return this.isStoredExternally; } /** ** A Boolean value that specifies whether the property definition is imported from an external data store. *
* * @param isImported * A Boolean value that specifies whether the property definition is imported from an external data store. */ public void setIsImported(Boolean isImported) { this.isImported = isImported; } /** ** A Boolean value that specifies whether the property definition is imported from an external data store. *
* * @return A Boolean value that specifies whether the property definition is imported from an external data store. */ public Boolean getIsImported() { return this.isImported; } /** ** A Boolean value that specifies whether the property definition is imported from an external data store. *
* * @param isImported * A Boolean value that specifies whether the property definition is imported from an external data store. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsImported(Boolean isImported) { setIsImported(isImported); return this; } /** ** A Boolean value that specifies whether the property definition is imported from an external data store. *
* * @return A Boolean value that specifies whether the property definition is imported from an external data store. */ public Boolean isImported() { return this.isImported; } /** ** A Boolean value that specifies whether the property definition can be updated. *
* * @param isFinal * A Boolean value that specifies whether the property definition can be updated. */ public void setIsFinal(Boolean isFinal) { this.isFinal = isFinal; } /** ** A Boolean value that specifies whether the property definition can be updated. *
* * @return A Boolean value that specifies whether the property definition can be updated. */ public Boolean getIsFinal() { return this.isFinal; } /** ** A Boolean value that specifies whether the property definition can be updated. *
* * @param isFinal * A Boolean value that specifies whether the property definition can be updated. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsFinal(Boolean isFinal) { setIsFinal(isFinal); return this; } /** ** A Boolean value that specifies whether the property definition can be updated. *
* * @return A Boolean value that specifies whether the property definition can be updated. */ public Boolean isFinal() { return this.isFinal; } /** ** A Boolean value that specifies whether the property definition is inherited from a parent entity. *
* * @param isInherited * A Boolean value that specifies whether the property definition is inherited from a parent entity. */ public void setIsInherited(Boolean isInherited) { this.isInherited = isInherited; } /** ** A Boolean value that specifies whether the property definition is inherited from a parent entity. *
* * @return A Boolean value that specifies whether the property definition is inherited from a parent entity. */ public Boolean getIsInherited() { return this.isInherited; } /** ** A Boolean value that specifies whether the property definition is inherited from a parent entity. *
* * @param isInherited * A Boolean value that specifies whether the property definition is inherited from a parent entity. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withIsInherited(Boolean isInherited) { setIsInherited(isInherited); return this; } /** ** A Boolean value that specifies whether the property definition is inherited from a parent entity. *
* * @return A Boolean value that specifies whether the property definition is inherited from a parent entity. */ public Boolean isInherited() { return this.isInherited; } /** ** An object that contains the default value. *
* * @param defaultValue * An object that contains the default value. */ public void setDefaultValue(DataValue defaultValue) { this.defaultValue = defaultValue; } /** ** An object that contains the default value. *
* * @return An object that contains the default value. */ public DataValue getDefaultValue() { return this.defaultValue; } /** ** An object that contains the default value. *
* * @param defaultValue * An object that contains the default value. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withDefaultValue(DataValue defaultValue) { setDefaultValue(defaultValue); return this; } /** ** A mapping that specifies configuration information about the property. *
* * @return A mapping that specifies configuration information about the property. */ public java.util.Map* A mapping that specifies configuration information about the property. *
* * @param configuration * A mapping that specifies configuration information about the property. */ public void setConfiguration(java.util.Map* A mapping that specifies configuration information about the property. *
* * @param configuration * A mapping that specifies configuration information about the property. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withConfiguration(java.util.Map* A friendly name for the property. *
* * @param displayName * A friendly name for the property. */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** ** A friendly name for the property. *
* * @return A friendly name for the property. */ public String getDisplayName() { return this.displayName; } /** ** A friendly name for the property. *
* * @param displayName * A friendly name for the property. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDefinitionResponse withDisplayName(String displayName) { setDisplayName(displayName); 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 (getDataType() != null) sb.append("DataType: ").append(getDataType()).append(","); if (getIsTimeSeries() != null) sb.append("IsTimeSeries: ").append(getIsTimeSeries()).append(","); if (getIsRequiredInEntity() != null) sb.append("IsRequiredInEntity: ").append(getIsRequiredInEntity()).append(","); if (getIsExternalId() != null) sb.append("IsExternalId: ").append(getIsExternalId()).append(","); if (getIsStoredExternally() != null) sb.append("IsStoredExternally: ").append(getIsStoredExternally()).append(","); if (getIsImported() != null) sb.append("IsImported: ").append(getIsImported()).append(","); if (getIsFinal() != null) sb.append("IsFinal: ").append(getIsFinal()).append(","); if (getIsInherited() != null) sb.append("IsInherited: ").append(getIsInherited()).append(","); if (getDefaultValue() != null) sb.append("DefaultValue: ").append(getDefaultValue()).append(","); if (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()).append(","); if (getDisplayName() != null) sb.append("DisplayName: ").append(getDisplayName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PropertyDefinitionResponse == false) return false; PropertyDefinitionResponse other = (PropertyDefinitionResponse) obj; if (other.getDataType() == null ^ this.getDataType() == null) return false; if (other.getDataType() != null && other.getDataType().equals(this.getDataType()) == false) return false; if (other.getIsTimeSeries() == null ^ this.getIsTimeSeries() == null) return false; if (other.getIsTimeSeries() != null && other.getIsTimeSeries().equals(this.getIsTimeSeries()) == false) return false; if (other.getIsRequiredInEntity() == null ^ this.getIsRequiredInEntity() == null) return false; if (other.getIsRequiredInEntity() != null && other.getIsRequiredInEntity().equals(this.getIsRequiredInEntity()) == false) return false; if (other.getIsExternalId() == null ^ this.getIsExternalId() == null) return false; if (other.getIsExternalId() != null && other.getIsExternalId().equals(this.getIsExternalId()) == false) return false; if (other.getIsStoredExternally() == null ^ this.getIsStoredExternally() == null) return false; if (other.getIsStoredExternally() != null && other.getIsStoredExternally().equals(this.getIsStoredExternally()) == false) return false; if (other.getIsImported() == null ^ this.getIsImported() == null) return false; if (other.getIsImported() != null && other.getIsImported().equals(this.getIsImported()) == false) return false; if (other.getIsFinal() == null ^ this.getIsFinal() == null) return false; if (other.getIsFinal() != null && other.getIsFinal().equals(this.getIsFinal()) == false) return false; if (other.getIsInherited() == null ^ this.getIsInherited() == null) return false; if (other.getIsInherited() != null && other.getIsInherited().equals(this.getIsInherited()) == false) return false; if (other.getDefaultValue() == null ^ this.getDefaultValue() == null) return false; if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == false) return false; if (other.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false) return false; if (other.getDisplayName() == null ^ this.getDisplayName() == null) return false; if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().hashCode()); hashCode = prime * hashCode + ((getIsTimeSeries() == null) ? 0 : getIsTimeSeries().hashCode()); hashCode = prime * hashCode + ((getIsRequiredInEntity() == null) ? 0 : getIsRequiredInEntity().hashCode()); hashCode = prime * hashCode + ((getIsExternalId() == null) ? 0 : getIsExternalId().hashCode()); hashCode = prime * hashCode + ((getIsStoredExternally() == null) ? 0 : getIsStoredExternally().hashCode()); hashCode = prime * hashCode + ((getIsImported() == null) ? 0 : getIsImported().hashCode()); hashCode = prime * hashCode + ((getIsFinal() == null) ? 0 : getIsFinal().hashCode()); hashCode = prime * hashCode + ((getIsInherited() == null) ? 0 : getIsInherited().hashCode()); hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode()); return hashCode; } @Override public PropertyDefinitionResponse clone() { try { return (PropertyDefinitionResponse) 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.iottwinmaker.model.transform.PropertyDefinitionResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }