Skip to content

Commit b30d4b9

Browse files
authored
Updates to handle protocolSettings h2 optional.
1 parent 2f7a286 commit b30d4b9

15 files changed

+1268
-1226
lines changed

generator/ServiceClientGeneratorLib/Generators/Marshallers/AWSQueryRequestMarshaller.cs

Lines changed: 192 additions & 192 deletions
Large diffs are not rendered by default.

generator/ServiceClientGeneratorLib/Generators/Marshallers/AWSQueryRequestMarshaller.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace <#=this.Config.Namespace #>.Model.Internal.MarshallTransformations
3535
{
3636
IRequest request = new DefaultRequest(publicRequest, "<#=this.Config.Namespace#>");
3737
<#
38-
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
38+
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
3939
{
4040
#>
4141
#if NET8_0_OR_GREATER

generator/ServiceClientGeneratorLib/Generators/Marshallers/JsonRPCRequestMarshaller.cs

Lines changed: 49 additions & 49 deletions
Large diffs are not rendered by default.

generator/ServiceClientGeneratorLib/Generators/Marshallers/JsonRPCRequestMarshaller.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace <#=this.Config.Namespace #>.Model.Internal.MarshallTransformations
4040
{
4141
IRequest request = new DefaultRequest(publicRequest, "<#=this.Config.Namespace #>");
4242
<#
43-
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
43+
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
4444
{
4545
#>
4646
#if NET8_0_OR_GREATER

generator/ServiceClientGeneratorLib/Generators/Marshallers/RestXmlRequestMarshaller.cs

Lines changed: 623 additions & 623 deletions
Large diffs are not rendered by default.

generator/ServiceClientGeneratorLib/Generators/Marshallers/RestXmlRequestMarshaller.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace <#=this.Config.Namespace #>.Model.Internal.MarshallTransformations
3838
{
3939
var request = new DefaultRequest(publicRequest, "<#=this.Config.Namespace#>");
4040
<#
41-
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
41+
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
4242
{
4343
#>
4444
#if NET8_0_OR_GREATER

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetFramework.cs

Lines changed: 143 additions & 136 deletions
Large diffs are not rendered by default.

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetFramework.tt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,13 @@ namespace <#=this.Config.Namespace#>
375375

376376
foreach(var operation in this.Config.ServiceModel.Operations)
377377
{
378+
if(operation.IsInternal ||
379+
((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) ||
380+
(this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) ||
381+
this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
382+
)
383+
continue;
384+
378385
#>
379386

380387
#region <#=operation.Name#>

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetStandard.cs

Lines changed: 139 additions & 139 deletions
Large diffs are not rendered by default.

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetStandard.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ namespace <#=this.Config.Namespace#>
385385
#region <#=operation.Name#>
386386

387387
<#
388-
if (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput)
388+
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
389389
{
390390
#>
391391
#if NET8_0_OR_GREATER
@@ -483,7 +483,7 @@ namespace <#=this.Config.Namespace#>
483483
return InvokeAsync<<#=operation.Name#>Response>(request, options, cancellationToken);
484484
}
485485
<#
486-
if (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput)
486+
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
487487
{
488488
#>
489489
#endif

0 commit comments

Comments
 (0)