AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Message.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/ConversationRole.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/bedrock-runtime/model/ContentBlock.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace BedrockRuntime
24{
25namespace Model
26{
27
37 class Message
38 {
39 public:
40 AWS_BEDROCKRUNTIME_API Message();
41 AWS_BEDROCKRUNTIME_API Message(Aws::Utils::Json::JsonView jsonValue);
42 AWS_BEDROCKRUNTIME_API Message& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
50 inline const ConversationRole& GetRole() const{ return m_role; }
51 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
52 inline void SetRole(const ConversationRole& value) { m_roleHasBeenSet = true; m_role = value; }
53 inline void SetRole(ConversationRole&& value) { m_roleHasBeenSet = true; m_role = std::move(value); }
54 inline Message& WithRole(const ConversationRole& value) { SetRole(value); return *this;}
55 inline Message& WithRole(ConversationRole&& value) { SetRole(std::move(value)); return *this;}
57
59
70 inline const Aws::Vector<ContentBlock>& GetContent() const{ return m_content; }
71 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
72 inline void SetContent(const Aws::Vector<ContentBlock>& value) { m_contentHasBeenSet = true; m_content = value; }
73 inline void SetContent(Aws::Vector<ContentBlock>&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
74 inline Message& WithContent(const Aws::Vector<ContentBlock>& value) { SetContent(value); return *this;}
75 inline Message& WithContent(Aws::Vector<ContentBlock>&& value) { SetContent(std::move(value)); return *this;}
76 inline Message& AddContent(const ContentBlock& value) { m_contentHasBeenSet = true; m_content.push_back(value); return *this; }
77 inline Message& AddContent(ContentBlock&& value) { m_contentHasBeenSet = true; m_content.push_back(std::move(value)); return *this; }
79 private:
80
81 ConversationRole m_role;
82 bool m_roleHasBeenSet = false;
83
85 bool m_contentHasBeenSet = false;
86 };
87
88} // namespace Model
89} // namespace BedrockRuntime
90} // namespace Aws
const Aws::Vector< ContentBlock > & GetContent() const
Definition Message.h:70
void SetContent(const Aws::Vector< ContentBlock > &value)
Definition Message.h:72
Message & WithContent(Aws::Vector< ContentBlock > &&value)
Definition Message.h:75
void SetRole(const ConversationRole &value)
Definition Message.h:52
Message & AddContent(ContentBlock &&value)
Definition Message.h:77
const ConversationRole & GetRole() const
Definition Message.h:50
Message & WithContent(const Aws::Vector< ContentBlock > &value)
Definition Message.h:74
AWS_BEDROCKRUNTIME_API Message & operator=(Aws::Utils::Json::JsonView jsonValue)
Message & WithRole(ConversationRole &&value)
Definition Message.h:55
AWS_BEDROCKRUNTIME_API Message(Aws::Utils::Json::JsonView jsonValue)
void SetRole(ConversationRole &&value)
Definition Message.h:53
Message & WithRole(const ConversationRole &value)
Definition Message.h:54
AWS_BEDROCKRUNTIME_API Message()
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
Message & AddContent(const ContentBlock &value)
Definition Message.h:76
void SetContent(Aws::Vector< ContentBlock > &&value)
Definition Message.h:73
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue