AWS SDK for C++

AWS SDK for C++ Version 1.11.609

Loading...
Searching...
No Matches
InvokeModelWithBidirectionalStreamRequest.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/InvokeModelWithBidirectionalStreamHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <memory>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/bedrock-runtime/model/InvokeModelWithBidirectionalStreamInput.h>
14#include <utility>
15
16namespace Aws
17{
18namespace BedrockRuntime
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_BEDROCKRUNTIME_API InvokeModelWithBidirectionalStreamRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "InvokeModelWithBidirectionalStream"; }
35
36 inline virtual bool IsEventStreamRequest() const override { return true; }
37 inline virtual bool HasEventStreamResponse() const override { return true; }
38 // SerializePayload will not be invoked.
39 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
40 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override { return {}; }
41 AWS_BEDROCKRUNTIME_API std::shared_ptr<Aws::IOStream> GetBody() const override;
46
51
55 inline void SetEventStreamHandler(const InvokeModelWithBidirectionalStreamHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
56
61
62
64
68 inline const Aws::String& GetModelId() const { return m_modelId; }
69 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
70 template<typename ModelIdT = Aws::String>
71 void SetModelId(ModelIdT&& value) { m_modelIdHasBeenSet = true; m_modelId = std::forward<ModelIdT>(value); }
72 template<typename ModelIdT = Aws::String>
73 InvokeModelWithBidirectionalStreamRequest& WithModelId(ModelIdT&& value) { SetModelId(std::forward<ModelIdT>(value)); return *this;}
75
77
87 AWS_BEDROCKRUNTIME_API std::shared_ptr<InvokeModelWithBidirectionalStreamInput> GetMemberBody() const { return m_body; }
88 AWS_BEDROCKRUNTIME_API void SetBody(const std::shared_ptr<InvokeModelWithBidirectionalStreamInput>& value) { m_bodyHasBeenSet = true; m_body = value; }
89 AWS_BEDROCKRUNTIME_API InvokeModelWithBidirectionalStreamRequest& WithBody(const std::shared_ptr<InvokeModelWithBidirectionalStreamInput>& value) { SetBody(value); return *this;}
90
92 private:
93
94 Aws::String m_modelId;
95 bool m_modelIdHasBeenSet = false;
96
97 std::shared_ptr<InvokeModelWithBidirectionalStreamInput> m_body;
98 bool m_bodyHasBeenSet = false;
101
102 };
103
104} // namespace Model
105} // namespace BedrockRuntime
106} // namespace Aws
AWS_BEDROCKRUNTIME_API std::shared_ptr< Aws::IOStream > GetBody() const override
AWS_BEDROCKRUNTIME_API std::shared_ptr< InvokeModelWithBidirectionalStreamInput > GetMemberBody() const
void SetEventStreamHandler(const InvokeModelWithBidirectionalStreamHandler &value)
AWS_BEDROCKRUNTIME_API void SetBody(const std::shared_ptr< InvokeModelWithBidirectionalStreamInput > &value)
InvokeModelWithBidirectionalStreamRequest & WithEventStreamHandler(const InvokeModelWithBidirectionalStreamHandler &value)
AWS_BEDROCKRUNTIME_API InvokeModelWithBidirectionalStreamRequest & WithBody(const std::shared_ptr< InvokeModelWithBidirectionalStreamInput > &value)
void ResetEventStreamHandler(EventStreamHandler *handler)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String