AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/Document.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace BedrockAgentRuntime
26{
27namespace Model
28{
29
40 {
41 public:
42 AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult() = default;
43 AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult(Aws::Utils::Json::JsonView jsonValue);
44 AWS_BEDROCKAGENTRUNTIME_API KnowledgeBaseRetrievalResult& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline const RetrievalResultContent& GetContent() const { return m_content; }
53 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
54 template<typename ContentT = RetrievalResultContent>
55 void SetContent(ContentT&& value) { m_contentHasBeenSet = true; m_content = std::forward<ContentT>(value); }
56 template<typename ContentT = RetrievalResultContent>
57 KnowledgeBaseRetrievalResult& WithContent(ContentT&& value) { SetContent(std::forward<ContentT>(value)); return *this;}
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) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
68 template<typename LocationT = RetrievalResultLocation>
69 KnowledgeBaseRetrievalResult& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
71
73
79 inline const Aws::Map<Aws::String, Aws::Utils::Document>& GetMetadata() const { return m_metadata; }
80 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
81 template<typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
82 void SetMetadata(MetadataT&& value) { m_metadataHasBeenSet = true; m_metadata = std::forward<MetadataT>(value); }
83 template<typename MetadataT = Aws::Map<Aws::String, Aws::Utils::Document>>
84 KnowledgeBaseRetrievalResult& WithMetadata(MetadataT&& value) { SetMetadata(std::forward<MetadataT>(value)); return *this;}
85 template<typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::Utils::Document>
86 KnowledgeBaseRetrievalResult& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
87 m_metadataHasBeenSet = true; m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value)); return *this;
88 }
90
92
95 inline double GetScore() const { return m_score; }
96 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
97 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; }
98 inline KnowledgeBaseRetrievalResult& WithScore(double value) { SetScore(value); return *this;}
100 private:
101
102 RetrievalResultContent m_content;
103 bool m_contentHasBeenSet = false;
104
105 RetrievalResultLocation m_location;
106 bool m_locationHasBeenSet = false;
107
109 bool m_metadataHasBeenSet = false;
110
111 double m_score{0.0};
112 bool m_scoreHasBeenSet = false;
113 };
114
115} // namespace Model
116} // namespace BedrockAgentRuntime
117} // 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::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue