AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
Slot.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/core/utils/memory/stl/AWSVector.h>
10#include <aws/lexv2-runtime/LexRuntimeV2_EXPORTS.h>
11#include <aws/lexv2-runtime/model/Shape.h>
12#include <aws/lexv2-runtime/model/Value.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace LexRuntimeV2 {
24namespace Model {
25
32class Slot {
33 public:
34 AWS_LEXRUNTIMEV2_API Slot() = default;
35 AWS_LEXRUNTIMEV2_API Slot(Aws::Utils::Json::JsonView jsonValue);
36 AWS_LEXRUNTIMEV2_API Slot& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Value& GetValue() const { return m_value; }
44 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
45 template <typename ValueT = Value>
46 void SetValue(ValueT&& value) {
47 m_valueHasBeenSet = true;
48 m_value = std::forward<ValueT>(value);
49 }
50 template <typename ValueT = Value>
51 Slot& WithValue(ValueT&& value) {
52 SetValue(std::forward<ValueT>(value));
53 return *this;
54 }
56
58
64 inline Shape GetShape() const { return m_shape; }
65 inline bool ShapeHasBeenSet() const { return m_shapeHasBeenSet; }
66 inline void SetShape(Shape value) {
67 m_shapeHasBeenSet = true;
68 m_shape = value;
69 }
70 inline Slot& WithShape(Shape value) {
71 SetShape(value);
72 return *this;
73 }
75
77
82 inline const Aws::Vector<Slot>& GetValues() const { return m_values; }
83 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
84 template <typename ValuesT = Aws::Vector<Slot>>
85 void SetValues(ValuesT&& value) {
86 m_valuesHasBeenSet = true;
87 m_values = std::forward<ValuesT>(value);
88 }
89 template <typename ValuesT = Aws::Vector<Slot>>
90 Slot& WithValues(ValuesT&& value) {
91 SetValues(std::forward<ValuesT>(value));
92 return *this;
93 }
94 template <typename ValuesT = Slot>
95 Slot& AddValues(ValuesT&& value) {
96 m_valuesHasBeenSet = true;
97 m_values.emplace_back(std::forward<ValuesT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::Map<Aws::String, Slot>& GetSubSlots() const { return m_subSlots; }
107 inline bool SubSlotsHasBeenSet() const { return m_subSlotsHasBeenSet; }
108 template <typename SubSlotsT = Aws::Map<Aws::String, Slot>>
109 void SetSubSlots(SubSlotsT&& value) {
110 m_subSlotsHasBeenSet = true;
111 m_subSlots = std::forward<SubSlotsT>(value);
112 }
113 template <typename SubSlotsT = Aws::Map<Aws::String, Slot>>
114 Slot& WithSubSlots(SubSlotsT&& value) {
115 SetSubSlots(std::forward<SubSlotsT>(value));
116 return *this;
117 }
118 template <typename SubSlotsKeyT = Aws::String, typename SubSlotsValueT = Slot>
119 Slot& AddSubSlots(SubSlotsKeyT&& key, SubSlotsValueT&& value) {
120 m_subSlotsHasBeenSet = true;
121 m_subSlots.emplace(std::forward<SubSlotsKeyT>(key), std::forward<SubSlotsValueT>(value));
122 return *this;
123 }
125 private:
126 Value m_value;
127
128 Shape m_shape{Shape::NOT_SET};
129
130 Aws::Vector<Slot> m_values;
131
133 bool m_valueHasBeenSet = false;
134 bool m_shapeHasBeenSet = false;
135 bool m_valuesHasBeenSet = false;
136 bool m_subSlotsHasBeenSet = false;
137};
138
139} // namespace Model
140} // namespace LexRuntimeV2
141} // namespace Aws
bool SubSlotsHasBeenSet() const
Definition Slot.h:107
Slot & WithValue(ValueT &&value)
Definition Slot.h:51
const Value & GetValue() const
Definition Slot.h:43
AWS_LEXRUNTIMEV2_API Slot & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetValues(ValuesT &&value)
Definition Slot.h:85
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
bool ShapeHasBeenSet() const
Definition Slot.h:65
void SetShape(Shape value)
Definition Slot.h:66
const Aws::Vector< Slot > & GetValues() const
Definition Slot.h:82
Slot & AddSubSlots(SubSlotsKeyT &&key, SubSlotsValueT &&value)
Definition Slot.h:119
bool ValueHasBeenSet() const
Definition Slot.h:44
Slot & WithValues(ValuesT &&value)
Definition Slot.h:90
Shape GetShape() const
Definition Slot.h:64
AWS_LEXRUNTIMEV2_API Slot(Aws::Utils::Json::JsonView jsonValue)
bool ValuesHasBeenSet() const
Definition Slot.h:83
void SetSubSlots(SubSlotsT &&value)
Definition Slot.h:109
Slot & WithSubSlots(SubSlotsT &&value)
Definition Slot.h:114
void SetValue(ValueT &&value)
Definition Slot.h:46
Slot & AddValues(ValuesT &&value)
Definition Slot.h:95
AWS_LEXRUNTIMEV2_API Slot()=default
const Aws::Map< Aws::String, Slot > & GetSubSlots() const
Definition Slot.h:106
Slot & WithShape(Shape value)
Definition Slot.h:70
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue