-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Amazon Athena SDK.
--   
--   The types from this library are intended to be used with
--   <a>amazonka</a>, which provides mechanisms for specifying AuthN/AuthZ
--   information, sending requests, and receiving responses.
--   
--   Lenses are used for constructing and manipulating types, due to the
--   depth of nesting of AWS types and transparency regarding
--   de/serialisation into more palatable Haskell values. The provided
--   lenses should be compatible with any of the major lens libraries such
--   as <a>lens</a> or <a>lens-family-core</a>.
--   
--   See <a>Network.AWS.Athena</a> or <a>the AWS documentation</a> to get
--   started.
@package amazonka-athena
@version 1.6.1


module Network.AWS.Athena.Types

-- | API version <tt>2017-05-18</tt> of the Amazon Athena SDK
--   configuration.
athena :: Service

-- | Indicates that something is wrong with the input to the request. For
--   example, a required parameter may be missing or out of range.
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Indicates that the request was throttled.
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Indicates a platform issue, which may be due to a transient condition
--   or outage.
_InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError
data ColumnNullable
NotNull :: ColumnNullable
Nullable :: ColumnNullable
Unknown :: ColumnNullable
data EncryptionOption
CseKMS :: EncryptionOption
SseKMS :: EncryptionOption
SseS3 :: EncryptionOption
data QueryExecutionState
Cancelled :: QueryExecutionState
Failed :: QueryExecutionState
Queued :: QueryExecutionState
Running :: QueryExecutionState
Succeeded :: QueryExecutionState

-- | Information about the columns in a query execution result.
--   
--   <i>See:</i> <a>columnInfo</a> smart constructor.
data ColumnInfo

-- | Creates a value of <a>ColumnInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ciScale</a> - For <tt>DECIMAL</tt> data types, specifies the
--   total number of digits in the fractional part of the value. Defaults
--   to 0.</li>
--   <li><a>ciPrecision</a> - For <tt>DECIMAL</tt> data types, specifies
--   the total number of digits, up to 38. For performance reasons, we
--   recommend up to 18 digits.</li>
--   <li><a>ciSchemaName</a> - The schema name (database name) to which the
--   query results belong.</li>
--   <li><a>ciCatalogName</a> - The catalog to which the query results
--   belong.</li>
--   <li><a>ciCaseSensitive</a> - Indicates whether values in the column
--   are case-sensitive.</li>
--   <li><a>ciLabel</a> - A column label.</li>
--   <li><a>ciTableName</a> - The table name for the query results.</li>
--   <li><a>ciNullable</a> - Indicates the column's nullable status.</li>
--   <li><a>ciName</a> - The name of the column.</li>
--   <li><a>ciType</a> - The data type of the column.</li>
--   </ul>
columnInfo :: Text -> Text -> ColumnInfo

-- | For <tt>DECIMAL</tt> data types, specifies the total number of digits
--   in the fractional part of the value. Defaults to 0.
ciScale :: Lens' ColumnInfo (Maybe Int)

-- | For <tt>DECIMAL</tt> data types, specifies the total number of digits,
--   up to 38. For performance reasons, we recommend up to 18 digits.
ciPrecision :: Lens' ColumnInfo (Maybe Int)

-- | The schema name (database name) to which the query results belong.
ciSchemaName :: Lens' ColumnInfo (Maybe Text)

-- | The catalog to which the query results belong.
ciCatalogName :: Lens' ColumnInfo (Maybe Text)

-- | Indicates whether values in the column are case-sensitive.
ciCaseSensitive :: Lens' ColumnInfo (Maybe Bool)

-- | A column label.
ciLabel :: Lens' ColumnInfo (Maybe Text)

-- | The table name for the query results.
ciTableName :: Lens' ColumnInfo (Maybe Text)

-- | Indicates the column's nullable status.
ciNullable :: Lens' ColumnInfo (Maybe ColumnNullable)

-- | The name of the column.
ciName :: Lens' ColumnInfo Text

-- | The data type of the column.
ciType :: Lens' ColumnInfo Text

-- | A piece of data (a field in the table).
--   
--   <i>See:</i> <a>datum</a> smart constructor.
data Datum

-- | Creates a value of <a>Datum</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dVarCharValue</a> - The value of the datum.</li>
--   </ul>
datum :: Datum

-- | The value of the datum.
dVarCharValue :: Lens' Datum (Maybe Text)

-- | If query results are encrypted in Amazon S3, indicates the Amazon S3
--   encryption option used.
--   
--   <i>See:</i> <a>encryptionConfiguration</a> smart constructor.
data EncryptionConfiguration

-- | Creates a value of <a>EncryptionConfiguration</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ecKMSKey</a> - For <tt>SSE-KMS</tt> and <tt>CSE-KMS</tt> , this
--   is the KMS key ARN or ID.</li>
--   <li><a>ecEncryptionOption</a> - Indicates whether Amazon S3
--   server-side encryption with Amazon S3-managed keys (<tt>SSE-S3</tt> ),
--   server-side encryption with KMS-managed keys (<tt>SSE-KMS</tt> ), or
--   client-side encryption with KMS-managed keys (CSE-KMS) is used.</li>
--   </ul>
encryptionConfiguration :: EncryptionOption -> EncryptionConfiguration

-- | For <tt>SSE-KMS</tt> and <tt>CSE-KMS</tt> , this is the KMS key ARN or
--   ID.
ecKMSKey :: Lens' EncryptionConfiguration (Maybe Text)

-- | Indicates whether Amazon S3 server-side encryption with Amazon
--   S3-managed keys (<tt>SSE-S3</tt> ), server-side encryption with
--   KMS-managed keys (<tt>SSE-KMS</tt> ), or client-side encryption with
--   KMS-managed keys (CSE-KMS) is used.
ecEncryptionOption :: Lens' EncryptionConfiguration EncryptionOption

-- | A query, where <tt>QueryString</tt> is the SQL query statements that
--   comprise the query.
--   
--   <i>See:</i> <a>namedQuery</a> smart constructor.
data NamedQuery

-- | Creates a value of <a>NamedQuery</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>nqNamedQueryId</a> - The unique identifier of the query.</li>
--   <li><a>nqDescription</a> - A brief description of the query.</li>
--   <li><a>nqName</a> - The plain-language name of the query.</li>
--   <li><a>nqDatabase</a> - The database to which the query belongs.</li>
--   <li><a>nqQueryString</a> - The SQL query statements that comprise the
--   query.</li>
--   </ul>
namedQuery :: Text -> Text -> Text -> NamedQuery

-- | The unique identifier of the query.
nqNamedQueryId :: Lens' NamedQuery (Maybe Text)

-- | A brief description of the query.
nqDescription :: Lens' NamedQuery (Maybe Text)

-- | The plain-language name of the query.
nqName :: Lens' NamedQuery Text

-- | The database to which the query belongs.
nqDatabase :: Lens' NamedQuery Text

-- | The SQL query statements that comprise the query.
nqQueryString :: Lens' NamedQuery Text

-- | Information about a single instance of a query execution.
--   
--   <i>See:</i> <a>queryExecution</a> smart constructor.
data QueryExecution

-- | Creates a value of <a>QueryExecution</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qeStatus</a> - The completion date, current state, submission
--   time, and state change reason (if applicable) for the query
--   execution.</li>
--   <li><a>qeQueryExecutionContext</a> - The database in which the query
--   execution occurred.</li>
--   <li><a>qeResultConfiguration</a> - The location in Amazon S3 where
--   query results were stored and the encryption option, if any, used for
--   query results.</li>
--   <li><a>qeQuery</a> - The SQL query statements which the query
--   execution ran.</li>
--   <li><a>qeStatistics</a> - The amount of data scanned during the query
--   execution and the amount of time that it took to execute.</li>
--   <li><a>qeQueryExecutionId</a> - The unique identifier for each query
--   execution.</li>
--   </ul>
queryExecution :: QueryExecution

-- | The completion date, current state, submission time, and state change
--   reason (if applicable) for the query execution.
qeStatus :: Lens' QueryExecution (Maybe QueryExecutionStatus)

-- | The database in which the query execution occurred.
qeQueryExecutionContext :: Lens' QueryExecution (Maybe QueryExecutionContext)

-- | The location in Amazon S3 where query results were stored and the
--   encryption option, if any, used for query results.
qeResultConfiguration :: Lens' QueryExecution (Maybe ResultConfiguration)

-- | The SQL query statements which the query execution ran.
qeQuery :: Lens' QueryExecution (Maybe Text)

-- | The amount of data scanned during the query execution and the amount
--   of time that it took to execute.
qeStatistics :: Lens' QueryExecution (Maybe QueryExecutionStatistics)

-- | The unique identifier for each query execution.
qeQueryExecutionId :: Lens' QueryExecution (Maybe Text)

-- | The database in which the query execution occurs.
--   
--   <i>See:</i> <a>queryExecutionContext</a> smart constructor.
data QueryExecutionContext

-- | Creates a value of <a>QueryExecutionContext</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qecDatabase</a> - The name of the database.</li>
--   </ul>
queryExecutionContext :: QueryExecutionContext

-- | The name of the database.
qecDatabase :: Lens' QueryExecutionContext (Maybe Text)

-- | The amount of data scanned during the query execution and the amount
--   of time that it took to execute.
--   
--   <i>See:</i> <a>queryExecutionStatistics</a> smart constructor.
data QueryExecutionStatistics

-- | Creates a value of <a>QueryExecutionStatistics</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qesEngineExecutionTimeInMillis</a> - The number of milliseconds
--   that the query took to execute.</li>
--   <li><a>qesDataScannedInBytes</a> - The number of bytes in the data
--   that was queried.</li>
--   </ul>
queryExecutionStatistics :: QueryExecutionStatistics

-- | The number of milliseconds that the query took to execute.
qesEngineExecutionTimeInMillis :: Lens' QueryExecutionStatistics (Maybe Integer)

-- | The number of bytes in the data that was queried.
qesDataScannedInBytes :: Lens' QueryExecutionStatistics (Maybe Integer)

-- | The completion date, current state, submission time, and state change
--   reason (if applicable) for the query execution.
--   
--   <i>See:</i> <a>queryExecutionStatus</a> smart constructor.
data QueryExecutionStatus

-- | Creates a value of <a>QueryExecutionStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qesState</a> - The state of query execution. <tt>SUBMITTED</tt>
--   indicates that the query is queued for execution. <tt>RUNNING</tt>
--   indicates that the query is scanning data and returning results.
--   <tt>SUCCEEDED</tt> indicates that the query completed without error.
--   <tt>FAILED</tt> indicates that the query experienced an error and did
--   not complete processing. <tt>CANCELLED</tt> indicates that user input
--   interrupted query execution.</li>
--   <li><a>qesStateChangeReason</a> - Further detail about the status of
--   the query.</li>
--   <li><a>qesSubmissionDateTime</a> - The date and time that the query
--   was submitted.</li>
--   <li><a>qesCompletionDateTime</a> - The date and time that the query
--   completed.</li>
--   </ul>
queryExecutionStatus :: QueryExecutionStatus

-- | The state of query execution. <tt>SUBMITTED</tt> indicates that the
--   query is queued for execution. <tt>RUNNING</tt> indicates that the
--   query is scanning data and returning results. <tt>SUCCEEDED</tt>
--   indicates that the query completed without error. <tt>FAILED</tt>
--   indicates that the query experienced an error and did not complete
--   processing. <tt>CANCELLED</tt> indicates that user input interrupted
--   query execution.
qesState :: Lens' QueryExecutionStatus (Maybe QueryExecutionState)

-- | Further detail about the status of the query.
qesStateChangeReason :: Lens' QueryExecutionStatus (Maybe Text)

-- | The date and time that the query was submitted.
qesSubmissionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)

-- | The date and time that the query completed.
qesCompletionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)

-- | The location in Amazon S3 where query results are stored and the
--   encryption option, if any, used for query results.
--   
--   <i>See:</i> <a>resultConfiguration</a> smart constructor.
data ResultConfiguration

-- | Creates a value of <a>ResultConfiguration</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcEncryptionConfiguration</a> - If query results are encrypted
--   in S3, indicates the S3 encryption option used (for example,
--   <tt>SSE-KMS</tt> or <tt>CSE-KMS</tt> and key information.</li>
--   <li><a>rcOutputLocation</a> - The location in S3 where query results
--   are stored.</li>
--   </ul>
resultConfiguration :: Text -> ResultConfiguration

-- | If query results are encrypted in S3, indicates the S3 encryption
--   option used (for example, <tt>SSE-KMS</tt> or <tt>CSE-KMS</tt> and key
--   information.
rcEncryptionConfiguration :: Lens' ResultConfiguration (Maybe EncryptionConfiguration)

-- | The location in S3 where query results are stored.
rcOutputLocation :: Lens' ResultConfiguration Text

-- | The metadata and rows that comprise a query result set. The metadata
--   describes the column structure and data types.
--   
--   <i>See:</i> <a>resultSet</a> smart constructor.
data ResultSet

-- | Creates a value of <a>ResultSet</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rsRows</a> - The rows in the table.</li>
--   <li><a>rsResultSetMetadata</a> - The metadata that describes the
--   column structure and data types of a table of query results.</li>
--   </ul>
resultSet :: ResultSet

-- | The rows in the table.
rsRows :: Lens' ResultSet [Row]

-- | The metadata that describes the column structure and data types of a
--   table of query results.
rsResultSetMetadata :: Lens' ResultSet (Maybe ResultSetMetadata)

-- | The metadata that describes the column structure and data types of a
--   table of query results.
--   
--   <i>See:</i> <a>resultSetMetadata</a> smart constructor.
data ResultSetMetadata

-- | Creates a value of <a>ResultSetMetadata</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rsmColumnInfo</a> - Information about the columns in a query
--   execution result.</li>
--   </ul>
resultSetMetadata :: ResultSetMetadata

-- | Information about the columns in a query execution result.
rsmColumnInfo :: Lens' ResultSetMetadata [ColumnInfo]

-- | The rows that comprise a query result table.
--   
--   <i>See:</i> <a>row</a> smart constructor.
data Row

-- | Creates a value of <a>Row</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rowData</a> - The data that populates a row in a query result
--   table.</li>
--   </ul>
row :: Row

-- | The data that populates a row in a query result table.
rowData :: Lens' Row [Datum]

-- | Information about a named query ID that could not be processed.
--   
--   <i>See:</i> <a>unprocessedNamedQueryId</a> smart constructor.
data UnprocessedNamedQueryId

-- | Creates a value of <a>UnprocessedNamedQueryId</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>unqiNamedQueryId</a> - The unique identifier of the named
--   query.</li>
--   <li><a>unqiErrorCode</a> - The error code returned when the processing
--   request for the named query failed, if applicable.</li>
--   <li><a>unqiErrorMessage</a> - The error message returned when the
--   processing request for the named query failed, if applicable.</li>
--   </ul>
unprocessedNamedQueryId :: UnprocessedNamedQueryId

-- | The unique identifier of the named query.
unqiNamedQueryId :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | The error code returned when the processing request for the named
--   query failed, if applicable.
unqiErrorCode :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | The error message returned when the processing request for the named
--   query failed, if applicable.
unqiErrorMessage :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | Describes a query execution that failed to process.
--   
--   <i>See:</i> <a>unprocessedQueryExecutionId</a> smart constructor.
data UnprocessedQueryExecutionId

-- | Creates a value of <a>UnprocessedQueryExecutionId</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uqeiErrorCode</a> - The error code returned when the query
--   execution failed to process, if applicable.</li>
--   <li><a>uqeiQueryExecutionId</a> - The unique identifier of the query
--   execution.</li>
--   <li><a>uqeiErrorMessage</a> - The error message returned when the
--   query execution failed to process, if applicable.</li>
--   </ul>
unprocessedQueryExecutionId :: UnprocessedQueryExecutionId

-- | The error code returned when the query execution failed to process, if
--   applicable.
uqeiErrorCode :: Lens' UnprocessedQueryExecutionId (Maybe Text)

-- | The unique identifier of the query execution.
uqeiQueryExecutionId :: Lens' UnprocessedQueryExecutionId (Maybe Text)

-- | The error message returned when the query execution failed to process,
--   if applicable.
uqeiErrorMessage :: Lens' UnprocessedQueryExecutionId (Maybe Text)


-- | Stops a query execution.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
module Network.AWS.Athena.StopQueryExecution

-- | Creates a value of <a>StopQueryExecution</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sqeQueryExecutionId</a> - The unique ID of the query execution
--   to stop.</li>
--   </ul>
stopQueryExecution :: Text -> StopQueryExecution

-- | <i>See:</i> <a>stopQueryExecution</a> smart constructor.
data StopQueryExecution

-- | The unique ID of the query execution to stop.
sqeQueryExecutionId :: Lens' StopQueryExecution Text

-- | Creates a value of <a>StopQueryExecutionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>srsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
stopQueryExecutionResponse :: Int -> StopQueryExecutionResponse

-- | <i>See:</i> <a>stopQueryExecutionResponse</a> smart constructor.
data StopQueryExecutionResponse

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
srsResponseStatus :: Lens' StopQueryExecutionResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance Data.Data.Data Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance GHC.Show.Show Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance GHC.Read.Read Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance GHC.Classes.Eq Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance GHC.Generics.Generic Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Data.Data.Data Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance GHC.Show.Show Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance GHC.Read.Read Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance GHC.Classes.Eq Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.StopQueryExecution.StopQueryExecutionResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.StopQueryExecution.StopQueryExecution
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.StopQueryExecution.StopQueryExecution


-- | Runs (executes) the SQL query statements contained in the
--   <tt>Query</tt> string.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
module Network.AWS.Athena.StartQueryExecution

-- | Creates a value of <a>StartQueryExecution</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sqeQueryExecutionContext</a> - The database within which the
--   query executes.</li>
--   <li><a>sqeClientRequestToken</a> - A unique case-sensitive string used
--   to ensure the request to create the query is idempotent (executes only
--   once). If another <tt>StartQueryExecution</tt> request is received,
--   the same response is returned and another query is not created. If a
--   parameter has changed, for example, the <tt>QueryString</tt> , an
--   error is returned. <i>Important:</i> This token is listed as not
--   required because AWS SDKs (for example the AWS SDK for Java)
--   auto-generate the token for users. If you are not using the AWS SDK or
--   the AWS CLI, you must provide this token or the action will fail.</li>
--   <li><a>sqeQueryString</a> - The SQL query statements to be
--   executed.</li>
--   <li><a>sqeResultConfiguration</a> - Specifies information about where
--   and how to save the results of the query execution.</li>
--   </ul>
startQueryExecution :: Text -> ResultConfiguration -> StartQueryExecution

-- | <i>See:</i> <a>startQueryExecution</a> smart constructor.
data StartQueryExecution

-- | The database within which the query executes.
sqeQueryExecutionContext :: Lens' StartQueryExecution (Maybe QueryExecutionContext)

-- | A unique case-sensitive string used to ensure the request to create
--   the query is idempotent (executes only once). If another
--   <tt>StartQueryExecution</tt> request is received, the same response is
--   returned and another query is not created. If a parameter has changed,
--   for example, the <tt>QueryString</tt> , an error is returned.
--   <i>Important:</i> This token is listed as not required because AWS
--   SDKs (for example the AWS SDK for Java) auto-generate the token for
--   users. If you are not using the AWS SDK or the AWS CLI, you must
--   provide this token or the action will fail.
sqeClientRequestToken :: Lens' StartQueryExecution (Maybe Text)

-- | The SQL query statements to be executed.
sqeQueryString :: Lens' StartQueryExecution Text

-- | Specifies information about where and how to save the results of the
--   query execution.
sqeResultConfiguration :: Lens' StartQueryExecution ResultConfiguration

-- | Creates a value of <a>StartQueryExecutionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sqersQueryExecutionId</a> - The unique ID of the query that ran
--   as a result of this request.</li>
--   <li><a>sqersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
startQueryExecutionResponse :: Int -> StartQueryExecutionResponse

-- | <i>See:</i> <a>startQueryExecutionResponse</a> smart constructor.
data StartQueryExecutionResponse

-- | The unique ID of the query that ran as a result of this request.
sqersQueryExecutionId :: Lens' StartQueryExecutionResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
sqersResponseStatus :: Lens' StartQueryExecutionResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance Data.Data.Data Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance GHC.Show.Show Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance GHC.Read.Read Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance GHC.Classes.Eq Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance GHC.Generics.Generic Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Data.Data.Data Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance GHC.Show.Show Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance GHC.Read.Read Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance GHC.Classes.Eq Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.StartQueryExecution.StartQueryExecutionResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.StartQueryExecution.StartQueryExecution
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.StartQueryExecution.StartQueryExecution


-- | Provides a list of all available query execution IDs.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
--   
--   This operation returns paginated results.
module Network.AWS.Athena.ListQueryExecutions

-- | Creates a value of <a>ListQueryExecutions</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lqeNextToken</a> - The token that specifies where to start
--   pagination if a previous request was truncated.</li>
--   <li><a>lqeMaxResults</a> - The maximum number of query executions to
--   return in this request.</li>
--   </ul>
listQueryExecutions :: ListQueryExecutions

-- | <i>See:</i> <a>listQueryExecutions</a> smart constructor.
data ListQueryExecutions

-- | The token that specifies where to start pagination if a previous
--   request was truncated.
lqeNextToken :: Lens' ListQueryExecutions (Maybe Text)

-- | The maximum number of query executions to return in this request.
lqeMaxResults :: Lens' ListQueryExecutions (Maybe Natural)

-- | Creates a value of <a>ListQueryExecutionsResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lqersQueryExecutionIds</a> - The unique IDs of each query
--   execution as an array of strings.</li>
--   <li><a>lqersNextToken</a> - A token to be used by the next request if
--   this request is truncated.</li>
--   <li><a>lqersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listQueryExecutionsResponse :: Int -> ListQueryExecutionsResponse

-- | <i>See:</i> <a>listQueryExecutionsResponse</a> smart constructor.
data ListQueryExecutionsResponse

-- | The unique IDs of each query execution as an array of strings.
lqersQueryExecutionIds :: Lens' ListQueryExecutionsResponse (Maybe (NonEmpty Text))

-- | A token to be used by the next request if this request is truncated.
lqersNextToken :: Lens' ListQueryExecutionsResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
lqersResponseStatus :: Lens' ListQueryExecutionsResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance Data.Data.Data Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance GHC.Show.Show Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance GHC.Read.Read Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance GHC.Classes.Eq Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance GHC.Generics.Generic Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Data.Data.Data Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance GHC.Show.Show Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance GHC.Read.Read Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance GHC.Classes.Eq Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Control.DeepSeq.NFData Network.AWS.Athena.ListQueryExecutions.ListQueryExecutionsResponse
instance Network.AWS.Pager.AWSPager Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Data.Hashable.Class.Hashable Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Control.DeepSeq.NFData Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.ListQueryExecutions.ListQueryExecutions


-- | Provides a list of all available query IDs.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
--   
--   This operation returns paginated results.
module Network.AWS.Athena.ListNamedQueries

-- | Creates a value of <a>ListNamedQueries</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lnqNextToken</a> - The token that specifies where to start
--   pagination if a previous request was truncated.</li>
--   <li><a>lnqMaxResults</a> - The maximum number of queries to return in
--   this request.</li>
--   </ul>
listNamedQueries :: ListNamedQueries

-- | <i>See:</i> <a>listNamedQueries</a> smart constructor.
data ListNamedQueries

-- | The token that specifies where to start pagination if a previous
--   request was truncated.
lnqNextToken :: Lens' ListNamedQueries (Maybe Text)

-- | The maximum number of queries to return in this request.
lnqMaxResults :: Lens' ListNamedQueries (Maybe Natural)

-- | Creates a value of <a>ListNamedQueriesResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lnqrsNextToken</a> - A token to be used by the next request if
--   this request is truncated.</li>
--   <li><a>lnqrsNamedQueryIds</a> - The list of unique query IDs.</li>
--   <li><a>lnqrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listNamedQueriesResponse :: Int -> ListNamedQueriesResponse

-- | <i>See:</i> <a>listNamedQueriesResponse</a> smart constructor.
data ListNamedQueriesResponse

-- | A token to be used by the next request if this request is truncated.
lnqrsNextToken :: Lens' ListNamedQueriesResponse (Maybe Text)

-- | The list of unique query IDs.
lnqrsNamedQueryIds :: Lens' ListNamedQueriesResponse (Maybe (NonEmpty Text))

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
lnqrsResponseStatus :: Lens' ListNamedQueriesResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance Data.Data.Data Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance GHC.Show.Show Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance GHC.Read.Read Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance GHC.Classes.Eq Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance GHC.Generics.Generic Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Data.Data.Data Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance GHC.Show.Show Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance GHC.Read.Read Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance GHC.Classes.Eq Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Control.DeepSeq.NFData Network.AWS.Athena.ListNamedQueries.ListNamedQueriesResponse
instance Network.AWS.Pager.AWSPager Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Data.Hashable.Class.Hashable Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Control.DeepSeq.NFData Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.ListNamedQueries.ListNamedQueries
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.ListNamedQueries.ListNamedQueries


-- | Returns the results of a single query execution specified by
--   <tt>QueryExecutionId</tt> . This request does not execute the query
--   but returns results. Use <tt>StartQueryExecution</tt> to run a query.
--   
--   This operation returns paginated results.
module Network.AWS.Athena.GetQueryResults

-- | Creates a value of <a>GetQueryResults</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqrNextToken</a> - The token that specifies where to start
--   pagination if a previous request was truncated.</li>
--   <li><a>gqrMaxResults</a> - The maximum number of results (rows) to
--   return in this request.</li>
--   <li><a>gqrQueryExecutionId</a> - The unique ID of the query
--   execution.</li>
--   </ul>
getQueryResults :: Text -> GetQueryResults

-- | <i>See:</i> <a>getQueryResults</a> smart constructor.
data GetQueryResults

-- | The token that specifies where to start pagination if a previous
--   request was truncated.
gqrNextToken :: Lens' GetQueryResults (Maybe Text)

-- | The maximum number of results (rows) to return in this request.
gqrMaxResults :: Lens' GetQueryResults (Maybe Natural)

-- | The unique ID of the query execution.
gqrQueryExecutionId :: Lens' GetQueryResults Text

-- | Creates a value of <a>GetQueryResultsResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqrrsNextToken</a> - A token to be used by the next request if
--   this request is truncated.</li>
--   <li><a>gqrrsResultSet</a> - The results of the query execution.</li>
--   <li><a>gqrrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getQueryResultsResponse :: Int -> GetQueryResultsResponse

-- | <i>See:</i> <a>getQueryResultsResponse</a> smart constructor.
data GetQueryResultsResponse

-- | A token to be used by the next request if this request is truncated.
gqrrsNextToken :: Lens' GetQueryResultsResponse (Maybe Text)

-- | The results of the query execution.
gqrrsResultSet :: Lens' GetQueryResultsResponse (Maybe ResultSet)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gqrrsResponseStatus :: Lens' GetQueryResultsResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance Data.Data.Data Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance GHC.Show.Show Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance GHC.Read.Read Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance GHC.Classes.Eq Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance GHC.Generics.Generic Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Data.Data.Data Network.AWS.Athena.GetQueryResults.GetQueryResults
instance GHC.Show.Show Network.AWS.Athena.GetQueryResults.GetQueryResults
instance GHC.Read.Read Network.AWS.Athena.GetQueryResults.GetQueryResults
instance GHC.Classes.Eq Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Control.DeepSeq.NFData Network.AWS.Athena.GetQueryResults.GetQueryResultsResponse
instance Network.AWS.Pager.AWSPager Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Data.Hashable.Class.Hashable Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Control.DeepSeq.NFData Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.GetQueryResults.GetQueryResults
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.GetQueryResults.GetQueryResults


-- | Returns information about a single execution of a query. Each time a
--   query executes, information about the query execution is saved with a
--   unique ID.
module Network.AWS.Athena.GetQueryExecution

-- | Creates a value of <a>GetQueryExecution</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqeQueryExecutionId</a> - The unique ID of the query
--   execution.</li>
--   </ul>
getQueryExecution :: Text -> GetQueryExecution

-- | <i>See:</i> <a>getQueryExecution</a> smart constructor.
data GetQueryExecution

-- | The unique ID of the query execution.
gqeQueryExecutionId :: Lens' GetQueryExecution Text

-- | Creates a value of <a>GetQueryExecutionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqersQueryExecution</a> - Information about the query
--   execution.</li>
--   <li><a>gqersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getQueryExecutionResponse :: Int -> GetQueryExecutionResponse

-- | <i>See:</i> <a>getQueryExecutionResponse</a> smart constructor.
data GetQueryExecutionResponse

-- | Information about the query execution.
gqersQueryExecution :: Lens' GetQueryExecutionResponse (Maybe QueryExecution)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gqersResponseStatus :: Lens' GetQueryExecutionResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance Data.Data.Data Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance GHC.Show.Show Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance GHC.Read.Read Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance GHC.Classes.Eq Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance GHC.Generics.Generic Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Data.Data.Data Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance GHC.Show.Show Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance GHC.Read.Read Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance GHC.Classes.Eq Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.GetQueryExecution.GetQueryExecutionResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.GetQueryExecution.GetQueryExecution
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.GetQueryExecution.GetQueryExecution


-- | Returns information about a single query.
module Network.AWS.Athena.GetNamedQuery

-- | Creates a value of <a>GetNamedQuery</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gnqNamedQueryId</a> - The unique ID of the query. Use
--   <tt>ListNamedQueries</tt> to get query IDs.</li>
--   </ul>
getNamedQuery :: Text -> GetNamedQuery

-- | <i>See:</i> <a>getNamedQuery</a> smart constructor.
data GetNamedQuery

-- | The unique ID of the query. Use <tt>ListNamedQueries</tt> to get query
--   IDs.
gnqNamedQueryId :: Lens' GetNamedQuery Text

-- | Creates a value of <a>GetNamedQueryResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gnqrsNamedQuery</a> - Information about the query.</li>
--   <li><a>gnqrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getNamedQueryResponse :: Int -> GetNamedQueryResponse

-- | <i>See:</i> <a>getNamedQueryResponse</a> smart constructor.
data GetNamedQueryResponse

-- | Information about the query.
gnqrsNamedQuery :: Lens' GetNamedQueryResponse (Maybe NamedQuery)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gnqrsResponseStatus :: Lens' GetNamedQueryResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance Data.Data.Data Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance GHC.Show.Show Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance GHC.Read.Read Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance GHC.Classes.Eq Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance GHC.Generics.Generic Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Data.Data.Data Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance GHC.Show.Show Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance GHC.Read.Read Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance GHC.Classes.Eq Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.GetNamedQuery.GetNamedQueryResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.GetNamedQuery.GetNamedQuery
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.GetNamedQuery.GetNamedQuery


-- | Deletes a named query.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
module Network.AWS.Athena.DeleteNamedQuery

-- | Creates a value of <a>DeleteNamedQuery</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dnqNamedQueryId</a> - The unique ID of the query to
--   delete.</li>
--   </ul>
deleteNamedQuery :: Text -> DeleteNamedQuery

-- | <i>See:</i> <a>deleteNamedQuery</a> smart constructor.
data DeleteNamedQuery

-- | The unique ID of the query to delete.
dnqNamedQueryId :: Lens' DeleteNamedQuery Text

-- | Creates a value of <a>DeleteNamedQueryResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dnqrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
deleteNamedQueryResponse :: Int -> DeleteNamedQueryResponse

-- | <i>See:</i> <a>deleteNamedQueryResponse</a> smart constructor.
data DeleteNamedQueryResponse

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
dnqrsResponseStatus :: Lens' DeleteNamedQueryResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance Data.Data.Data Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance GHC.Show.Show Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance GHC.Read.Read Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance GHC.Classes.Eq Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance GHC.Generics.Generic Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Data.Data.Data Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance GHC.Show.Show Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance GHC.Read.Read Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance GHC.Classes.Eq Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQueryResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.DeleteNamedQuery.DeleteNamedQuery


-- | Creates a named query.
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
module Network.AWS.Athena.CreateNamedQuery

-- | Creates a value of <a>CreateNamedQuery</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cnqClientRequestToken</a> - A unique case-sensitive string used
--   to ensure the request to create the query is idempotent (executes only
--   once). If another <tt>CreateNamedQuery</tt> request is received, the
--   same response is returned and another query is not created. If a
--   parameter has changed, for example, the <tt>QueryString</tt> , an
--   error is returned. <i>Important:</i> This token is listed as not
--   required because AWS SDKs (for example the AWS SDK for Java)
--   auto-generate the token for users. If you are not using the AWS SDK or
--   the AWS CLI, you must provide this token or the action will fail.</li>
--   <li><a>cnqDescription</a> - A brief explanation of the query.</li>
--   <li><a>cnqName</a> - The plain language name for the query.</li>
--   <li><a>cnqDatabase</a> - The database to which the query belongs.</li>
--   <li><a>cnqQueryString</a> - The text of the query itself. In other
--   words, all query statements.</li>
--   </ul>
createNamedQuery :: Text -> Text -> Text -> CreateNamedQuery

-- | <i>See:</i> <a>createNamedQuery</a> smart constructor.
data CreateNamedQuery

-- | A unique case-sensitive string used to ensure the request to create
--   the query is idempotent (executes only once). If another
--   <tt>CreateNamedQuery</tt> request is received, the same response is
--   returned and another query is not created. If a parameter has changed,
--   for example, the <tt>QueryString</tt> , an error is returned.
--   <i>Important:</i> This token is listed as not required because AWS
--   SDKs (for example the AWS SDK for Java) auto-generate the token for
--   users. If you are not using the AWS SDK or the AWS CLI, you must
--   provide this token or the action will fail.
cnqClientRequestToken :: Lens' CreateNamedQuery (Maybe Text)

-- | A brief explanation of the query.
cnqDescription :: Lens' CreateNamedQuery (Maybe Text)

-- | The plain language name for the query.
cnqName :: Lens' CreateNamedQuery Text

-- | The database to which the query belongs.
cnqDatabase :: Lens' CreateNamedQuery Text

-- | The text of the query itself. In other words, all query statements.
cnqQueryString :: Lens' CreateNamedQuery Text

-- | Creates a value of <a>CreateNamedQueryResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cnqrsNamedQueryId</a> - The unique ID of the query.</li>
--   <li><a>cnqrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
createNamedQueryResponse :: Int -> CreateNamedQueryResponse

-- | <i>See:</i> <a>createNamedQueryResponse</a> smart constructor.
data CreateNamedQueryResponse

-- | The unique ID of the query.
cnqrsNamedQueryId :: Lens' CreateNamedQueryResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
cnqrsResponseStatus :: Lens' CreateNamedQueryResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance Data.Data.Data Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance GHC.Show.Show Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance GHC.Read.Read Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance GHC.Classes.Eq Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance GHC.Generics.Generic Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Data.Data.Data Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance GHC.Show.Show Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance GHC.Read.Read Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance GHC.Classes.Eq Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.CreateNamedQuery.CreateNamedQueryResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.CreateNamedQuery.CreateNamedQuery


-- | Returns the details of a single query execution or a list of up to 50
--   query executions, which you provide as an array of query execution ID
--   strings. To get a list of query execution IDs, use
--   <tt>ListQueryExecutions</tt> . Query executions are different from
--   named (saved) queries. Use <tt>BatchGetNamedQuery</tt> to get details
--   about named queries.
module Network.AWS.Athena.BatchGetQueryExecution

-- | Creates a value of <a>BatchGetQueryExecution</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bgqeQueryExecutionIds</a> - An array of query execution
--   IDs.</li>
--   </ul>
batchGetQueryExecution :: NonEmpty Text -> BatchGetQueryExecution

-- | <i>See:</i> <a>batchGetQueryExecution</a> smart constructor.
data BatchGetQueryExecution

-- | An array of query execution IDs.
bgqeQueryExecutionIds :: Lens' BatchGetQueryExecution (NonEmpty Text)

-- | Creates a value of <a>BatchGetQueryExecutionResponse</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bgqersUnprocessedQueryExecutionIds</a> - Information about the
--   query executions that failed to run.</li>
--   <li><a>bgqersQueryExecutions</a> - Information about a query
--   execution.</li>
--   <li><a>bgqersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
batchGetQueryExecutionResponse :: Int -> BatchGetQueryExecutionResponse

-- | <i>See:</i> <a>batchGetQueryExecutionResponse</a> smart constructor.
data BatchGetQueryExecutionResponse

-- | Information about the query executions that failed to run.
bgqersUnprocessedQueryExecutionIds :: Lens' BatchGetQueryExecutionResponse [UnprocessedQueryExecutionId]

-- | Information about a query execution.
bgqersQueryExecutions :: Lens' BatchGetQueryExecutionResponse [QueryExecution]

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
bgqersResponseStatus :: Lens' BatchGetQueryExecutionResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance Data.Data.Data Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance GHC.Show.Show Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance GHC.Read.Read Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance GHC.Classes.Eq Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance GHC.Generics.Generic Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Data.Data.Data Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance GHC.Show.Show Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance GHC.Read.Read Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance GHC.Classes.Eq Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecutionResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Control.DeepSeq.NFData Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.BatchGetQueryExecution.BatchGetQueryExecution


-- | Returns the details of a single named query or a list of up to 50
--   queries, which you provide as an array of query ID strings. Use
--   <tt>ListNamedQueries</tt> to get the list of named query IDs. If
--   information could not be retrieved for a submitted query ID,
--   information about the query ID submitted is listed under
--   <a>UnprocessedNamedQueryId</a> . Named queries are different from
--   executed queries. Use <tt>BatchGetQueryExecution</tt> to get details
--   about each unique query execution, and <tt>ListQueryExecutions</tt> to
--   get a list of query execution IDs.
module Network.AWS.Athena.BatchGetNamedQuery

-- | Creates a value of <a>BatchGetNamedQuery</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bgnqNamedQueryIds</a> - An array of query IDs.</li>
--   </ul>
batchGetNamedQuery :: NonEmpty Text -> BatchGetNamedQuery

-- | <i>See:</i> <a>batchGetNamedQuery</a> smart constructor.
data BatchGetNamedQuery

-- | An array of query IDs.
bgnqNamedQueryIds :: Lens' BatchGetNamedQuery (NonEmpty Text)

-- | Creates a value of <a>BatchGetNamedQueryResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bgnqrsNamedQueries</a> - Information about the named query IDs
--   submitted.</li>
--   <li><a>bgnqrsUnprocessedNamedQueryIds</a> - Information about provided
--   query IDs.</li>
--   <li><a>bgnqrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
batchGetNamedQueryResponse :: Int -> BatchGetNamedQueryResponse

-- | <i>See:</i> <a>batchGetNamedQueryResponse</a> smart constructor.
data BatchGetNamedQueryResponse

-- | Information about the named query IDs submitted.
bgnqrsNamedQueries :: Lens' BatchGetNamedQueryResponse [NamedQuery]

-- | Information about provided query IDs.
bgnqrsUnprocessedNamedQueryIds :: Lens' BatchGetNamedQueryResponse [UnprocessedNamedQueryId]

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
bgnqrsResponseStatus :: Lens' BatchGetNamedQueryResponse Int
instance GHC.Generics.Generic Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance Data.Data.Data Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance GHC.Show.Show Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance GHC.Read.Read Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance GHC.Classes.Eq Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance GHC.Generics.Generic Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Data.Data.Data Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance GHC.Show.Show Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance GHC.Read.Read Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance GHC.Classes.Eq Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Network.AWS.Types.AWSRequest Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQueryResponse
instance Data.Hashable.Class.Hashable Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Control.DeepSeq.NFData Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Network.AWS.Data.Path.ToPath Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery
instance Network.AWS.Data.Query.ToQuery Network.AWS.Athena.BatchGetNamedQuery.BatchGetNamedQuery


module Network.AWS.Athena.Waiters


-- | Amazon Athena is an interactive query service that lets you use
--   standard SQL to analyze data directly in Amazon S3. You can point
--   Athena at your data in Amazon S3 and run ad-hoc queries and get
--   results in seconds. Athena is serverless, so there is no
--   infrastructure to set up or manage. You pay only for the queries you
--   run. Athena scales automatically—executing queries in parallel—so
--   results are fast, even with large datasets and complex queries. For
--   more information, see <a>What is Amazon Athena</a> in the <i>Amazon
--   Athena User Guide</i> .
--   
--   For code samples using the AWS SDK for Java, see <a>Examples and Code
--   Samples</a> in the <i>Amazon Athena User Guide</i> .
module Network.AWS.Athena

-- | API version <tt>2017-05-18</tt> of the Amazon Athena SDK
--   configuration.
athena :: Service

-- | Indicates that something is wrong with the input to the request. For
--   example, a required parameter may be missing or out of range.
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Indicates that the request was throttled.
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Indicates a platform issue, which may be due to a transient condition
--   or outage.
_InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError
data ColumnNullable
NotNull :: ColumnNullable
Nullable :: ColumnNullable
Unknown :: ColumnNullable
data EncryptionOption
CseKMS :: EncryptionOption
SseKMS :: EncryptionOption
SseS3 :: EncryptionOption
data QueryExecutionState
Cancelled :: QueryExecutionState
Failed :: QueryExecutionState
Queued :: QueryExecutionState
Running :: QueryExecutionState
Succeeded :: QueryExecutionState

-- | Information about the columns in a query execution result.
--   
--   <i>See:</i> <a>columnInfo</a> smart constructor.
data ColumnInfo

-- | Creates a value of <a>ColumnInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ciScale</a> - For <tt>DECIMAL</tt> data types, specifies the
--   total number of digits in the fractional part of the value. Defaults
--   to 0.</li>
--   <li><a>ciPrecision</a> - For <tt>DECIMAL</tt> data types, specifies
--   the total number of digits, up to 38. For performance reasons, we
--   recommend up to 18 digits.</li>
--   <li><a>ciSchemaName</a> - The schema name (database name) to which the
--   query results belong.</li>
--   <li><a>ciCatalogName</a> - The catalog to which the query results
--   belong.</li>
--   <li><a>ciCaseSensitive</a> - Indicates whether values in the column
--   are case-sensitive.</li>
--   <li><a>ciLabel</a> - A column label.</li>
--   <li><a>ciTableName</a> - The table name for the query results.</li>
--   <li><a>ciNullable</a> - Indicates the column's nullable status.</li>
--   <li><a>ciName</a> - The name of the column.</li>
--   <li><a>ciType</a> - The data type of the column.</li>
--   </ul>
columnInfo :: Text -> Text -> ColumnInfo

-- | For <tt>DECIMAL</tt> data types, specifies the total number of digits
--   in the fractional part of the value. Defaults to 0.
ciScale :: Lens' ColumnInfo (Maybe Int)

-- | For <tt>DECIMAL</tt> data types, specifies the total number of digits,
--   up to 38. For performance reasons, we recommend up to 18 digits.
ciPrecision :: Lens' ColumnInfo (Maybe Int)

-- | The schema name (database name) to which the query results belong.
ciSchemaName :: Lens' ColumnInfo (Maybe Text)

-- | The catalog to which the query results belong.
ciCatalogName :: Lens' ColumnInfo (Maybe Text)

-- | Indicates whether values in the column are case-sensitive.
ciCaseSensitive :: Lens' ColumnInfo (Maybe Bool)

-- | A column label.
ciLabel :: Lens' ColumnInfo (Maybe Text)

-- | The table name for the query results.
ciTableName :: Lens' ColumnInfo (Maybe Text)

-- | Indicates the column's nullable status.
ciNullable :: Lens' ColumnInfo (Maybe ColumnNullable)

-- | The name of the column.
ciName :: Lens' ColumnInfo Text

-- | The data type of the column.
ciType :: Lens' ColumnInfo Text

-- | A piece of data (a field in the table).
--   
--   <i>See:</i> <a>datum</a> smart constructor.
data Datum

-- | Creates a value of <a>Datum</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dVarCharValue</a> - The value of the datum.</li>
--   </ul>
datum :: Datum

-- | The value of the datum.
dVarCharValue :: Lens' Datum (Maybe Text)

-- | If query results are encrypted in Amazon S3, indicates the Amazon S3
--   encryption option used.
--   
--   <i>See:</i> <a>encryptionConfiguration</a> smart constructor.
data EncryptionConfiguration

-- | Creates a value of <a>EncryptionConfiguration</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ecKMSKey</a> - For <tt>SSE-KMS</tt> and <tt>CSE-KMS</tt> , this
--   is the KMS key ARN or ID.</li>
--   <li><a>ecEncryptionOption</a> - Indicates whether Amazon S3
--   server-side encryption with Amazon S3-managed keys (<tt>SSE-S3</tt> ),
--   server-side encryption with KMS-managed keys (<tt>SSE-KMS</tt> ), or
--   client-side encryption with KMS-managed keys (CSE-KMS) is used.</li>
--   </ul>
encryptionConfiguration :: EncryptionOption -> EncryptionConfiguration

-- | For <tt>SSE-KMS</tt> and <tt>CSE-KMS</tt> , this is the KMS key ARN or
--   ID.
ecKMSKey :: Lens' EncryptionConfiguration (Maybe Text)

-- | Indicates whether Amazon S3 server-side encryption with Amazon
--   S3-managed keys (<tt>SSE-S3</tt> ), server-side encryption with
--   KMS-managed keys (<tt>SSE-KMS</tt> ), or client-side encryption with
--   KMS-managed keys (CSE-KMS) is used.
ecEncryptionOption :: Lens' EncryptionConfiguration EncryptionOption

-- | A query, where <tt>QueryString</tt> is the SQL query statements that
--   comprise the query.
--   
--   <i>See:</i> <a>namedQuery</a> smart constructor.
data NamedQuery

-- | Creates a value of <a>NamedQuery</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>nqNamedQueryId</a> - The unique identifier of the query.</li>
--   <li><a>nqDescription</a> - A brief description of the query.</li>
--   <li><a>nqName</a> - The plain-language name of the query.</li>
--   <li><a>nqDatabase</a> - The database to which the query belongs.</li>
--   <li><a>nqQueryString</a> - The SQL query statements that comprise the
--   query.</li>
--   </ul>
namedQuery :: Text -> Text -> Text -> NamedQuery

-- | The unique identifier of the query.
nqNamedQueryId :: Lens' NamedQuery (Maybe Text)

-- | A brief description of the query.
nqDescription :: Lens' NamedQuery (Maybe Text)

-- | The plain-language name of the query.
nqName :: Lens' NamedQuery Text

-- | The database to which the query belongs.
nqDatabase :: Lens' NamedQuery Text

-- | The SQL query statements that comprise the query.
nqQueryString :: Lens' NamedQuery Text

-- | Information about a single instance of a query execution.
--   
--   <i>See:</i> <a>queryExecution</a> smart constructor.
data QueryExecution

-- | Creates a value of <a>QueryExecution</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qeStatus</a> - The completion date, current state, submission
--   time, and state change reason (if applicable) for the query
--   execution.</li>
--   <li><a>qeQueryExecutionContext</a> - The database in which the query
--   execution occurred.</li>
--   <li><a>qeResultConfiguration</a> - The location in Amazon S3 where
--   query results were stored and the encryption option, if any, used for
--   query results.</li>
--   <li><a>qeQuery</a> - The SQL query statements which the query
--   execution ran.</li>
--   <li><a>qeStatistics</a> - The amount of data scanned during the query
--   execution and the amount of time that it took to execute.</li>
--   <li><a>qeQueryExecutionId</a> - The unique identifier for each query
--   execution.</li>
--   </ul>
queryExecution :: QueryExecution

-- | The completion date, current state, submission time, and state change
--   reason (if applicable) for the query execution.
qeStatus :: Lens' QueryExecution (Maybe QueryExecutionStatus)

-- | The database in which the query execution occurred.
qeQueryExecutionContext :: Lens' QueryExecution (Maybe QueryExecutionContext)

-- | The location in Amazon S3 where query results were stored and the
--   encryption option, if any, used for query results.
qeResultConfiguration :: Lens' QueryExecution (Maybe ResultConfiguration)

-- | The SQL query statements which the query execution ran.
qeQuery :: Lens' QueryExecution (Maybe Text)

-- | The amount of data scanned during the query execution and the amount
--   of time that it took to execute.
qeStatistics :: Lens' QueryExecution (Maybe QueryExecutionStatistics)

-- | The unique identifier for each query execution.
qeQueryExecutionId :: Lens' QueryExecution (Maybe Text)

-- | The database in which the query execution occurs.
--   
--   <i>See:</i> <a>queryExecutionContext</a> smart constructor.
data QueryExecutionContext

-- | Creates a value of <a>QueryExecutionContext</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qecDatabase</a> - The name of the database.</li>
--   </ul>
queryExecutionContext :: QueryExecutionContext

-- | The name of the database.
qecDatabase :: Lens' QueryExecutionContext (Maybe Text)

-- | The amount of data scanned during the query execution and the amount
--   of time that it took to execute.
--   
--   <i>See:</i> <a>queryExecutionStatistics</a> smart constructor.
data QueryExecutionStatistics

-- | Creates a value of <a>QueryExecutionStatistics</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qesEngineExecutionTimeInMillis</a> - The number of milliseconds
--   that the query took to execute.</li>
--   <li><a>qesDataScannedInBytes</a> - The number of bytes in the data
--   that was queried.</li>
--   </ul>
queryExecutionStatistics :: QueryExecutionStatistics

-- | The number of milliseconds that the query took to execute.
qesEngineExecutionTimeInMillis :: Lens' QueryExecutionStatistics (Maybe Integer)

-- | The number of bytes in the data that was queried.
qesDataScannedInBytes :: Lens' QueryExecutionStatistics (Maybe Integer)

-- | The completion date, current state, submission time, and state change
--   reason (if applicable) for the query execution.
--   
--   <i>See:</i> <a>queryExecutionStatus</a> smart constructor.
data QueryExecutionStatus

-- | Creates a value of <a>QueryExecutionStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qesState</a> - The state of query execution. <tt>SUBMITTED</tt>
--   indicates that the query is queued for execution. <tt>RUNNING</tt>
--   indicates that the query is scanning data and returning results.
--   <tt>SUCCEEDED</tt> indicates that the query completed without error.
--   <tt>FAILED</tt> indicates that the query experienced an error and did
--   not complete processing. <tt>CANCELLED</tt> indicates that user input
--   interrupted query execution.</li>
--   <li><a>qesStateChangeReason</a> - Further detail about the status of
--   the query.</li>
--   <li><a>qesSubmissionDateTime</a> - The date and time that the query
--   was submitted.</li>
--   <li><a>qesCompletionDateTime</a> - The date and time that the query
--   completed.</li>
--   </ul>
queryExecutionStatus :: QueryExecutionStatus

-- | The state of query execution. <tt>SUBMITTED</tt> indicates that the
--   query is queued for execution. <tt>RUNNING</tt> indicates that the
--   query is scanning data and returning results. <tt>SUCCEEDED</tt>
--   indicates that the query completed without error. <tt>FAILED</tt>
--   indicates that the query experienced an error and did not complete
--   processing. <tt>CANCELLED</tt> indicates that user input interrupted
--   query execution.
qesState :: Lens' QueryExecutionStatus (Maybe QueryExecutionState)

-- | Further detail about the status of the query.
qesStateChangeReason :: Lens' QueryExecutionStatus (Maybe Text)

-- | The date and time that the query was submitted.
qesSubmissionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)

-- | The date and time that the query completed.
qesCompletionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)

