AWS SDK for C++

AWS SDK for C++ Version 1.11.788

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#include <aws/logs/model/QueryParameter.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CloudWatchLogs {
23namespace Model {
24
32 public:
33 AWS_CLOUDWATCHLOGS_API QueryDefinition() = default;
34 AWS_CLOUDWATCHLOGS_API QueryDefinition(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDWATCHLOGS_API QueryDefinition& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
45 inline QueryLanguage GetQueryLanguage() const { return m_queryLanguage; }
46 inline bool QueryLanguageHasBeenSet() const { return m_queryLanguageHasBeenSet; }
47 inline void SetQueryLanguage(QueryLanguage value) {
48 m_queryLanguageHasBeenSet = true;
49 m_queryLanguage = value;
50 }
52 SetQueryLanguage(value);
53 return *this;
54 }
56
58
61 inline const Aws::String& GetQueryDefinitionId() const { return m_queryDefinitionId; }
62 inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; }
63 template <typename QueryDefinitionIdT = Aws::String>
64 void SetQueryDefinitionId(QueryDefinitionIdT&& value) {
65 m_queryDefinitionIdHasBeenSet = true;
66 m_queryDefinitionId = std::forward<QueryDefinitionIdT>(value);
67 }
68 template <typename QueryDefinitionIdT = Aws::String>
69 QueryDefinition& WithQueryDefinitionId(QueryDefinitionIdT&& value) {
70 SetQueryDefinitionId(std::forward<QueryDefinitionIdT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetName() const { return m_name; }
80 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
81 template <typename NameT = Aws::String>
82 void SetName(NameT&& value) {
83 m_nameHasBeenSet = true;
84 m_name = std::forward<NameT>(value);
85 }
86 template <typename NameT = Aws::String>
87 QueryDefinition& WithName(NameT&& value) {
88 SetName(std::forward<NameT>(value));
89 return *this;
90 }
92
94
99 inline const Aws::String& GetQueryString() const { return m_queryString; }
100 inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; }
101 template <typename QueryStringT = Aws::String>
102 void SetQueryString(QueryStringT&& value) {
103 m_queryStringHasBeenSet = true;
104 m_queryString = std::forward<QueryStringT>(value);
105 }
106 template <typename QueryStringT = Aws::String>
107 QueryDefinition& WithQueryString(QueryStringT&& value) {
108 SetQueryString(std::forward<QueryStringT>(value));
109 return *this;
110 }
112
114
117 inline long long GetLastModified() const { return m_lastModified; }
118 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
119 inline void SetLastModified(long long value) {
120 m_lastModifiedHasBeenSet = true;
121 m_lastModified = value;
122 }
123 inline QueryDefinition& WithLastModified(long long value) {
124 SetLastModified(value);
125 return *this;
126 }
128
130
134 inline const Aws::Vector<Aws::String>& GetLogGroupNames() const { return m_logGroupNames; }
135 inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; }
136 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
137 void SetLogGroupNames(LogGroupNamesT&& value) {
138 m_logGroupNamesHasBeenSet = true;
139 m_logGroupNames = std::forward<LogGroupNamesT>(value);
140 }
141 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
142 QueryDefinition& WithLogGroupNames(LogGroupNamesT&& value) {
143 SetLogGroupNames(std::forward<LogGroupNamesT>(value));
144 return *this;
145 }
146 template <typename LogGroupNamesT = Aws::String>
147 QueryDefinition& AddLogGroupNames(LogGroupNamesT&& value) {
148 m_logGroupNamesHasBeenSet = true;
149 m_logGroupNames.emplace_back(std::forward<LogGroupNamesT>(value));
150 return *this;
151 }
153
155
159 inline const Aws::Vector<QueryParameter>& GetParameters() const { return m_parameters; }
160 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
161 template <typename ParametersT = Aws::Vector<QueryParameter>>
162 void SetParameters(ParametersT&& value) {
163 m_parametersHasBeenSet = true;
164 m_parameters = std::forward<ParametersT>(value);
165 }
166 template <typename ParametersT = Aws::Vector<QueryParameter>>
167 QueryDefinition& WithParameters(ParametersT&& value) {
168 SetParameters(std::forward<ParametersT>(value));
169 return *this;
170 }
171 template <typename ParametersT = QueryParameter>
172 QueryDefinition& AddParameters(ParametersT&& value) {
173 m_parametersHasBeenSet = true;
174 m_parameters.emplace_back(std::forward<ParametersT>(value));
175 return *this;
176 }
178 private:
179 QueryLanguage m_queryLanguage{QueryLanguage::NOT_SET};
180
181 Aws::String m_queryDefinitionId;
182
183 Aws::String m_name;
184
185 Aws::String m_queryString;
186
187 long long m_lastModified{0};
188
189 Aws::Vector<Aws::String> m_logGroupNames;
190
191 Aws::Vector<QueryParameter> m_parameters;
192 bool m_queryLanguageHasBeenSet = false;
193 bool m_queryDefinitionIdHasBeenSet = false;
194 bool m_nameHasBeenSet = false;
195 bool m_queryStringHasBeenSet = false;
196 bool m_lastModifiedHasBeenSet = false;
197 bool m_logGroupNamesHasBeenSet = false;
198 bool m_parametersHasBeenSet = false;
199};
200
201} // namespace Model
202} // namespace CloudWatchLogs
203} // namespace Aws
QueryDefinition & AddParameters(ParametersT &&value)
QueryDefinition & WithLogGroupNames(LogGroupNamesT &&value)
const Aws::String & GetQueryDefinitionId() const
QueryDefinition & WithQueryLanguage(QueryLanguage value)
QueryDefinition & WithLastModified(long long value)
QueryDefinition & WithParameters(ParametersT &&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)
const Aws::Vector< QueryParameter > & GetParameters() const
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