AWS SDK for C++

AWS SDK for C++ Version 1.11.781

Loading...
Searching...
No Matches
ConverseResult.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/ConverseMetrics.h>
9#include <aws/bedrock-runtime/model/ConverseOutput.h>
10#include <aws/bedrock-runtime/model/ConverseTrace.h>
11#include <aws/bedrock-runtime/model/PerformanceConfiguration.h>
12#include <aws/bedrock-runtime/model/ServiceTier.h>
13#include <aws/bedrock-runtime/model/StopReason.h>
14#include <aws/bedrock-runtime/model/TokenUsage.h>
15#include <aws/core/http/HttpResponse.h>
16#include <aws/core/utils/Document.h>
17#include <aws/core/utils/memory/stl/AWSString.h>
18
19#include <utility>
20
21namespace Aws {
22template <typename RESULT_TYPE>
23class AmazonWebServiceResult;
24
25namespace Utils {
26namespace Json {
27class JsonValue;
28} // namespace Json
29} // namespace Utils
30namespace BedrockRuntime {
31namespace Model {
33 public:
34 AWS_BEDROCKRUNTIME_API ConverseResult() = default;
37
39
42 inline const ConverseOutput& GetOutput() const { return m_output; }
43 template <typename OutputT = ConverseOutput>
44 void SetOutput(OutputT&& value) {
45 m_outputHasBeenSet = true;
46 m_output = std::forward<OutputT>(value);
47 }
48 template <typename OutputT = ConverseOutput>
50 SetOutput(std::forward<OutputT>(value));
51 return *this;
52 }
54
56
59 inline StopReason GetStopReason() const { return m_stopReason; }
60 inline void SetStopReason(StopReason value) {
61 m_stopReasonHasBeenSet = true;
62 m_stopReason = value;
63 }
65 SetStopReason(value);
66 return *this;
67 }
69
71
76 inline const TokenUsage& GetUsage() const { return m_usage; }
77 template <typename UsageT = TokenUsage>
78 void SetUsage(UsageT&& value) {
79 m_usageHasBeenSet = true;
80 m_usage = std::forward<UsageT>(value);
81 }
82 template <typename UsageT = TokenUsage>
84 SetUsage(std::forward<UsageT>(value));
85 return *this;
86 }
88
90
93 inline const ConverseMetrics& GetMetrics() const { return m_metrics; }
94 template <typename MetricsT = ConverseMetrics>
95 void SetMetrics(MetricsT&& value) {
96 m_metricsHasBeenSet = true;
97 m_metrics = std::forward<MetricsT>(value);
98 }
99 template <typename MetricsT = ConverseMetrics>
101 SetMetrics(std::forward<MetricsT>(value));
102 return *this;
103 }
105
107
110 inline Aws::Utils::DocumentView GetAdditionalModelResponseFields() const { return m_additionalModelResponseFields; }
111 template <typename AdditionalModelResponseFieldsT = Aws::Utils::Document>
113 m_additionalModelResponseFieldsHasBeenSet = true;
114 m_additionalModelResponseFields = std::forward<AdditionalModelResponseFieldsT>(value);
115 }
116 template <typename AdditionalModelResponseFieldsT = Aws::Utils::Document>
118 SetAdditionalModelResponseFields(std::forward<AdditionalModelResponseFieldsT>(value));
119 return *this;
120 }
122
124
127 inline const ConverseTrace& GetTrace() const { return m_trace; }
128 template <typename TraceT = ConverseTrace>
129 void SetTrace(TraceT&& value) {
130 m_traceHasBeenSet = true;
131 m_trace = std::forward<TraceT>(value);
132 }
133 template <typename TraceT = ConverseTrace>
135 SetTrace(std::forward<TraceT>(value));
136 return *this;
137 }
139
141
144 inline const PerformanceConfiguration& GetPerformanceConfig() const { return m_performanceConfig; }
145 template <typename PerformanceConfigT = PerformanceConfiguration>
147 m_performanceConfigHasBeenSet = true;
148 m_performanceConfig = std::forward<PerformanceConfigT>(value);
149 }
150 template <typename PerformanceConfigT = PerformanceConfiguration>
152 SetPerformanceConfig(std::forward<PerformanceConfigT>(value));
153 return *this;
154 }
156
158
161 inline const ServiceTier& GetServiceTier() const { return m_serviceTier; }
162 template <typename ServiceTierT = ServiceTier>
164 m_serviceTierHasBeenSet = true;
165 m_serviceTier = std::forward<ServiceTierT>(value);
166 }
167 template <typename ServiceTierT = ServiceTier>
169 SetServiceTier(std::forward<ServiceTierT>(value));
170 return *this;
171 }
173
175
176 inline const Aws::String& GetRequestId() const { return m_requestId; }
177 template <typename RequestIdT = Aws::String>
178 void SetRequestId(RequestIdT&& value) {
179 m_requestIdHasBeenSet = true;
180 m_requestId = std::forward<RequestIdT>(value);
181 }
182 template <typename RequestIdT = Aws::String>
184 SetRequestId(std::forward<RequestIdT>(value));
185 return *this;
186 }
188 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
189
190 private:
191 ConverseOutput m_output;
192
193 StopReason m_stopReason{StopReason::NOT_SET};
194
195 TokenUsage m_usage;
196
197 ConverseMetrics m_metrics;
198
199 Aws::Utils::Document m_additionalModelResponseFields;
200
201 ConverseTrace m_trace;
202
203 PerformanceConfiguration m_performanceConfig;
204
205 ServiceTier m_serviceTier;
206
207 Aws::String m_requestId;
208 Aws::Http::HttpResponseCode m_HttpResponseCode;
209 bool m_outputHasBeenSet = false;
210 bool m_stopReasonHasBeenSet = false;
211 bool m_usageHasBeenSet = false;
212 bool m_metricsHasBeenSet = false;
213 bool m_additionalModelResponseFieldsHasBeenSet = false;
214 bool m_traceHasBeenSet = false;
215 bool m_performanceConfigHasBeenSet = false;
216 bool m_serviceTierHasBeenSet = false;
217 bool m_requestIdHasBeenSet = false;
218};
219
220} // namespace Model
221} // namespace BedrockRuntime
222} // namespace Aws
AWS_BEDROCKRUNTIME_API ConverseResult()=default
ConverseResult & WithPerformanceConfig(PerformanceConfigT &&value)
AWS_BEDROCKRUNTIME_API ConverseResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
ConverseResult & WithServiceTier(ServiceTierT &&value)
ConverseResult & WithMetrics(MetricsT &&value)
const ConverseMetrics & GetMetrics() const
void SetAdditionalModelResponseFields(AdditionalModelResponseFieldsT &&value)
void SetServiceTier(ServiceTierT &&value)
ConverseResult & WithTrace(TraceT &&value)
AWS_BEDROCKRUNTIME_API ConverseResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
void SetPerformanceConfig(PerformanceConfigT &&value)
const ConverseOutput & GetOutput() const
const ServiceTier & GetServiceTier() const
ConverseResult & WithUsage(UsageT &&value)
const Aws::String & GetRequestId() const
ConverseResult & WithOutput(OutputT &&value)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
const ConverseTrace & GetTrace() const
ConverseResult & WithAdditionalModelResponseFields(AdditionalModelResponseFieldsT &&value)
ConverseResult & WithRequestId(RequestIdT &&value)
const PerformanceConfiguration & GetPerformanceConfig() const
ConverseResult & WithStopReason(StopReason value)
Aws::Utils::DocumentView GetAdditionalModelResponseFields() const
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue