@@ -251,6 +251,7 @@ namespace Aws
251
251
EVENT_STREAM_RPC_SUCCESS = 0 ,
252
252
EVENT_STREAM_RPC_NULL_PARAMETER,
253
253
EVENT_STREAM_RPC_INITIALIZATION_ERROR,
254
+ EVENT_STREAM_RPC_ALLOCATION_ERROR,
254
255
EVENT_STREAM_RPC_CONNECTION_CLOSED,
255
256
EVENT_STREAM_RPC_CONNECTION_ACCESS_DENIED,
256
257
EVENT_STREAM_RPC_CONTINUATION_CLOSED,
@@ -439,21 +440,6 @@ namespace Aws
439
440
Crt::Allocator *m_allocator;
440
441
};
441
442
442
- class AWS_EVENTSTREAMRPC_API OperationResponse : public AbstractShapeBase
443
- {
444
- public:
445
- OperationResponse () noexcept ;
446
- static void s_customDeleter (OperationResponse *shape) noexcept ;
447
- /* A response does not necessarily have to be serialized so provide a default implementation. */
448
- virtual void SerializeToJsonObject (Crt::JsonObject &payloadObject) const override ;
449
- };
450
-
451
- class AWS_EVENTSTREAMRPC_API OperationRequest : public AbstractShapeBase
452
- {
453
- public:
454
- OperationRequest () noexcept ;
455
- };
456
-
457
443
class AWS_EVENTSTREAMRPC_API OperationError : public AbstractShapeBase
458
444
{
459
445
public:
@@ -481,7 +467,7 @@ namespace Aws
481
467
/* *
482
468
* Invoked when a message is received on this continuation.
483
469
*/
484
- virtual void OnStreamEvent (Crt::ScopedResource<OperationResponse > response);
470
+ virtual void OnStreamEvent (Crt::ScopedResource<AbstractShapeBase > response);
485
471
/* *
486
472
* Invoked when a message is received on this continuation but results in an error.
487
473
*
@@ -501,7 +487,7 @@ namespace Aws
501
487
{
502
488
public:
503
489
TaggedResult () noexcept ;
504
- explicit TaggedResult (Crt::ScopedResource<OperationResponse > response) noexcept ;
490
+ explicit TaggedResult (Crt::ScopedResource<AbstractShapeBase > response) noexcept ;
505
491
explicit TaggedResult (Crt::ScopedResource<OperationError> error) noexcept ;
506
492
explicit TaggedResult (RpcError rpcError) noexcept ;
507
493
TaggedResult (TaggedResult &&rhs) noexcept ;
@@ -512,22 +498,22 @@ namespace Aws
512
498
*/
513
499
operator bool () const noexcept ;
514
500
515
- OperationResponse *GetOperationResponse () const noexcept ;
501
+ AbstractShapeBase *GetOperationResponse () const noexcept ;
516
502
OperationError *GetOperationError () const noexcept ;
517
503
RpcError GetRpcError () const noexcept ;
518
504
ResultType GetResultType () const noexcept { return m_responseType; }
519
505
520
506
private:
521
507
union AWS_EVENTSTREAMRPC_API OperationResult
522
508
{
523
- OperationResult (Crt::ScopedResource<OperationResponse > &&response) noexcept
509
+ OperationResult (Crt::ScopedResource<AbstractShapeBase > &&response) noexcept
524
510
: m_response (std::move (response))
525
511
{
526
512
}
527
513
OperationResult (Crt::ScopedResource<OperationError> &&error) noexcept : m_error (std::move (error)) {}
528
514
OperationResult () noexcept : m_response (nullptr ) {}
529
515
~OperationResult () noexcept {};
530
- Crt::ScopedResource<OperationResponse > m_response;
516
+ Crt::ScopedResource<AbstractShapeBase > m_response;
531
517
Crt::ScopedResource<OperationError> m_error;
532
518
};
533
519
ResultType m_responseType;
@@ -536,7 +522,7 @@ namespace Aws
536
522
};
537
523
538
524
using ExpectedResponseFactory = std::function<
539
- Crt::ScopedResource<OperationResponse >(const Crt::StringView &payload, Crt::Allocator *allocator)>;
525
+ Crt::ScopedResource<AbstractShapeBase >(const Crt::StringView &payload, Crt::Allocator *allocator)>;
540
526
using ErrorResponseFactory = std::function<
541
527
Crt::ScopedResource<OperationError>(const Crt::StringView &payload, Crt::Allocator *allocator)>;
542
528
@@ -569,10 +555,10 @@ namespace Aws
569
555
{
570
556
public:
571
557
OperationModelContext (const ServiceModel &serviceModel) noexcept ;
572
- virtual Crt::ScopedResource<OperationResponse > AllocateInitialResponseFromPayload (
558
+ virtual Crt::ScopedResource<AbstractShapeBase > AllocateInitialResponseFromPayload (
573
559
Crt::StringView stringView,
574
560
Crt::Allocator *allocator) const noexcept = 0;
575
- virtual Crt::ScopedResource<OperationResponse > AllocateStreamingResponseFromPayload (
561
+ virtual Crt::ScopedResource<AbstractShapeBase > AllocateStreamingResponseFromPayload (
576
562
Crt::StringView stringView,
577
563
Crt::Allocator *allocator) const noexcept = 0;
578
564
virtual Crt::String GetInitialResponseModelName () const noexcept = 0;
@@ -607,10 +593,10 @@ namespace Aws
607
593
608
594
protected:
609
595
std::future<RpcError> Activate (
610
- const OperationRequest *shape,
596
+ const AbstractShapeBase *shape,
611
597
OnMessageFlushCallback onMessageFlushCallback) noexcept ;
612
598
std::future<RpcError> SendStreamEvent (
613
- OperationRequest *shape,
599
+ AbstractShapeBase *shape,
614
600
OnMessageFlushCallback onMessageFlushCallback) noexcept ;
615
601
virtual Crt::String GetModelName () const noexcept = 0;
616
602
const OperationModelContext &m_operationModelContext;
0 commit comments