/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Athena { namespace Model { /** */ class ListSessionsRequest : public AthenaRequest { public: AWS_ATHENA_API ListSessionsRequest(); // 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 "ListSessions"; } AWS_ATHENA_API Aws::String SerializePayload() const override; AWS_ATHENA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The workgroup to which the session belongs.

*/ inline const Aws::String& GetWorkGroup() const{ return m_workGroup; } /** *

The workgroup to which the session belongs.

*/ inline bool WorkGroupHasBeenSet() const { return m_workGroupHasBeenSet; } /** *

The workgroup to which the session belongs.

*/ inline void SetWorkGroup(const Aws::String& value) { m_workGroupHasBeenSet = true; m_workGroup = value; } /** *

The workgroup to which the session belongs.

*/ inline void SetWorkGroup(Aws::String&& value) { m_workGroupHasBeenSet = true; m_workGroup = std::move(value); } /** *

The workgroup to which the session belongs.

*/ inline void SetWorkGroup(const char* value) { m_workGroupHasBeenSet = true; m_workGroup.assign(value); } /** *

The workgroup to which the session belongs.

*/ inline ListSessionsRequest& WithWorkGroup(const Aws::String& value) { SetWorkGroup(value); return *this;} /** *

The workgroup to which the session belongs.

*/ inline ListSessionsRequest& WithWorkGroup(Aws::String&& value) { SetWorkGroup(std::move(value)); return *this;} /** *

The workgroup to which the session belongs.

*/ inline ListSessionsRequest& WithWorkGroup(const char* value) { SetWorkGroup(value); return *this;} /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline const SessionState& GetStateFilter() const{ return m_stateFilter; } /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline bool StateFilterHasBeenSet() const { return m_stateFilterHasBeenSet; } /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline void SetStateFilter(const SessionState& value) { m_stateFilterHasBeenSet = true; m_stateFilter = value; } /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline void SetStateFilter(SessionState&& value) { m_stateFilterHasBeenSet = true; m_stateFilter = std::move(value); } /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline ListSessionsRequest& WithStateFilter(const SessionState& value) { SetStateFilter(value); return *this;} /** *

A filter for a specific session state. A description of each state * follows.

CREATING - The session is being started, including * acquiring resources.

CREATED - The session has been * started.

IDLE - The session is able to accept a * calculation.

BUSY - The session is processing another task * and is unable to accept a calculation.

TERMINATING - The * session is in the process of shutting down.

TERMINATED - * The session and its resources are no longer running.

* DEGRADED - The session has no healthy coordinators.

* FAILED - Due to a failure, the session and its resources are no * longer running.

*/ inline ListSessionsRequest& WithStateFilter(SessionState&& value) { SetStateFilter(std::move(value)); return *this;} /** *

The maximum number of sessions to return.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of sessions to return.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of sessions to return.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of sessions to return.

*/ inline ListSessionsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline ListSessionsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline ListSessionsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

A token generated by the Athena service that specifies where to continue * pagination if a previous request was truncated. To obtain the next set of pages, * pass in the NextToken from the response object of the previous page * call.

*/ inline ListSessionsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::String m_workGroup; bool m_workGroupHasBeenSet = false; SessionState m_stateFilter; bool m_stateFilterHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; }; } // namespace Model } // namespace Athena } // namespace Aws