/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudWatchLogs { namespace Model { /** *

This structure contains details about a saved CloudWatch Logs Insights query * definition.

See Also:

AWS * API Reference

*/ class QueryDefinition { public: AWS_CLOUDWATCHLOGS_API QueryDefinition(); AWS_CLOUDWATCHLOGS_API QueryDefinition(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHLOGS_API QueryDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The unique ID of the query definition.

*/ inline const Aws::String& GetQueryDefinitionId() const{ return m_queryDefinitionId; } /** *

The unique ID of the query definition.

*/ inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; } /** *

The unique ID of the query definition.

*/ inline void SetQueryDefinitionId(const Aws::String& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = value; } /** *

The unique ID of the query definition.

*/ inline void SetQueryDefinitionId(Aws::String&& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = std::move(value); } /** *

The unique ID of the query definition.

*/ inline void SetQueryDefinitionId(const char* value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId.assign(value); } /** *

The unique ID of the query definition.

*/ inline QueryDefinition& WithQueryDefinitionId(const Aws::String& value) { SetQueryDefinitionId(value); return *this;} /** *

The unique ID of the query definition.

*/ inline QueryDefinition& WithQueryDefinitionId(Aws::String&& value) { SetQueryDefinitionId(std::move(value)); return *this;} /** *

The unique ID of the query definition.

*/ inline QueryDefinition& WithQueryDefinitionId(const char* value) { SetQueryDefinitionId(value); return *this;} /** *

The name of the query definition.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the query definition.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the query definition.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the query definition.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the query definition.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the query definition.

*/ inline QueryDefinition& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the query definition.

*/ inline QueryDefinition& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the query definition.

*/ inline QueryDefinition& WithName(const char* value) { SetName(value); return *this;} /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline const Aws::String& GetQueryString() const{ return m_queryString; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(const Aws::String& value) { m_queryStringHasBeenSet = true; m_queryString = value; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(Aws::String&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(const char* value) { m_queryStringHasBeenSet = true; m_queryString.assign(value); } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline QueryDefinition& WithQueryString(const Aws::String& value) { SetQueryString(value); return *this;} /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline QueryDefinition& WithQueryString(Aws::String&& value) { SetQueryString(std::move(value)); return *this;} /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline QueryDefinition& WithQueryString(const char* value) { SetQueryString(value); return *this;} /** *

The date that the query definition was most recently modified.

*/ inline long long GetLastModified() const{ return m_lastModified; } /** *

The date that the query definition was most recently modified.

*/ inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; } /** *

The date that the query definition was most recently modified.

*/ inline void SetLastModified(long long value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; } /** *

The date that the query definition was most recently modified.

*/ inline QueryDefinition& WithLastModified(long long value) { SetLastModified(value); return *this;} /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline const Aws::Vector& GetLogGroupNames() const{ return m_logGroupNames; } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline void SetLogGroupNames(const Aws::Vector& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = value; } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline void SetLogGroupNames(Aws::Vector&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = std::move(value); } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline QueryDefinition& WithLogGroupNames(const Aws::Vector& value) { SetLogGroupNames(value); return *this;} /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline QueryDefinition& WithLogGroupNames(Aws::Vector&& value) { SetLogGroupNames(std::move(value)); return *this;} /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline QueryDefinition& AddLogGroupNames(const Aws::String& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); return *this; } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline QueryDefinition& AddLogGroupNames(Aws::String&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(std::move(value)); return *this; } /** *

If this query definition contains a list of log groups that it is limited to, * that list appears here.

*/ inline QueryDefinition& AddLogGroupNames(const char* value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); return *this; } private: Aws::String m_queryDefinitionId; bool m_queryDefinitionIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_queryString; bool m_queryStringHasBeenSet = false; long long m_lastModified; bool m_lastModifiedHasBeenSet = false; Aws::Vector m_logGroupNames; bool m_logGroupNamesHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws