AWS SDK for C++

AWS SDK for C++ Version 1.11.933

Loading...
Searching...
No Matches
Context.h
1
6#pragma once
7#include <aws/bedrock-agentcore/BedrockAgentCore_EXPORTS.h>
8#include <aws/bedrock-agentcore/model/SpanContext.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace BedrockAgentCore {
20namespace Model {
21
29class Context {
30 public:
31 AWS_BEDROCKAGENTCORE_API Context() = default;
32 AWS_BEDROCKAGENTCORE_API Context(Aws::Utils::Json::JsonView jsonValue);
33 AWS_BEDROCKAGENTCORE_API Context& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
42 inline const SpanContext& GetSpanContext() const { return m_spanContext; }
43 inline bool SpanContextHasBeenSet() const { return m_spanContextHasBeenSet; }
44 template <typename SpanContextT = SpanContext>
45 void SetSpanContext(SpanContextT&& value) {
46 m_spanContextHasBeenSet = true;
47 m_spanContext = std::forward<SpanContextT>(value);
48 }
49 template <typename SpanContextT = SpanContext>
50 Context& WithSpanContext(SpanContextT&& value) {
51 SetSpanContext(std::forward<SpanContextT>(value));
52 return *this;
53 }
55 private:
56 SpanContext m_spanContext;
57 bool m_spanContextHasBeenSet = false;
58};
59
60} // namespace Model
61} // namespace BedrockAgentCore
62} // namespace Aws
Context & WithSpanContext(SpanContextT &&value)
Definition Context.h:50
AWS_BEDROCKAGENTCORE_API Context & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKAGENTCORE_API Context()=default
AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const
const SpanContext & GetSpanContext() const
Definition Context.h:42
void SetSpanContext(SpanContextT &&value)
Definition Context.h:45
AWS_BEDROCKAGENTCORE_API Context(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue JsonValue