AWS SDK for C++

AWS SDK for C++ Version 1.11.609

Loading...
Searching...
No Matches
InvokeModelWithResponseStreamRequest.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/BedrockRuntimeRequest.h>
9#include <aws/bedrock-runtime/model/InvokeModelWithResponseStreamHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <aws/core/utils/Array.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/bedrock-runtime/model/Trace.h>
14#include <aws/bedrock-runtime/model/PerformanceConfigLatency.h>
15#include <utility>
16
17namespace Aws
18{
19namespace BedrockRuntime
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "InvokeModelWithResponseStream"; }
36
37 inline virtual bool HasEventStreamResponse() const override { return true; }
38 AWS_BEDROCKRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39
44
49
53 inline void SetEventStreamHandler(const InvokeModelWithResponseStreamHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
54
59
60
62
66 inline const Aws::String& GetAccept() const { return m_accept; }
67 inline bool AcceptHasBeenSet() const { return m_acceptHasBeenSet; }
68 template<typename AcceptT = Aws::String>
69 void SetAccept(AcceptT&& value) { m_acceptHasBeenSet = true; m_accept = std::forward<AcceptT>(value); }
70 template<typename AcceptT = Aws::String>
71 InvokeModelWithResponseStreamRequest& WithAccept(AcceptT&& value) { SetAccept(std::forward<AcceptT>(value)); return *this;}
73
75
102 inline const Aws::String& GetModelId() const { return m_modelId; }
103 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
104 template<typename ModelIdT = Aws::String>
105 void SetModelId(ModelIdT&& value) { m_modelIdHasBeenSet = true; m_modelId = std::forward<ModelIdT>(value); }
106 template<typename ModelIdT = Aws::String>
107 InvokeModelWithResponseStreamRequest& WithModelId(ModelIdT&& value) { SetModelId(std::forward<ModelIdT>(value)); return *this;}
109
111
115 inline Trace GetTrace() const { return m_trace; }
116 inline bool TraceHasBeenSet() const { return m_traceHasBeenSet; }
117 inline void SetTrace(Trace value) { m_traceHasBeenSet = true; m_trace = value; }
118 inline InvokeModelWithResponseStreamRequest& WithTrace(Trace value) { SetTrace(value); return *this;}
120
122
132 inline const Aws::String& GetGuardrailIdentifier() const { return m_guardrailIdentifier; }
133 inline bool GuardrailIdentifierHasBeenSet() const { return m_guardrailIdentifierHasBeenSet; }
134 template<typename GuardrailIdentifierT = Aws::String>
135 void SetGuardrailIdentifier(GuardrailIdentifierT&& value) { m_guardrailIdentifierHasBeenSet = true; m_guardrailIdentifier = std::forward<GuardrailIdentifierT>(value); }
136 template<typename GuardrailIdentifierT = Aws::String>
137 InvokeModelWithResponseStreamRequest& WithGuardrailIdentifier(GuardrailIdentifierT&& value) { SetGuardrailIdentifier(std::forward<GuardrailIdentifierT>(value)); return *this;}
139
141
145 inline const Aws::String& GetGuardrailVersion() const { return m_guardrailVersion; }
146 inline bool GuardrailVersionHasBeenSet() const { return m_guardrailVersionHasBeenSet; }
147 template<typename GuardrailVersionT = Aws::String>
148 void SetGuardrailVersion(GuardrailVersionT&& value) { m_guardrailVersionHasBeenSet = true; m_guardrailVersion = std::forward<GuardrailVersionT>(value); }
149 template<typename GuardrailVersionT = Aws::String>
150 InvokeModelWithResponseStreamRequest& WithGuardrailVersion(GuardrailVersionT&& value) { SetGuardrailVersion(std::forward<GuardrailVersionT>(value)); return *this;}
152
154
157 inline PerformanceConfigLatency GetPerformanceConfigLatency() const { return m_performanceConfigLatency; }
158 inline bool PerformanceConfigLatencyHasBeenSet() const { return m_performanceConfigLatencyHasBeenSet; }
159 inline void SetPerformanceConfigLatency(PerformanceConfigLatency value) { m_performanceConfigLatencyHasBeenSet = true; m_performanceConfigLatency = value; }
162 private:
163
164
165 Aws::String m_accept;
166 bool m_acceptHasBeenSet = false;
167
168 Aws::String m_modelId;
169 bool m_modelIdHasBeenSet = false;
170
171 Trace m_trace{Trace::NOT_SET};
172 bool m_traceHasBeenSet = false;
173
174 Aws::String m_guardrailIdentifier;
175 bool m_guardrailIdentifierHasBeenSet = false;
176
177 Aws::String m_guardrailVersion;
178 bool m_guardrailVersionHasBeenSet = false;
179
181 bool m_performanceConfigLatencyHasBeenSet = false;
182 InvokeModelWithResponseStreamHandler m_handler;
184
185 };
186
187} // namespace Model
188} // namespace BedrockRuntime
189} // namespace Aws
InvokeModelWithResponseStreamRequest & WithPerformanceConfigLatency(PerformanceConfigLatency value)
void SetEventStreamHandler(const InvokeModelWithResponseStreamHandler &value)
InvokeModelWithResponseStreamRequest & WithEventStreamHandler(const InvokeModelWithResponseStreamHandler &value)
InvokeModelWithResponseStreamRequest & WithGuardrailVersion(GuardrailVersionT &&value)
AWS_BEDROCKRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
InvokeModelWithResponseStreamRequest & WithGuardrailIdentifier(GuardrailIdentifierT &&value)
AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamRequest()=default
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String