Skip to content

Commit cabf92d

Browse files
committed
Remove the need to check for H2Support == H2SupportDegree.Optional
1 parent 3480a10 commit cabf92d

14 files changed

+18
-18
lines changed

generator/ServiceClientGeneratorLib/Generators/Marshallers/AWSQueryRequestMarshaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public IRequest Marshall(AmazonWebServiceRequest input)
109109

110110
#line 37 "C:\Dev\repos\aws-sdk-net\generator\ServiceClientGeneratorLib\Generators\Marshallers\AWSQueryRequestMarshaller.tt"
111111

112-
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)
112+
if (this.Operation.IsEventStreamBidi || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
113113
{
114114

115115

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.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
38+
if (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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public IRequest Marshall(AmazonWebServiceRequest input)
105105

106106
#line 42 "C:\Dev\repos\aws-sdk-net\generator\ServiceClientGeneratorLib\Generators\Marshallers\JsonRPCRequestMarshaller.tt"
107107

108-
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)
108+
if (this.Operation.IsEventStreamBidi || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
109109
{
110110

111111

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.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
43+
if (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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public IRequest Marshall(AmazonWebServiceRequest input)
105105

106106
#line 40 "C:\Dev\repos\aws-sdk-net\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlRequestMarshaller.tt"
107107

108-
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)
108+
if (this.Operation.IsEventStreamBidi || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
109109
{
110110

111111

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.Optional && this.Operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && this.Operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
41+
if (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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ protected override IEnumerable<DiscoveryEndpointBase> EndpointOperation(Endpoint
876876
foreach(var operation in this.Config.ServiceModel.Operations)
877877
{
878878
if(operation.IsInternal ||
879-
((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) ||
879+
(operation.IsEventStreamBidi ||
880880
(this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) ||
881881
this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
882882
)

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetFramework.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ namespace <#=this.Config.Namespace#>
376376
foreach(var operation in this.Config.ServiceModel.Operations)
377377
{
378378
if(operation.IsInternal ||
379-
((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) ||
379+
(operation.IsEventStreamBidi ||
380380
(this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) ||
381381
this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
382382
)

generator/ServiceClientGeneratorLib/Generators/SourceFiles/ServiceClientsNetStandard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ protected override IEnumerable<DiscoveryEndpointBase> EndpointOperation(Endpoint
891891

892892
#line 387 "C:\Dev\repos\aws-sdk-net\generator\ServiceClientGeneratorLib\Generators\SourceFiles\ServiceClientsNetStandard.tt"
893893

894-
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
894+
if (operation.IsEventStreamBidi || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
895895
{
896896

897897

@@ -1237,7 +1237,7 @@ protected override IEnumerable<DiscoveryEndpointBase> EndpointOperation(Endpoint
12371237

12381238
#line 485 "C:\Dev\repos\aws-sdk-net\generator\ServiceClientGeneratorLib\Generators\SourceFiles\ServiceClientsNetStandard.tt"
12391239

1240-
if ((this.Config.ServiceModel.H2Support == H2SupportDegree.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
1240+
if (operation.IsEventStreamBidi || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
12411241
{
12421242

12431243

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.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
388+
if (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.Optional && operation.IsEventStreamBidi) || (this.Config.ServiceModel.H2Support == H2SupportDegree.EventStream && operation.IsEventStreamOutput) || this.Config.ServiceModel.H2Support == H2SupportDegree.Required)
486+
if (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)