AWS SDK for C++

AWS SDK for C++ Version 1.11.747

Loading...
Searching...
No Matches
ApplyGuardrailRequest.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntimeRequest.h>
8#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
9#include <aws/bedrock-runtime/model/GuardrailContentBlock.h>
10#include <aws/bedrock-runtime/model/GuardrailContentSource.h>
11#include <aws/bedrock-runtime/model/GuardrailOutputScope.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace BedrockRuntime {
19namespace Model {
20
24 public:
25 AWS_BEDROCKRUNTIME_API ApplyGuardrailRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ApplyGuardrail"; }
32
33 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
34
36
39 inline const Aws::String& GetGuardrailIdentifier() const { return m_guardrailIdentifier; }
40 inline bool GuardrailIdentifierHasBeenSet() const { return m_guardrailIdentifierHasBeenSet; }
41 template <typename GuardrailIdentifierT = Aws::String>
43 m_guardrailIdentifierHasBeenSet = true;
44 m_guardrailIdentifier = std::forward<GuardrailIdentifierT>(value);
45 }
46 template <typename GuardrailIdentifierT = Aws::String>
48 SetGuardrailIdentifier(std::forward<GuardrailIdentifierT>(value));
49 return *this;
50 }
52
54
57 inline const Aws::String& GetGuardrailVersion() const { return m_guardrailVersion; }
58 inline bool GuardrailVersionHasBeenSet() const { return m_guardrailVersionHasBeenSet; }
59 template <typename GuardrailVersionT = Aws::String>
61 m_guardrailVersionHasBeenSet = true;
62 m_guardrailVersion = std::forward<GuardrailVersionT>(value);
63 }
64 template <typename GuardrailVersionT = Aws::String>
66 SetGuardrailVersion(std::forward<GuardrailVersionT>(value));
67 return *this;
68 }
70
72
75 inline GuardrailContentSource GetSource() const { return m_source; }
76 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
77 inline void SetSource(GuardrailContentSource value) {
78 m_sourceHasBeenSet = true;
79 m_source = value;
80 }
82 SetSource(value);
83 return *this;
84 }
86
88
91 inline const Aws::Vector<GuardrailContentBlock>& GetContent() const { return m_content; }
92 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
93 template <typename ContentT = Aws::Vector<GuardrailContentBlock>>
94 void SetContent(ContentT&& value) {
95 m_contentHasBeenSet = true;
96 m_content = std::forward<ContentT>(value);
97 }
98 template <typename ContentT = Aws::Vector<GuardrailContentBlock>>
100 SetContent(std::forward<ContentT>(value));
101 return *this;
102 }
103 template <typename ContentT = GuardrailContentBlock>
105 m_contentHasBeenSet = true;
106 m_content.emplace_back(std::forward<ContentT>(value));
107 return *this;
108 }
110
112
121 inline GuardrailOutputScope GetOutputScope() const { return m_outputScope; }
122 inline bool OutputScopeHasBeenSet() const { return m_outputScopeHasBeenSet; }
124 m_outputScopeHasBeenSet = true;
125 m_outputScope = value;
126 }
128 SetOutputScope(value);
129 return *this;
130 }
132 private:
133 Aws::String m_guardrailIdentifier;
134
135 Aws::String m_guardrailVersion;
136
138
140
142 bool m_guardrailIdentifierHasBeenSet = false;
143 bool m_guardrailVersionHasBeenSet = false;
144 bool m_sourceHasBeenSet = false;
145 bool m_contentHasBeenSet = false;
146 bool m_outputScopeHasBeenSet = false;
147};
148
149} // namespace Model
150} // namespace BedrockRuntime
151} // namespace Aws
ApplyGuardrailRequest & AddContent(ContentT &&value)
ApplyGuardrailRequest & WithGuardrailVersion(GuardrailVersionT &&value)
ApplyGuardrailRequest & WithGuardrailIdentifier(GuardrailIdentifierT &&value)
ApplyGuardrailRequest & WithOutputScope(GuardrailOutputScope value)
virtual const char * GetServiceRequestName() const override
ApplyGuardrailRequest & WithSource(GuardrailContentSource value)
AWS_BEDROCKRUNTIME_API ApplyGuardrailRequest()=default
AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override
const Aws::Vector< GuardrailContentBlock > & GetContent() const
void SetGuardrailIdentifier(GuardrailIdentifierT &&value)
ApplyGuardrailRequest & WithContent(ContentT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector