AWS SDK for C++

AWS SDK for C++ Version 1.11.682

Loading...
Searching...
No Matches
GuardrailWordPolicy.h
1
6#pragma once
7#include <aws/bedrock/Bedrock_EXPORTS.h>
8#include <aws/bedrock/model/GuardrailManagedWords.h>
9#include <aws/bedrock/model/GuardrailWord.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Bedrock {
22namespace Model {
23
31 public:
32 AWS_BEDROCK_API GuardrailWordPolicy() = default;
35 AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::Vector<GuardrailWord>& GetWords() const { return m_words; }
42 inline bool WordsHasBeenSet() const { return m_wordsHasBeenSet; }
43 template <typename WordsT = Aws::Vector<GuardrailWord>>
44 void SetWords(WordsT&& value) {
45 m_wordsHasBeenSet = true;
46 m_words = std::forward<WordsT>(value);
47 }
48 template <typename WordsT = Aws::Vector<GuardrailWord>>
49 GuardrailWordPolicy& WithWords(WordsT&& value) {
50 SetWords(std::forward<WordsT>(value));
51 return *this;
52 }
53 template <typename WordsT = GuardrailWord>
54 GuardrailWordPolicy& AddWords(WordsT&& value) {
55 m_wordsHasBeenSet = true;
56 m_words.emplace_back(std::forward<WordsT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Vector<GuardrailManagedWords>& GetManagedWordLists() const { return m_managedWordLists; }
66 inline bool ManagedWordListsHasBeenSet() const { return m_managedWordListsHasBeenSet; }
67 template <typename ManagedWordListsT = Aws::Vector<GuardrailManagedWords>>
68 void SetManagedWordLists(ManagedWordListsT&& value) {
69 m_managedWordListsHasBeenSet = true;
70 m_managedWordLists = std::forward<ManagedWordListsT>(value);
71 }
72 template <typename ManagedWordListsT = Aws::Vector<GuardrailManagedWords>>
73 GuardrailWordPolicy& WithManagedWordLists(ManagedWordListsT&& value) {
74 SetManagedWordLists(std::forward<ManagedWordListsT>(value));
75 return *this;
76 }
77 template <typename ManagedWordListsT = GuardrailManagedWords>
78 GuardrailWordPolicy& AddManagedWordLists(ManagedWordListsT&& value) {
79 m_managedWordListsHasBeenSet = true;
80 m_managedWordLists.emplace_back(std::forward<ManagedWordListsT>(value));
81 return *this;
82 }
84 private:
86 bool m_wordsHasBeenSet = false;
87
88 Aws::Vector<GuardrailManagedWords> m_managedWordLists;
89 bool m_managedWordListsHasBeenSet = false;
90};
91
92} // namespace Model
93} // namespace Bedrock
94} // namespace Aws
AWS_BEDROCK_API GuardrailWordPolicy(Aws::Utils::Json::JsonView jsonValue)
GuardrailWordPolicy & WithManagedWordLists(ManagedWordListsT &&value)
void SetManagedWordLists(ManagedWordListsT &&value)
GuardrailWordPolicy & AddManagedWordLists(ManagedWordListsT &&value)
GuardrailWordPolicy & WithWords(WordsT &&value)
AWS_BEDROCK_API GuardrailWordPolicy()=default
GuardrailWordPolicy & AddWords(WordsT &&value)
const Aws::Vector< GuardrailWord > & GetWords() const
const Aws::Vector< GuardrailManagedWords > & GetManagedWordLists() const
AWS_BEDROCK_API GuardrailWordPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue