AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ContentBlock.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/bedrock-runtime/model/ImageBlock.h>
10#include <aws/bedrock-runtime/model/DocumentBlock.h>
11#include <aws/bedrock-runtime/model/ToolUseBlock.h>
12#include <aws/bedrock-runtime/model/ToolResultBlock.h>
13#include <aws/bedrock-runtime/model/GuardrailConverseContentBlock.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace BedrockRuntime
27{
28namespace Model
29{
30
42 {
43 public:
44 AWS_BEDROCKRUNTIME_API ContentBlock();
45 AWS_BEDROCKRUNTIME_API ContentBlock(Aws::Utils::Json::JsonView jsonValue);
46 AWS_BEDROCKRUNTIME_API ContentBlock& operator=(Aws::Utils::Json::JsonView jsonValue);
47 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
48
49
51
54 inline const Aws::String& GetText() const{ return m_text; }
55 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
56 inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
57 inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
58 inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
59 inline ContentBlock& WithText(const Aws::String& value) { SetText(value); return *this;}
60 inline ContentBlock& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
61 inline ContentBlock& WithText(const char* value) { SetText(value); return *this;}
63
65
69 inline const ImageBlock& GetImage() const{ return m_image; }
70 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
71 inline void SetImage(const ImageBlock& value) { m_imageHasBeenSet = true; m_image = value; }
72 inline void SetImage(ImageBlock&& value) { m_imageHasBeenSet = true; m_image = std::move(value); }
73 inline ContentBlock& WithImage(const ImageBlock& value) { SetImage(value); return *this;}
74 inline ContentBlock& WithImage(ImageBlock&& value) { SetImage(std::move(value)); return *this;}
76
78
81 inline const DocumentBlock& GetDocument() const{ return m_document; }
82 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
83 inline void SetDocument(const DocumentBlock& value) { m_documentHasBeenSet = true; m_document = value; }
84 inline void SetDocument(DocumentBlock&& value) { m_documentHasBeenSet = true; m_document = std::move(value); }
85 inline ContentBlock& WithDocument(const DocumentBlock& value) { SetDocument(value); return *this;}
86 inline ContentBlock& WithDocument(DocumentBlock&& value) { SetDocument(std::move(value)); return *this;}
88
90
93 inline const ToolUseBlock& GetToolUse() const{ return m_toolUse; }
94 inline bool ToolUseHasBeenSet() const { return m_toolUseHasBeenSet; }
95 inline void SetToolUse(const ToolUseBlock& value) { m_toolUseHasBeenSet = true; m_toolUse = value; }
96 inline void SetToolUse(ToolUseBlock&& value) { m_toolUseHasBeenSet = true; m_toolUse = std::move(value); }
97 inline ContentBlock& WithToolUse(const ToolUseBlock& value) { SetToolUse(value); return *this;}
98 inline ContentBlock& WithToolUse(ToolUseBlock&& value) { SetToolUse(std::move(value)); return *this;}
100
102
105 inline const ToolResultBlock& GetToolResult() const{ return m_toolResult; }
106 inline bool ToolResultHasBeenSet() const { return m_toolResultHasBeenSet; }
107 inline void SetToolResult(const ToolResultBlock& value) { m_toolResultHasBeenSet = true; m_toolResult = value; }
108 inline void SetToolResult(ToolResultBlock&& value) { m_toolResultHasBeenSet = true; m_toolResult = std::move(value); }
109 inline ContentBlock& WithToolResult(const ToolResultBlock& value) { SetToolResult(value); return *this;}
110 inline ContentBlock& WithToolResult(ToolResultBlock&& value) { SetToolResult(std::move(value)); return *this;}
112
114
121 inline const GuardrailConverseContentBlock& GetGuardContent() const{ return m_guardContent; }
122 inline bool GuardContentHasBeenSet() const { return m_guardContentHasBeenSet; }
123 inline void SetGuardContent(const GuardrailConverseContentBlock& value) { m_guardContentHasBeenSet = true; m_guardContent = value; }
124 inline void SetGuardContent(GuardrailConverseContentBlock&& value) { m_guardContentHasBeenSet = true; m_guardContent = std::move(value); }
125 inline ContentBlock& WithGuardContent(const GuardrailConverseContentBlock& value) { SetGuardContent(value); return *this;}
126 inline ContentBlock& WithGuardContent(GuardrailConverseContentBlock&& value) { SetGuardContent(std::move(value)); return *this;}
128 private:
129
130 Aws::String m_text;
131 bool m_textHasBeenSet = false;
132
133 ImageBlock m_image;
134 bool m_imageHasBeenSet = false;
135
136 DocumentBlock m_document;
137 bool m_documentHasBeenSet = false;
138
139 ToolUseBlock m_toolUse;
140 bool m_toolUseHasBeenSet = false;
141
142 ToolResultBlock m_toolResult;
143 bool m_toolResultHasBeenSet = false;
144
145 GuardrailConverseContentBlock m_guardContent;
146 bool m_guardContentHasBeenSet = false;
147 };
148
149} // namespace Model
150} // namespace BedrockRuntime
151} // namespace Aws
ContentBlock & WithToolResult(ToolResultBlock &&value)
ContentBlock & WithToolResult(const ToolResultBlock &value)
void SetToolUse(const ToolUseBlock &value)
void SetToolResult(const ToolResultBlock &value)
const GuardrailConverseContentBlock & GetGuardContent() const
const Aws::String & GetText() const
ContentBlock & WithText(const Aws::String &value)
ContentBlock & WithDocument(DocumentBlock &&value)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
ContentBlock & WithImage(const ImageBlock &value)
const ToolUseBlock & GetToolUse() const
AWS_BEDROCKRUNTIME_API ContentBlock & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetText(Aws::String &&value)
AWS_BEDROCKRUNTIME_API ContentBlock(Aws::Utils::Json::JsonView jsonValue)
ContentBlock & WithGuardContent(GuardrailConverseContentBlock &&value)
ContentBlock & WithText(const char *value)
ContentBlock & WithText(Aws::String &&value)
void SetDocument(DocumentBlock &&value)
const DocumentBlock & GetDocument() const
void SetGuardContent(GuardrailConverseContentBlock &&value)
void SetImage(const ImageBlock &value)
const ImageBlock & GetImage() const
ContentBlock & WithToolUse(const ToolUseBlock &value)
void SetDocument(const DocumentBlock &value)
void SetToolResult(ToolResultBlock &&value)
ContentBlock & WithGuardContent(const GuardrailConverseContentBlock &value)
ContentBlock & WithDocument(const DocumentBlock &value)
void SetGuardContent(const GuardrailConverseContentBlock &value)
AWS_BEDROCKRUNTIME_API ContentBlock()
void SetToolUse(ToolUseBlock &&value)
ContentBlock & WithImage(ImageBlock &&value)
void SetText(const Aws::String &value)
ContentBlock & WithToolUse(ToolUseBlock &&value)
const ToolResultBlock & GetToolResult() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue