AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
QueryDefinition.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/logs/CloudWatchLogs_EXPORTS.h>
10#include <aws/logs/model/QueryLanguage.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CloudWatchLogs {
22namespace Model {
23
31 public:
32 AWS_CLOUDWATCHLOGS_API QueryDefinition() = default;
33 AWS_CLOUDWATCHLOGS_API QueryDefinition(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CLOUDWATCHLOGS_API QueryDefinition& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
44 inline QueryLanguage GetQueryLanguage() const { return m_queryLanguage; }
45 inline bool QueryLanguageHasBeenSet() const { return m_queryLanguageHasBeenSet; }
46 inline void SetQueryLanguage(QueryLanguage value) {
47 m_queryLanguageHasBeenSet = true;
48 m_queryLanguage = value;
49 }
51 SetQueryLanguage(value);
52 return *this;
53 }
55
57
60 inline const Aws::String& GetQueryDefinitionId() const { return m_queryDefinitionId; }
61 inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; }
62 template <typename QueryDefinitionIdT = Aws::String>
63 void SetQueryDefinitionId(QueryDefinitionIdT&& value) {
64 m_queryDefinitionIdHasBeenSet = true;
65 m_queryDefinitionId = std::forward<QueryDefinitionIdT>(value);
66 }
67 template <typename QueryDefinitionIdT = Aws::String>
68 QueryDefinition& WithQueryDefinitionId(QueryDefinitionIdT&& value) {
69 SetQueryDefinitionId(std::forward<QueryDefinitionIdT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetName() const { return m_name; }
79 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
80 template <typename NameT = Aws::String>
81 void SetName(NameT&& value) {
82 m_nameHasBeenSet = true;
83 m_name = std::forward<NameT>(value);
84 }
85 template <typename NameT = Aws::String>
86 QueryDefinition& WithName(NameT&& value) {
87 SetName(std::forward<NameT>(value));
88 return *this;
89 }
91
93
98 inline const Aws::String& GetQueryString() const { return m_queryString; }
99 inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; }
100 template <typename QueryStringT = Aws::String>
101 void SetQueryString(QueryStringT&& value) {
102 m_queryStringHasBeenSet = true;
103 m_queryString = std::forward<QueryStringT>(value);
104 }
105 template <typename QueryStringT = Aws::String>
106 QueryDefinition& WithQueryString(QueryStringT&& value) {
107 SetQueryString(std::forward<QueryStringT>(value));
108 return *this;
109 }
111
113
116 inline long long GetLastModified() const { return m_lastModified; }
117 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
118 inline void SetLastModified(long long value) {
119 m_lastModifiedHasBeenSet = true;
120 m_lastModified = value;
121 }
122 inline QueryDefinition& WithLastModified(long long value) {
123 SetLastModified(value);
124 return *this;
125 }
127
129
133 inline const Aws::Vector<Aws::String>& GetLogGroupNames() const { return m_logGroupNames; }
134 inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; }
135 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
136 void SetLogGroupNames(LogGroupNamesT&& value) {
137 m_logGroupNamesHasBeenSet = true;
138 m_logGroupNames = std::forward<LogGroupNamesT>(value);
139 }
140 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
141 QueryDefinition& WithLogGroupNames(LogGroupNamesT&& value) {
142 SetLogGroupNames(std::forward<LogGroupNamesT>(value));
143 return *this;
144 }
145 template <typename LogGroupNamesT = Aws::String>
146 QueryDefinition& AddLogGroupNames(LogGroupNamesT&& value) {
147 m_logGroupNamesHasBeenSet = true;
148 m_logGroupNames.emplace_back(std::forward<LogGroupNamesT>(value));
149 return *this;
150 }
152 private:
153 QueryLanguage m_queryLanguage{QueryLanguage::NOT_SET};
154
155 Aws::String m_queryDefinitionId;
156
157 Aws::String m_name;
158
159 Aws::String m_queryString;
160
161 long long m_lastModified{0};
162
163 Aws::Vector<Aws::String> m_logGroupNames;
164 bool m_queryLanguageHasBeenSet = false;
165 bool m_queryDefinitionIdHasBeenSet = false;
166 bool m_nameHasBeenSet = false;
167 bool m_queryStringHasBeenSet = false;
168 bool m_lastModifiedHasBeenSet = false;
169 bool m_logGroupNamesHasBeenSet = false;
170};
171
172} // namespace Model
173} // namespace CloudWatchLogs
174} // namespace Aws
QueryDefinition & WithLogGroupNames(LogGroupNamesT &&value)
const Aws::String & GetQueryDefinitionId() const
QueryDefinition & WithQueryLanguage(QueryLanguage value)
QueryDefinition & WithLastModified(long long value)
const Aws::String & GetQueryString() const
AWS_CLOUDWATCHLOGS_API QueryDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetLogGroupNames() const
void SetQueryDefinitionId(QueryDefinitionIdT &&value)
QueryDefinition & WithQueryDefinitionId(QueryDefinitionIdT &&value)
AWS_CLOUDWATCHLOGS_API QueryDefinition()=default
QueryDefinition & AddLogGroupNames(LogGroupNamesT &&value)
QueryDefinition & WithQueryString(QueryStringT &&value)
void SetLogGroupNames(LogGroupNamesT &&value)
AWS_CLOUDWATCHLOGS_API QueryDefinition(Aws::Utils::Json::JsonView jsonValue)
QueryDefinition & WithName(NameT &&value)
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue