AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/GuardrailContentBlock.h>
13#include <utility>
14
15namespace Aws
16{
17namespace BedrockRuntime
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_BEDROCKRUNTIME_API ApplyGuardrailRequest();
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "ApplyGuardrail"; }
34
35 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
36
37
39
42 inline const Aws::String& GetGuardrailIdentifier() const{ return m_guardrailIdentifier; }
43 inline bool GuardrailIdentifierHasBeenSet() const { return m_guardrailIdentifierHasBeenSet; }
44 inline void SetGuardrailIdentifier(const Aws::String& value) { m_guardrailIdentifierHasBeenSet = true; m_guardrailIdentifier = value; }
45 inline void SetGuardrailIdentifier(Aws::String&& value) { m_guardrailIdentifierHasBeenSet = true; m_guardrailIdentifier = std::move(value); }
46 inline void SetGuardrailIdentifier(const char* value) { m_guardrailIdentifierHasBeenSet = true; m_guardrailIdentifier.assign(value); }
48 inline ApplyGuardrailRequest& WithGuardrailIdentifier(Aws::String&& value) { SetGuardrailIdentifier(std::move(value)); return *this;}
49 inline ApplyGuardrailRequest& WithGuardrailIdentifier(const char* value) { SetGuardrailIdentifier(value); return *this;}
51
53
56 inline const Aws::String& GetGuardrailVersion() const{ return m_guardrailVersion; }
57 inline bool GuardrailVersionHasBeenSet() const { return m_guardrailVersionHasBeenSet; }
58 inline void SetGuardrailVersion(const Aws::String& value) { m_guardrailVersionHasBeenSet = true; m_guardrailVersion = value; }
59 inline void SetGuardrailVersion(Aws::String&& value) { m_guardrailVersionHasBeenSet = true; m_guardrailVersion = std::move(value); }
60 inline void SetGuardrailVersion(const char* value) { m_guardrailVersionHasBeenSet = true; m_guardrailVersion.assign(value); }
61 inline ApplyGuardrailRequest& WithGuardrailVersion(const Aws::String& value) { SetGuardrailVersion(value); return *this;}
62 inline ApplyGuardrailRequest& WithGuardrailVersion(Aws::String&& value) { SetGuardrailVersion(std::move(value)); return *this;}
63 inline ApplyGuardrailRequest& WithGuardrailVersion(const char* value) { SetGuardrailVersion(value); return *this;}
65
67
70 inline const GuardrailContentSource& GetSource() const{ return m_source; }
71 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
72 inline void SetSource(const GuardrailContentSource& value) { m_sourceHasBeenSet = true; m_source = value; }
73 inline void SetSource(GuardrailContentSource&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); }
74 inline ApplyGuardrailRequest& WithSource(const GuardrailContentSource& value) { SetSource(value); return *this;}
75 inline ApplyGuardrailRequest& WithSource(GuardrailContentSource&& value) { SetSource(std::move(value)); return *this;}
77
79
82 inline const Aws::Vector<GuardrailContentBlock>& GetContent() const{ return m_content; }
83 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
84 inline void SetContent(const Aws::Vector<GuardrailContentBlock>& value) { m_contentHasBeenSet = true; m_content = value; }
85 inline void SetContent(Aws::Vector<GuardrailContentBlock>&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
87 inline ApplyGuardrailRequest& WithContent(Aws::Vector<GuardrailContentBlock>&& value) { SetContent(std::move(value)); return *this;}
88 inline ApplyGuardrailRequest& AddContent(const GuardrailContentBlock& value) { m_contentHasBeenSet = true; m_content.push_back(value); return *this; }
89 inline ApplyGuardrailRequest& AddContent(GuardrailContentBlock&& value) { m_contentHasBeenSet = true; m_content.push_back(std::move(value)); return *this; }
91 private:
92
93 Aws::String m_guardrailIdentifier;
94 bool m_guardrailIdentifierHasBeenSet = false;
95
96 Aws::String m_guardrailVersion;
97 bool m_guardrailVersionHasBeenSet = false;
98
100 bool m_sourceHasBeenSet = false;
101
103 bool m_contentHasBeenSet = false;
104 };
105
106} // namespace Model
107} // namespace BedrockRuntime
108} // namespace Aws
ApplyGuardrailRequest & WithContent(const Aws::Vector< GuardrailContentBlock > &value)
void SetSource(const GuardrailContentSource &value)
ApplyGuardrailRequest & WithGuardrailVersion(const char *value)
ApplyGuardrailRequest & AddContent(GuardrailContentBlock &&value)
void SetContent(Aws::Vector< GuardrailContentBlock > &&value)
ApplyGuardrailRequest & AddContent(const GuardrailContentBlock &value)
ApplyGuardrailRequest & WithGuardrailIdentifier(const Aws::String &value)
ApplyGuardrailRequest & WithSource(const GuardrailContentSource &value)
virtual const char * GetServiceRequestName() const override
ApplyGuardrailRequest & WithGuardrailIdentifier(Aws::String &&value)
void SetContent(const Aws::Vector< GuardrailContentBlock > &value)
AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override
ApplyGuardrailRequest & WithContent(Aws::Vector< GuardrailContentBlock > &&value)
ApplyGuardrailRequest & WithGuardrailIdentifier(const char *value)
const Aws::Vector< GuardrailContentBlock > & GetContent() const
ApplyGuardrailRequest & WithGuardrailVersion(Aws::String &&value)
ApplyGuardrailRequest & WithSource(GuardrailContentSource &&value)
const GuardrailContentSource & GetSource() const
ApplyGuardrailRequest & WithGuardrailVersion(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector