7#include <aws/core/utils/HashingUtils.h>
8#include <aws/core/utils/event/EventStreamHandler.h>
9#include <aws/core/client/AWSError.h>
10#include <aws/sagemaker-runtime/SageMakerRuntime_EXPORTS.h>
11#include <aws/sagemaker-runtime/SageMakerRuntimeErrors.h>
13#include <aws/sagemaker-runtime/model/InvokeEndpointWithResponseStreamInitialResponse.h>
14#include <aws/sagemaker-runtime/model/PayloadPart.h>
18namespace SageMakerRuntime
33 typedef std::function<void(
const PayloadPart&)> PayloadPartCallback;
41 AWS_SAGEMAKERRUNTIME_API
virtual void OnEvent()
override;
50 inline void SetInitialResponseCallbackEx(
const InvokeEndpointWithResponseStreamInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
65 AWS_SAGEMAKERRUNTIME_API
void HandleEventInMessage();
66 AWS_SAGEMAKERRUNTIME_API
void HandleErrorInMessage();
67 AWS_SAGEMAKERRUNTIME_API
void MarshallError(
const Aws::String& errorCode,
const Aws::String& errorMessage);
69 InvokeEndpointWithResponseStreamInitialResponseCallbackEx m_onInitialResponse;
70 PayloadPartCallback m_onPayloadPart;
71 ErrorCallback m_onError;
74namespace InvokeEndpointWithResponseStreamEventMapper
void SetPayloadPartCallback(const PayloadPartCallback &callback)
void SetInitialResponseCallback(const InvokeEndpointWithResponseStreamInitialResponseCallback &noArgCallback)
AWS_SAGEMAKERRUNTIME_API InvokeEndpointWithResponseStreamHandler(const InvokeEndpointWithResponseStreamHandler &)=default
AWS_SAGEMAKERRUNTIME_API InvokeEndpointWithResponseStreamHandler()
InvokeEndpointWithResponseStreamInitialResponseCallbackEx & GetInitialResponseCallbackEx()
void SetInitialResponseCallbackEx(const InvokeEndpointWithResponseStreamInitialResponseCallbackEx &callback)
void SetOnErrorCallback(const ErrorCallback &callback)
AWS_SAGEMAKERRUNTIME_API InvokeEndpointWithResponseStreamHandler & operator=(const InvokeEndpointWithResponseStreamHandler &)=default
virtual AWS_SAGEMAKERRUNTIME_API void OnEvent() override
AWS_SAGEMAKERRUNTIME_API InvokeEndpointWithResponseStreamEventType GetInvokeEndpointWithResponseStreamEventTypeForName(const Aws::String &name)
AWS_SAGEMAKERRUNTIME_API Aws::String GetNameForInvokeEndpointWithResponseStreamEventType(InvokeEndpointWithResponseStreamEventType value)
InvokeEndpointWithResponseStreamEventType
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String