AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
RerankRequest.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntimeRequest.h>
8#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
9#include <aws/bedrock-agent-runtime/model/RerankQuery.h>
10#include <aws/bedrock-agent-runtime/model/RerankSource.h>
11#include <aws/bedrock-agent-runtime/model/RerankingConfiguration.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace BedrockAgentRuntime {
19namespace Model {
20
24 public:
25 AWS_BEDROCKAGENTRUNTIME_API RerankRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "Rerank"; }
32
33 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
34
36
41 inline const Aws::String& GetNextToken() const { return m_nextToken; }
42 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
43 template <typename NextTokenT = Aws::String>
44 void SetNextToken(NextTokenT&& value) {
45 m_nextTokenHasBeenSet = true;
46 m_nextToken = std::forward<NextTokenT>(value);
47 }
48 template <typename NextTokenT = Aws::String>
50 SetNextToken(std::forward<NextTokenT>(value));
51 return *this;
52 }
54
56
60 inline const Aws::Vector<RerankQuery>& GetQueries() const { return m_queries; }
61 inline bool QueriesHasBeenSet() const { return m_queriesHasBeenSet; }
62 template <typename QueriesT = Aws::Vector<RerankQuery>>
63 void SetQueries(QueriesT&& value) {
64 m_queriesHasBeenSet = true;
65 m_queries = std::forward<QueriesT>(value);
66 }
67 template <typename QueriesT = Aws::Vector<RerankQuery>>
69 SetQueries(std::forward<QueriesT>(value));
70 return *this;
71 }
72 template <typename QueriesT = RerankQuery>
74 m_queriesHasBeenSet = true;
75 m_queries.emplace_back(std::forward<QueriesT>(value));
76 return *this;
77 }
79
81
84 inline const RerankingConfiguration& GetRerankingConfiguration() const { return m_rerankingConfiguration; }
85 inline bool RerankingConfigurationHasBeenSet() const { return m_rerankingConfigurationHasBeenSet; }
86 template <typename RerankingConfigurationT = RerankingConfiguration>
88 m_rerankingConfigurationHasBeenSet = true;
89 m_rerankingConfiguration = std::forward<RerankingConfigurationT>(value);
90 }
91 template <typename RerankingConfigurationT = RerankingConfiguration>
93 SetRerankingConfiguration(std::forward<RerankingConfigurationT>(value));
94 return *this;
95 }
97
99
103 inline const Aws::Vector<RerankSource>& GetSources() const { return m_sources; }
104 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
105 template <typename SourcesT = Aws::Vector<RerankSource>>
106 void SetSources(SourcesT&& value) {
107 m_sourcesHasBeenSet = true;
108 m_sources = std::forward<SourcesT>(value);
109 }
110 template <typename SourcesT = Aws::Vector<RerankSource>>
112 SetSources(std::forward<SourcesT>(value));
113 return *this;
114 }
115 template <typename SourcesT = RerankSource>
117 m_sourcesHasBeenSet = true;
118 m_sources.emplace_back(std::forward<SourcesT>(value));
119 return *this;
120 }
122 private:
123 Aws::String m_nextToken;
124
125 Aws::Vector<RerankQuery> m_queries;
126
127 RerankingConfiguration m_rerankingConfiguration;
128
130 bool m_nextTokenHasBeenSet = false;
131 bool m_queriesHasBeenSet = false;
132 bool m_rerankingConfigurationHasBeenSet = false;
133 bool m_sourcesHasBeenSet = false;
134};
135
136} // namespace Model
137} // namespace BedrockAgentRuntime
138} // namespace Aws
RerankRequest & AddQueries(QueriesT &&value)
RerankRequest & AddSources(SourcesT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
RerankRequest & WithSources(SourcesT &&value)
const Aws::Vector< RerankSource > & GetSources() const
RerankRequest & WithQueries(QueriesT &&value)
RerankRequest & WithRerankingConfiguration(RerankingConfigurationT &&value)
AWS_BEDROCKAGENTRUNTIME_API RerankRequest()=default
void SetRerankingConfiguration(RerankingConfigurationT &&value)
const Aws::Vector< RerankQuery > & GetQueries() const
virtual const char * GetServiceRequestName() const override
const RerankingConfiguration & GetRerankingConfiguration() const
RerankRequest & WithNextToken(NextTokenT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector