Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* zone.getRecordsStream()
* .on('data', function(change) {
* this.end();
* });
*/
Zone.prototype.getRecordsStream = paginator.streamify('getRecords');
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Zone, ['getChanges', 'getRecords']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Zone, {
exclude: ['change', 'record'],
});
/**
* Reference to the {@link Zone} class.
* @name module:@google-cloud/dns.Zone
* @see Zone
*/
export {Zone};
*
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* topic.getSubscriptionsStream()
* .on('data', function(subscription) {
* this.end();
* });
*/
/*! Developer Documentation
*
* These methods can be agto-paginated.
*/
paginator.extend(Topic, ['getSubscriptions']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Topic, {
exclude: ['publisher', 'subscription'],
});
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* gce.getZonesStream()
* .on('data', function(zone) {
* this.end();
* });
*/
Compute.prototype.getZonesStream = paginator.streamify('getZones');
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Compute, [
'getAddresses',
'getAutoscalers',
'getDisks',
'getFirewalls',
'getImages',
'getHealthChecks',
'getInstanceGroups',
'getMachineTypes',
'getNetworks',
'getOperations',
'getRegions',
'getRules',
'getServices',
'getSnapshots',
'getSubnetworks',
'getVMs',
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* region.getSubnetworksStream()
* .on('data', function(subnetwork) {
* this.end();
* });
*/
Region.prototype.getSubnetworksStream = paginator.streamify('getSubnetworks');
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Region, [
'getAddresses',
'getOperations',
'getRules',
'getSubnetworks',
]);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Region, {
exclude: ['address', 'operation', 'rule', 'subnetwork'],
});
/**
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* instance.getTablesStream()
* .on('data', function(table) {
* this.end();
* });
*/
Instance.prototype.getTablesStream = paginator.streamify('getTables');
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Instance, ['getTables']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Instance, {
exclude: ['appProfile', 'cluster', 'table'],
});
/**
* Reference to the {@link Instance} class.
* @name module:@google-cloud/bigtable.Instance
* @see Instance
*/
* //-
* // If you anticipate many results, you can end a stream early to prevent
* // unnecessary processing and API requests.
* //-
* instanceGroup.getVMsStream()
* .on('data', function(vm) {
* this.end();
* });
*/
InstanceGroup.prototype.getVMsStream = paginator.streamify('getVMs');
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(InstanceGroup, ['getVMs']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(InstanceGroup);
module.exports = InstanceGroup;
/**
* This method will be called by `createQueryStream()`. It is required to
* properly set the `autoPaginate` option value.
*
* @private
*/
BigQuery.prototype.queryAsStream_ = function(query, callback) {
this.query(query, {autoPaginate: false}, callback);
};
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(BigQuery, ['getDatasets', 'getJobs']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(BigQuery, {
exclude: ['dataset', 'date', 'datetime', 'job', 'time', 'timestamp'],
});
/**
* {@link Dataset} class.
*
* @name BigQuery.Dataset
* @see Dataset
* @type {constructor}
return;
}
const baseUrl = 'pubsub.googleapis.com';
const topicName = topic.name;
config.destination = `${baseUrl}/${topicName}`;
self.createSink(name, config, callback);
});
});
}
}
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Logging, ['getEntries', 'getSinks']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Logging, {
exclude: ['entry', 'log', 'request', 'sink'],
});
/**
* {@link Entry} class.
*
* @name Logging.Entry
* @see Entry
* @type {Constructor}
* table.setMetadata(metadata).then((data) => {
* const metadata = data[0];
* const apiResponse = data[1];
* });
*/
setMetadata(metadata, callback) {
const body = Table.formatMetadata_(metadata);
super.setMetadata(body, callback);
}
}
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Table, ['getRows']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Table);
/**
* Reference to the {@link Table} class.
* @name module:@google-cloud/bigquery.Table
* @see Table
*/
export {Table};
options = extend(
{
location: this.location,
},
options
);
return new Table(this, id, options);
}
}
/*! Developer Documentation
*
* These methods can be auto-paginated.
*/
paginator.extend(Dataset, ['getTables']);
/*! Developer Documentation
*
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
promisifyAll(Dataset, {
exclude: ['table'],
});
/**
* Reference to the {@link Dataset} class.
* @name module:@google-cloud/bigquery.Dataset
* @see Dataset
*/
export {Dataset};