AWS SDK for C++

AWS SDK for C++ Version 1.11.609

Loading...
Searching...
No Matches
ApplyGuardrailRequest.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/BedrockRuntimeRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/bedrock-runtime/model/GuardrailContentSource.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/bedrock-runtime/model/GuardrailOutputScope.h>
13#include <aws/bedrock-runtime/model/GuardrailContentBlock.h>
14#include <utility>
15
16namespace Aws
17{
18namespace BedrockRuntime
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_BEDROCKRUNTIME_API ApplyGuardrailRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "ApplyGuardrail"; }
35
36 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
37
38
40
43 inline const Aws::String& GetGuardrailIdentifier() const { return m_guardrailIdentifier; }
44 inline bool GuardrailIdentifierHasBeenSet() const { return m_guardrailIdentifierHasBeenSet; }
45 template<typename GuardrailIdentifierT = Aws::String>
46 void SetGuardrailIdentifier(GuardrailIdentifierT&& value) { m_guardrailIdentifierHasBeenSet = true; m_guardrailIdentifier = std::forward<GuardrailIdentifierT>(value); }
47 template<typename GuardrailIdentifierT = Aws::String>
48 ApplyGuardrailRequest& WithGuardrailIdentifier(GuardrailIdentifierT&& value) { SetGuardrailIdentifier(std::forward<GuardrailIdentifierT>(value)); return *this;}
50
52
55 inline const Aws::String& GetGuardrailVersion() const { return m_guardrailVersion; }
56 inline bool GuardrailVersionHasBeenSet() const { return m_guardrailVersionHasBeenSet; }
57 template<typename GuardrailVersionT = Aws::String>
58 void SetGuardrailVersion(GuardrailVersionT&& value) { m_guardrailVersionHasBeenSet = true; m_guardrailVersion = std::forward<GuardrailVersionT>(value); }
59 template<typename GuardrailVersionT = Aws::String>
60 ApplyGuardrailRequest& WithGuardrailVersion(GuardrailVersionT&& value) { SetGuardrailVersion(std::forward<GuardrailVersionT>(value)); return *this;}
62
64
67 inline GuardrailContentSource GetSource() const { return m_source; }
68 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
69 inline void SetSource(GuardrailContentSource value) { m_sourceHasBeenSet = true; m_source = value; }
70 inline ApplyGuardrailRequest& WithSource(GuardrailContentSource value) { SetSource(value); return *this;}
72
74
77 inline const Aws::Vector<GuardrailContentBlock>& GetContent() const { return m_content; }
78 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
79 template<typename ContentT = Aws::Vector<GuardrailContentBlock>>
80 void SetContent(ContentT&& value) { m_contentHasBeenSet = true; m_content = std::forward<ContentT>(value); }
81 template<typename ContentT = Aws::Vector<GuardrailContentBlock>>
82 ApplyGuardrailRequest& WithContent(ContentT&& value) { SetContent(std::forward<ContentT>(value)); return *this;}
83 template<typename ContentT = GuardrailContentBlock>
84 ApplyGuardrailRequest& AddContent(ContentT&& value) { m_contentHasBeenSet = true; m_content.emplace_back(std::forward<ContentT>(value)); return *this; }
86
88
97 inline GuardrailOutputScope GetOutputScope() const { return m_outputScope; }
98 inline bool OutputScopeHasBeenSet() const { return m_outputScopeHasBeenSet; }
99 inline void SetOutputScope(GuardrailOutputScope value) { m_outputScopeHasBeenSet = true; m_outputScope = value; }
102 private:
103
104 Aws::String m_guardrailIdentifier;
105 bool m_guardrailIdentifierHasBeenSet = false;
106
107 Aws::String m_guardrailVersion;
108 bool m_guardrailVersionHasBeenSet = false;
109
111 bool m_sourceHasBeenSet = false;
112
114 bool m_contentHasBeenSet = false;
115
117 bool m_outputScopeHasBeenSet = false;
118 };
119
120} // namespace Model
121} // namespace BedrockRuntime
122} // 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::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector