AWS SDK for C++

AWS SDK for C++ Version 1.11.938

Loading...
Searching...
No Matches
LogGroup.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/DataProtectionStatus.h>
11#include <aws/logs/model/InheritedProperty.h>
12#include <aws/logs/model/LogGroupClass.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CloudWatchLogs {
24namespace Model {
25
31class LogGroup {
32 public:
33 AWS_CLOUDWATCHLOGS_API LogGroup() = default;
34 AWS_CLOUDWATCHLOGS_API LogGroup(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDWATCHLOGS_API LogGroup& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
43 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
44 template <typename LogGroupNameT = Aws::String>
45 void SetLogGroupName(LogGroupNameT&& value) {
46 m_logGroupNameHasBeenSet = true;
47 m_logGroupName = std::forward<LogGroupNameT>(value);
48 }
49 template <typename LogGroupNameT = Aws::String>
50 LogGroup& WithLogGroupName(LogGroupNameT&& value) {
51 SetLogGroupName(std::forward<LogGroupNameT>(value));
52 return *this;
53 }
55
57
61 inline long long GetCreationTime() const { return m_creationTime; }
62 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
63 inline void SetCreationTime(long long value) {
64 m_creationTimeHasBeenSet = true;
65 m_creationTime = value;
66 }
67 inline LogGroup& WithCreationTime(long long value) {
68 SetCreationTime(value);
69 return *this;
70 }
72
74
75 inline int GetRetentionInDays() const { return m_retentionInDays; }
76 inline bool RetentionInDaysHasBeenSet() const { return m_retentionInDaysHasBeenSet; }
77 inline void SetRetentionInDays(int value) {
78 m_retentionInDaysHasBeenSet = true;
79 m_retentionInDays = value;
80 }
81 inline LogGroup& WithRetentionInDays(int value) {
82 SetRetentionInDays(value);
83 return *this;
84 }
86
88
91 inline int GetMetricFilterCount() const { return m_metricFilterCount; }
92 inline bool MetricFilterCountHasBeenSet() const { return m_metricFilterCountHasBeenSet; }
93 inline void SetMetricFilterCount(int value) {
94 m_metricFilterCountHasBeenSet = true;
95 m_metricFilterCount = value;
96 }
97 inline LogGroup& WithMetricFilterCount(int value) {
99 return *this;
100 }
102
104
117 inline const Aws::String& GetArn() const { return m_arn; }
118 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
119 template <typename ArnT = Aws::String>
120 void SetArn(ArnT&& value) {
121 m_arnHasBeenSet = true;
122 m_arn = std::forward<ArnT>(value);
123 }
124 template <typename ArnT = Aws::String>
125 LogGroup& WithArn(ArnT&& value) {
126 SetArn(std::forward<ArnT>(value));
127 return *this;
128 }
130
132
135 inline long long GetStoredBytes() const { return m_storedBytes; }
136 inline bool StoredBytesHasBeenSet() const { return m_storedBytesHasBeenSet; }
137 inline void SetStoredBytes(long long value) {
138 m_storedBytesHasBeenSet = true;
139 m_storedBytes = value;
140 }
141 inline LogGroup& WithStoredBytes(long long value) {
142 SetStoredBytes(value);
143 return *this;
144 }
146
148
152 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
153 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
154 template <typename KmsKeyIdT = Aws::String>
155 void SetKmsKeyId(KmsKeyIdT&& value) {
156 m_kmsKeyIdHasBeenSet = true;
157 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
158 }
159 template <typename KmsKeyIdT = Aws::String>
160 LogGroup& WithKmsKeyId(KmsKeyIdT&& value) {
161 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
162 return *this;
163 }
165
167
172 inline DataProtectionStatus GetDataProtectionStatus() const { return m_dataProtectionStatus; }
173 inline bool DataProtectionStatusHasBeenSet() const { return m_dataProtectionStatusHasBeenSet; }
175 m_dataProtectionStatusHasBeenSet = true;
176 m_dataProtectionStatus = value;
177 }
180 return *this;
181 }
183
185
189 inline const Aws::Vector<InheritedProperty>& GetInheritedProperties() const { return m_inheritedProperties; }
190 inline bool InheritedPropertiesHasBeenSet() const { return m_inheritedPropertiesHasBeenSet; }
191 template <typename InheritedPropertiesT = Aws::Vector<InheritedProperty>>
192 void SetInheritedProperties(InheritedPropertiesT&& value) {
193 m_inheritedPropertiesHasBeenSet = true;
194 m_inheritedProperties = std::forward<InheritedPropertiesT>(value);
195 }
196 template <typename InheritedPropertiesT = Aws::Vector<InheritedProperty>>
197 LogGroup& WithInheritedProperties(InheritedPropertiesT&& value) {
198 SetInheritedProperties(std::forward<InheritedPropertiesT>(value));
199 return *this;
200 }
202 m_inheritedPropertiesHasBeenSet = true;
203 m_inheritedProperties.push_back(value);
204 return *this;
205 }
207
209
225 inline LogGroupClass GetLogGroupClass() const { return m_logGroupClass; }
226 inline bool LogGroupClassHasBeenSet() const { return m_logGroupClassHasBeenSet; }
227 inline void SetLogGroupClass(LogGroupClass value) {
228 m_logGroupClassHasBeenSet = true;
229 m_logGroupClass = value;
230 }
232 SetLogGroupClass(value);
233 return *this;
234 }
236
238
252 inline const Aws::String& GetLogGroupArn() const { return m_logGroupArn; }
253 inline bool LogGroupArnHasBeenSet() const { return m_logGroupArnHasBeenSet; }
254 template <typename LogGroupArnT = Aws::String>
255 void SetLogGroupArn(LogGroupArnT&& value) {
256 m_logGroupArnHasBeenSet = true;
257 m_logGroupArn = std::forward<LogGroupArnT>(value);
258 }
259 template <typename LogGroupArnT = Aws::String>
260 LogGroup& WithLogGroupArn(LogGroupArnT&& value) {
261 SetLogGroupArn(std::forward<LogGroupArnT>(value));
262 return *this;
263 }
265
267
272 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
273 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
274 inline void SetDeletionProtectionEnabled(bool value) {
275 m_deletionProtectionEnabledHasBeenSet = true;
276 m_deletionProtectionEnabled = value;
277 }
280 return *this;
281 }
283
285
290 inline bool GetBearerTokenAuthenticationEnabled() const { return m_bearerTokenAuthenticationEnabled; }
291 inline bool BearerTokenAuthenticationEnabledHasBeenSet() const { return m_bearerTokenAuthenticationEnabledHasBeenSet; }
292 inline void SetBearerTokenAuthenticationEnabled(bool value) {
293 m_bearerTokenAuthenticationEnabledHasBeenSet = true;
294 m_bearerTokenAuthenticationEnabled = value;
295 }
298 return *this;
299 }
301
303
311 inline const Aws::String& GetRetentionPolicyName() const { return m_retentionPolicyName; }
312 inline bool RetentionPolicyNameHasBeenSet() const { return m_retentionPolicyNameHasBeenSet; }
313 template <typename RetentionPolicyNameT = Aws::String>
314 void SetRetentionPolicyName(RetentionPolicyNameT&& value) {
315 m_retentionPolicyNameHasBeenSet = true;
316 m_retentionPolicyName = std::forward<RetentionPolicyNameT>(value);
317 }
318 template <typename RetentionPolicyNameT = Aws::String>
319 LogGroup& WithRetentionPolicyName(RetentionPolicyNameT&& value) {
320 SetRetentionPolicyName(std::forward<RetentionPolicyNameT>(value));
321 return *this;
322 }
324 private:
325 Aws::String m_logGroupName;
326
327 long long m_creationTime{0};
328
329 int m_retentionInDays{0};
330
331 int m_metricFilterCount{0};
332
333 Aws::String m_arn;
334
335 long long m_storedBytes{0};
336
337 Aws::String m_kmsKeyId;
338
340
341 Aws::Vector<InheritedProperty> m_inheritedProperties;
342
343 LogGroupClass m_logGroupClass{LogGroupClass::NOT_SET};
344
345 Aws::String m_logGroupArn;
346
347 bool m_deletionProtectionEnabled{false};
348
349 bool m_bearerTokenAuthenticationEnabled{false};
350
351 Aws::String m_retentionPolicyName;
352 bool m_logGroupNameHasBeenSet = false;
353 bool m_creationTimeHasBeenSet = false;
354 bool m_retentionInDaysHasBeenSet = false;
355 bool m_metricFilterCountHasBeenSet = false;
356 bool m_arnHasBeenSet = false;
357 bool m_storedBytesHasBeenSet = false;
358 bool m_kmsKeyIdHasBeenSet = false;
359 bool m_dataProtectionStatusHasBeenSet = false;
360 bool m_inheritedPropertiesHasBeenSet = false;
361 bool m_logGroupClassHasBeenSet = false;
362 bool m_logGroupArnHasBeenSet = false;
363 bool m_deletionProtectionEnabledHasBeenSet = false;
364 bool m_bearerTokenAuthenticationEnabledHasBeenSet = false;
365 bool m_retentionPolicyNameHasBeenSet = false;
366};
367
368} // namespace Model
369} // namespace CloudWatchLogs
370} // namespace Aws
LogGroup & WithLogGroupClass(LogGroupClass value)
Definition LogGroup.h:231
void SetLogGroupArn(LogGroupArnT &&value)
Definition LogGroup.h:255
LogGroup & WithLogGroupArn(LogGroupArnT &&value)
Definition LogGroup.h:260
void SetLogGroupClass(LogGroupClass value)
Definition LogGroup.h:227
long long GetCreationTime() const
Definition LogGroup.h:61
void SetInheritedProperties(InheritedPropertiesT &&value)
Definition LogGroup.h:192
AWS_CLOUDWATCHLOGS_API LogGroup()=default
const Aws::String & GetKmsKeyId() const
Definition LogGroup.h:152
const Aws::String & GetArn() const
Definition LogGroup.h:117
LogGroup & WithDataProtectionStatus(DataProtectionStatus value)
Definition LogGroup.h:178
LogGroup & WithArn(ArnT &&value)
Definition LogGroup.h:125
const Aws::Vector< InheritedProperty > & GetInheritedProperties() const
Definition LogGroup.h:189
void SetLogGroupName(LogGroupNameT &&value)
Definition LogGroup.h:45
const Aws::String & GetLogGroupName() const
Definition LogGroup.h:42
LogGroup & WithBearerTokenAuthenticationEnabled(bool value)
Definition LogGroup.h:296
LogGroup & WithRetentionInDays(int value)
Definition LogGroup.h:81
bool GetBearerTokenAuthenticationEnabled() const
Definition LogGroup.h:290
LogGroup & AddInheritedProperties(InheritedProperty value)
Definition LogGroup.h:201
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
bool BearerTokenAuthenticationEnabledHasBeenSet() const
Definition LogGroup.h:291
void SetBearerTokenAuthenticationEnabled(bool value)
Definition LogGroup.h:292
void SetDeletionProtectionEnabled(bool value)
Definition LogGroup.h:274
void SetRetentionPolicyName(RetentionPolicyNameT &&value)
Definition LogGroup.h:314
void SetStoredBytes(long long value)
Definition LogGroup.h:137
LogGroup & WithLogGroupName(LogGroupNameT &&value)
Definition LogGroup.h:50
LogGroup & WithCreationTime(long long value)
Definition LogGroup.h:67
const Aws::String & GetRetentionPolicyName() const
Definition LogGroup.h:311
void SetKmsKeyId(KmsKeyIdT &&value)
Definition LogGroup.h:155
const Aws::String & GetLogGroupArn() const
Definition LogGroup.h:252
LogGroup & WithMetricFilterCount(int value)
Definition LogGroup.h:97
LogGroup & WithStoredBytes(long long value)
Definition LogGroup.h:141
void SetCreationTime(long long value)
Definition LogGroup.h:63
void SetDataProtectionStatus(DataProtectionStatus value)
Definition LogGroup.h:174
bool DeletionProtectionEnabledHasBeenSet() const
Definition LogGroup.h:273
AWS_CLOUDWATCHLOGS_API LogGroup & operator=(Aws::Utils::Json::JsonView jsonValue)
LogGroup & WithRetentionPolicyName(RetentionPolicyNameT &&value)
Definition LogGroup.h:319
LogGroup & WithDeletionProtectionEnabled(bool value)
Definition LogGroup.h:278
AWS_CLOUDWATCHLOGS_API LogGroup(Aws::Utils::Json::JsonView jsonValue)
LogGroupClass GetLogGroupClass() const
Definition LogGroup.h:225
DataProtectionStatus GetDataProtectionStatus() const
Definition LogGroup.h:172
LogGroup & WithKmsKeyId(KmsKeyIdT &&value)
Definition LogGroup.h:160
LogGroup & WithInheritedProperties(InheritedPropertiesT &&value)
Definition LogGroup.h:197
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue