File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
generator/ServiceClientGeneratorLib Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -525,10 +525,35 @@ public IEnumerable<Member> RequestHostPrefixMembers
525
525
}
526
526
}
527
527
528
+ /// <summary>
529
+ /// Determines if any of the ResponseStructure (Output) shapes are marked with "eventstream":true.
530
+ /// </summary>
528
531
public bool IsEventStreamOutput => ResponseStructure ? . Members ? . Any (
529
532
member => member . Shape ? . IsEventStream ?? false )
530
533
?? false ;
534
+
535
+ /// <summary>
536
+ /// Determines if any of the RequestStructure (Input) shapes are marked with "eventstream":true.
537
+ /// </summary>
538
+ public bool IsEventStreamInput => RequestStructure ? . Members ? . Any (
539
+ member => member . Shape ? . IsEventStream ?? false )
540
+ ?? false ;
541
+
542
+ /// <summary>
543
+ /// Determines if both the RequestStructure (Input) and ResponseStructure (Output) shapes contain shapes
544
+ /// marked with "eventstream":true. When true, the operation is a bi-directional event stream operation
545
+ /// which requires H2 support when "protocolSettings":{"h2":"eventstreams"}, "protocolSettings":{"h2":"optional"},
546
+ /// or "protocolSettings":{"h2":"required"} is modeled for the service.
547
+ /// </summary>
548
+ public bool IsEventStreamBidi
549
+ {
550
+ get
551
+ {
552
+ return IsEventStreamInput && IsEventStreamOutput ;
553
+ }
554
+ }
531
555
556
+
532
557
/// <summary>
533
558
/// Determines if the request structure will have members in the header
534
559
/// </summary>
Original file line number Diff line number Diff line change @@ -442,15 +442,21 @@ public List<Operation> Operations
442
442
{
443
443
operation = new Operation ( this , kvp . Key , kvp . Value ) ;
444
444
}
445
+
445
446
if ( operation . IsExcluded )
446
447
{
447
448
ExcludedOperations . Add ( operation . Name ) ;
448
449
}
449
- // Event Streams are not supported ( yet)
450
+ // H2 event streams are not yet supported
450
451
else if ( H2Support == H2SupportDegree . EventStream && operation . IsEventStreamOutput )
451
452
{
452
453
ExcludedOperations . Add ( operation . Name ) ;
453
454
}
455
+ // H2 bi-directional (bidi) event streams are not yet supported
456
+ else if ( H2Support == H2SupportDegree . Optional && operation . IsEventStreamBidi )
457
+ {
458
+ ExcludedOperations . Add ( operation . Name ) ;
459
+ }
454
460
else
455
461
{
456
462
list . Add ( operation ) ;
You can’t perform that action at this time.
0 commit comments