@@ -23,6 +23,7 @@ const format = require('string-format-obj');
23
23
const is = require ( 'is' ) ;
24
24
const util = require ( 'util' ) ;
25
25
const { promisifyAll} = require ( '@google-cloud/promisify' ) ;
26
+ const { paginator} = require ( '@google-cloud/paginator' ) ;
26
27
27
28
const Firewall = require ( './firewall.js' ) ;
28
29
const HealthCheck = require ( './health-check.js' ) ;
@@ -809,9 +810,7 @@ Compute.prototype.getAddresses = function(options, callback) {
809
810
* this.end();
810
811
* });
811
812
*/
812
- Compute . prototype . getAddressesStream = common . paginator . streamify (
813
- 'getAddresses'
814
- ) ;
813
+ Compute . prototype . getAddressesStream = paginator . streamify ( 'getAddresses' ) ;
815
814
816
815
/**
817
816
* Get a list of autoscalers. For a detailed description of this method's
@@ -948,9 +947,7 @@ Compute.prototype.getAutoscalers = function(options, callback) {
948
947
* this.end();
949
948
* });
950
949
*/
951
- Compute . prototype . getAutoscalersStream = common . paginator . streamify (
952
- 'getAutoscalers'
953
- ) ;
950
+ Compute . prototype . getAutoscalersStream = paginator . streamify ( 'getAutoscalers' ) ;
954
951
955
952
/**
956
953
* Get a list of disks.
@@ -1082,7 +1079,7 @@ Compute.prototype.getDisks = function(options, callback) {
1082
1079
* });
1083
1080
*/
1084
1081
1085
- Compute . prototype . getDisksStream = common . paginator . streamify ( 'getDisks' ) ;
1082
+ Compute . prototype . getDisksStream = paginator . streamify ( 'getDisks' ) ;
1086
1083
1087
1084
/**
1088
1085
* Get a list of instance groups.
@@ -1216,7 +1213,7 @@ Compute.prototype.getInstanceGroups = function(options, callback) {
1216
1213
* });
1217
1214
*/
1218
1215
1219
- Compute . prototype . getInstanceGroupsStream = common . paginator . streamify (
1216
+ Compute . prototype . getInstanceGroupsStream = paginator . streamify (
1220
1217
'getInstanceGroups'
1221
1218
) ;
1222
1219
@@ -1337,9 +1334,7 @@ Compute.prototype.getFirewalls = function(options, callback) {
1337
1334
* this.end();
1338
1335
* });
1339
1336
*/
1340
- Compute . prototype . getFirewallsStream = common . paginator . streamify (
1341
- 'getFirewalls'
1342
- ) ;
1337
+ Compute . prototype . getFirewallsStream = paginator . streamify ( 'getFirewalls' ) ;
1343
1338
1344
1339
/**
1345
1340
* Get a list of health checks.
@@ -1467,7 +1462,7 @@ Compute.prototype.getHealthChecks = function(options, callback) {
1467
1462
* this.end();
1468
1463
* });
1469
1464
*/
1470
- Compute . prototype . getHealthChecksStream = common . paginator . streamify (
1465
+ Compute . prototype . getHealthChecksStream = paginator . streamify (
1471
1466
'getHealthChecks'
1472
1467
) ;
1473
1468
@@ -1587,7 +1582,7 @@ Compute.prototype.getImages = function(options, callback) {
1587
1582
* this.end();
1588
1583
* });
1589
1584
*/
1590
- Compute . prototype . getImagesStream = common . paginator . streamify ( 'getImages' ) ;
1585
+ Compute . prototype . getImagesStream = paginator . streamify ( 'getImages' ) ;
1591
1586
1592
1587
/**
1593
1588
* Get a list of machine types in this project.
@@ -1721,7 +1716,7 @@ Compute.prototype.getMachineTypes = function(options, callback) {
1721
1716
* this.end();
1722
1717
* });
1723
1718
*/
1724
- Compute . prototype . getMachineTypesStream = common . paginator . streamify (
1719
+ Compute . prototype . getMachineTypesStream = paginator . streamify (
1725
1720
'getMachineTypes'
1726
1721
) ;
1727
1722
@@ -1845,7 +1840,7 @@ Compute.prototype.getNetworks = function(options, callback) {
1845
1840
* this.end();
1846
1841
* });
1847
1842
*/
1848
- Compute . prototype . getNetworksStream = common . paginator . streamify ( 'getNetworks' ) ;
1843
+ Compute . prototype . getNetworksStream = paginator . streamify ( 'getNetworks' ) ;
1849
1844
1850
1845
/**
1851
1846
* Get a list of global operations.
@@ -1968,9 +1963,7 @@ Compute.prototype.getOperations = function(options, callback) {
1968
1963
* this.end();
1969
1964
* });
1970
1965
*/
1971
- Compute . prototype . getOperationsStream = common . paginator . streamify (
1972
- 'getOperations'
1973
- ) ;
1966
+ Compute . prototype . getOperationsStream = paginator . streamify ( 'getOperations' ) ;
1974
1967
1975
1968
/**
1976
1969
* Return the regions available to your project.
@@ -2091,7 +2084,7 @@ Compute.prototype.getRegions = function(options, callback) {
2091
2084
* this.end();
2092
2085
* });
2093
2086
*/
2094
- Compute . prototype . getRegionsStream = common . paginator . streamify ( 'getRegions' ) ;
2087
+ Compute . prototype . getRegionsStream = paginator . streamify ( 'getRegions' ) ;
2095
2088
2096
2089
/**
2097
2090
* Get a list of forwarding rules.
@@ -2212,7 +2205,7 @@ Compute.prototype.getRules = function(options, callback) {
2212
2205
* this.end();
2213
2206
* });
2214
2207
*/
2215
- Compute . prototype . getRulesStream = common . paginator . streamify ( 'getRules' ) ;
2208
+ Compute . prototype . getRulesStream = paginator . streamify ( 'getRules' ) ;
2216
2209
2217
2210
/**
2218
2211
* Get a list of backend services.
@@ -2334,7 +2327,7 @@ Compute.prototype.getServices = function(options, callback) {
2334
2327
* this.end();
2335
2328
* });
2336
2329
*/
2337
- Compute . prototype . getServicesStream = common . paginator . streamify ( 'getServices' ) ;
2330
+ Compute . prototype . getServicesStream = paginator . streamify ( 'getServices' ) ;
2338
2331
2339
2332
/**
2340
2333
* Get a list of snapshots.
@@ -2456,9 +2449,7 @@ Compute.prototype.getSnapshots = function(options, callback) {
2456
2449
* this.end();
2457
2450
* });
2458
2451
*/
2459
- Compute . prototype . getSnapshotsStream = common . paginator . streamify (
2460
- 'getSnapshots'
2461
- ) ;
2452
+ Compute . prototype . getSnapshotsStream = paginator . streamify ( 'getSnapshots' ) ;
2462
2453
2463
2454
/**
2464
2455
* Get a list of subnetworks in this project.
@@ -2594,9 +2585,7 @@ Compute.prototype.getSubnetworks = function(options, callback) {
2594
2585
* this.end();
2595
2586
* });
2596
2587
*/
2597
- Compute . prototype . getSubnetworksStream = common . paginator . streamify (
2598
- 'getSubnetworks'
2599
- ) ;
2588
+ Compute . prototype . getSubnetworksStream = paginator . streamify ( 'getSubnetworks' ) ;
2600
2589
2601
2590
/**
2602
2591
* Get a list of virtual machine instances.
@@ -2726,7 +2715,7 @@ Compute.prototype.getVMs = function(options, callback) {
2726
2715
* this.end();
2727
2716
* });
2728
2717
*/
2729
- Compute . prototype . getVMsStream = common . paginator . streamify ( 'getVMs' ) ;
2718
+ Compute . prototype . getVMsStream = paginator . streamify ( 'getVMs' ) ;
2730
2719
2731
2720
/**
2732
2721
* Return the zones available to your project.
@@ -2847,7 +2836,7 @@ Compute.prototype.getZones = function(options, callback) {
2847
2836
* this.end();
2848
2837
* });
2849
2838
*/
2850
- Compute . prototype . getZonesStream = common . paginator . streamify ( 'getZones' ) ;
2839
+ Compute . prototype . getZonesStream = paginator . streamify ( 'getZones' ) ;
2851
2840
2852
2841
/**
2853
2842
* Get a reference to a Google Compute Engine health check.
@@ -3035,7 +3024,7 @@ Compute.prototype.execAfterOperation_ = function(callback) {
3035
3024
*
3036
3025
* These methods can be auto-paginated.
3037
3026
*/
3038
- common . paginator . extend ( Compute , [
3027
+ paginator . extend ( Compute , [
3039
3028
'getAddresses' ,
3040
3029
'getAutoscalers' ,
3041
3030
'getDisks' ,
0 commit comments