@@ -246,13 +246,14 @@ export class CloudSchedulerClient {
246
246
] ;
247
247
for ( const methodName of cloudSchedulerStubMethods ) {
248
248
const callPromise = this . cloudSchedulerStub . then (
249
- stub => ( ...args : Array < { } > ) => {
250
- if ( this . _terminated ) {
251
- return Promise . reject ( 'The client has already been closed.' ) ;
252
- }
253
- const func = stub [ methodName ] ;
254
- return func . apply ( stub , args ) ;
255
- } ,
249
+ stub =>
250
+ ( ...args : Array < { } > ) => {
251
+ if ( this . _terminated ) {
252
+ return Promise . reject ( 'The client has already been closed.' ) ;
253
+ }
254
+ const func = stub [ methodName ] ;
255
+ return func . apply ( stub , args ) ;
256
+ } ,
256
257
( err : Error | null | undefined ) => ( ) => {
257
258
throw err ;
258
259
}
@@ -401,11 +402,10 @@ export class CloudSchedulerClient {
401
402
options = options || { } ;
402
403
options . otherArgs = options . otherArgs || { } ;
403
404
options . otherArgs . headers = options . otherArgs . headers || { } ;
404
- options . otherArgs . headers [
405
- 'x-goog-request-params'
406
- ] = gax . routingHeader . fromParams ( {
407
- name : request . name || '' ,
408
- } ) ;
405
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
406
+ gax . routingHeader . fromParams ( {
407
+ name : request . name || '' ,
408
+ } ) ;
409
409
this . initialize ( ) ;
410
410
return this . innerApiCalls . getJob ( request , options , callback ) ;
411
411
}
@@ -492,11 +492,10 @@ export class CloudSchedulerClient {
492
492
options = options || { } ;
493
493
options . otherArgs = options . otherArgs || { } ;
494
494
options . otherArgs . headers = options . otherArgs . headers || { } ;
495
- options . otherArgs . headers [
496
- 'x-goog-request-params'
497
- ] = gax . routingHeader . fromParams ( {
498
- parent : request . parent || '' ,
499
- } ) ;
495
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
496
+ gax . routingHeader . fromParams ( {
497
+ parent : request . parent || '' ,
498
+ } ) ;
500
499
this . initialize ( ) ;
501
500
return this . innerApiCalls . createJob ( request , options , callback ) ;
502
501
}
@@ -589,11 +588,10 @@ export class CloudSchedulerClient {
589
588
options = options || { } ;
590
589
options . otherArgs = options . otherArgs || { } ;
591
590
options . otherArgs . headers = options . otherArgs . headers || { } ;
592
- options . otherArgs . headers [
593
- 'x-goog-request-params'
594
- ] = gax . routingHeader . fromParams ( {
595
- 'job.name' : request . job ! . name || '' ,
596
- } ) ;
591
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
592
+ gax . routingHeader . fromParams ( {
593
+ 'job.name' : request . job ! . name || '' ,
594
+ } ) ;
597
595
this . initialize ( ) ;
598
596
return this . innerApiCalls . updateJob ( request , options , callback ) ;
599
597
}
@@ -674,11 +672,10 @@ export class CloudSchedulerClient {
674
672
options = options || { } ;
675
673
options . otherArgs = options . otherArgs || { } ;
676
674
options . otherArgs . headers = options . otherArgs . headers || { } ;
677
- options . otherArgs . headers [
678
- 'x-goog-request-params'
679
- ] = gax . routingHeader . fromParams ( {
680
- name : request . name || '' ,
681
- } ) ;
675
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
676
+ gax . routingHeader . fromParams ( {
677
+ name : request . name || '' ,
678
+ } ) ;
682
679
this . initialize ( ) ;
683
680
return this . innerApiCalls . deleteJob ( request , options , callback ) ;
684
681
}
@@ -765,11 +762,10 @@ export class CloudSchedulerClient {
765
762
options = options || { } ;
766
763
options . otherArgs = options . otherArgs || { } ;
767
764
options . otherArgs . headers = options . otherArgs . headers || { } ;
768
- options . otherArgs . headers [
769
- 'x-goog-request-params'
770
- ] = gax . routingHeader . fromParams ( {
771
- name : request . name || '' ,
772
- } ) ;
765
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
766
+ gax . routingHeader . fromParams ( {
767
+ name : request . name || '' ,
768
+ } ) ;
773
769
this . initialize ( ) ;
774
770
return this . innerApiCalls . pauseJob ( request , options , callback ) ;
775
771
}
@@ -855,11 +851,10 @@ export class CloudSchedulerClient {
855
851
options = options || { } ;
856
852
options . otherArgs = options . otherArgs || { } ;
857
853
options . otherArgs . headers = options . otherArgs . headers || { } ;
858
- options . otherArgs . headers [
859
- 'x-goog-request-params'
860
- ] = gax . routingHeader . fromParams ( {
861
- name : request . name || '' ,
862
- } ) ;
854
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
855
+ gax . routingHeader . fromParams ( {
856
+ name : request . name || '' ,
857
+ } ) ;
863
858
this . initialize ( ) ;
864
859
return this . innerApiCalls . resumeJob ( request , options , callback ) ;
865
860
}
@@ -943,11 +938,10 @@ export class CloudSchedulerClient {
943
938
options = options || { } ;
944
939
options . otherArgs = options . otherArgs || { } ;
945
940
options . otherArgs . headers = options . otherArgs . headers || { } ;
946
- options . otherArgs . headers [
947
- 'x-goog-request-params'
948
- ] = gax . routingHeader . fromParams ( {
949
- name : request . name || '' ,
950
- } ) ;
941
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
942
+ gax . routingHeader . fromParams ( {
943
+ name : request . name || '' ,
944
+ } ) ;
951
945
this . initialize ( ) ;
952
946
return this . innerApiCalls . runJob ( request , options , callback ) ;
953
947
}
@@ -1047,11 +1041,10 @@ export class CloudSchedulerClient {
1047
1041
options = options || { } ;
1048
1042
options . otherArgs = options . otherArgs || { } ;
1049
1043
options . otherArgs . headers = options . otherArgs . headers || { } ;
1050
- options . otherArgs . headers [
1051
- 'x-goog-request-params'
1052
- ] = gax . routingHeader . fromParams ( {
1053
- parent : request . parent || '' ,
1054
- } ) ;
1044
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1045
+ gax . routingHeader . fromParams ( {
1046
+ parent : request . parent || '' ,
1047
+ } ) ;
1055
1048
this . initialize ( ) ;
1056
1049
return this . innerApiCalls . listJobs ( request , options , callback ) ;
1057
1050
}
@@ -1098,11 +1091,10 @@ export class CloudSchedulerClient {
1098
1091
options = options || { } ;
1099
1092
options . otherArgs = options . otherArgs || { } ;
1100
1093
options . otherArgs . headers = options . otherArgs . headers || { } ;
1101
- options . otherArgs . headers [
1102
- 'x-goog-request-params'
1103
- ] = gax . routingHeader . fromParams ( {
1104
- parent : request . parent || '' ,
1105
- } ) ;
1094
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1095
+ gax . routingHeader . fromParams ( {
1096
+ parent : request . parent || '' ,
1097
+ } ) ;
1106
1098
const callSettings = new gax . CallSettings ( options ) ;
1107
1099
this . initialize ( ) ;
1108
1100
return this . descriptors . page . listJobs . createStream (
@@ -1160,17 +1152,16 @@ export class CloudSchedulerClient {
1160
1152
options = options || { } ;
1161
1153
options . otherArgs = options . otherArgs || { } ;
1162
1154
options . otherArgs . headers = options . otherArgs . headers || { } ;
1163
- options . otherArgs . headers [
1164
- 'x-goog-request-params'
1165
- ] = gax . routingHeader . fromParams ( {
1166
- parent : request . parent || '' ,
1167
- } ) ;
1155
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1156
+ gax . routingHeader . fromParams ( {
1157
+ parent : request . parent || '' ,
1158
+ } ) ;
1168
1159
options = options || { } ;
1169
1160
const callSettings = new gax . CallSettings ( options ) ;
1170
1161
this . initialize ( ) ;
1171
1162
return this . descriptors . page . listJobs . asyncIterate (
1172
1163
this . innerApiCalls [ 'listJobs' ] as GaxCall ,
1173
- ( request as unknown ) as RequestType ,
1164
+ request as unknown as RequestType ,
1174
1165
callSettings
1175
1166
) as AsyncIterable < protos . google . cloud . scheduler . v1 . IJob > ;
1176
1167
}
0 commit comments