From 240165c44567428bda3564e0933c17734cd80b76 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 14 Sep 2018 08:40:50 -0700 Subject: [PATCH] Switch to let/const (#97) --- .../v1/doc_video_intelligence.js | 48 ++++++++--------- .../doc/google/longrunning/doc_operations.js | 12 ++--- .../src/v1/doc/google/protobuf/doc_any.js | 2 +- .../v1/doc/google/protobuf/doc_duration.js | 2 +- .../src/v1/doc/google/rpc/doc_status.js | 2 +- .../v1/video_intelligence_service_client.js | 52 +++++++++---------- .../v1beta1/doc_video_intelligence.js | 34 ++++++------ .../doc/google/longrunning/doc_operations.js | 12 ++--- .../v1beta1/doc/google/protobuf/doc_any.js | 2 +- .../src/v1beta1/doc/google/rpc/doc_status.js | 2 +- .../video_intelligence_service_client.js | 52 +++++++++---------- .../v1beta2/doc_video_intelligence.js | 48 ++++++++--------- .../doc/google/longrunning/doc_operations.js | 12 ++--- .../v1beta2/doc/google/protobuf/doc_any.js | 2 +- .../doc/google/protobuf/doc_duration.js | 2 +- .../src/v1beta2/doc/google/rpc/doc_status.js | 2 +- .../video_intelligence_service_client.js | 52 +++++++++---------- .../v1p1beta1/doc_video_intelligence.js | 48 ++++++++--------- .../doc/google/longrunning/doc_operations.js | 12 ++--- .../v1p1beta1/doc/google/protobuf/doc_any.js | 2 +- .../doc/google/protobuf/doc_duration.js | 2 +- .../v1p1beta1/doc/google/rpc/doc_status.js | 2 +- .../video_intelligence_service_client.js | 52 +++++++++---------- .../test/gapic-v1.js | 34 ++++++------ .../test/gapic-v1beta1.js | 34 ++++++------ .../test/gapic-v1beta2.js | 34 ++++++------ .../test/gapic-v1p1beta1.js | 34 ++++++------ 27 files changed, 296 insertions(+), 296 deletions(-) diff --git a/packages/google-cloud-videointelligence/src/v1/doc/google/cloud/videointelligence/v1/doc_video_intelligence.js b/packages/google-cloud-videointelligence/src/v1/doc/google/cloud/videointelligence/v1/doc_video_intelligence.js index c882a671cc3..d8dce9b8e51 100644 --- a/packages/google-cloud-videointelligence/src/v1/doc/google/cloud/videointelligence/v1/doc_video_intelligence.js +++ b/packages/google-cloud-videointelligence/src/v1/doc/google/cloud/videointelligence/v1/doc_video_intelligence.js @@ -62,7 +62,7 @@ * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.AnnotateVideoRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var AnnotateVideoRequest = { +const AnnotateVideoRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -100,7 +100,7 @@ var AnnotateVideoRequest = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.VideoContext definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var VideoContext = { +const VideoContext = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -128,7 +128,7 @@ var VideoContext = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.LabelDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var LabelDetectionConfig = { +const LabelDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -144,7 +144,7 @@ var LabelDetectionConfig = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.ShotChangeDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var ShotChangeDetectionConfig = { +const ShotChangeDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -160,7 +160,7 @@ var ShotChangeDetectionConfig = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.ExplicitContentDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var ExplicitContentDetectionConfig = { +const ExplicitContentDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -179,7 +179,7 @@ var ExplicitContentDetectionConfig = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.FaceDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var FaceDetectionConfig = { +const FaceDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -202,7 +202,7 @@ var FaceDetectionConfig = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.VideoSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var VideoSegment = { +const VideoSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -221,7 +221,7 @@ var VideoSegment = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.LabelSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var LabelSegment = { +const LabelSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -241,7 +241,7 @@ var LabelSegment = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.LabelFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var LabelFrame = { +const LabelFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -263,7 +263,7 @@ var LabelFrame = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var Entity = { +const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -297,7 +297,7 @@ var Entity = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.LabelAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var LabelAnnotation = { +const LabelAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -319,7 +319,7 @@ var LabelAnnotation = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.ExplicitContentFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var ExplicitContentFrame = { +const ExplicitContentFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -337,7 +337,7 @@ var ExplicitContentFrame = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.ExplicitContentAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var ExplicitContentAnnotation = { +const ExplicitContentAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -362,7 +362,7 @@ var ExplicitContentAnnotation = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.NormalizedBoundingBox definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var NormalizedBoundingBox = { +const NormalizedBoundingBox = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -378,7 +378,7 @@ var NormalizedBoundingBox = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.FaceSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var FaceSegment = { +const FaceSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -402,7 +402,7 @@ var FaceSegment = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.FaceFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var FaceFrame = { +const FaceFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -426,7 +426,7 @@ var FaceFrame = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.FaceAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var FaceAnnotation = { +const FaceAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -480,7 +480,7 @@ var FaceAnnotation = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.VideoAnnotationResults definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var VideoAnnotationResults = { +const VideoAnnotationResults = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -498,7 +498,7 @@ var VideoAnnotationResults = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.AnnotateVideoResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var AnnotateVideoResponse = { +const AnnotateVideoResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -527,7 +527,7 @@ var AnnotateVideoResponse = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.VideoAnnotationProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var VideoAnnotationProgress = { +const VideoAnnotationProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -545,7 +545,7 @@ var VideoAnnotationProgress = { * @memberof google.cloud.videointelligence.v1 * @see [google.cloud.videointelligence.v1.AnnotateVideoProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1/video_intelligence.proto} */ -var AnnotateVideoProgress = { +const AnnotateVideoProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -555,7 +555,7 @@ var AnnotateVideoProgress = { * @enum {number} * @memberof google.cloud.videointelligence.v1 */ -var Feature = { +const Feature = { /** * Unspecified. @@ -589,7 +589,7 @@ var Feature = { * @enum {number} * @memberof google.cloud.videointelligence.v1 */ -var LabelDetectionMode = { +const LabelDetectionMode = { /** * Unspecified. @@ -618,7 +618,7 @@ var LabelDetectionMode = { * @enum {number} * @memberof google.cloud.videointelligence.v1 */ -var Likelihood = { +const Likelihood = { /** * Unspecified likelihood. diff --git a/packages/google-cloud-videointelligence/src/v1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-videointelligence/src/v1/doc/google/longrunning/doc_operations.js index 79ef6344437..4af5d7d3574 100644 --- a/packages/google-cloud-videointelligence/src/v1/doc/google/longrunning/doc_operations.js +++ b/packages/google-cloud-videointelligence/src/v1/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-videointelligence/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-videointelligence/src/v1/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-videointelligence/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-videointelligence/src/v1/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-videointelligence/src/v1/doc/google/protobuf/doc_duration.js b/packages/google-cloud-videointelligence/src/v1/doc/google/protobuf/doc_duration.js index 3ea5c376abb..c03ce2fb3df 100644 --- a/packages/google-cloud-videointelligence/src/v1/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-videointelligence/src/v1/doc/google/protobuf/doc_duration.js @@ -92,6 +92,6 @@ * @memberof google.protobuf * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ -var Duration = { +const Duration = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-videointelligence/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-videointelligence/src/v1/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-videointelligence/src/v1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-videointelligence/src/v1/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-videointelligence/src/v1/video_intelligence_service_client.js b/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.js index 59a23d41e8f..6ed0c6467e6 100644 --- a/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.js +++ b/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.js @@ -72,13 +72,13 @@ class VideoIntelligenceServiceClient { // 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}`, @@ -89,14 +89,14 @@ class VideoIntelligenceServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), 'google/cloud/videointelligence/v1/video_intelligence.proto' ) ); - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -116,10 +116,10 @@ class VideoIntelligenceServiceClient { grpc: gaxGrpc.grpc, }).operationsClient(opts); - var annotateVideoResponse = protoFilesRoot.lookup( + const annotateVideoResponse = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1.AnnotateVideoResponse' ); - var annotateVideoMetadata = protoFilesRoot.lookup( + const annotateVideoMetadata = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1.AnnotateVideoProgress' ); @@ -132,7 +132,7 @@ class VideoIntelligenceServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.videointelligence.v1.VideoIntelligenceService', gapicConfig, opts.clientConfig, @@ -146,20 +146,20 @@ class VideoIntelligenceServiceClient { // Put together the "service stub" for // google.cloud.videointelligence.v1.VideoIntelligenceService. - var videoIntelligenceServiceStub = gaxGrpc.createStub( + const videoIntelligenceServiceStub = gaxGrpc.createStub( protos.google.cloud.videointelligence.v1.VideoIntelligenceService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var videoIntelligenceServiceStubMethods = ['annotateVideo']; + const videoIntelligenceServiceStubMethods = ['annotateVideo']; for (let methodName of videoIntelligenceServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( videoIntelligenceServiceStub.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); } ), @@ -261,14 +261,14 @@ class VideoIntelligenceServiceClient { * * const videoIntelligence = require('@google-cloud/video-intelligence'); * - * var client = new videoIntelligence.v1.VideoIntelligenceServiceClient({ + * const client = new videoIntelligence.v1.VideoIntelligenceServiceClient({ * // optional auth parameters. * }); * - * var inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -276,30 +276,30 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the promise pattern. * client.annotateVideo(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 inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -307,8 +307,8 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the event emitter pattern. * client.annotateVideo(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. diff --git a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/cloud/videointelligence/v1beta1/doc_video_intelligence.js b/packages/google-cloud-videointelligence/src/v1beta1/doc/google/cloud/videointelligence/v1beta1/doc_video_intelligence.js index 2d10356f406..01e20f52221 100644 --- a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/cloud/videointelligence/v1beta1/doc_video_intelligence.js +++ b/packages/google-cloud-videointelligence/src/v1beta1/doc/google/cloud/videointelligence/v1beta1/doc_video_intelligence.js @@ -61,7 +61,7 @@ * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.AnnotateVideoRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var AnnotateVideoRequest = { +const AnnotateVideoRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -106,7 +106,7 @@ var AnnotateVideoRequest = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.VideoContext definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var VideoContext = { +const VideoContext = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -123,7 +123,7 @@ var VideoContext = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.VideoSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var VideoSegment = { +const VideoSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -150,7 +150,7 @@ var VideoSegment = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.LabelLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var LabelLocation = { +const LabelLocation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -172,7 +172,7 @@ var LabelLocation = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.LabelAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var LabelAnnotation = { +const LabelAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -216,7 +216,7 @@ var LabelAnnotation = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.SafeSearchAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var SafeSearchAnnotation = { +const SafeSearchAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -239,7 +239,7 @@ var SafeSearchAnnotation = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.BoundingBox definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var BoundingBox = { +const BoundingBox = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -258,7 +258,7 @@ var BoundingBox = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.FaceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var FaceLocation = { +const FaceLocation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -284,7 +284,7 @@ var FaceLocation = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.FaceAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var FaceAnnotation = { +const FaceAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -325,7 +325,7 @@ var FaceAnnotation = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.VideoAnnotationResults definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var VideoAnnotationResults = { +const VideoAnnotationResults = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -343,7 +343,7 @@ var VideoAnnotationResults = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.AnnotateVideoResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var AnnotateVideoResponse = { +const AnnotateVideoResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -372,7 +372,7 @@ var AnnotateVideoResponse = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.VideoAnnotationProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var VideoAnnotationProgress = { +const VideoAnnotationProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -390,7 +390,7 @@ var VideoAnnotationProgress = { * @memberof google.cloud.videointelligence.v1beta1 * @see [google.cloud.videointelligence.v1beta1.AnnotateVideoProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto} */ -var AnnotateVideoProgress = { +const AnnotateVideoProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -400,7 +400,7 @@ var AnnotateVideoProgress = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta1 */ -var Feature = { +const Feature = { /** * Unspecified. @@ -434,7 +434,7 @@ var Feature = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta1 */ -var LabelLevel = { +const LabelLevel = { /** * Unspecified. @@ -469,7 +469,7 @@ var LabelLevel = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta1 */ -var LabelDetectionMode = { +const LabelDetectionMode = { /** * Unspecified. @@ -498,7 +498,7 @@ var LabelDetectionMode = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta1 */ -var Likelihood = { +const Likelihood = { /** * Unknown likelihood. diff --git a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-videointelligence/src/v1beta1/doc/google/longrunning/doc_operations.js index 79ef6344437..4af5d7d3574 100644 --- a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/longrunning/doc_operations.js +++ b/packages/google-cloud-videointelligence/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-videointelligence/src/v1beta1/doc/google/protobuf/doc_any.js b/packages/google-cloud-videointelligence/src/v1beta1/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-videointelligence/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-videointelligence/src/v1beta1/doc/google/rpc/doc_status.js b/packages/google-cloud-videointelligence/src/v1beta1/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-videointelligence/src/v1beta1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-videointelligence/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-videointelligence/src/v1beta1/video_intelligence_service_client.js b/packages/google-cloud-videointelligence/src/v1beta1/video_intelligence_service_client.js index f2b6447aefd..90327fc9706 100644 --- a/packages/google-cloud-videointelligence/src/v1beta1/video_intelligence_service_client.js +++ b/packages/google-cloud-videointelligence/src/v1beta1/video_intelligence_service_client.js @@ -72,13 +72,13 @@ class VideoIntelligenceServiceClient { // 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}`, @@ -89,14 +89,14 @@ class VideoIntelligenceServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), 'google/cloud/videointelligence/v1beta1/video_intelligence.proto' ) ); - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -116,10 +116,10 @@ class VideoIntelligenceServiceClient { grpc: gaxGrpc.grpc, }).operationsClient(opts); - var annotateVideoResponse = protoFilesRoot.lookup( + const annotateVideoResponse = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1beta1.AnnotateVideoResponse' ); - var annotateVideoMetadata = protoFilesRoot.lookup( + const annotateVideoMetadata = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1beta1.AnnotateVideoProgress' ); @@ -132,7 +132,7 @@ class VideoIntelligenceServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.videointelligence.v1beta1.VideoIntelligenceService', gapicConfig, opts.clientConfig, @@ -146,20 +146,20 @@ class VideoIntelligenceServiceClient { // Put together the "service stub" for // google.cloud.videointelligence.v1beta1.VideoIntelligenceService. - var videoIntelligenceServiceStub = gaxGrpc.createStub( + const videoIntelligenceServiceStub = gaxGrpc.createStub( protos.google.cloud.videointelligence.v1beta1.VideoIntelligenceService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var videoIntelligenceServiceStubMethods = ['annotateVideo']; + const videoIntelligenceServiceStubMethods = ['annotateVideo']; for (let methodName of videoIntelligenceServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( videoIntelligenceServiceStub.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); } ), @@ -260,14 +260,14 @@ class VideoIntelligenceServiceClient { * * const videointelligence = require('@google-cloud/videointelligence'); * - * var client = new videointelligence.v1beta1.VideoIntelligenceServiceClient({ + * const client = new videointelligence.v1beta1.VideoIntelligenceServiceClient({ * // optional auth parameters. * }); * - * var inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -275,30 +275,30 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the promise pattern. * client.annotateVideo(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 inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -306,8 +306,8 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the event emitter pattern. * client.annotateVideo(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. diff --git a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/cloud/videointelligence/v1beta2/doc_video_intelligence.js b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/cloud/videointelligence/v1beta2/doc_video_intelligence.js index 0b6902adc13..cbb27216ab0 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/cloud/videointelligence/v1beta2/doc_video_intelligence.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/cloud/videointelligence/v1beta2/doc_video_intelligence.js @@ -62,7 +62,7 @@ * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.AnnotateVideoRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var AnnotateVideoRequest = { +const AnnotateVideoRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -100,7 +100,7 @@ var AnnotateVideoRequest = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.VideoContext definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var VideoContext = { +const VideoContext = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -128,7 +128,7 @@ var VideoContext = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.LabelDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var LabelDetectionConfig = { +const LabelDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -144,7 +144,7 @@ var LabelDetectionConfig = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.ShotChangeDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var ShotChangeDetectionConfig = { +const ShotChangeDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -160,7 +160,7 @@ var ShotChangeDetectionConfig = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.ExplicitContentDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var ExplicitContentDetectionConfig = { +const ExplicitContentDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -179,7 +179,7 @@ var ExplicitContentDetectionConfig = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.FaceDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var FaceDetectionConfig = { +const FaceDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -202,7 +202,7 @@ var FaceDetectionConfig = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.VideoSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var VideoSegment = { +const VideoSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -221,7 +221,7 @@ var VideoSegment = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.LabelSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var LabelSegment = { +const LabelSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -241,7 +241,7 @@ var LabelSegment = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.LabelFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var LabelFrame = { +const LabelFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -263,7 +263,7 @@ var LabelFrame = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var Entity = { +const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -297,7 +297,7 @@ var Entity = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.LabelAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var LabelAnnotation = { +const LabelAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -319,7 +319,7 @@ var LabelAnnotation = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.ExplicitContentFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var ExplicitContentFrame = { +const ExplicitContentFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -337,7 +337,7 @@ var ExplicitContentFrame = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var ExplicitContentAnnotation = { +const ExplicitContentAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -362,7 +362,7 @@ var ExplicitContentAnnotation = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.NormalizedBoundingBox definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var NormalizedBoundingBox = { +const NormalizedBoundingBox = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -378,7 +378,7 @@ var NormalizedBoundingBox = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.FaceSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var FaceSegment = { +const FaceSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -402,7 +402,7 @@ var FaceSegment = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.FaceFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var FaceFrame = { +const FaceFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -426,7 +426,7 @@ var FaceFrame = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.FaceAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var FaceAnnotation = { +const FaceAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -480,7 +480,7 @@ var FaceAnnotation = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.VideoAnnotationResults definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var VideoAnnotationResults = { +const VideoAnnotationResults = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -498,7 +498,7 @@ var VideoAnnotationResults = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.AnnotateVideoResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var AnnotateVideoResponse = { +const AnnotateVideoResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -527,7 +527,7 @@ var AnnotateVideoResponse = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.VideoAnnotationProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var VideoAnnotationProgress = { +const VideoAnnotationProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -545,7 +545,7 @@ var VideoAnnotationProgress = { * @memberof google.cloud.videointelligence.v1beta2 * @see [google.cloud.videointelligence.v1beta2.AnnotateVideoProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta2/video_intelligence.proto} */ -var AnnotateVideoProgress = { +const AnnotateVideoProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -555,7 +555,7 @@ var AnnotateVideoProgress = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta2 */ -var Feature = { +const Feature = { /** * Unspecified. @@ -589,7 +589,7 @@ var Feature = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta2 */ -var LabelDetectionMode = { +const LabelDetectionMode = { /** * Unspecified. @@ -618,7 +618,7 @@ var LabelDetectionMode = { * @enum {number} * @memberof google.cloud.videointelligence.v1beta2 */ -var Likelihood = { +const Likelihood = { /** * Unspecified likelihood. diff --git a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/longrunning/doc_operations.js b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/longrunning/doc_operations.js index 79ef6344437..4af5d7d3574 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/longrunning/doc_operations.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/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-videointelligence/src/v1beta2/doc/google/protobuf/doc_any.js b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/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-videointelligence/src/v1beta2/doc/google/protobuf/doc_duration.js b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/protobuf/doc_duration.js index 3ea5c376abb..c03ce2fb3df 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/protobuf/doc_duration.js @@ -92,6 +92,6 @@ * @memberof google.protobuf * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ -var Duration = { +const Duration = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/rpc/doc_status.js b/packages/google-cloud-videointelligence/src/v1beta2/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/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-videointelligence/src/v1beta2/video_intelligence_service_client.js b/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.js index 5aa1e3e90fd..6b73c09e508 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.js +++ b/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.js @@ -72,13 +72,13 @@ class VideoIntelligenceServiceClient { // 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}`, @@ -89,14 +89,14 @@ class VideoIntelligenceServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), 'google/cloud/videointelligence/v1beta2/video_intelligence.proto' ) ); - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -116,10 +116,10 @@ class VideoIntelligenceServiceClient { grpc: gaxGrpc.grpc, }).operationsClient(opts); - var annotateVideoResponse = protoFilesRoot.lookup( + const annotateVideoResponse = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1beta2.AnnotateVideoResponse' ); - var annotateVideoMetadata = protoFilesRoot.lookup( + const annotateVideoMetadata = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1beta2.AnnotateVideoProgress' ); @@ -132,7 +132,7 @@ class VideoIntelligenceServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.videointelligence.v1beta2.VideoIntelligenceService', gapicConfig, opts.clientConfig, @@ -146,20 +146,20 @@ class VideoIntelligenceServiceClient { // Put together the "service stub" for // google.cloud.videointelligence.v1beta2.VideoIntelligenceService. - var videoIntelligenceServiceStub = gaxGrpc.createStub( + const videoIntelligenceServiceStub = gaxGrpc.createStub( protos.google.cloud.videointelligence.v1beta2.VideoIntelligenceService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var videoIntelligenceServiceStubMethods = ['annotateVideo']; + const videoIntelligenceServiceStubMethods = ['annotateVideo']; for (let methodName of videoIntelligenceServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( videoIntelligenceServiceStub.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); } ), @@ -261,14 +261,14 @@ class VideoIntelligenceServiceClient { * * const videoIntelligence = require('@google-cloud/video-intelligence'); * - * var client = new videoIntelligence.v1beta2.VideoIntelligenceServiceClient({ + * const client = new videoIntelligence.v1beta2.VideoIntelligenceServiceClient({ * // optional auth parameters. * }); * - * var inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -276,30 +276,30 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the promise pattern. * client.annotateVideo(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 inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -307,8 +307,8 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the event emitter pattern. * client.annotateVideo(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. diff --git a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/doc_video_intelligence.js b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/doc_video_intelligence.js index bcd79fedc26..771b44aa26e 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/doc_video_intelligence.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/doc_video_intelligence.js @@ -62,7 +62,7 @@ * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var AnnotateVideoRequest = { +const AnnotateVideoRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -100,7 +100,7 @@ var AnnotateVideoRequest = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.VideoContext definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var VideoContext = { +const VideoContext = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -128,7 +128,7 @@ var VideoContext = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var LabelDetectionConfig = { +const LabelDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -144,7 +144,7 @@ var LabelDetectionConfig = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var ShotChangeDetectionConfig = { +const ShotChangeDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -160,7 +160,7 @@ var ShotChangeDetectionConfig = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var ExplicitContentDetectionConfig = { +const ExplicitContentDetectionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -183,7 +183,7 @@ var ExplicitContentDetectionConfig = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.VideoSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var VideoSegment = { +const VideoSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -202,7 +202,7 @@ var VideoSegment = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.LabelSegment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var LabelSegment = { +const LabelSegment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -222,7 +222,7 @@ var LabelSegment = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.LabelFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var LabelFrame = { +const LabelFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -244,7 +244,7 @@ var LabelFrame = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var Entity = { +const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -278,7 +278,7 @@ var Entity = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.LabelAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var LabelAnnotation = { +const LabelAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -300,7 +300,7 @@ var LabelAnnotation = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var ExplicitContentFrame = { +const ExplicitContentFrame = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -318,7 +318,7 @@ var ExplicitContentFrame = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var ExplicitContentAnnotation = { +const ExplicitContentAnnotation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -372,7 +372,7 @@ var ExplicitContentAnnotation = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var VideoAnnotationResults = { +const VideoAnnotationResults = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -390,7 +390,7 @@ var VideoAnnotationResults = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var AnnotateVideoResponse = { +const AnnotateVideoResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -419,7 +419,7 @@ var AnnotateVideoResponse = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var VideoAnnotationProgress = { +const VideoAnnotationProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -437,7 +437,7 @@ var VideoAnnotationProgress = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var AnnotateVideoProgress = { +const AnnotateVideoProgress = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -485,7 +485,7 @@ var AnnotateVideoProgress = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var SpeechTranscriptionConfig = { +const SpeechTranscriptionConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -505,7 +505,7 @@ var SpeechTranscriptionConfig = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.SpeechContext definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var SpeechContext = { +const SpeechContext = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -524,7 +524,7 @@ var SpeechContext = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.SpeechTranscription definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var SpeechTranscription = { +const SpeechTranscription = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -551,7 +551,7 @@ var SpeechTranscription = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var SpeechRecognitionAlternative = { +const SpeechRecognitionAlternative = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -583,7 +583,7 @@ var SpeechRecognitionAlternative = { * @memberof google.cloud.videointelligence.v1p1beta1 * @see [google.cloud.videointelligence.v1p1beta1.WordInfo definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto} */ -var WordInfo = { +const WordInfo = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -593,7 +593,7 @@ var WordInfo = { * @enum {number} * @memberof google.cloud.videointelligence.v1p1beta1 */ -var Feature = { +const Feature = { /** * Unspecified. @@ -627,7 +627,7 @@ var Feature = { * @enum {number} * @memberof google.cloud.videointelligence.v1p1beta1 */ -var LabelDetectionMode = { +const LabelDetectionMode = { /** * Unspecified. @@ -656,7 +656,7 @@ var LabelDetectionMode = { * @enum {number} * @memberof google.cloud.videointelligence.v1p1beta1 */ -var Likelihood = { +const Likelihood = { /** * Unspecified likelihood. diff --git a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/longrunning/doc_operations.js b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/longrunning/doc_operations.js index 79ef6344437..4af5d7d3574 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/longrunning/doc_operations.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/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-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_any.js b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/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-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_duration.js b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_duration.js index 3ea5c376abb..c03ce2fb3df 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/protobuf/doc_duration.js @@ -92,6 +92,6 @@ * @memberof google.protobuf * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ -var Duration = { +const Duration = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/rpc/doc_status.js b/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/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-videointelligence/src/v1p1beta1/video_intelligence_service_client.js b/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.js index f53fdcdcdc4..81231d06fb6 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.js +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.js @@ -72,13 +72,13 @@ class VideoIntelligenceServiceClient { // 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}`, @@ -89,14 +89,14 @@ class VideoIntelligenceServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), 'google/cloud/videointelligence/v1p1beta1/video_intelligence.proto' ) ); - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -116,10 +116,10 @@ class VideoIntelligenceServiceClient { grpc: gaxGrpc.grpc, }).operationsClient(opts); - var annotateVideoResponse = protoFilesRoot.lookup( + const annotateVideoResponse = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse' ); - var annotateVideoMetadata = protoFilesRoot.lookup( + const annotateVideoMetadata = protoFilesRoot.lookup( 'google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress' ); @@ -132,7 +132,7 @@ class VideoIntelligenceServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService', gapicConfig, opts.clientConfig, @@ -146,20 +146,20 @@ class VideoIntelligenceServiceClient { // Put together the "service stub" for // google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService. - var videoIntelligenceServiceStub = gaxGrpc.createStub( + const videoIntelligenceServiceStub = gaxGrpc.createStub( protos.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var videoIntelligenceServiceStubMethods = ['annotateVideo']; + const videoIntelligenceServiceStubMethods = ['annotateVideo']; for (let methodName of videoIntelligenceServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( videoIntelligenceServiceStub.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); } ), @@ -261,14 +261,14 @@ class VideoIntelligenceServiceClient { * * const videoIntelligence = require('@google-cloud/video-intelligence'); * - * var client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient({ + * const client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient({ * // optional auth parameters. * }); * - * var inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -276,30 +276,30 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the promise pattern. * client.annotateVideo(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 inputUri = 'gs://demomaker/cat.mp4'; - * var featuresElement = 'LABEL_DETECTION'; - * var features = [featuresElement]; - * var request = { + * const inputUri = 'gs://demomaker/cat.mp4'; + * const featuresElement = 'LABEL_DETECTION'; + * const features = [featuresElement]; + * const request = { * inputUri: inputUri, * features: features, * }; @@ -307,8 +307,8 @@ class VideoIntelligenceServiceClient { * // Handle the operation using the event emitter pattern. * client.annotateVideo(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. diff --git a/packages/google-cloud-videointelligence/test/gapic-v1.js b/packages/google-cloud-videointelligence/test/gapic-v1.js index 2b44f38b13e..98e1478a85e 100644 --- a/packages/google-cloud-videointelligence/test/gapic-v1.js +++ b/packages/google-cloud-videointelligence/test/gapic-v1.js @@ -18,14 +18,14 @@ const assert = require('assert'); const videoIntelligenceModule = 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('VideoIntelligenceServiceClient', () => { describe('annotateVideo', function() { it('invokes annotateVideo without error', done => { - var client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -33,16 +33,16 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.annotateVideo = mockLongRunningGrpcMethod( @@ -53,7 +53,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -66,7 +66,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('invokes annotateVideo with error', done => { - var client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -74,10 +74,10 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; @@ -92,7 +92,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -106,7 +106,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('has longrunning decoder functions', () => { - var client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -127,7 +127,7 @@ describe('VideoIntelligenceServiceClient', () => { function mockLongRunningGrpcMethod(expectedRequest, response, error) { return request => { assert.deepStrictEqual(request, expectedRequest); - var mockOperation = { + const mockOperation = { promise: function() { return new Promise((resolve, reject) => { if (error) { diff --git a/packages/google-cloud-videointelligence/test/gapic-v1beta1.js b/packages/google-cloud-videointelligence/test/gapic-v1beta1.js index e19c91d2dfa..beb3ce95dec 100644 --- a/packages/google-cloud-videointelligence/test/gapic-v1beta1.js +++ b/packages/google-cloud-videointelligence/test/gapic-v1beta1.js @@ -18,14 +18,14 @@ const assert = require('assert'); const videointelligenceModule = 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('VideoIntelligenceServiceClient', () => { describe('annotateVideo', function() { it('invokes annotateVideo without error', done => { - var client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( + const client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -33,16 +33,16 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.annotateVideo = mockLongRunningGrpcMethod( @@ -53,7 +53,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -66,7 +66,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('invokes annotateVideo with error', done => { - var client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( + const client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -74,10 +74,10 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; @@ -92,7 +92,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -106,7 +106,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('has longrunning decoder functions', () => { - var client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( + const client = new videointelligenceModule.v1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -127,7 +127,7 @@ describe('VideoIntelligenceServiceClient', () => { function mockLongRunningGrpcMethod(expectedRequest, response, error) { return request => { assert.deepStrictEqual(request, expectedRequest); - var mockOperation = { + const mockOperation = { promise: function() { return new Promise((resolve, reject) => { if (error) { diff --git a/packages/google-cloud-videointelligence/test/gapic-v1beta2.js b/packages/google-cloud-videointelligence/test/gapic-v1beta2.js index b95d496fdbc..befa16c4c00 100644 --- a/packages/google-cloud-videointelligence/test/gapic-v1beta2.js +++ b/packages/google-cloud-videointelligence/test/gapic-v1beta2.js @@ -18,14 +18,14 @@ const assert = require('assert'); const videoIntelligenceModule = 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('VideoIntelligenceServiceClient', () => { describe('annotateVideo', function() { it('invokes annotateVideo without error', done => { - var client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -33,16 +33,16 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.annotateVideo = mockLongRunningGrpcMethod( @@ -53,7 +53,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -66,7 +66,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('invokes annotateVideo with error', done => { - var client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -74,10 +74,10 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; @@ -92,7 +92,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -106,7 +106,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('has longrunning decoder functions', () => { - var client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1beta2.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -127,7 +127,7 @@ describe('VideoIntelligenceServiceClient', () => { function mockLongRunningGrpcMethod(expectedRequest, response, error) { return request => { assert.deepStrictEqual(request, expectedRequest); - var mockOperation = { + const mockOperation = { promise: function() { return new Promise((resolve, reject) => { if (error) { diff --git a/packages/google-cloud-videointelligence/test/gapic-v1p1beta1.js b/packages/google-cloud-videointelligence/test/gapic-v1p1beta1.js index bdb48809016..c9e7ac6cc78 100644 --- a/packages/google-cloud-videointelligence/test/gapic-v1p1beta1.js +++ b/packages/google-cloud-videointelligence/test/gapic-v1p1beta1.js @@ -18,14 +18,14 @@ const assert = require('assert'); const videoIntelligenceModule = 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('VideoIntelligenceServiceClient', () => { describe('annotateVideo', function() { it('invokes annotateVideo without error', done => { - var client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -33,16 +33,16 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.annotateVideo = mockLongRunningGrpcMethod( @@ -53,7 +53,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(responses => { @@ -66,7 +66,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('invokes annotateVideo with error', done => { - var client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -74,10 +74,10 @@ describe('VideoIntelligenceServiceClient', () => { ); // Mock request - var inputUri = 'gs://demomaker/cat.mp4'; - var featuresElement = 'LABEL_DETECTION'; - var features = [featuresElement]; - var request = { + const inputUri = 'gs://demomaker/cat.mp4'; + const featuresElement = 'LABEL_DETECTION'; + const features = [featuresElement]; + const request = { inputUri: inputUri, features: features, }; @@ -92,7 +92,7 @@ describe('VideoIntelligenceServiceClient', () => { client .annotateVideo(request) .then(responses => { - var operation = responses[0]; + const operation = responses[0]; return operation.promise(); }) .then(() => { @@ -106,7 +106,7 @@ describe('VideoIntelligenceServiceClient', () => { }); it('has longrunning decoder functions', () => { - var client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( + const client = new videoIntelligenceModule.v1p1beta1.VideoIntelligenceServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -127,7 +127,7 @@ describe('VideoIntelligenceServiceClient', () => { function mockLongRunningGrpcMethod(expectedRequest, response, error) { return request => { assert.deepStrictEqual(request, expectedRequest); - var mockOperation = { + const mockOperation = { promise: function() { return new Promise((resolve, reject) => { if (error) {