diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js index ab8922c10a7..b8c4a9cd36f 100644 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.js @@ -80,13 +80,13 @@ class AutoMlClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -97,7 +97,7 @@ class AutoMlClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -139,7 +139,7 @@ class AutoMlClient { 'modelEvaluation' ), }; - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -159,26 +159,28 @@ class AutoMlClient { grpc: gaxGrpc.grpc, }).operationsClient(opts); - var deleteDatasetResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - var deleteDatasetMetadata = protoFilesRoot.lookup( + const deleteDatasetResponse = protoFilesRoot.lookup( + 'google.protobuf.Empty' + ); + const deleteDatasetMetadata = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.OperationMetadata' ); - var importDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - var importDataMetadata = protoFilesRoot.lookup( + const importDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); + const importDataMetadata = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.OperationMetadata' ); - var exportDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - var exportDataMetadata = protoFilesRoot.lookup( + const exportDataResponse = protoFilesRoot.lookup('google.protobuf.Empty'); + const exportDataMetadata = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.OperationMetadata' ); - var createModelResponse = protoFilesRoot.lookup( + const createModelResponse = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.Model' ); - var createModelMetadata = protoFilesRoot.lookup( + const createModelMetadata = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.OperationMetadata' ); - var deleteModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); - var deleteModelMetadata = protoFilesRoot.lookup( + const deleteModelResponse = protoFilesRoot.lookup('google.protobuf.Empty'); + const deleteModelMetadata = protoFilesRoot.lookup( 'google.cloud.automl.v1beta1.OperationMetadata' ); @@ -211,7 +213,7 @@ class AutoMlClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.automl.v1beta1.AutoMl', gapicConfig, opts.clientConfig, @@ -225,14 +227,14 @@ class AutoMlClient { // Put together the "service stub" for // google.cloud.automl.v1beta1.AutoMl. - var autoMlStub = gaxGrpc.createStub( + const autoMlStub = gaxGrpc.createStub( protos.google.cloud.automl.v1beta1.AutoMl, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var autoMlStubMethods = [ + const autoMlStubMethods = [ 'createDataset', 'getDataset', 'listDatasets', @@ -253,7 +255,7 @@ class AutoMlClient { autoMlStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -325,19 +327,19 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * var dataset = {}; - * var request = { + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const dataset = {}; + * const request = { * parent: formattedParent, * dataset: dataset, * }; * client.createDataset(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -376,14 +378,14 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); * client.getDataset({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -449,16 +451,16 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * client.listDatasets({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -468,17 +470,17 @@ class AutoMlClient { * }); * * // Or obtain the paged response. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -545,11 +547,11 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * client.listDatasetsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -593,42 +595,42 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); * * // Handle the operation using the promise pattern. * client.deleteDataset({name: formattedName}) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); * * // Handle the operation using the event emitter pattern. * client.deleteDataset({name: formattedName}) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -690,13 +692,13 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * var inputConfig = {}; - * var request = { + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const inputConfig = {}; + * const request = { * name: formattedName, * inputConfig: inputConfig, * }; @@ -704,29 +706,29 @@ class AutoMlClient { * // Handle the operation using the promise pattern. * client.importData(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * var inputConfig = {}; - * var request = { + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const inputConfig = {}; + * const request = { * name: formattedName, * inputConfig: inputConfig, * }; @@ -734,8 +736,8 @@ class AutoMlClient { * // Handle the operation using the event emitter pattern. * client.importData(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -796,13 +798,13 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * var outputConfig = {}; - * var request = { + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const outputConfig = {}; + * const request = { * name: formattedName, * outputConfig: outputConfig, * }; @@ -810,29 +812,29 @@ class AutoMlClient { * // Handle the operation using the promise pattern. * client.exportData(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); - * var outputConfig = {}; - * var request = { + * const formattedName = client.datasetPath('[PROJECT]', '[LOCATION]', '[DATASET]'); + * const outputConfig = {}; + * const request = { * name: formattedName, * outputConfig: outputConfig, * }; @@ -840,8 +842,8 @@ class AutoMlClient { * // Handle the operation using the event emitter pattern. * client.exportData(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -904,13 +906,13 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * var model = {}; - * var request = { + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const model = {}; + * const request = { * parent: formattedParent, * model: model, * }; @@ -918,29 +920,29 @@ class AutoMlClient { * // Handle the operation using the promise pattern. * client.createModel(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * var model = {}; - * var request = { + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const model = {}; + * const request = { * parent: formattedParent, * model: model, * }; @@ -948,8 +950,8 @@ class AutoMlClient { * // Handle the operation using the event emitter pattern. * client.createModel(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -1004,14 +1006,14 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * client.getModel({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1080,16 +1082,16 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * client.listModels({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -1099,17 +1101,17 @@ class AutoMlClient { * }); * * // Or obtain the paged response. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -1179,11 +1181,11 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * client.listModelsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -1230,42 +1232,42 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * * // Handle the operation using the promise pattern. * client.deleteModel({name: formattedName}) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * * // Handle the operation using the event emitter pattern. * client.deleteModel({name: formattedName}) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -1322,14 +1324,14 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * client.deployModel({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1370,14 +1372,14 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * client.undeployModel({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1416,14 +1418,14 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelEvaluationPath('[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]'); + * const formattedName = client.modelEvaluationPath('[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]'); * client.getModelEvaluation({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1494,16 +1496,16 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * * client.listModelEvaluations({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -1513,17 +1515,17 @@ class AutoMlClient { * }); * * // Or obtain the paged response. - * var formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -1595,11 +1597,11 @@ class AutoMlClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.AutoMlClient({ + * const client = new automl.v1beta1.AutoMlClient({ * // optional auth parameters. * }); * - * var formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const formattedParent = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); * client.listModelEvaluationsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js index 23438d58a55..dbe063bb394 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_annotation_payload.js @@ -44,6 +44,6 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.AnnotationPayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/annotation_payload.proto} */ -var AnnotationPayload = { +const AnnotationPayload = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js index ea822898c3e..3b2a753877c 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_classification.js @@ -29,7 +29,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ClassificationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} */ -var ClassificationAnnotation = { +const ClassificationAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -64,7 +64,7 @@ var ClassificationAnnotation = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ClassificationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/classification.proto} */ -var ClassificationEvaluationMetrics = { +const ClassificationEvaluationMetrics = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -149,7 +149,7 @@ var ClassificationEvaluationMetrics = { * @enum {number} * @memberof google.cloud.automl.v1beta1 */ -var ClassificationType = { +const ClassificationType = { /** * Should not be used, an un-set enum has this value by default. diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js index 4b02ba83cee..d19aa4e92eb 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_data_items.js @@ -35,7 +35,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.Image definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} */ -var Image = { +const Image = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -59,7 +59,7 @@ var Image = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TextSnippet definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} */ -var TextSnippet = { +const TextSnippet = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -80,6 +80,6 @@ var TextSnippet = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ExamplePayload definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/data_items.proto} */ -var ExamplePayload = { +const ExamplePayload = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js index 98b33eebd12..aff3ea19966 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_dataset.js @@ -56,6 +56,6 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.Dataset definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/dataset.proto} */ -var Dataset = { +const Dataset = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js index 201a27fddd3..5b11172b148 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_image.js @@ -28,7 +28,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} */ -var ImageClassificationDatasetMetadata = { +const ImageClassificationDatasetMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -58,6 +58,6 @@ var ImageClassificationDatasetMetadata = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ImageClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/image.proto} */ -var ImageClassificationModelMetadata = { +const ImageClassificationModelMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js index e2301adfcbf..f69974415ce 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_io.js @@ -27,7 +27,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.InputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} */ -var InputConfig = { +const InputConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -43,7 +43,7 @@ var InputConfig = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.OutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} */ -var OutputConfig = { +const OutputConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -59,7 +59,7 @@ var OutputConfig = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.GcsSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} */ -var GcsSource = { +const GcsSource = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -78,6 +78,6 @@ var GcsSource = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.GcsDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/io.proto} */ -var GcsDestination = { +const GcsDestination = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js index b48ff025003..2792bc432f4 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model.js @@ -71,7 +71,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.Model definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/model.proto} */ -var Model = { +const Model = { // This is for documentation. Actual contents will be loaded by gRPC. /** diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js index 3203c83512c..47fa43795dd 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_model_evaluation.js @@ -56,6 +56,6 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ModelEvaluation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/model_evaluation.proto} */ -var ModelEvaluation = { +const ModelEvaluation = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js index 9308074d092..695f89fdf8d 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_prediction_service.js @@ -43,7 +43,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.PredictRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} */ -var PredictRequest = { +const PredictRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -66,6 +66,6 @@ var PredictRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.PredictResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/prediction_service.proto} */ -var PredictResponse = { +const PredictResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js index 3be431eb6bb..567e6a0bed1 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_service.js @@ -30,7 +30,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.CreateDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var CreateDatasetRequest = { +const CreateDatasetRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -44,7 +44,7 @@ var CreateDatasetRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.GetDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var GetDatasetRequest = { +const GetDatasetRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -78,7 +78,7 @@ var GetDatasetRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListDatasetsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListDatasetsRequest = { +const ListDatasetsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -98,7 +98,7 @@ var ListDatasetsRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListDatasetsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListDatasetsResponse = { +const ListDatasetsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -112,7 +112,7 @@ var ListDatasetsResponse = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.DeleteDatasetRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var DeleteDatasetRequest = { +const DeleteDatasetRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -132,7 +132,7 @@ var DeleteDatasetRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ImportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ImportDataRequest = { +const ImportDataRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -151,7 +151,7 @@ var ImportDataRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ExportDataRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ExportDataRequest = { +const ExportDataRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -170,7 +170,7 @@ var ExportDataRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.CreateModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var CreateModelRequest = { +const CreateModelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -184,7 +184,7 @@ var CreateModelRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.GetModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var GetModelRequest = { +const GetModelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -220,7 +220,7 @@ var GetModelRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListModelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListModelsRequest = { +const ListModelsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -240,7 +240,7 @@ var ListModelsRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListModelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListModelsResponse = { +const ListModelsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -254,7 +254,7 @@ var ListModelsResponse = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.DeleteModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var DeleteModelRequest = { +const DeleteModelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -268,7 +268,7 @@ var DeleteModelRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.DeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var DeployModelRequest = { +const DeployModelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -282,7 +282,7 @@ var DeployModelRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.UndeployModelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var UndeployModelRequest = { +const UndeployModelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -296,7 +296,7 @@ var UndeployModelRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.GetModelEvaluationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var GetModelEvaluationRequest = { +const GetModelEvaluationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -334,7 +334,7 @@ var GetModelEvaluationRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListModelEvaluationsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListModelEvaluationsRequest = { +const ListModelEvaluationsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -354,6 +354,6 @@ var ListModelEvaluationsRequest = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.ListModelEvaluationsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto} */ -var ListModelEvaluationsResponse = { +const ListModelEvaluationsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js index 1ad592d93a4..357ca6ccc99 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_text.js @@ -28,7 +28,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TextClassificationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} */ -var TextClassificationDatasetMetadata = { +const TextClassificationDatasetMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -38,6 +38,6 @@ var TextClassificationDatasetMetadata = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TextClassificationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/text.proto} */ -var TextClassificationModelMetadata = { +const TextClassificationModelMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js index f7bfe8d1842..76faa84e3bf 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/cloud/automl/v1beta1/doc_translation.js @@ -28,7 +28,7 @@ * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TranslationDatasetMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} */ -var TranslationDatasetMetadata = { +const TranslationDatasetMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -45,7 +45,7 @@ var TranslationDatasetMetadata = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TranslationEvaluationMetrics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} */ -var TranslationEvaluationMetrics = { +const TranslationEvaluationMetrics = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -70,7 +70,7 @@ var TranslationEvaluationMetrics = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TranslationModelMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} */ -var TranslationModelMetadata = { +const TranslationModelMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -86,6 +86,6 @@ var TranslationModelMetadata = { * @memberof google.cloud.automl.v1beta1 * @see [google.cloud.automl.v1beta1.TranslationAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/translation.proto} */ -var TranslationAnnotation = { +const TranslationAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js index 79ef6344437..4af5d7d3574 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/longrunning/doc_operations.js @@ -58,7 +58,7 @@ * @memberof google.longrunning * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var Operation = { +const Operation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -72,7 +72,7 @@ var Operation = { * @memberof google.longrunning * @see [google.longrunning.GetOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var GetOperationRequest = { +const GetOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -95,7 +95,7 @@ var GetOperationRequest = { * @memberof google.longrunning * @see [google.longrunning.ListOperationsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var ListOperationsRequest = { +const ListOperationsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -114,7 +114,7 @@ var ListOperationsRequest = { * @memberof google.longrunning * @see [google.longrunning.ListOperationsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var ListOperationsResponse = { +const ListOperationsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -128,7 +128,7 @@ var ListOperationsResponse = { * @memberof google.longrunning * @see [google.longrunning.CancelOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var CancelOperationRequest = { +const CancelOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -142,6 +142,6 @@ var CancelOperationRequest = { * @memberof google.longrunning * @see [google.longrunning.DeleteOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var DeleteOperationRequest = { +const DeleteOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_any.js @@ -131,6 +131,6 @@ * @memberof google.protobuf * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ -var Any = { +const Any = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js index 51d8f40f54d..1ebe2e6e1a5 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/protobuf/doc_timestamp.js @@ -110,6 +110,6 @@ * @memberof google.protobuf * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ -var Timestamp = { +const Timestamp = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js b/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-automl/src/v1beta1/doc/google/rpc/doc_status.js @@ -87,6 +87,6 @@ * @memberof google.rpc * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} */ -var Status = { +const Status = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js index 425b5a3b96e..cc65f146523 100644 --- a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js +++ b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.js @@ -71,13 +71,13 @@ class PredictionServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -88,7 +88,7 @@ class PredictionServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -106,7 +106,7 @@ class PredictionServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.automl.v1beta1.PredictionService', gapicConfig, opts.clientConfig, @@ -120,20 +120,20 @@ class PredictionServiceClient { // Put together the "service stub" for // google.cloud.automl.v1beta1.PredictionService. - var predictionServiceStub = gaxGrpc.createStub( + const predictionServiceStub = gaxGrpc.createStub( protos.google.cloud.automl.v1beta1.PredictionService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var predictionServiceStubMethods = ['predict']; + const predictionServiceStubMethods = ['predict']; for (let methodName of predictionServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( predictionServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -216,19 +216,19 @@ class PredictionServiceClient { * * const automl = require('automl.v1beta1'); * - * var client = new automl.v1beta1.PredictionServiceClient({ + * const client = new automl.v1beta1.PredictionServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); - * var payload = {}; - * var request = { + * const formattedName = client.modelPath('[PROJECT]', '[LOCATION]', '[MODEL]'); + * const payload = {}; + * const request = { * name: formattedName, * payload: payload, * }; * client.predict(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/packages/google-cloud-automl/test/gapic-v1beta1.js b/packages/google-cloud-automl/test/gapic-v1beta1.js index 6f16b4d928f..89e9c7db2be 100644 --- a/packages/google-cloud-automl/test/gapic-v1beta1.js +++ b/packages/google-cloud-automl/test/gapic-v1beta1.js @@ -18,32 +18,32 @@ const assert = require('assert'); const automlModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('PredictionServiceClient', () => { describe('predict', () => { it('invokes predict without error', done => { - var client = new automlModule.v1beta1.PredictionServiceClient({ + const client = new automlModule.v1beta1.PredictionServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var payload = {}; - var request = { + const payload = {}; + const request = { name: formattedName, payload: payload, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.predict = mockSimpleGrpcMethod( @@ -59,19 +59,19 @@ describe('PredictionServiceClient', () => { }); it('invokes predict with error', done => { - var client = new automlModule.v1beta1.PredictionServiceClient({ + const client = new automlModule.v1beta1.PredictionServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var payload = {}; - var request = { + const payload = {}; + const request = { name: formattedName, payload: payload, }; @@ -95,24 +95,24 @@ describe('PredictionServiceClient', () => { describe('AutoMlClient', () => { describe('createDataset', () => { it('invokes createDataset without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var dataset = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const dataset = {}; + const request = { parent: formattedParent, dataset: dataset, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var exampleCount = 1517063674; - var expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const exampleCount = 1517063674; + const expectedResponse = { name: name, displayName: displayName, exampleCount: exampleCount, @@ -132,15 +132,15 @@ describe('AutoMlClient', () => { }); it('invokes createDataset with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var dataset = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const dataset = {}; + const request = { parent: formattedParent, dataset: dataset, }; @@ -163,26 +163,26 @@ describe('AutoMlClient', () => { describe('getDataset', () => { it('invokes getDataset without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var exampleCount = 1517063674; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const exampleCount = 1517063674; + const expectedResponse = { name: name2, displayName: displayName, exampleCount: exampleCount, @@ -202,18 +202,18 @@ describe('AutoMlClient', () => { }); it('invokes getDataset with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var request = { + const request = { name: formattedName, }; @@ -235,22 +235,22 @@ describe('AutoMlClient', () => { describe('listDatasets', () => { it('invokes listDatasets without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var datasetsElement = {}; - var datasets = [datasetsElement]; - var expectedResponse = { + const nextPageToken = ''; + const datasetsElement = {}; + const datasets = [datasetsElement]; + const expectedResponse = { nextPageToken: nextPageToken, datasets: datasets, }; @@ -273,14 +273,14 @@ describe('AutoMlClient', () => { }); it('invokes listDatasets with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; @@ -302,23 +302,23 @@ describe('AutoMlClient', () => { describe('deleteDataset', function() { it('invokes deleteDataset without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.deleteDataset = mockLongRunningGrpcMethod( @@ -329,7 +329,7 @@ describe('AutoMlClient', () => { client .deleteDataset(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -342,18 +342,18 @@ describe('AutoMlClient', () => { }); it('invokes deleteDataset with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var request = { + const request = { name: formattedName, }; @@ -367,7 +367,7 @@ describe('AutoMlClient', () => { client .deleteDataset(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -381,7 +381,7 @@ describe('AutoMlClient', () => { }); it('has longrunning decoder functions', () => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -398,25 +398,25 @@ describe('AutoMlClient', () => { describe('importData', function() { it('invokes importData without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var inputConfig = {}; - var request = { + const inputConfig = {}; + const request = { name: formattedName, inputConfig: inputConfig, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.importData = mockLongRunningGrpcMethod( @@ -427,7 +427,7 @@ describe('AutoMlClient', () => { client .importData(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -440,19 +440,19 @@ describe('AutoMlClient', () => { }); it('invokes importData with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var inputConfig = {}; - var request = { + const inputConfig = {}; + const request = { name: formattedName, inputConfig: inputConfig, }; @@ -467,7 +467,7 @@ describe('AutoMlClient', () => { client .importData(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -481,7 +481,7 @@ describe('AutoMlClient', () => { }); it('has longrunning decoder functions', () => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -498,25 +498,25 @@ describe('AutoMlClient', () => { describe('exportData', function() { it('invokes exportData without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var outputConfig = {}; - var request = { + const outputConfig = {}; + const request = { name: formattedName, outputConfig: outputConfig, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.exportData = mockLongRunningGrpcMethod( @@ -527,7 +527,7 @@ describe('AutoMlClient', () => { client .exportData(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -540,19 +540,19 @@ describe('AutoMlClient', () => { }); it('invokes exportData with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.datasetPath( + const formattedName = client.datasetPath( '[PROJECT]', '[LOCATION]', '[DATASET]' ); - var outputConfig = {}; - var request = { + const outputConfig = {}; + const request = { name: formattedName, outputConfig: outputConfig, }; @@ -567,7 +567,7 @@ describe('AutoMlClient', () => { client .exportData(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -581,7 +581,7 @@ describe('AutoMlClient', () => { }); it('has longrunning decoder functions', () => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -598,24 +598,24 @@ describe('AutoMlClient', () => { describe('createModel', function() { it('invokes createModel without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var model = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const model = {}; + const request = { parent: formattedParent, model: model, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var datasetId = 'datasetId-2115646910'; - var expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const datasetId = 'datasetId-2115646910'; + const expectedResponse = { name: name, displayName: displayName, datasetId: datasetId, @@ -630,7 +630,7 @@ describe('AutoMlClient', () => { client .createModel(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -643,15 +643,15 @@ describe('AutoMlClient', () => { }); it('invokes createModel with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var model = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const model = {}; + const request = { parent: formattedParent, model: model, }; @@ -666,7 +666,7 @@ describe('AutoMlClient', () => { client .createModel(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -680,7 +680,7 @@ describe('AutoMlClient', () => { }); it('has longrunning decoder functions', () => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -697,26 +697,26 @@ describe('AutoMlClient', () => { describe('getModel', () => { it('invokes getModel without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var datasetId = 'datasetId-2115646910'; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const datasetId = 'datasetId-2115646910'; + const expectedResponse = { name: name2, displayName: displayName, datasetId: datasetId, @@ -736,18 +736,18 @@ describe('AutoMlClient', () => { }); it('invokes getModel with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; @@ -769,22 +769,22 @@ describe('AutoMlClient', () => { describe('listModels', () => { it('invokes listModels without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var modelElement = {}; - var model = [modelElement]; - var expectedResponse = { + const nextPageToken = ''; + const modelElement = {}; + const model = [modelElement]; + const expectedResponse = { nextPageToken: nextPageToken, model: model, }; @@ -803,14 +803,14 @@ describe('AutoMlClient', () => { }); it('invokes listModels with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; @@ -832,23 +832,23 @@ describe('AutoMlClient', () => { describe('deleteModel', function() { it('invokes deleteModel without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.deleteModel = mockLongRunningGrpcMethod( @@ -859,7 +859,7 @@ describe('AutoMlClient', () => { client .deleteModel(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -872,18 +872,18 @@ describe('AutoMlClient', () => { }); it('invokes deleteModel with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; @@ -897,7 +897,7 @@ describe('AutoMlClient', () => { client .deleteModel(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -911,7 +911,7 @@ describe('AutoMlClient', () => { }); it('has longrunning decoder functions', () => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -928,25 +928,25 @@ describe('AutoMlClient', () => { describe('deployModel', () => { it('invokes deployModel without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var done_ = true; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const done_ = true; + const expectedResponse = { name: name2, done: done_, }; @@ -965,18 +965,18 @@ describe('AutoMlClient', () => { }); it('invokes deployModel with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; @@ -998,25 +998,25 @@ describe('AutoMlClient', () => { describe('undeployModel', () => { it('invokes undeployModel without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var done_ = true; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const done_ = true; + const expectedResponse = { name: name2, done: done_, }; @@ -1035,18 +1035,18 @@ describe('AutoMlClient', () => { }); it('invokes undeployModel with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelPath( + const formattedName = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { name: formattedName, }; @@ -1068,27 +1068,27 @@ describe('AutoMlClient', () => { describe('getModelEvaluation', () => { it('invokes getModelEvaluation without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelEvaluationPath( + const formattedName = client.modelEvaluationPath( '[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var annotationSpecId = 'annotationSpecId60690191'; - var evaluatedExampleCount = 277565350; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const annotationSpecId = 'annotationSpecId60690191'; + const evaluatedExampleCount = 277565350; + const expectedResponse = { name: name2, annotationSpecId: annotationSpecId, evaluatedExampleCount: evaluatedExampleCount, @@ -1108,19 +1108,19 @@ describe('AutoMlClient', () => { }); it('invokes getModelEvaluation with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.modelEvaluationPath( + const formattedName = client.modelEvaluationPath( '[PROJECT]', '[LOCATION]', '[MODEL]', '[MODEL_EVALUATION]' ); - var request = { + const request = { name: formattedName, }; @@ -1142,26 +1142,26 @@ describe('AutoMlClient', () => { describe('listModelEvaluations', () => { it('invokes listModelEvaluations without error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.modelPath( + const formattedParent = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var modelEvaluationElement = {}; - var modelEvaluation = [modelEvaluationElement]; - var expectedResponse = { + const nextPageToken = ''; + const modelEvaluationElement = {}; + const modelEvaluation = [modelEvaluationElement]; + const expectedResponse = { nextPageToken: nextPageToken, modelEvaluation: modelEvaluation, }; @@ -1184,18 +1184,18 @@ describe('AutoMlClient', () => { }); it('invokes listModelEvaluations with error', done => { - var client = new automlModule.v1beta1.AutoMlClient({ + const client = new automlModule.v1beta1.AutoMlClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.modelPath( + const formattedParent = client.modelPath( '[PROJECT]', '[LOCATION]', '[MODEL]' ); - var request = { + const request = { parent: formattedParent, }; @@ -1232,7 +1232,7 @@ function mockSimpleGrpcMethod(expectedRequest, response, error) { function mockLongRunningGrpcMethod(expectedRequest, response, error) { return request => { assert.deepStrictEqual(request, expectedRequest); - var mockOperation = { + const mockOperation = { promise: function() { return new Promise((resolve, reject) => { if (error) {