@@ -305,7 +305,13 @@ public static List<Service> parseService(
305
305
.setOriginalJavaPackage (originalJavaPackage )
306
306
.setProtoPakkage (fileDescriptor .getPackage ())
307
307
.setMethods (
308
- parseMethods (s , pakkage , messageTypes , resourceNames , outputArgResourceNames ))
308
+ parseMethods (
309
+ s ,
310
+ pakkage ,
311
+ messageTypes ,
312
+ resourceNames ,
313
+ serviceConfigOpt ,
314
+ outputArgResourceNames ))
309
315
.build ();
310
316
})
311
317
.collect (Collectors .toList ());
@@ -433,6 +439,7 @@ static List<Method> parseMethods(
433
439
String servicePackage ,
434
440
Map <String , Message > messageTypes ,
435
441
Map <String , ResourceName > resourceNames ,
442
+ Optional <GapicServiceConfig > serviceConfigOpt ,
436
443
Set <ResourceName > outputArgResourceNames ) {
437
444
List <Method > methods = new ArrayList <>();
438
445
for (MethodDescriptor protoMethod : serviceDescriptor .getMethods ()) {
@@ -456,6 +463,15 @@ static List<Method> parseMethods(
456
463
HttpRuleParser .parseHttpBindings (protoMethod , inputMessage , messageTypes );
457
464
List <String > httpBindings =
458
465
httpBindingsOpt .isPresent () ? httpBindingsOpt .get () : Collections .emptyList ();
466
+ boolean isBatching =
467
+ !serviceConfigOpt .isPresent ()
468
+ ? false
469
+ : serviceConfigOpt
470
+ .get ()
471
+ .hasBatchingSetting (
472
+ /* protoPakkage */ protoMethod .getFile ().getPackage (),
473
+ serviceDescriptor .getName (),
474
+ protoMethod .getName ());
459
475
460
476
methods .add (
461
477
methodBuilder
@@ -474,6 +490,7 @@ static List<Method> parseMethods(
474
490
resourceNames ,
475
491
outputArgResourceNames ))
476
492
.setHttpBindings (httpBindings )
493
+ .setIsBatching (isBatching )
477
494
.setIsPaged (parseIsPaged (protoMethod , messageTypes ))
478
495
.build ());
479
496
0 commit comments