AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
ActiveContext.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/lexv2-runtime/LexRuntimeV2_EXPORTS.h>
10#include <aws/lexv2-runtime/model/ActiveContextTimeToLive.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace LexRuntimeV2 {
22namespace Model {
23
36 public:
37 AWS_LEXRUNTIMEV2_API ActiveContext() = default;
38 AWS_LEXRUNTIMEV2_API ActiveContext(Aws::Utils::Json::JsonView jsonValue);
39 AWS_LEXRUNTIMEV2_API ActiveContext& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
54 ActiveContext& WithName(NameT&& value) {
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
65 inline const ActiveContextTimeToLive& GetTimeToLive() const { return m_timeToLive; }
66 inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; }
67 template <typename TimeToLiveT = ActiveContextTimeToLive>
68 void SetTimeToLive(TimeToLiveT&& value) {
69 m_timeToLiveHasBeenSet = true;
70 m_timeToLive = std::forward<TimeToLiveT>(value);
71 }
72 template <typename TimeToLiveT = ActiveContextTimeToLive>
73 ActiveContext& WithTimeToLive(TimeToLiveT&& value) {
74 SetTimeToLive(std::forward<TimeToLiveT>(value));
75 return *this;
76 }
78
80
87 inline const Aws::Map<Aws::String, Aws::String>& GetContextAttributes() const { return m_contextAttributes; }
88 inline bool ContextAttributesHasBeenSet() const { return m_contextAttributesHasBeenSet; }
89 template <typename ContextAttributesT = Aws::Map<Aws::String, Aws::String>>
90 void SetContextAttributes(ContextAttributesT&& value) {
91 m_contextAttributesHasBeenSet = true;
92 m_contextAttributes = std::forward<ContextAttributesT>(value);
93 }
94 template <typename ContextAttributesT = Aws::Map<Aws::String, Aws::String>>
95 ActiveContext& WithContextAttributes(ContextAttributesT&& value) {
96 SetContextAttributes(std::forward<ContextAttributesT>(value));
97 return *this;
98 }
99 template <typename ContextAttributesKeyT = Aws::String, typename ContextAttributesValueT = Aws::String>
100 ActiveContext& AddContextAttributes(ContextAttributesKeyT&& key, ContextAttributesValueT&& value) {
101 m_contextAttributesHasBeenSet = true;
102 m_contextAttributes.emplace(std::forward<ContextAttributesKeyT>(key), std::forward<ContextAttributesValueT>(value));
103 return *this;
104 }
106 private:
107 Aws::String m_name;
108
109 ActiveContextTimeToLive m_timeToLive;
110
111 Aws::Map<Aws::String, Aws::String> m_contextAttributes;
112 bool m_nameHasBeenSet = false;
113 bool m_timeToLiveHasBeenSet = false;
114 bool m_contextAttributesHasBeenSet = false;
115};
116
117} // namespace Model
118} // namespace LexRuntimeV2
119} // namespace Aws
AWS_LEXRUNTIMEV2_API ActiveContext()=default
const ActiveContextTimeToLive & GetTimeToLive() const
const Aws::String & GetName() const
ActiveContext & WithTimeToLive(TimeToLiveT &&value)
const Aws::Map< Aws::String, Aws::String > & GetContextAttributes() const
ActiveContext & WithContextAttributes(ContextAttributesT &&value)
void SetTimeToLive(TimeToLiveT &&value)
void SetContextAttributes(ContextAttributesT &&value)
ActiveContext & WithName(NameT &&value)
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
ActiveContext & AddContextAttributes(ContextAttributesKeyT &&key, ContextAttributesValueT &&value)
AWS_LEXRUNTIMEV2_API ActiveContext & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_LEXRUNTIMEV2_API ActiveContext(Aws::Utils::Json::JsonView jsonValue)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue