/* * 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; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information for an asset property aggregate entry that is associated with the BatchGetAssetPropertyAggregates API. *
** To identify an asset property, you must specify one of the following: *
*
* The assetId
and propertyId
of an asset property.
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
* The ID of the entry. *
*/ private String entryId; /** ** The ID of the asset in which the asset property was created. *
*/ private String assetId; /** ** The ID of the asset property. *
*/ private String propertyId; /** *
* The alias that identifies the property, such as an OPC-UA server data stream path (for example,
* /company/windfarm/3/turbine/7/temperature
). For more information, see Mapping industrial
* data streams to asset properties in the IoT SiteWise User Guide.
*
* The data aggregating function. *
*/ private java.util.List* The time interval over which to aggregate data. *
*/ private String resolution; /** ** The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time. *
*/ private java.util.Date startDate; /** ** The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time. *
*/ private java.util.Date endDate; /** ** The quality by which to filter asset data. *
*/ private java.util.List* The chronological sorting order of the requested information. *
*
* Default: ASCENDING
*
* The ID of the entry. *
* * @param entryId * The ID of the entry. */ public void setEntryId(String entryId) { this.entryId = entryId; } /** ** The ID of the entry. *
* * @return The ID of the entry. */ public String getEntryId() { return this.entryId; } /** ** The ID of the entry. *
* * @param entryId * The ID of the entry. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withEntryId(String entryId) { setEntryId(entryId); return this; } /** ** The ID of the asset in which the asset property was created. *
* * @param assetId * The ID of the asset in which the asset property was created. */ public void setAssetId(String assetId) { this.assetId = assetId; } /** ** The ID of the asset in which the asset property was created. *
* * @return The ID of the asset in which the asset property was created. */ public String getAssetId() { return this.assetId; } /** ** The ID of the asset in which the asset property was created. *
* * @param assetId * The ID of the asset in which the asset property was created. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withAssetId(String assetId) { setAssetId(assetId); return this; } /** ** The ID of the asset property. *
* * @param propertyId * The ID of the asset property. */ public void setPropertyId(String propertyId) { this.propertyId = propertyId; } /** ** The ID of the asset property. *
* * @return The ID of the asset property. */ public String getPropertyId() { return this.propertyId; } /** ** The ID of the asset property. *
* * @param propertyId * The ID of the asset property. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withPropertyId(String propertyId) { setPropertyId(propertyId); return this; } /** *
* The alias that identifies the property, such as an OPC-UA server data stream path (for example,
* /company/windfarm/3/turbine/7/temperature
). For more information, see Mapping industrial
* data streams to asset properties in the IoT SiteWise User Guide.
*
/company/windfarm/3/turbine/7/temperature
). For more information, see Mapping
* industrial data streams to asset properties in the IoT SiteWise User Guide.
*/
public void setPropertyAlias(String propertyAlias) {
this.propertyAlias = propertyAlias;
}
/**
*
* The alias that identifies the property, such as an OPC-UA server data stream path (for example,
* /company/windfarm/3/turbine/7/temperature
). For more information, see Mapping industrial
* data streams to asset properties in the IoT SiteWise User Guide.
*
/company/windfarm/3/turbine/7/temperature
). For more information, see Mapping
* industrial data streams to asset properties in the IoT SiteWise User Guide.
*/
public String getPropertyAlias() {
return this.propertyAlias;
}
/**
*
* The alias that identifies the property, such as an OPC-UA server data stream path (for example,
* /company/windfarm/3/turbine/7/temperature
). For more information, see Mapping industrial
* data streams to asset properties in the IoT SiteWise User Guide.
*
/company/windfarm/3/turbine/7/temperature
). For more information, see Mapping
* industrial data streams to asset properties in the IoT SiteWise User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetAssetPropertyAggregatesEntry withPropertyAlias(String propertyAlias) {
setPropertyAlias(propertyAlias);
return this;
}
/**
* * The data aggregating function. *
* * @return The data aggregating function. * @see AggregateType */ public java.util.List* The data aggregating function. *
* * @param aggregateTypes * The data aggregating function. * @see AggregateType */ public void setAggregateTypes(java.util.Collection* The data aggregating function. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAggregateTypes(java.util.Collection)} or {@link #withAggregateTypes(java.util.Collection)} if you want * to override the existing values. *
* * @param aggregateTypes * The data aggregating function. * @return Returns a reference to this object so that method calls can be chained together. * @see AggregateType */ public BatchGetAssetPropertyAggregatesEntry withAggregateTypes(String... aggregateTypes) { if (this.aggregateTypes == null) { setAggregateTypes(new java.util.ArrayList* The data aggregating function. *
* * @param aggregateTypes * The data aggregating function. * @return Returns a reference to this object so that method calls can be chained together. * @see AggregateType */ public BatchGetAssetPropertyAggregatesEntry withAggregateTypes(java.util.Collection* The data aggregating function. *
* * @param aggregateTypes * The data aggregating function. * @return Returns a reference to this object so that method calls can be chained together. * @see AggregateType */ public BatchGetAssetPropertyAggregatesEntry withAggregateTypes(AggregateType... aggregateTypes) { java.util.ArrayList* The time interval over which to aggregate data. *
* * @param resolution * The time interval over which to aggregate data. */ public void setResolution(String resolution) { this.resolution = resolution; } /** ** The time interval over which to aggregate data. *
* * @return The time interval over which to aggregate data. */ public String getResolution() { return this.resolution; } /** ** The time interval over which to aggregate data. *
* * @param resolution * The time interval over which to aggregate data. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withResolution(String resolution) { setResolution(resolution); return this; } /** ** The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @param startDate * The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch * time. */ public void setStartDate(java.util.Date startDate) { this.startDate = startDate; } /** ** The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @return The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch * time. */ public java.util.Date getStartDate() { return this.startDate; } /** ** The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @param startDate * The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch * time. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withStartDate(java.util.Date startDate) { setStartDate(startDate); return this; } /** ** The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @param endDate * The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch * time. */ public void setEndDate(java.util.Date endDate) { this.endDate = endDate; } /** ** The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @return The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch * time. */ public java.util.Date getEndDate() { return this.endDate; } /** ** The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time. *
* * @param endDate * The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch * time. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyAggregatesEntry withEndDate(java.util.Date endDate) { setEndDate(endDate); return this; } /** ** The quality by which to filter asset data. *
* * @return The quality by which to filter asset data. * @see Quality */ public java.util.List* The quality by which to filter asset data. *
* * @param qualities * The quality by which to filter asset data. * @see Quality */ public void setQualities(java.util.Collection* The quality by which to filter asset data. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setQualities(java.util.Collection)} or {@link #withQualities(java.util.Collection)} if you want to * override the existing values. *
* * @param qualities * The quality by which to filter asset data. * @return Returns a reference to this object so that method calls can be chained together. * @see Quality */ public BatchGetAssetPropertyAggregatesEntry withQualities(String... qualities) { if (this.qualities == null) { setQualities(new java.util.ArrayList* The quality by which to filter asset data. *
* * @param qualities * The quality by which to filter asset data. * @return Returns a reference to this object so that method calls can be chained together. * @see Quality */ public BatchGetAssetPropertyAggregatesEntry withQualities(java.util.Collection* The quality by which to filter asset data. *
* * @param qualities * The quality by which to filter asset data. * @return Returns a reference to this object so that method calls can be chained together. * @see Quality */ public BatchGetAssetPropertyAggregatesEntry withQualities(Quality... qualities) { java.util.ArrayList* The chronological sorting order of the requested information. *
*
* Default: ASCENDING
*
* Default: ASCENDING
* @see TimeOrdering
*/
public void setTimeOrdering(String timeOrdering) {
this.timeOrdering = timeOrdering;
}
/**
*
* The chronological sorting order of the requested information. *
*
* Default: ASCENDING
*
* Default: ASCENDING
* @see TimeOrdering
*/
public String getTimeOrdering() {
return this.timeOrdering;
}
/**
*
* The chronological sorting order of the requested information. *
*
* Default: ASCENDING
*
* Default: ASCENDING
* @return Returns a reference to this object so that method calls can be chained together.
* @see TimeOrdering
*/
public BatchGetAssetPropertyAggregatesEntry withTimeOrdering(String timeOrdering) {
setTimeOrdering(timeOrdering);
return this;
}
/**
*
* The chronological sorting order of the requested information. *
*
* Default: ASCENDING
*
* Default: ASCENDING
* @return Returns a reference to this object so that method calls can be chained together.
* @see TimeOrdering
*/
public BatchGetAssetPropertyAggregatesEntry withTimeOrdering(TimeOrdering timeOrdering) {
this.timeOrdering = timeOrdering.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 (getEntryId() != null)
sb.append("EntryId: ").append(getEntryId()).append(",");
if (getAssetId() != null)
sb.append("AssetId: ").append(getAssetId()).append(",");
if (getPropertyId() != null)
sb.append("PropertyId: ").append(getPropertyId()).append(",");
if (getPropertyAlias() != null)
sb.append("PropertyAlias: ").append(getPropertyAlias()).append(",");
if (getAggregateTypes() != null)
sb.append("AggregateTypes: ").append(getAggregateTypes()).append(",");
if (getResolution() != null)
sb.append("Resolution: ").append(getResolution()).append(",");
if (getStartDate() != null)
sb.append("StartDate: ").append(getStartDate()).append(",");
if (getEndDate() != null)
sb.append("EndDate: ").append(getEndDate()).append(",");
if (getQualities() != null)
sb.append("Qualities: ").append(getQualities()).append(",");
if (getTimeOrdering() != null)
sb.append("TimeOrdering: ").append(getTimeOrdering());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchGetAssetPropertyAggregatesEntry == false)
return false;
BatchGetAssetPropertyAggregatesEntry other = (BatchGetAssetPropertyAggregatesEntry) obj;
if (other.getEntryId() == null ^ this.getEntryId() == null)
return false;
if (other.getEntryId() != null && other.getEntryId().equals(this.getEntryId()) == false)
return false;
if (other.getAssetId() == null ^ this.getAssetId() == null)
return false;
if (other.getAssetId() != null && other.getAssetId().equals(this.getAssetId()) == false)
return false;
if (other.getPropertyId() == null ^ this.getPropertyId() == null)
return false;
if (other.getPropertyId() != null && other.getPropertyId().equals(this.getPropertyId()) == false)
return false;
if (other.getPropertyAlias() == null ^ this.getPropertyAlias() == null)
return false;
if (other.getPropertyAlias() != null && other.getPropertyAlias().equals(this.getPropertyAlias()) == false)
return false;
if (other.getAggregateTypes() == null ^ this.getAggregateTypes() == null)
return false;
if (other.getAggregateTypes() != null && other.getAggregateTypes().equals(this.getAggregateTypes()) == false)
return false;
if (other.getResolution() == null ^ this.getResolution() == null)
return false;
if (other.getResolution() != null && other.getResolution().equals(this.getResolution()) == false)
return false;
if (other.getStartDate() == null ^ this.getStartDate() == null)
return false;
if (other.getStartDate() != null && other.getStartDate().equals(this.getStartDate()) == false)
return false;
if (other.getEndDate() == null ^ this.getEndDate() == null)
return false;
if (other.getEndDate() != null && other.getEndDate().equals(this.getEndDate()) == false)
return false;
if (other.getQualities() == null ^ this.getQualities() == null)
return false;
if (other.getQualities() != null && other.getQualities().equals(this.getQualities()) == false)
return false;
if (other.getTimeOrdering() == null ^ this.getTimeOrdering() == null)
return false;
if (other.getTimeOrdering() != null && other.getTimeOrdering().equals(this.getTimeOrdering()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEntryId() == null) ? 0 : getEntryId().hashCode());
hashCode = prime * hashCode + ((getAssetId() == null) ? 0 : getAssetId().hashCode());
hashCode = prime * hashCode + ((getPropertyId() == null) ? 0 : getPropertyId().hashCode());
hashCode = prime * hashCode + ((getPropertyAlias() == null) ? 0 : getPropertyAlias().hashCode());
hashCode = prime * hashCode + ((getAggregateTypes() == null) ? 0 : getAggregateTypes().hashCode());
hashCode = prime * hashCode + ((getResolution() == null) ? 0 : getResolution().hashCode());
hashCode = prime * hashCode + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
hashCode = prime * hashCode + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
hashCode = prime * hashCode + ((getQualities() == null) ? 0 : getQualities().hashCode());
hashCode = prime * hashCode + ((getTimeOrdering() == null) ? 0 : getTimeOrdering().hashCode());
return hashCode;
}
@Override
public BatchGetAssetPropertyAggregatesEntry clone() {
try {
return (BatchGetAssetPropertyAggregatesEntry) 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.iotsitewise.model.transform.BatchGetAssetPropertyAggregatesEntryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}