com.amazonaws.services.redshiftdataapi.model.ListStatementsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshiftdataapi Show documentation
/*
* 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;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListStatementsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one
* response, then NextToken
is returned to page through the results.
*
*/
private Integer maxResults;
/**
*
* 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;
/**
*
* A value that filters which statements to return in the response. If true, all statements run by the caller's IAM
* role are returned. If false, only statements run by the caller's IAM role in the current IAM session are
* returned. The default is true.
*
*/
private Boolean roleLevel;
/**
*
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a prefix that
* matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and
* so on, then provide the a value of myStatement
. Data API does a case-sensitive match of SQL
* statement names to the prefix value you provide.
*
*/
private String statementName;
/**
*
* The status of the SQL statement to list. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*/
private String status;
/**
*
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one
* response, then NextToken
is returned to page through the results.
*
*
* @param maxResults
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in
* one response, then NextToken
is returned to page through the results.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one
* response, then NextToken
is returned to page through the results.
*
*
* @return The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in
* one response, then NextToken
is returned to page through the results.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one
* response, then NextToken
is returned to page through the results.
*
*
* @param maxResults
* The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in
* one response, then NextToken
is returned to page through the results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListStatementsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
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 ListStatementsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* A value that filters which statements to return in the response. If true, all statements run by the caller's IAM
* role are returned. If false, only statements run by the caller's IAM role in the current IAM session are
* returned. The default is true.
*
*
* @param roleLevel
* A value that filters which statements to return in the response. If true, all statements run by the
* caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM
* session are returned. The default is true.
*/
public void setRoleLevel(Boolean roleLevel) {
this.roleLevel = roleLevel;
}
/**
*
* A value that filters which statements to return in the response. If true, all statements run by the caller's IAM
* role are returned. If false, only statements run by the caller's IAM role in the current IAM session are
* returned. The default is true.
*
*
* @return A value that filters which statements to return in the response. If true, all statements run by the
* caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM
* session are returned. The default is true.
*/
public Boolean getRoleLevel() {
return this.roleLevel;
}
/**
*
* A value that filters which statements to return in the response. If true, all statements run by the caller's IAM
* role are returned. If false, only statements run by the caller's IAM role in the current IAM session are
* returned. The default is true.
*
*
* @param roleLevel
* A value that filters which statements to return in the response. If true, all statements run by the
* caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM
* session are returned. The default is true.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListStatementsRequest withRoleLevel(Boolean roleLevel) {
setRoleLevel(roleLevel);
return this;
}
/**
*
* A value that filters which statements to return in the response. If true, all statements run by the caller's IAM
* role are returned. If false, only statements run by the caller's IAM role in the current IAM session are
* returned. The default is true.
*
*
* @return A value that filters which statements to return in the response. If true, all statements run by the
* caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM
* session are returned. The default is true.
*/
public Boolean isRoleLevel() {
return this.roleLevel;
}
/**
*
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a prefix that
* matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and
* so on, then provide the a value of myStatement
. Data API does a case-sensitive match of SQL
* statement names to the prefix value you provide.
*
*
* @param statementName
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a
* prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2,
* myStatement3, and so on, then provide the a value of myStatement
. Data API does a
* case-sensitive match of SQL statement names to the prefix value you provide.
*/
public void setStatementName(String statementName) {
this.statementName = statementName;
}
/**
*
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a prefix that
* matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and
* so on, then provide the a value of myStatement
. Data API does a case-sensitive match of SQL
* statement names to the prefix value you provide.
*
*
* @return The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a
* prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2,
* myStatement3, and so on, then provide the a value of myStatement
. Data API does a
* case-sensitive match of SQL statement names to the prefix value you provide.
*/
public String getStatementName() {
return this.statementName;
}
/**
*
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a prefix that
* matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and
* so on, then provide the a value of myStatement
. Data API does a case-sensitive match of SQL
* statement names to the prefix value you provide.
*
*
* @param statementName
* The name of the SQL statement specified as input to BatchExecuteStatement
or
* ExecuteStatement
to identify the query. You can list multiple statements by providing a
* prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2,
* myStatement3, and so on, then provide the a value of myStatement
. Data API does a
* case-sensitive match of SQL statement names to the prefix value you provide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListStatementsRequest withStatementName(String statementName) {
setStatementName(statementName);
return this;
}
/**
*
* The status of the SQL statement to list. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement to list. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @see StatusString
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the SQL statement to list. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @return The status of the SQL statement to list. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @see StatusString
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the SQL statement to list. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement to list. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusString
*/
public ListStatementsRequest withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the SQL statement to list. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement to list. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusString
*/
public ListStatementsRequest withStatus(StatusString status) {
this.status = status.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 (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getRoleLevel() != null)
sb.append("RoleLevel: ").append(getRoleLevel()).append(",");
if (getStatementName() != null)
sb.append("StatementName: ").append(getStatementName()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListStatementsRequest == false)
return false;
ListStatementsRequest other = (ListStatementsRequest) obj;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == 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.getRoleLevel() == null ^ this.getRoleLevel() == null)
return false;
if (other.getRoleLevel() != null && other.getRoleLevel().equals(this.getRoleLevel()) == false)
return false;
if (other.getStatementName() == null ^ this.getStatementName() == null)
return false;
if (other.getStatementName() != null && other.getStatementName().equals(this.getStatementName()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getRoleLevel() == null) ? 0 : getRoleLevel().hashCode());
hashCode = prime * hashCode + ((getStatementName() == null) ? 0 : getStatementName().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
return hashCode;
}
@Override
public ListStatementsRequest clone() {
return (ListStatementsRequest) super.clone();
}
}