AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
PromptSpecification.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lexv2-models/LexModelsV2_EXPORTS.h>
10#include <aws/lexv2-models/model/MessageGroup.h>
11#include <aws/lexv2-models/model/MessageSelectionStrategy.h>
12#include <aws/lexv2-models/model/PromptAttempt.h>
13#include <aws/lexv2-models/model/PromptAttemptSpecification.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace LexModelsV2 {
25namespace Model {
26
34 public:
35 AWS_LEXMODELSV2_API PromptSpecification() = default;
36 AWS_LEXMODELSV2_API PromptSpecification(Aws::Utils::Json::JsonView jsonValue);
38 AWS_LEXMODELSV2_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline const Aws::Vector<MessageGroup>& GetMessageGroups() const { return m_messageGroups; }
46 inline bool MessageGroupsHasBeenSet() const { return m_messageGroupsHasBeenSet; }
47 template <typename MessageGroupsT = Aws::Vector<MessageGroup>>
48 void SetMessageGroups(MessageGroupsT&& value) {
49 m_messageGroupsHasBeenSet = true;
50 m_messageGroups = std::forward<MessageGroupsT>(value);
51 }
52 template <typename MessageGroupsT = Aws::Vector<MessageGroup>>
53 PromptSpecification& WithMessageGroups(MessageGroupsT&& value) {
54 SetMessageGroups(std::forward<MessageGroupsT>(value));
55 return *this;
56 }
57 template <typename MessageGroupsT = MessageGroup>
58 PromptSpecification& AddMessageGroups(MessageGroupsT&& value) {
59 m_messageGroupsHasBeenSet = true;
60 m_messageGroups.emplace_back(std::forward<MessageGroupsT>(value));
61 return *this;
62 }
64
66
70 inline int GetMaxRetries() const { return m_maxRetries; }
71 inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
72 inline void SetMaxRetries(int value) {
73 m_maxRetriesHasBeenSet = true;
74 m_maxRetries = value;
75 }
77 SetMaxRetries(value);
78 return *this;
79 }
81
83
86 inline bool GetAllowInterrupt() const { return m_allowInterrupt; }
87 inline bool AllowInterruptHasBeenSet() const { return m_allowInterruptHasBeenSet; }
88 inline void SetAllowInterrupt(bool value) {
89 m_allowInterruptHasBeenSet = true;
90 m_allowInterrupt = value;
91 }
93 SetAllowInterrupt(value);
94 return *this;
95 }
97
99
102 inline MessageSelectionStrategy GetMessageSelectionStrategy() const { return m_messageSelectionStrategy; }
103 inline bool MessageSelectionStrategyHasBeenSet() const { return m_messageSelectionStrategyHasBeenSet; }
105 m_messageSelectionStrategyHasBeenSet = true;
106 m_messageSelectionStrategy = value;
107 }
110 return *this;
111 }
113
115
119 return m_promptAttemptsSpecification;
120 }
121 inline bool PromptAttemptsSpecificationHasBeenSet() const { return m_promptAttemptsSpecificationHasBeenSet; }
122 template <typename PromptAttemptsSpecificationT = Aws::Map<PromptAttempt, PromptAttemptSpecification>>
123 void SetPromptAttemptsSpecification(PromptAttemptsSpecificationT&& value) {
124 m_promptAttemptsSpecificationHasBeenSet = true;
125 m_promptAttemptsSpecification = std::forward<PromptAttemptsSpecificationT>(value);
126 }
127 template <typename PromptAttemptsSpecificationT = Aws::Map<PromptAttempt, PromptAttemptSpecification>>
128 PromptSpecification& WithPromptAttemptsSpecification(PromptAttemptsSpecificationT&& value) {
129 SetPromptAttemptsSpecification(std::forward<PromptAttemptsSpecificationT>(value));
130 return *this;
131 }
133 m_promptAttemptsSpecificationHasBeenSet = true;
134 m_promptAttemptsSpecification.emplace(key, value);
135 return *this;
136 }
138 private:
139 Aws::Vector<MessageGroup> m_messageGroups;
140
141 int m_maxRetries{0};
142
143 bool m_allowInterrupt{false};
144
146
147 Aws::Map<PromptAttempt, PromptAttemptSpecification> m_promptAttemptsSpecification;
148 bool m_messageGroupsHasBeenSet = false;
149 bool m_maxRetriesHasBeenSet = false;
150 bool m_allowInterruptHasBeenSet = false;
151 bool m_messageSelectionStrategyHasBeenSet = false;
152 bool m_promptAttemptsSpecificationHasBeenSet = false;
153};
154
155} // namespace Model
156} // namespace LexModelsV2
157} // namespace Aws
PromptSpecification & WithMaxRetries(int value)
PromptSpecification & WithMessageGroups(MessageGroupsT &&value)
AWS_LEXMODELSV2_API PromptSpecification(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< MessageGroup > & GetMessageGroups() const
PromptSpecification & WithMessageSelectionStrategy(MessageSelectionStrategy value)
AWS_LEXMODELSV2_API PromptSpecification()=default
AWS_LEXMODELSV2_API Aws::Utils::Json::JsonValue Jsonize() const
MessageSelectionStrategy GetMessageSelectionStrategy() const
const Aws::Map< PromptAttempt, PromptAttemptSpecification > & GetPromptAttemptsSpecification() const
PromptSpecification & AddMessageGroups(MessageGroupsT &&value)
void SetMessageSelectionStrategy(MessageSelectionStrategy value)
void SetPromptAttemptsSpecification(PromptAttemptsSpecificationT &&value)
PromptSpecification & AddPromptAttemptsSpecification(PromptAttempt key, PromptAttemptSpecification value)
AWS_LEXMODELSV2_API PromptSpecification & operator=(Aws::Utils::Json::JsonView jsonValue)
PromptSpecification & WithAllowInterrupt(bool value)
PromptSpecification & WithPromptAttemptsSpecification(PromptAttemptsSpecificationT &&value)
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