/* * 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 BatchGetAssetPropertyValueHistoryResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. *

*/ private java.util.List errorEntries; /** *

* A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. *

*/ private java.util.List successEntries; /** *

* A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the entry that * skipped. *

*/ private java.util.List skippedEntries; /** *

* The token for the next set of results, or null if there are no additional results. *

*/ private String nextToken; /** *

* A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. *

* * @return A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. */ public java.util.List getErrorEntries() { return errorEntries; } /** *

* A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. *

* * @param errorEntries * A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. */ public void setErrorEntries(java.util.Collection errorEntries) { if (errorEntries == null) { this.errorEntries = null; return; } this.errorEntries = new java.util.ArrayList(errorEntries); } /** *

* A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setErrorEntries(java.util.Collection)} or {@link #withErrorEntries(java.util.Collection)} if you want to * override the existing values. *

* * @param errorEntries * A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withErrorEntries(BatchGetAssetPropertyValueHistoryErrorEntry... errorEntries) { if (this.errorEntries == null) { setErrorEntries(new java.util.ArrayList(errorEntries.length)); } for (BatchGetAssetPropertyValueHistoryErrorEntry ele : errorEntries) { this.errorEntries.add(ele); } return this; } /** *

* A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. *

* * @param errorEntries * A list of the errors (if any) associated with the batch request. Each error entry contains the * entryId of the entry that failed. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withErrorEntries(java.util.Collection errorEntries) { setErrorEntries(errorEntries); return this; } /** *

* A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. *

* * @return A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. */ public java.util.List getSuccessEntries() { return successEntries; } /** *

* A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. *

* * @param successEntries * A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. */ public void setSuccessEntries(java.util.Collection successEntries) { if (successEntries == null) { this.successEntries = null; return; } this.successEntries = new java.util.ArrayList(successEntries); } /** *

* A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSuccessEntries(java.util.Collection)} or {@link #withSuccessEntries(java.util.Collection)} if you want * to override the existing values. *

* * @param successEntries * A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withSuccessEntries(BatchGetAssetPropertyValueHistorySuccessEntry... successEntries) { if (this.successEntries == null) { setSuccessEntries(new java.util.ArrayList(successEntries.length)); } for (BatchGetAssetPropertyValueHistorySuccessEntry ele : successEntries) { this.successEntries.add(ele); } return this; } /** *

* A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. *

* * @param successEntries * A list of entries that were processed successfully by this batch request. Each success entry contains the * entryId of the entry that succeeded and the latest query result. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withSuccessEntries(java.util.Collection successEntries) { setSuccessEntries(successEntries); return this; } /** *

* A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the entry that * skipped. *

* * @return A list of entries that were not processed by this batch request. because these entries had been * completely processed by previous paginated requests. Each skipped entry contains the entryId * of the entry that skipped. */ public java.util.List getSkippedEntries() { return skippedEntries; } /** *

* A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the entry that * skipped. *

* * @param skippedEntries * A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the * entry that skipped. */ public void setSkippedEntries(java.util.Collection skippedEntries) { if (skippedEntries == null) { this.skippedEntries = null; return; } this.skippedEntries = new java.util.ArrayList(skippedEntries); } /** *

* A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the entry that * skipped. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSkippedEntries(java.util.Collection)} or {@link #withSkippedEntries(java.util.Collection)} if you want * to override the existing values. *

* * @param skippedEntries * A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the * entry that skipped. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withSkippedEntries(BatchGetAssetPropertyValueHistorySkippedEntry... skippedEntries) { if (this.skippedEntries == null) { setSkippedEntries(new java.util.ArrayList(skippedEntries.length)); } for (BatchGetAssetPropertyValueHistorySkippedEntry ele : skippedEntries) { this.skippedEntries.add(ele); } return this; } /** *

* A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the entry that * skipped. *

* * @param skippedEntries * A list of entries that were not processed by this batch request. because these entries had been completely * processed by previous paginated requests. Each skipped entry contains the entryId of the * entry that skipped. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withSkippedEntries(java.util.Collection skippedEntries) { setSkippedEntries(skippedEntries); return this; } /** *

* The token for the next set of results, or null if there are no additional results. *

* * @param nextToken * The token for the next set of results, or null if there are no additional results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token for the next set of results, or null if there are no additional results. *

* * @return The token for the next set of results, or null if there are no additional results. */ public String getNextToken() { return this.nextToken; } /** *

* The token for the next set of results, or null if there are no additional results. *

* * @param nextToken * The token for the next set of results, or null if there are no additional results. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetAssetPropertyValueHistoryResult withNextToken(String nextToken) { setNextToken(nextToken); 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 (getErrorEntries() != null) sb.append("ErrorEntries: ").append(getErrorEntries()).append(","); if (getSuccessEntries() != null) sb.append("SuccessEntries: ").append(getSuccessEntries()).append(","); if (getSkippedEntries() != null) sb.append("SkippedEntries: ").append(getSkippedEntries()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchGetAssetPropertyValueHistoryResult == false) return false; BatchGetAssetPropertyValueHistoryResult other = (BatchGetAssetPropertyValueHistoryResult) obj; if (other.getErrorEntries() == null ^ this.getErrorEntries() == null) return false; if (other.getErrorEntries() != null && other.getErrorEntries().equals(this.getErrorEntries()) == false) return false; if (other.getSuccessEntries() == null ^ this.getSuccessEntries() == null) return false; if (other.getSuccessEntries() != null && other.getSuccessEntries().equals(this.getSuccessEntries()) == false) return false; if (other.getSkippedEntries() == null ^ this.getSkippedEntries() == null) return false; if (other.getSkippedEntries() != null && other.getSkippedEntries().equals(this.getSkippedEntries()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getErrorEntries() == null) ? 0 : getErrorEntries().hashCode()); hashCode = prime * hashCode + ((getSuccessEntries() == null) ? 0 : getSuccessEntries().hashCode()); hashCode = prime * hashCode + ((getSkippedEntries() == null) ? 0 : getSkippedEntries().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public BatchGetAssetPropertyValueHistoryResult clone() { try { return (BatchGetAssetPropertyValueHistoryResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }