AWS SDK for C++

AWS SDK for C++ Version 1.11.787

Loading...
Searching...
No Matches
PutQueryDefinitionRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/logs/CloudWatchLogsRequest.h>
11#include <aws/logs/CloudWatchLogs_EXPORTS.h>
12#include <aws/logs/model/QueryLanguage.h>
13#include <aws/logs/model/QueryParameter.h>
14
15#include <utility>
16
17namespace Aws {
18namespace CloudWatchLogs {
19namespace Model {
20
24 public:
25 AWS_CLOUDWATCHLOGS_API PutQueryDefinitionRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "PutQueryDefinition"; }
32
33 AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override;
34
35 AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36
38
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
65 inline const Aws::String& GetName() const { return m_name; }
66 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
67 template <typename NameT = Aws::String>
68 void SetName(NameT&& value) {
69 m_nameHasBeenSet = true;
70 m_name = std::forward<NameT>(value);
71 }
72 template <typename NameT = Aws::String>
74 SetName(std::forward<NameT>(value));
75 return *this;
76 }
78
80
89 inline const Aws::String& GetQueryDefinitionId() const { return m_queryDefinitionId; }
90 inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; }
91 template <typename QueryDefinitionIdT = Aws::String>
92 void SetQueryDefinitionId(QueryDefinitionIdT&& value) {
93 m_queryDefinitionIdHasBeenSet = true;
94 m_queryDefinitionId = std::forward<QueryDefinitionIdT>(value);
95 }
96 template <typename QueryDefinitionIdT = Aws::String>
97 PutQueryDefinitionRequest& WithQueryDefinitionId(QueryDefinitionIdT&& value) {
98 SetQueryDefinitionId(std::forward<QueryDefinitionIdT>(value));
99 return *this;
100 }
102
104
112 inline const Aws::Vector<Aws::String>& GetLogGroupNames() const { return m_logGroupNames; }
113 inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; }
114 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
115 void SetLogGroupNames(LogGroupNamesT&& value) {
116 m_logGroupNamesHasBeenSet = true;
117 m_logGroupNames = std::forward<LogGroupNamesT>(value);
118 }
119 template <typename LogGroupNamesT = Aws::Vector<Aws::String>>
121 SetLogGroupNames(std::forward<LogGroupNamesT>(value));
122 return *this;
123 }
124 template <typename LogGroupNamesT = Aws::String>
126 m_logGroupNamesHasBeenSet = true;
127 m_logGroupNames.emplace_back(std::forward<LogGroupNamesT>(value));
128 return *this;
129 }
131
133
138 inline const Aws::String& GetQueryString() const { return m_queryString; }
139 inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; }
140 template <typename QueryStringT = Aws::String>
141 void SetQueryString(QueryStringT&& value) {
142 m_queryStringHasBeenSet = true;
143 m_queryString = std::forward<QueryStringT>(value);
144 }
145 template <typename QueryStringT = Aws::String>
147 SetQueryString(std::forward<QueryStringT>(value));
148 return *this;
149 }
151
153
157 inline const Aws::String& GetClientToken() const { return m_clientToken; }
158 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
159 template <typename ClientTokenT = Aws::String>
160 void SetClientToken(ClientTokenT&& value) {
161 m_clientTokenHasBeenSet = true;
162 m_clientToken = std::forward<ClientTokenT>(value);
163 }
164 template <typename ClientTokenT = Aws::String>
166 SetClientToken(std::forward<ClientTokenT>(value));
167 return *this;
168 }
170
172
180 inline const Aws::Vector<QueryParameter>& GetParameters() const { return m_parameters; }
181 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
182 template <typename ParametersT = Aws::Vector<QueryParameter>>
183 void SetParameters(ParametersT&& value) {
184 m_parametersHasBeenSet = true;
185 m_parameters = std::forward<ParametersT>(value);
186 }
187 template <typename ParametersT = Aws::Vector<QueryParameter>>
189 SetParameters(std::forward<ParametersT>(value));
190 return *this;
191 }
192 template <typename ParametersT = QueryParameter>
194 m_parametersHasBeenSet = true;
195 m_parameters.emplace_back(std::forward<ParametersT>(value));
196 return *this;
197 }
199 private:
200 QueryLanguage m_queryLanguage{QueryLanguage::NOT_SET};
201
202 Aws::String m_name;
203
204 Aws::String m_queryDefinitionId;
205
206 Aws::Vector<Aws::String> m_logGroupNames;
207
208 Aws::String m_queryString;
209
211
212 Aws::Vector<QueryParameter> m_parameters;
213 bool m_queryLanguageHasBeenSet = false;
214 bool m_nameHasBeenSet = false;
215 bool m_queryDefinitionIdHasBeenSet = false;
216 bool m_logGroupNamesHasBeenSet = false;
217 bool m_queryStringHasBeenSet = false;
218 bool m_clientTokenHasBeenSet = true;
219 bool m_parametersHasBeenSet = false;
220};
221
222} // namespace Model
223} // namespace CloudWatchLogs
224} // namespace Aws
PutQueryDefinitionRequest & WithLogGroupNames(LogGroupNamesT &&value)
AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutQueryDefinitionRequest & WithName(NameT &&value)
AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override
const Aws::Vector< QueryParameter > & GetParameters() const
PutQueryDefinitionRequest & AddParameters(ParametersT &&value)
PutQueryDefinitionRequest & AddLogGroupNames(LogGroupNamesT &&value)
PutQueryDefinitionRequest & WithClientToken(ClientTokenT &&value)
PutQueryDefinitionRequest & WithQueryDefinitionId(QueryDefinitionIdT &&value)
PutQueryDefinitionRequest & WithQueryLanguage(QueryLanguage value)
AWS_CLOUDWATCHLOGS_API PutQueryDefinitionRequest()=default
const Aws::Vector< Aws::String > & GetLogGroupNames() const
PutQueryDefinitionRequest & WithQueryString(QueryStringT &&value)
PutQueryDefinitionRequest & WithParameters(ParametersT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector