AWS SDK for C++

AWS SDK for C++ Version 1.11.849

Loading...
Searching...
No Matches
KnowledgeBaseRetrievalResult.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/RetrievalResultContent.h>
9#include <aws/bedrock-agent-runtime/model/RetrievalResultLocation.h>
10#include <aws/core/utils/Document.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace BedrockAgentRuntime {
24namespace Model {
25
36 public:
37 AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult() = default;
40 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const RetrievalResultContent& GetContent() const { return m_content; }
47 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
48 template <typename ContentT = RetrievalResultContent>
49 void SetContent(ContentT&& value) {
50 m_contentHasBeenSet = true;
51 m_content = std::forward<ContentT>(value);
52 }
53 template <typename ContentT = RetrievalResultContent>
55 SetContent(std::forward<ContentT>(value));
56 return *this;
57 }
59
61
65 inline const Aws::String& GetDocumentId() const { return m_documentId; }
66 inline bool DocumentIdHasBeenSet() const { return m_documentIdHasBeenSet; }
67 template <typename DocumentIdT = Aws::String>
68 void SetDocumentId(DocumentIdT&& value) {
69 m_documentIdHasBeenSet = true;
70 m_documentId = std::forward<DocumentIdT>(value);
71 }
72 template <typename DocumentIdT = Aws::String>
74 SetDocumentId(std::forward<DocumentIdT>(value));
75 return *this;
76 }
78
80
83 inline const RetrievalResultLocation& GetLocation() const { return m_location; }
84 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
85 template <typename LocationT = RetrievalResultLocation>
86 void SetLocation(LocationT&& value) {
87 m_locationHasBeenSet = true;
88 m_location = std::forward<LocationT>(value);
89 }
90 template <typename LocationT = RetrievalResultLocation>
92 SetLocation(std::forward<LocationT>(value));
93 return *this;
94 }
96
98
104 inline const Aws::Map<Aws::String, Aws::Utils::Document>& GetMetadata() const { return m_metadata; }
105 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
106 template <typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
107 void SetMetadata(MetadataT&& value) {
108 m_metadataHasBeenSet = true;
109 m_metadata = std::forward<MetadataT>(value);
110 }
111 template <typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
113 SetMetadata(std::forward<MetadataT>(value));
114 return *this;
115 }
116 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::Utils::Document>
118 m_metadataHasBeenSet = true;
119 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
120 return *this;
121 }
123
125
128 inline double GetScore() const { return m_score; }
129 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
130 inline void SetScore(double value) {
131 m_scoreHasBeenSet = true;
132 m_score = value;
133 }
135 SetScore(value);
136 return *this;
137 }
139 private:
140 RetrievalResultContent m_content;
141
142 Aws::String m_documentId;
143
144 RetrievalResultLocation m_location;
145
147
148 double m_score{0.0};
149 bool m_contentHasBeenSet = false;
150 bool m_documentIdHasBeenSet = false;
151 bool m_locationHasBeenSet = false;
152 bool m_metadataHasBeenSet = false;
153 bool m_scoreHasBeenSet = false;
154};
155
156} // namespace Model
157} // namespace BedrockAgentRuntime
158} // namespace Aws
AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult()=default
const Aws::Map< Aws::String, Aws::Utils::Document > & GetMetadata() const
KnowledgeBaseRetrievalResult & WithDocumentId(DocumentIdT &&value)
AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult & operator=(Aws::Utils::Json::JsonView jsonValue)
KnowledgeBaseRetrievalResult & WithLocation(LocationT &&value)
KnowledgeBaseRetrievalResult & WithMetadata(MetadataT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
KnowledgeBaseRetrievalResult & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue