AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Message.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/ContentBlock.h>
9#include <aws/bedrock-runtime/model/ConversationRole.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 BedrockRuntime {
22namespace Model {
23
33class Message {
34 public:
35 AWS_BEDROCKRUNTIME_API Message() = default;
38 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline ConversationRole GetRole() const { return m_role; }
45 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
46 inline void SetRole(ConversationRole value) {
47 m_roleHasBeenSet = true;
48 m_role = value;
49 }
51 SetRole(value);
52 return *this;
53 }
55
57
68 inline const Aws::Vector<ContentBlock>& GetContent() const { return m_content; }
69 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
70 template <typename ContentT = Aws::Vector<ContentBlock>>
71 void SetContent(ContentT&& value) {
72 m_contentHasBeenSet = true;
73 m_content = std::forward<ContentT>(value);
74 }
75 template <typename ContentT = Aws::Vector<ContentBlock>>
77 SetContent(std::forward<ContentT>(value));
78 return *this;
79 }
80 template <typename ContentT = ContentBlock>
82 m_contentHasBeenSet = true;
83 m_content.emplace_back(std::forward<ContentT>(value));
84 return *this;
85 }
87 private:
89
91 bool m_roleHasBeenSet = false;
92 bool m_contentHasBeenSet = false;
93};
94
95} // namespace Model
96} // namespace BedrockRuntime
97} // namespace Aws
const Aws::Vector< ContentBlock > & GetContent() const
Definition Message.h:68
AWS_BEDROCKRUNTIME_API Message()=default
Message & AddContent(ContentT &&value)
Definition Message.h:81
ConversationRole GetRole() const
Definition Message.h:44
AWS_BEDROCKRUNTIME_API Message & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetContent(ContentT &&value)
Definition Message.h:71
AWS_BEDROCKRUNTIME_API Message(Aws::Utils::Json::JsonView jsonValue)
Message & WithContent(ContentT &&value)
Definition Message.h:76
void SetRole(ConversationRole value)
Definition Message.h:46
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
Message & WithRole(ConversationRole value)
Definition Message.h:50
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue