@@ -353,13 +353,14 @@ export class HubServiceClient {
353
353
] ;
354
354
for ( const methodName of hubServiceStubMethods ) {
355
355
const callPromise = this . hubServiceStub . then (
356
- stub => ( ...args : Array < { } > ) => {
357
- if ( this . _terminated ) {
358
- return Promise . reject ( 'The client has already been closed.' ) ;
359
- }
360
- const func = stub [ methodName ] ;
361
- return func . apply ( stub , args ) ;
362
- } ,
356
+ stub =>
357
+ ( ...args : Array < { } > ) => {
358
+ if ( this . _terminated ) {
359
+ return Promise . reject ( 'The client has already been closed.' ) ;
360
+ }
361
+ const func = stub [ methodName ] ;
362
+ return func . apply ( stub , args ) ;
363
+ } ,
363
364
( err : Error | null | undefined ) => ( ) => {
364
365
throw err ;
365
366
}
@@ -524,11 +525,10 @@ export class HubServiceClient {
524
525
options = options || { } ;
525
526
options . otherArgs = options . otherArgs || { } ;
526
527
options . otherArgs . headers = options . otherArgs . headers || { } ;
527
- options . otherArgs . headers [
528
- 'x-goog-request-params'
529
- ] = gax . routingHeader . fromParams ( {
530
- name : request . name || '' ,
531
- } ) ;
528
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
529
+ gax . routingHeader . fromParams ( {
530
+ name : request . name || '' ,
531
+ } ) ;
532
532
this . initialize ( ) ;
533
533
return this . innerApiCalls . getHub ( request , options , callback ) ;
534
534
}
@@ -622,11 +622,10 @@ export class HubServiceClient {
622
622
options = options || { } ;
623
623
options . otherArgs = options . otherArgs || { } ;
624
624
options . otherArgs . headers = options . otherArgs . headers || { } ;
625
- options . otherArgs . headers [
626
- 'x-goog-request-params'
627
- ] = gax . routingHeader . fromParams ( {
628
- name : request . name || '' ,
629
- } ) ;
625
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
626
+ gax . routingHeader . fromParams ( {
627
+ name : request . name || '' ,
628
+ } ) ;
630
629
this . initialize ( ) ;
631
630
return this . innerApiCalls . getSpoke ( request , options , callback ) ;
632
631
}
@@ -746,11 +745,10 @@ export class HubServiceClient {
746
745
options = options || { } ;
747
746
options . otherArgs = options . otherArgs || { } ;
748
747
options . otherArgs . headers = options . otherArgs . headers || { } ;
749
- options . otherArgs . headers [
750
- 'x-goog-request-params'
751
- ] = gax . routingHeader . fromParams ( {
752
- parent : request . parent || '' ,
753
- } ) ;
748
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
749
+ gax . routingHeader . fromParams ( {
750
+ parent : request . parent || '' ,
751
+ } ) ;
754
752
this . initialize ( ) ;
755
753
return this . innerApiCalls . createHub ( request , options , callback ) ;
756
754
}
@@ -908,11 +906,10 @@ export class HubServiceClient {
908
906
options = options || { } ;
909
907
options . otherArgs = options . otherArgs || { } ;
910
908
options . otherArgs . headers = options . otherArgs . headers || { } ;
911
- options . otherArgs . headers [
912
- 'x-goog-request-params'
913
- ] = gax . routingHeader . fromParams ( {
914
- 'hub.name' : request . hub ! . name || '' ,
915
- } ) ;
909
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
910
+ gax . routingHeader . fromParams ( {
911
+ 'hub.name' : request . hub ! . name || '' ,
912
+ } ) ;
916
913
this . initialize ( ) ;
917
914
return this . innerApiCalls . updateHub ( request , options , callback ) ;
918
915
}
@@ -1064,11 +1061,10 @@ export class HubServiceClient {
1064
1061
options = options || { } ;
1065
1062
options . otherArgs = options . otherArgs || { } ;
1066
1063
options . otherArgs . headers = options . otherArgs . headers || { } ;
1067
- options . otherArgs . headers [
1068
- 'x-goog-request-params'
1069
- ] = gax . routingHeader . fromParams ( {
1070
- name : request . name || '' ,
1071
- } ) ;
1064
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1065
+ gax . routingHeader . fromParams ( {
1066
+ name : request . name || '' ,
1067
+ } ) ;
1072
1068
this . initialize ( ) ;
1073
1069
return this . innerApiCalls . deleteHub ( request , options , callback ) ;
1074
1070
}
@@ -1224,11 +1220,10 @@ export class HubServiceClient {
1224
1220
options = options || { } ;
1225
1221
options . otherArgs = options . otherArgs || { } ;
1226
1222
options . otherArgs . headers = options . otherArgs . headers || { } ;
1227
- options . otherArgs . headers [
1228
- 'x-goog-request-params'
1229
- ] = gax . routingHeader . fromParams ( {
1230
- parent : request . parent || '' ,
1231
- } ) ;
1223
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1224
+ gax . routingHeader . fromParams ( {
1225
+ parent : request . parent || '' ,
1226
+ } ) ;
1232
1227
this . initialize ( ) ;
1233
1228
return this . innerApiCalls . createSpoke ( request , options , callback ) ;
1234
1229
}
@@ -1386,11 +1381,10 @@ export class HubServiceClient {
1386
1381
options = options || { } ;
1387
1382
options . otherArgs = options . otherArgs || { } ;
1388
1383
options . otherArgs . headers = options . otherArgs . headers || { } ;
1389
- options . otherArgs . headers [
1390
- 'x-goog-request-params'
1391
- ] = gax . routingHeader . fromParams ( {
1392
- 'spoke.name' : request . spoke ! . name || '' ,
1393
- } ) ;
1384
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1385
+ gax . routingHeader . fromParams ( {
1386
+ 'spoke.name' : request . spoke ! . name || '' ,
1387
+ } ) ;
1394
1388
this . initialize ( ) ;
1395
1389
return this . innerApiCalls . updateSpoke ( request , options , callback ) ;
1396
1390
}
@@ -1542,11 +1536,10 @@ export class HubServiceClient {
1542
1536
options = options || { } ;
1543
1537
options . otherArgs = options . otherArgs || { } ;
1544
1538
options . otherArgs . headers = options . otherArgs . headers || { } ;
1545
- options . otherArgs . headers [
1546
- 'x-goog-request-params'
1547
- ] = gax . routingHeader . fromParams ( {
1548
- name : request . name || '' ,
1549
- } ) ;
1539
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1540
+ gax . routingHeader . fromParams ( {
1541
+ name : request . name || '' ,
1542
+ } ) ;
1550
1543
this . initialize ( ) ;
1551
1544
return this . innerApiCalls . deleteSpoke ( request , options , callback ) ;
1552
1545
}
@@ -1682,11 +1675,10 @@ export class HubServiceClient {
1682
1675
options = options || { } ;
1683
1676
options . otherArgs = options . otherArgs || { } ;
1684
1677
options . otherArgs . headers = options . otherArgs . headers || { } ;
1685
- options . otherArgs . headers [
1686
- 'x-goog-request-params'
1687
- ] = gax . routingHeader . fromParams ( {
1688
- parent : request . parent || '' ,
1689
- } ) ;
1678
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1679
+ gax . routingHeader . fromParams ( {
1680
+ parent : request . parent || '' ,
1681
+ } ) ;
1690
1682
this . initialize ( ) ;
1691
1683
return this . innerApiCalls . listHubs ( request , options , callback ) ;
1692
1684
}
@@ -1725,11 +1717,10 @@ export class HubServiceClient {
1725
1717
options = options || { } ;
1726
1718
options . otherArgs = options . otherArgs || { } ;
1727
1719
options . otherArgs . headers = options . otherArgs . headers || { } ;
1728
- options . otherArgs . headers [
1729
- 'x-goog-request-params'
1730
- ] = gax . routingHeader . fromParams ( {
1731
- parent : request . parent || '' ,
1732
- } ) ;
1720
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1721
+ gax . routingHeader . fromParams ( {
1722
+ parent : request . parent || '' ,
1723
+ } ) ;
1733
1724
const callSettings = new gax . CallSettings ( options ) ;
1734
1725
this . initialize ( ) ;
1735
1726
return this . descriptors . page . listHubs . createStream (
@@ -1779,17 +1770,16 @@ export class HubServiceClient {
1779
1770
options = options || { } ;
1780
1771
options . otherArgs = options . otherArgs || { } ;
1781
1772
options . otherArgs . headers = options . otherArgs . headers || { } ;
1782
- options . otherArgs . headers [
1783
- 'x-goog-request-params'
1784
- ] = gax . routingHeader . fromParams ( {
1785
- parent : request . parent || '' ,
1786
- } ) ;
1773
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1774
+ gax . routingHeader . fromParams ( {
1775
+ parent : request . parent || '' ,
1776
+ } ) ;
1787
1777
options = options || { } ;
1788
1778
const callSettings = new gax . CallSettings ( options ) ;
1789
1779
this . initialize ( ) ;
1790
1780
return this . descriptors . page . listHubs . asyncIterate (
1791
1781
this . innerApiCalls [ 'listHubs' ] as GaxCall ,
1792
- ( request as unknown ) as RequestType ,
1782
+ request as unknown as RequestType ,
1793
1783
callSettings
1794
1784
) as AsyncIterable < protos . google . cloud . networkconnectivity . v1alpha1 . IHub > ;
1795
1785
}
@@ -1888,11 +1878,10 @@ export class HubServiceClient {
1888
1878
options = options || { } ;
1889
1879
options . otherArgs = options . otherArgs || { } ;
1890
1880
options . otherArgs . headers = options . otherArgs . headers || { } ;
1891
- options . otherArgs . headers [
1892
- 'x-goog-request-params'
1893
- ] = gax . routingHeader . fromParams ( {
1894
- parent : request . parent || '' ,
1895
- } ) ;
1881
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1882
+ gax . routingHeader . fromParams ( {
1883
+ parent : request . parent || '' ,
1884
+ } ) ;
1896
1885
this . initialize ( ) ;
1897
1886
return this . innerApiCalls . listSpokes ( request , options , callback ) ;
1898
1887
}
@@ -1931,11 +1920,10 @@ export class HubServiceClient {
1931
1920
options = options || { } ;
1932
1921
options . otherArgs = options . otherArgs || { } ;
1933
1922
options . otherArgs . headers = options . otherArgs . headers || { } ;
1934
- options . otherArgs . headers [
1935
- 'x-goog-request-params'
1936
- ] = gax . routingHeader . fromParams ( {
1937
- parent : request . parent || '' ,
1938
- } ) ;
1923
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1924
+ gax . routingHeader . fromParams ( {
1925
+ parent : request . parent || '' ,
1926
+ } ) ;
1939
1927
const callSettings = new gax . CallSettings ( options ) ;
1940
1928
this . initialize ( ) ;
1941
1929
return this . descriptors . page . listSpokes . createStream (
@@ -1985,17 +1973,16 @@ export class HubServiceClient {
1985
1973
options = options || { } ;
1986
1974
options . otherArgs = options . otherArgs || { } ;
1987
1975
options . otherArgs . headers = options . otherArgs . headers || { } ;
1988
- options . otherArgs . headers [
1989
- 'x-goog-request-params'
1990
- ] = gax . routingHeader . fromParams ( {
1991
- parent : request . parent || '' ,
1992
- } ) ;
1976
+ options . otherArgs . headers [ 'x-goog-request-params' ] =
1977
+ gax . routingHeader . fromParams ( {
1978
+ parent : request . parent || '' ,
1979
+ } ) ;
1993
1980
options = options || { } ;
1994
1981
const callSettings = new gax . CallSettings ( options ) ;
1995
1982
this . initialize ( ) ;
1996
1983
return this . descriptors . page . listSpokes . asyncIterate (
1997
1984
this . innerApiCalls [ 'listSpokes' ] as GaxCall ,
1998
- ( request as unknown ) as RequestType ,
1985
+ request as unknown as RequestType ,
1999
1986
callSettings
2000
1987
) as AsyncIterable < protos . google . cloud . networkconnectivity . v1alpha1 . ISpoke > ;
2001
1988
}
0 commit comments