AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
RetrievedTrace.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/xray/XRay_EXPORTS.h>
10#include <aws/xray/model/Span.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace XRay {
22namespace Model {
23
31 public:
32 AWS_XRAY_API RetrievedTrace() = default;
36
38
41 inline const Aws::String& GetId() const { return m_id; }
42 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
43 template <typename IdT = Aws::String>
44 void SetId(IdT&& value) {
45 m_idHasBeenSet = true;
46 m_id = std::forward<IdT>(value);
47 }
48 template <typename IdT = Aws::String>
49 RetrievedTrace& WithId(IdT&& value) {
50 SetId(std::forward<IdT>(value));
51 return *this;
52 }
54
56
60 inline double GetDuration() const { return m_duration; }
61 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
62 inline void SetDuration(double value) {
63 m_durationHasBeenSet = true;
64 m_duration = value;
65 }
66 inline RetrievedTrace& WithDuration(double value) {
67 SetDuration(value);
68 return *this;
69 }
71
73
76 inline const Aws::Vector<Span>& GetSpans() const { return m_spans; }
77 inline bool SpansHasBeenSet() const { return m_spansHasBeenSet; }
78 template <typename SpansT = Aws::Vector<Span>>
79 void SetSpans(SpansT&& value) {
80 m_spansHasBeenSet = true;
81 m_spans = std::forward<SpansT>(value);
82 }
83 template <typename SpansT = Aws::Vector<Span>>
84 RetrievedTrace& WithSpans(SpansT&& value) {
85 SetSpans(std::forward<SpansT>(value));
86 return *this;
87 }
88 template <typename SpansT = Span>
89 RetrievedTrace& AddSpans(SpansT&& value) {
90 m_spansHasBeenSet = true;
91 m_spans.emplace_back(std::forward<SpansT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_id;
97
98 double m_duration{0.0};
99
100 Aws::Vector<Span> m_spans;
101 bool m_idHasBeenSet = false;
102 bool m_durationHasBeenSet = false;
103 bool m_spansHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace XRay
108} // namespace Aws
RetrievedTrace & WithDuration(double value)
RetrievedTrace & WithId(IdT &&value)
AWS_XRAY_API RetrievedTrace()=default
const Aws::String & GetId() const
const Aws::Vector< Span > & GetSpans() const
RetrievedTrace & AddSpans(SpansT &&value)
RetrievedTrace & WithSpans(SpansT &&value)
AWS_XRAY_API RetrievedTrace(Aws::Utils::Json::JsonView jsonValue)
AWS_XRAY_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_XRAY_API RetrievedTrace & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue