AWS SDK for C++

AWS SDK for C++ Version 1.11.759

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
64 inline const RetrievalResultLocation& GetLocation() const { return m_location; }
65 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
66 template <typename LocationT = RetrievalResultLocation>
67 void SetLocation(LocationT&& value) {
68 m_locationHasBeenSet = true;
69 m_location = std::forward<LocationT>(value);
70 }
71 template <typename LocationT = RetrievalResultLocation>
73 SetLocation(std::forward<LocationT>(value));
74 return *this;
75 }
77
79
85 inline const Aws::Map<Aws::String, Aws::Utils::Document>& GetMetadata() const { return m_metadata; }
86 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
87 template <typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
88 void SetMetadata(MetadataT&& value) {
89 m_metadataHasBeenSet = true;
90 m_metadata = std::forward<MetadataT>(value);
91 }
92 template <typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
94 SetMetadata(std::forward<MetadataT>(value));
95 return *this;
96 }
97 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::Utils::Document>
99 m_metadataHasBeenSet = true;
100 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
101 return *this;
102 }
104
106
109 inline double GetScore() const { return m_score; }
110 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
111 inline void SetScore(double value) {
112 m_scoreHasBeenSet = true;
113 m_score = value;
114 }
116 SetScore(value);
117 return *this;
118 }
120 private:
121 RetrievalResultContent m_content;
122
123 RetrievalResultLocation m_location;
124
126
127 double m_score{0.0};
128 bool m_contentHasBeenSet = false;
129 bool m_locationHasBeenSet = false;
130 bool m_metadataHasBeenSet = false;
131 bool m_scoreHasBeenSet = false;
132};
133
134} // namespace Model
135} // namespace BedrockAgentRuntime
136} // 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
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
Aws::Utils::Json::JsonValue JsonValue