AWS SDK for C++

AWS SDK for C++ Version 1.11.937

Loading...
Searching...
No Matches
Metadata.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
8#include <aws/cloudwatchomni/model/LogMetadata.h>
9#include <aws/cloudwatchomni/model/MetricMetadata.h>
10#include <aws/cloudwatchomni/model/NodeSemantics.h>
11#include <aws/cloudwatchomni/model/TraceMetadata.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/crt/cbor/Cbor.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Cbor {
20class CborValue;
21} // namespace Cbor
22} // namespace Utils
23namespace CloudWatchOmni {
24namespace Model {
25
33class Metadata {
34 public:
35 AWS_CLOUDWATCHOMNI_API Metadata() = default;
36 AWS_CLOUDWATCHOMNI_API Metadata(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_CLOUDWATCHOMNI_API Metadata& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
39
41
44 inline const Aws::Vector<MetricMetadata>& GetMetrics() const { return m_metrics; }
45 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
46 template <typename MetricsT = Aws::Vector<MetricMetadata>>
47 void SetMetrics(MetricsT&& value) {
48 m_metricsHasBeenSet = true;
49 m_metrics = std::forward<MetricsT>(value);
50 }
51 template <typename MetricsT = Aws::Vector<MetricMetadata>>
52 Metadata& WithMetrics(MetricsT&& value) {
53 SetMetrics(std::forward<MetricsT>(value));
54 return *this;
55 }
56 template <typename MetricsT = MetricMetadata>
57 Metadata& AddMetrics(MetricsT&& value) {
58 m_metricsHasBeenSet = true;
59 m_metrics.emplace_back(std::forward<MetricsT>(value));
60 return *this;
61 }
63
65
69 inline const NodeSemantics& GetSemantics() const { return m_semantics; }
70 inline bool SemanticsHasBeenSet() const { return m_semanticsHasBeenSet; }
71 template <typename SemanticsT = NodeSemantics>
72 void SetSemantics(SemanticsT&& value) {
73 m_semanticsHasBeenSet = true;
74 m_semantics = std::forward<SemanticsT>(value);
75 }
76 template <typename SemanticsT = NodeSemantics>
77 Metadata& WithSemantics(SemanticsT&& value) {
78 SetSemantics(std::forward<SemanticsT>(value));
79 return *this;
80 }
82
84
89 inline const Aws::Vector<LogMetadata>& GetLogs() const { return m_logs; }
90 inline bool LogsHasBeenSet() const { return m_logsHasBeenSet; }
91 template <typename LogsT = Aws::Vector<LogMetadata>>
92 void SetLogs(LogsT&& value) {
93 m_logsHasBeenSet = true;
94 m_logs = std::forward<LogsT>(value);
95 }
96 template <typename LogsT = Aws::Vector<LogMetadata>>
97 Metadata& WithLogs(LogsT&& value) {
98 SetLogs(std::forward<LogsT>(value));
99 return *this;
100 }
101 template <typename LogsT = LogMetadata>
102 Metadata& AddLogs(LogsT&& value) {
103 m_logsHasBeenSet = true;
104 m_logs.emplace_back(std::forward<LogsT>(value));
105 return *this;
106 }
108
110
114 inline const Aws::Vector<TraceMetadata>& GetTraces() const { return m_traces; }
115 inline bool TracesHasBeenSet() const { return m_tracesHasBeenSet; }
116 template <typename TracesT = Aws::Vector<TraceMetadata>>
117 void SetTraces(TracesT&& value) {
118 m_tracesHasBeenSet = true;
119 m_traces = std::forward<TracesT>(value);
120 }
121 template <typename TracesT = Aws::Vector<TraceMetadata>>
122 Metadata& WithTraces(TracesT&& value) {
123 SetTraces(std::forward<TracesT>(value));
124 return *this;
125 }
126 template <typename TracesT = TraceMetadata>
127 Metadata& AddTraces(TracesT&& value) {
128 m_tracesHasBeenSet = true;
129 m_traces.emplace_back(std::forward<TracesT>(value));
130 return *this;
131 }
133 private:
135
136 NodeSemantics m_semantics;
137
139
141 bool m_metricsHasBeenSet = false;
142 bool m_semanticsHasBeenSet = false;
143 bool m_logsHasBeenSet = false;
144 bool m_tracesHasBeenSet = false;
145};
146
147} // namespace Model
148} // namespace CloudWatchOmni
149} // namespace Aws
AWS_CLOUDWATCHOMNI_API Metadata(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_CLOUDWATCHOMNI_API Metadata()=default
const Aws::Vector< MetricMetadata > & GetMetrics() const
Definition Metadata.h:44
void SetMetrics(MetricsT &&value)
Definition Metadata.h:47
Metadata & AddMetrics(MetricsT &&value)
Definition Metadata.h:57
const Aws::Vector< LogMetadata > & GetLogs() const
Definition Metadata.h:89
Metadata & WithSemantics(SemanticsT &&value)
Definition Metadata.h:77
Metadata & WithMetrics(MetricsT &&value)
Definition Metadata.h:52
Metadata & AddLogs(LogsT &&value)
Definition Metadata.h:102
void SetTraces(TracesT &&value)
Definition Metadata.h:117
Metadata & WithLogs(LogsT &&value)
Definition Metadata.h:97
const NodeSemantics & GetSemantics() const
Definition Metadata.h:69
AWS_CLOUDWATCHOMNI_API Metadata & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::Vector< TraceMetadata > & GetTraces() const
Definition Metadata.h:114
Metadata & AddTraces(TracesT &&value)
Definition Metadata.h:127
Metadata & WithTraces(TracesT &&value)
Definition Metadata.h:122
void SetSemantics(SemanticsT &&value)
Definition Metadata.h:72
std::vector< T, Aws::Allocator< T > > Vector