AWS SDK for C++

AWS SDK for C++ Version 1.11.716

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
223 inline LogGroupClass GetLogGroupClass() const { return m_logGroupClass; }
224 inline bool LogGroupClassHasBeenSet() const { return m_logGroupClassHasBeenSet; }
225 inline void SetLogGroupClass(LogGroupClass value) {
226 m_logGroupClassHasBeenSet = true;
227 m_logGroupClass = value;
228 }
230 SetLogGroupClass(value);
231 return *this;
232 }
234
236
250 inline const Aws::String& GetLogGroupArn() const { return m_logGroupArn; }
251 inline bool LogGroupArnHasBeenSet() const { return m_logGroupArnHasBeenSet; }
252 template <typename LogGroupArnT = Aws::String>
253 void SetLogGroupArn(LogGroupArnT&& value) {
254 m_logGroupArnHasBeenSet = true;
255 m_logGroupArn = std::forward<LogGroupArnT>(value);
256 }
257 template <typename LogGroupArnT = Aws::String>
258 LogGroup& WithLogGroupArn(LogGroupArnT&& value) {
259 SetLogGroupArn(std::forward<LogGroupArnT>(value));
260 return *this;
261 }
263
265
270 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
271 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
272 inline void SetDeletionProtectionEnabled(bool value) {
273 m_deletionProtectionEnabledHasBeenSet = true;
274 m_deletionProtectionEnabled = value;
275 }
278 return *this;
279 }
281 private:
282 Aws::String m_logGroupName;
283
284 long long m_creationTime{0};
285
286 int m_retentionInDays{0};
287
288 int m_metricFilterCount{0};
289
290 Aws::String m_arn;
291
292 long long m_storedBytes{0};
293
294 Aws::String m_kmsKeyId;
295
297
298 Aws::Vector<InheritedProperty> m_inheritedProperties;
299
300 LogGroupClass m_logGroupClass{LogGroupClass::NOT_SET};
301
302 Aws::String m_logGroupArn;
303
304 bool m_deletionProtectionEnabled{false};
305 bool m_logGroupNameHasBeenSet = false;
306 bool m_creationTimeHasBeenSet = false;
307 bool m_retentionInDaysHasBeenSet = false;
308 bool m_metricFilterCountHasBeenSet = false;
309 bool m_arnHasBeenSet = false;
310 bool m_storedBytesHasBeenSet = false;
311 bool m_kmsKeyIdHasBeenSet = false;
312 bool m_dataProtectionStatusHasBeenSet = false;
313 bool m_inheritedPropertiesHasBeenSet = false;
314 bool m_logGroupClassHasBeenSet = false;
315 bool m_logGroupArnHasBeenSet = false;
316 bool m_deletionProtectionEnabledHasBeenSet = false;
317};
318
319} // namespace Model
320} // namespace CloudWatchLogs
321} // namespace Aws
LogGroup & WithLogGroupClass(LogGroupClass value)
Definition LogGroup.h:229
void SetLogGroupArn(LogGroupArnT &&value)
Definition LogGroup.h:253
LogGroup & WithLogGroupArn(LogGroupArnT &&value)
Definition LogGroup.h:258
void SetLogGroupClass(LogGroupClass value)
Definition LogGroup.h:225
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 & WithRetentionInDays(int value)
Definition LogGroup.h:81
LogGroup & AddInheritedProperties(InheritedProperty value)
Definition LogGroup.h:201
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetDeletionProtectionEnabled(bool value)
Definition LogGroup.h:272
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
void SetKmsKeyId(KmsKeyIdT &&value)
Definition LogGroup.h:155
const Aws::String & GetLogGroupArn() const
Definition LogGroup.h:250
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:271
AWS_CLOUDWATCHLOGS_API LogGroup & operator=(Aws::Utils::Json::JsonView jsonValue)
LogGroup & WithDeletionProtectionEnabled(bool value)
Definition LogGroup.h:276
AWS_CLOUDWATCHLOGS_API LogGroup(Aws::Utils::Json::JsonView jsonValue)
LogGroupClass GetLogGroupClass() const
Definition LogGroup.h:223
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