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

com.amazonaws.services.redshiftdataapi.model.GetStatementResultResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Redshift Data API module holds the client classes that are used for communicating with Redshift Data API Service

There is a newer version: 1.12.772
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.redshiftdataapi.model;

import java.io.Serializable;
import javax.annotation.Generated;

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

    /**
     * 

* The properties (metadata) of a column. *

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

* A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned NextToken * value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response * records have been retrieved for the request. *

*/ private String nextToken; /** *

* The results of the SQL statement. *

*/ private java.util.List> records; /** *

* The total number of rows in the result set returned from a query. You can use this number to estimate the number * of calls to the GetStatementResult operation needed to page through the results. *

*/ private Long totalNumRows; /** *

* The properties (metadata) of a column. *

* * @return The properties (metadata) of a column. */ public java.util.List getColumnMetadata() { return columnMetadata; } /** *

* The properties (metadata) of a column. *

* * @param columnMetadata * The properties (metadata) of a column. */ public void setColumnMetadata(java.util.Collection columnMetadata) { if (columnMetadata == null) { this.columnMetadata = null; return; } this.columnMetadata = new java.util.ArrayList(columnMetadata); } /** *

* The properties (metadata) of a column. *

*

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

* * @param columnMetadata * The properties (metadata) of a column. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withColumnMetadata(ColumnMetadata... columnMetadata) { if (this.columnMetadata == null) { setColumnMetadata(new java.util.ArrayList(columnMetadata.length)); } for (ColumnMetadata ele : columnMetadata) { this.columnMetadata.add(ele); } return this; } /** *

* The properties (metadata) of a column. *

* * @param columnMetadata * The properties (metadata) of a column. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withColumnMetadata(java.util.Collection columnMetadata) { setColumnMetadata(columnMetadata); return this; } /** *

* A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned NextToken * value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response * records have been retrieved for the request. *

* * @param nextToken * A value that indicates the starting point for the next set of response records in a subsequent request. If * a value is returned in a response, you can retrieve the next set of records by providing this returned * NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, * all response records have been retrieved for the request. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned NextToken * value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response * records have been retrieved for the request. *

* * @return A value that indicates the starting point for the next set of response records in a subsequent request. * If a value is returned in a response, you can retrieve the next set of records by providing this returned * NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is * empty, all response records have been retrieved for the request. */ public String getNextToken() { return this.nextToken; } /** *

* A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned NextToken * value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response * records have been retrieved for the request. *

* * @param nextToken * A value that indicates the starting point for the next set of response records in a subsequent request. If * a value is returned in a response, you can retrieve the next set of records by providing this returned * NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, * all response records have been retrieved for the request. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The results of the SQL statement. *

* * @return The results of the SQL statement. */ public java.util.List> getRecords() { return records; } /** *

* The results of the SQL statement. *

* * @param records * The results of the SQL statement. */ public void setRecords(java.util.Collection> records) { if (records == null) { this.records = null; return; } this.records = new java.util.ArrayList>(records); } /** *

* The results of the SQL statement. *

*

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

* * @param records * The results of the SQL statement. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withRecords(java.util.List... records) { if (this.records == null) { setRecords(new java.util.ArrayList>(records.length)); } for (java.util.List ele : records) { this.records.add(ele); } return this; } /** *

* The results of the SQL statement. *

* * @param records * The results of the SQL statement. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withRecords(java.util.Collection> records) { setRecords(records); return this; } /** *

* The total number of rows in the result set returned from a query. You can use this number to estimate the number * of calls to the GetStatementResult operation needed to page through the results. *

* * @param totalNumRows * The total number of rows in the result set returned from a query. You can use this number to estimate the * number of calls to the GetStatementResult operation needed to page through the results. */ public void setTotalNumRows(Long totalNumRows) { this.totalNumRows = totalNumRows; } /** *

* The total number of rows in the result set returned from a query. You can use this number to estimate the number * of calls to the GetStatementResult operation needed to page through the results. *

* * @return The total number of rows in the result set returned from a query. You can use this number to estimate the * number of calls to the GetStatementResult operation needed to page through the results. */ public Long getTotalNumRows() { return this.totalNumRows; } /** *

* The total number of rows in the result set returned from a query. You can use this number to estimate the number * of calls to the GetStatementResult operation needed to page through the results. *

* * @param totalNumRows * The total number of rows in the result set returned from a query. You can use this number to estimate the * number of calls to the GetStatementResult operation needed to page through the results. * @return Returns a reference to this object so that method calls can be chained together. */ public GetStatementResultResult withTotalNumRows(Long totalNumRows) { setTotalNumRows(totalNumRows); 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 (getColumnMetadata() != null) sb.append("ColumnMetadata: ").append(getColumnMetadata()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getRecords() != null) sb.append("Records: ").append(getRecords()).append(","); if (getTotalNumRows() != null) sb.append("TotalNumRows: ").append(getTotalNumRows()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetStatementResultResult == false) return false; GetStatementResultResult other = (GetStatementResultResult) obj; if (other.getColumnMetadata() == null ^ this.getColumnMetadata() == null) return false; if (other.getColumnMetadata() != null && other.getColumnMetadata().equals(this.getColumnMetadata()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getRecords() == null ^ this.getRecords() == null) return false; if (other.getRecords() != null && other.getRecords().equals(this.getRecords()) == false) return false; if (other.getTotalNumRows() == null ^ this.getTotalNumRows() == null) return false; if (other.getTotalNumRows() != null && other.getTotalNumRows().equals(this.getTotalNumRows()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getColumnMetadata() == null) ? 0 : getColumnMetadata().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getRecords() == null) ? 0 : getRecords().hashCode()); hashCode = prime * hashCode + ((getTotalNumRows() == null) ? 0 : getTotalNumRows().hashCode()); return hashCode; } @Override public GetStatementResultResult clone() { try { return (GetStatementResultResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy