/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace QLDBSession { namespace Model { /** */ class SendCommandRequest : public QLDBSessionRequest { public: AWS_QLDBSESSION_API SendCommandRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SendCommand"; } AWS_QLDBSESSION_API Aws::String SerializePayload() const override; AWS_QLDBSESSION_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline const Aws::String& GetSessionToken() const{ return m_sessionToken; } /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; } /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; } /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); } /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); } /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline SendCommandRequest& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;} /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline SendCommandRequest& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;} /** *

Specifies the session token for the current command. A session token is * constant throughout the life of the session.

To obtain a session token, * run the StartSession command. This SessionToken is * required for every subsequent command that is issued during the current * session.

*/ inline SendCommandRequest& WithSessionToken(const char* value) { SetSessionToken(value); return *this;} /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline const StartSessionRequest& GetStartSession() const{ return m_startSession; } /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline bool StartSessionHasBeenSet() const { return m_startSessionHasBeenSet; } /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline void SetStartSession(const StartSessionRequest& value) { m_startSessionHasBeenSet = true; m_startSession = value; } /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline void SetStartSession(StartSessionRequest&& value) { m_startSessionHasBeenSet = true; m_startSession = std::move(value); } /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline SendCommandRequest& WithStartSession(const StartSessionRequest& value) { SetStartSession(value); return *this;} /** *

Command to start a new session. A session token is obtained as part of the * response.

*/ inline SendCommandRequest& WithStartSession(StartSessionRequest&& value) { SetStartSession(std::move(value)); return *this;} /** *

Command to start a new transaction.

*/ inline const StartTransactionRequest& GetStartTransaction() const{ return m_startTransaction; } /** *

Command to start a new transaction.

*/ inline bool StartTransactionHasBeenSet() const { return m_startTransactionHasBeenSet; } /** *

Command to start a new transaction.

*/ inline void SetStartTransaction(const StartTransactionRequest& value) { m_startTransactionHasBeenSet = true; m_startTransaction = value; } /** *

Command to start a new transaction.

*/ inline void SetStartTransaction(StartTransactionRequest&& value) { m_startTransactionHasBeenSet = true; m_startTransaction = std::move(value); } /** *

Command to start a new transaction.

*/ inline SendCommandRequest& WithStartTransaction(const StartTransactionRequest& value) { SetStartTransaction(value); return *this;} /** *

Command to start a new transaction.

*/ inline SendCommandRequest& WithStartTransaction(StartTransactionRequest&& value) { SetStartTransaction(std::move(value)); return *this;} /** *

Command to end the current session.

*/ inline const EndSessionRequest& GetEndSession() const{ return m_endSession; } /** *

Command to end the current session.

*/ inline bool EndSessionHasBeenSet() const { return m_endSessionHasBeenSet; } /** *

Command to end the current session.

*/ inline void SetEndSession(const EndSessionRequest& value) { m_endSessionHasBeenSet = true; m_endSession = value; } /** *

Command to end the current session.

*/ inline void SetEndSession(EndSessionRequest&& value) { m_endSessionHasBeenSet = true; m_endSession = std::move(value); } /** *

Command to end the current session.

*/ inline SendCommandRequest& WithEndSession(const EndSessionRequest& value) { SetEndSession(value); return *this;} /** *

Command to end the current session.

*/ inline SendCommandRequest& WithEndSession(EndSessionRequest&& value) { SetEndSession(std::move(value)); return *this;} /** *

Command to commit the specified transaction.

*/ inline const CommitTransactionRequest& GetCommitTransaction() const{ return m_commitTransaction; } /** *

Command to commit the specified transaction.

*/ inline bool CommitTransactionHasBeenSet() const { return m_commitTransactionHasBeenSet; } /** *

Command to commit the specified transaction.

*/ inline void SetCommitTransaction(const CommitTransactionRequest& value) { m_commitTransactionHasBeenSet = true; m_commitTransaction = value; } /** *

Command to commit the specified transaction.

*/ inline void SetCommitTransaction(CommitTransactionRequest&& value) { m_commitTransactionHasBeenSet = true; m_commitTransaction = std::move(value); } /** *

Command to commit the specified transaction.

*/ inline SendCommandRequest& WithCommitTransaction(const CommitTransactionRequest& value) { SetCommitTransaction(value); return *this;} /** *

Command to commit the specified transaction.

*/ inline SendCommandRequest& WithCommitTransaction(CommitTransactionRequest&& value) { SetCommitTransaction(std::move(value)); return *this;} /** *

Command to abort the current transaction.

*/ inline const AbortTransactionRequest& GetAbortTransaction() const{ return m_abortTransaction; } /** *

Command to abort the current transaction.

*/ inline bool AbortTransactionHasBeenSet() const { return m_abortTransactionHasBeenSet; } /** *

Command to abort the current transaction.

*/ inline void SetAbortTransaction(const AbortTransactionRequest& value) { m_abortTransactionHasBeenSet = true; m_abortTransaction = value; } /** *

Command to abort the current transaction.

*/ inline void SetAbortTransaction(AbortTransactionRequest&& value) { m_abortTransactionHasBeenSet = true; m_abortTransaction = std::move(value); } /** *

Command to abort the current transaction.

*/ inline SendCommandRequest& WithAbortTransaction(const AbortTransactionRequest& value) { SetAbortTransaction(value); return *this;} /** *

Command to abort the current transaction.

*/ inline SendCommandRequest& WithAbortTransaction(AbortTransactionRequest&& value) { SetAbortTransaction(std::move(value)); return *this;} /** *

Command to execute a statement in the specified transaction.

*/ inline const ExecuteStatementRequest& GetExecuteStatement() const{ return m_executeStatement; } /** *

Command to execute a statement in the specified transaction.

*/ inline bool ExecuteStatementHasBeenSet() const { return m_executeStatementHasBeenSet; } /** *

Command to execute a statement in the specified transaction.

*/ inline void SetExecuteStatement(const ExecuteStatementRequest& value) { m_executeStatementHasBeenSet = true; m_executeStatement = value; } /** *

Command to execute a statement in the specified transaction.

*/ inline void SetExecuteStatement(ExecuteStatementRequest&& value) { m_executeStatementHasBeenSet = true; m_executeStatement = std::move(value); } /** *

Command to execute a statement in the specified transaction.

*/ inline SendCommandRequest& WithExecuteStatement(const ExecuteStatementRequest& value) { SetExecuteStatement(value); return *this;} /** *

Command to execute a statement in the specified transaction.

*/ inline SendCommandRequest& WithExecuteStatement(ExecuteStatementRequest&& value) { SetExecuteStatement(std::move(value)); return *this;} /** *

Command to fetch a page.

*/ inline const FetchPageRequest& GetFetchPage() const{ return m_fetchPage; } /** *

Command to fetch a page.

*/ inline bool FetchPageHasBeenSet() const { return m_fetchPageHasBeenSet; } /** *

Command to fetch a page.

*/ inline void SetFetchPage(const FetchPageRequest& value) { m_fetchPageHasBeenSet = true; m_fetchPage = value; } /** *

Command to fetch a page.

*/ inline void SetFetchPage(FetchPageRequest&& value) { m_fetchPageHasBeenSet = true; m_fetchPage = std::move(value); } /** *

Command to fetch a page.

*/ inline SendCommandRequest& WithFetchPage(const FetchPageRequest& value) { SetFetchPage(value); return *this;} /** *

Command to fetch a page.

*/ inline SendCommandRequest& WithFetchPage(FetchPageRequest&& value) { SetFetchPage(std::move(value)); return *this;} private: Aws::String m_sessionToken; bool m_sessionTokenHasBeenSet = false; StartSessionRequest m_startSession; bool m_startSessionHasBeenSet = false; StartTransactionRequest m_startTransaction; bool m_startTransactionHasBeenSet = false; EndSessionRequest m_endSession; bool m_endSessionHasBeenSet = false; CommitTransactionRequest m_commitTransaction; bool m_commitTransactionHasBeenSet = false; AbortTransactionRequest m_abortTransaction; bool m_abortTransactionHasBeenSet = false; ExecuteStatementRequest m_executeStatement; bool m_executeStatementHasBeenSet = false; FetchPageRequest m_fetchPage; bool m_fetchPageHasBeenSet = false; }; } // namespace Model } // namespace QLDBSession } // namespace Aws