All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.iottwinmaker.model.ExecuteQueryResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IoT TwinMaker module holds the client classes that are used for communicating with AWS IoT TwinMaker Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ExecuteQueryResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* A list of ColumnDescription objects. *

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

* Represents a single row in the query results. *

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

* The string that specifies the next page of results. *

*/ private String nextToken; /** *

* A list of ColumnDescription objects. *

* * @return A list of ColumnDescription objects. */ public java.util.List getColumnDescriptions() { return columnDescriptions; } /** *

* A list of ColumnDescription objects. *

* * @param columnDescriptions * A list of ColumnDescription objects. */ public void setColumnDescriptions(java.util.Collection columnDescriptions) { if (columnDescriptions == null) { this.columnDescriptions = null; return; } this.columnDescriptions = new java.util.ArrayList(columnDescriptions); } /** *

* A list of ColumnDescription objects. *

*

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

* * @param columnDescriptions * A list of ColumnDescription objects. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteQueryResult withColumnDescriptions(ColumnDescription... columnDescriptions) { if (this.columnDescriptions == null) { setColumnDescriptions(new java.util.ArrayList(columnDescriptions.length)); } for (ColumnDescription ele : columnDescriptions) { this.columnDescriptions.add(ele); } return this; } /** *

* A list of ColumnDescription objects. *

* * @param columnDescriptions * A list of ColumnDescription objects. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteQueryResult withColumnDescriptions(java.util.Collection columnDescriptions) { setColumnDescriptions(columnDescriptions); return this; } /** *

* Represents a single row in the query results. *

* * @return Represents a single row in the query results. */ public java.util.List getRows() { return rows; } /** *

* Represents a single row in the query results. *

* * @param rows * Represents a single row in the query results. */ public void setRows(java.util.Collection rows) { if (rows == null) { this.rows = null; return; } this.rows = new java.util.ArrayList(rows); } /** *

* Represents a single row in the query results. *

*

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

* * @param rows * Represents a single row in the query results. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteQueryResult withRows(Row... rows) { if (this.rows == null) { setRows(new java.util.ArrayList(rows.length)); } for (Row ele : rows) { this.rows.add(ele); } return this; } /** *

* Represents a single row in the query results. *

* * @param rows * Represents a single row in the query results. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteQueryResult withRows(java.util.Collection rows) { setRows(rows); return this; } /** *

* The string that specifies the next page of results. *

* * @param nextToken * The string that specifies the next page of results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The string that specifies the next page of results. *

* * @return The string that specifies the next page of results. */ public String getNextToken() { return this.nextToken; } /** *

* The string that specifies the next page of results. *

* * @param nextToken * The string that specifies the next page of results. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteQueryResult 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 (getColumnDescriptions() != null) sb.append("ColumnDescriptions: ").append(getColumnDescriptions()).append(","); if (getRows() != null) sb.append("Rows: ").append(getRows()).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 ExecuteQueryResult == false) return false; ExecuteQueryResult other = (ExecuteQueryResult) obj; if (other.getColumnDescriptions() == null ^ this.getColumnDescriptions() == null) return false; if (other.getColumnDescriptions() != null && other.getColumnDescriptions().equals(this.getColumnDescriptions()) == false) return false; if (other.getRows() == null ^ this.getRows() == null) return false; if (other.getRows() != null && other.getRows().equals(this.getRows()) == 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 + ((getColumnDescriptions() == null) ? 0 : getColumnDescriptions().hashCode()); hashCode = prime * hashCode + ((getRows() == null) ? 0 : getRows().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ExecuteQueryResult clone() { try { return (ExecuteQueryResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy