AWS SDK for C++

AWS SDK for C++ Version 1.11.900

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
90 inline const Aws::Vector<LogMetadata>& GetLogs() const { return m_logs; }
91 inline bool LogsHasBeenSet() const { return m_logsHasBeenSet; }
92 template <typename LogsT = Aws::Vector<LogMetadata>>
93 void SetLogs(LogsT&& value) {
94 m_logsHasBeenSet = true;
95 m_logs = std::forward<LogsT>(value);
96 }
97 template <typename LogsT = Aws::Vector<LogMetadata>>
98 Metadata& WithLogs(LogsT&& value) {
99 SetLogs(std::forward<LogsT>(value));
100 return *this;
101 }
102 template <typename LogsT = LogMetadata>
103 Metadata& AddLogs(LogsT&& value) {
104 m_logsHasBeenSet = true;
105 m_logs.emplace_back(std::forward<LogsT>(value));
106 return *this;
107 }
109
111
116 inline const Aws::Vector<TraceMetadata>& GetTraces() const { return m_traces; }
117 inline bool TracesHasBeenSet() const { return m_tracesHasBeenSet; }
118 template <typename TracesT = Aws::Vector<TraceMetadata>>
119 void SetTraces(TracesT&& value) {
120 m_tracesHasBeenSet = true;
121 m_traces = std::forward<TracesT>(value);
122 }
123 template <typename TracesT = Aws::Vector<TraceMetadata>>
124 Metadata& WithTraces(TracesT&& value) {
125 SetTraces(std::forward<TracesT>(value));
126 return *this;
127 }
128 template <typename TracesT = TraceMetadata>
129 Metadata& AddTraces(TracesT&& value) {
130 m_tracesHasBeenSet = true;
131 m_traces.emplace_back(std::forward<TracesT>(value));
132 return *this;
133 }
135 private:
137
138 NodeSemantics m_semantics;
139
141
143 bool m_metricsHasBeenSet = false;
144 bool m_semanticsHasBeenSet = false;
145 bool m_logsHasBeenSet = false;
146 bool m_tracesHasBeenSet = false;
147};
148
149} // namespace Model
150} // namespace CloudWatchOmni
151} // 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:90
Metadata & WithSemantics(SemanticsT &&value)
Definition Metadata.h:77
Metadata & WithMetrics(MetricsT &&value)
Definition Metadata.h:52
Metadata & AddLogs(LogsT &&value)
Definition Metadata.h:103
void SetTraces(TracesT &&value)
Definition Metadata.h:119
Metadata & WithLogs(LogsT &&value)
Definition Metadata.h:98
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:116
Metadata & AddTraces(TracesT &&value)
Definition Metadata.h:129
Metadata & WithTraces(TracesT &&value)
Definition Metadata.h:124
void SetSemantics(SemanticsT &&value)
Definition Metadata.h:72
std::vector< T, Aws::Allocator< T > > Vector