-- | The location in Amazon S3 where query results are stored and the
--   encryption option, if any, used for query results.
--   
--   <i>See:</i> <a>resultConfiguration</a> smart constructor.
data ResultConfiguration

-- | Creates a value of <a>ResultConfiguration</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcEncryptionConfiguration</a> - If query results are encrypted
--   in S3, indicates the S3 encryption option used (for example,
--   <tt>SSE-KMS</tt> or <tt>CSE-KMS</tt> and key information.</li>
--   <li><a>rcOutputLocation</a> - The location in S3 where query results
--   are stored.</li>
--   </ul>
resultConfiguration :: Text -> ResultConfiguration

-- | If query results are encrypted in S3, indicates the S3 encryption
--   option used (for example, <tt>SSE-KMS</tt> or <tt>CSE-KMS</tt> and key
--   information.
rcEncryptionConfiguration :: Lens' ResultConfiguration (Maybe EncryptionConfiguration)

-- | The location in S3 where query results are stored.
rcOutputLocation :: Lens' ResultConfiguration Text

-- | The metadata and rows that comprise a query result set. The metadata
--   describes the column structure and data types.
--   
--   <i>See:</i> <a>resultSet</a> smart constructor.
data ResultSet

-- | Creates a value of <a>ResultSet</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rsRows</a> - The rows in the table.</li>
--   <li><a>rsResultSetMetadata</a> - The metadata that describes the
--   column structure and data types of a table of query results.</li>
--   </ul>
resultSet :: ResultSet

-- | The rows in the table.
rsRows :: Lens' ResultSet [Row]

-- | The metadata that describes the column structure and data types of a
--   table of query results.
rsResultSetMetadata :: Lens' ResultSet (Maybe ResultSetMetadata)

-- | The metadata that describes the column structure and data types of a
--   table of query results.
--   
--   <i>See:</i> <a>resultSetMetadata</a> smart constructor.
data ResultSetMetadata

-- | Creates a value of <a>ResultSetMetadata</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rsmColumnInfo</a> - Information about the columns in a query
--   execution result.</li>
--   </ul>
resultSetMetadata :: ResultSetMetadata

-- | Information about the columns in a query execution result.
rsmColumnInfo :: Lens' ResultSetMetadata [ColumnInfo]

-- | The rows that comprise a query result table.
--   
--   <i>See:</i> <a>row</a> smart constructor.
data Row

-- | Creates a value of <a>Row</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rowData</a> - The data that populates a row in a query result
--   table.</li>
--   </ul>
row :: Row

-- | The data that populates a row in a query result table.
rowData :: Lens' Row [Datum]

-- | Information about a named query ID that could not be processed.
--   
--   <i>See:</i> <a>unprocessedNamedQueryId</a> smart constructor.
data UnprocessedNamedQueryId

-- | Creates a value of <a>UnprocessedNamedQueryId</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>unqiNamedQueryId</a> - The unique identifier of the named
--   query.</li>
--   <li><a>unqiErrorCode</a> - The error code returned when the processing
--   request for the named query failed, if applicable.</li>
--   <li><a>unqiErrorMessage</a> - The error message returned when the
--   processing request for the named query failed, if applicable.</li>
--   </ul>
unprocessedNamedQueryId :: UnprocessedNamedQueryId

-- | The unique identifier of the named query.
unqiNamedQueryId :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | The error code returned when the processing request for the named
--   query failed, if applicable.
unqiErrorCode :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | The error message returned when the processing request for the named
--   query failed, if applicable.
unqiErrorMessage :: Lens' UnprocessedNamedQueryId (Maybe Text)

-- | Describes a query execution that failed to process.
--   
--   <i>See:</i> <a>unprocessedQueryExecutionId</a> smart constructor.
data UnprocessedQueryExecutionId

-- | Creates a value of <a>UnprocessedQueryExecutionId</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uqeiErrorCode</a> - The error code returned when the query
--   execution failed to process, if applicable.</li>
--   <li><a>uqeiQueryExecutionId</a> - The unique identifier of the query
--   execution.</li>
--   <li><a>uqeiErrorMessage</a> - The error message returned when the
--   query execution failed to process, if applicable.</li>
--   </ul>
unprocessedQueryExecutionId :: UnprocessedQueryExecutionId

-- | The error code returned when the query execution failed to process, if
--   applicable.
uqeiErrorCode :: Lens' UnprocessedQueryExecutionId (Maybe Text)

-- | The unique identifier of the query execution.
uqeiQueryExecutionId :: Lens' UnprocessedQueryExecutionId (Maybe Text)

-- | The error message returned when the query execution failed to process,
--   if applicable.
uqeiErrorMessage :: Lens' UnprocessedQueryExecutionId (Maybe Text)
