AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
RerankResult.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/RerankDocument.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace BedrockAgentRuntime {
20namespace Model {
21
29 public:
30 AWS_BEDROCKAGENTRUNTIME_API RerankResult() = default;
33 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
39 inline const RerankDocument& GetDocument() const { return m_document; }
40 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
41 template <typename DocumentT = RerankDocument>
42 void SetDocument(DocumentT&& value) {
43 m_documentHasBeenSet = true;
44 m_document = std::forward<DocumentT>(value);
45 }
46 template <typename DocumentT = RerankDocument>
48 SetDocument(std::forward<DocumentT>(value));
49 return *this;
50 }
52
54
57 inline int GetIndex() const { return m_index; }
58 inline bool IndexHasBeenSet() const { return m_indexHasBeenSet; }
59 inline void SetIndex(int value) {
60 m_indexHasBeenSet = true;
61 m_index = value;
62 }
63 inline RerankResult& WithIndex(int value) {
64 SetIndex(value);
65 return *this;
66 }
68
70
73 inline double GetRelevanceScore() const { return m_relevanceScore; }
74 inline bool RelevanceScoreHasBeenSet() const { return m_relevanceScoreHasBeenSet; }
75 inline void SetRelevanceScore(double value) {
76 m_relevanceScoreHasBeenSet = true;
77 m_relevanceScore = value;
78 }
79 inline RerankResult& WithRelevanceScore(double value) {
80 SetRelevanceScore(value);
81 return *this;
82 }
84 private:
85 RerankDocument m_document;
86
87 int m_index{0};
88
89 double m_relevanceScore{0.0};
90 bool m_documentHasBeenSet = false;
91 bool m_indexHasBeenSet = false;
92 bool m_relevanceScoreHasBeenSet = false;
93};
94
95} // namespace Model
96} // namespace BedrockAgentRuntime
97} // namespace Aws
AWS_BEDROCKAGENTRUNTIME_API RerankResult & operator=(Aws::Utils::Json::JsonView jsonValue)
RerankResult & WithDocument(DocumentT &&value)
AWS_BEDROCKAGENTRUNTIME_API RerankResult()=default
const RerankDocument & GetDocument() const
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
RerankResult & WithRelevanceScore(double value)
AWS_BEDROCKAGENTRUNTIME_API RerankResult(Aws::Utils::Json::JsonView jsonValue)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue