From 68303116d70ac603cbef48c5d334469420966e6f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Sep 2021 11:10:02 -0700 Subject: [PATCH] docs: auto-generate samples and update protos (#622) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(ruby)!: Fix Ruby namespace for videointelligence/v1p3beta1 PiperOrigin-RevId: 399448269 Source-Link: https://github.com/googleapis/googleapis/commit/f75ccc2ee2dfc6328847a670b96cb8a56494acec Source-Link: https://github.com/googleapis/googleapis-gen/commit/6e2de2190c38b1e188523f28f4d32f958d2ad244 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmUyZGUyMTkwYzM4YjFlMTg4NTIzZjI4ZjRkMzJmOTU4ZDJhZDI0NCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v1p3beta1/video_intelligence.proto | 1 + .../protos/protos.json | 3 +- ...deo_intelligence_service.annotate_video.js | 95 +++++++++++++++++++ ...deo_intelligence_service.annotate_video.js | 94 ++++++++++++++++++ ...deo_intelligence_service.annotate_video.js | 94 ++++++++++++++++++ ...deo_intelligence_service.annotate_video.js | 92 ++++++++++++++++++ ...igence_service.streaming_annotate_video.js | 73 ++++++++++++++ ...deo_intelligence_service.annotate_video.js | 95 +++++++++++++++++++ 8 files changed, 546 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1/video_intelligence_service.annotate_video.js create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1beta2/video_intelligence_service.annotate_video.js create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1p1beta1/video_intelligence_service.annotate_video.js create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1p2beta1/video_intelligence_service.annotate_video.js create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1p3beta1/streaming_video_intelligence_service.streaming_annotate_video.js create mode 100644 packages/google-cloud-videointelligence/samples/generated/v1p3beta1/video_intelligence_service.annotate_video.js diff --git a/packages/google-cloud-videointelligence/protos/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto b/packages/google-cloud-videointelligence/protos/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto index 6284e0db384..db039e67a0c 100644 --- a/packages/google-cloud-videointelligence/protos/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto +++ b/packages/google-cloud-videointelligence/protos/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto @@ -30,6 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "VideoIntelligenceServiceProto"; option java_package = "com.google.cloud.videointelligence.v1p3beta1"; option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p3beta1"; +option ruby_package = "Google::Cloud::VideoIntelligence::V1p3beta1"; // Service that implements the Video Intelligence API. service VideoIntelligenceService { diff --git a/packages/google-cloud-videointelligence/protos/protos.json b/packages/google-cloud-videointelligence/protos/protos.json index 889e509528f..e8af7c9720f 100644 --- a/packages/google-cloud-videointelligence/protos/protos.json +++ b/packages/google-cloud-videointelligence/protos/protos.json @@ -2316,7 +2316,8 @@ "java_multiple_files": true, "java_outer_classname": "VideoIntelligenceServiceProto", "java_package": "com.google.cloud.videointelligence.v1p3beta1", - "php_namespace": "Google\\Cloud\\VideoIntelligence\\V1p3beta1" + "php_namespace": "Google\\Cloud\\VideoIntelligence\\V1p3beta1", + "ruby_package": "Google::Cloud::VideoIntelligence::V1p3beta1" }, "nested": { "VideoIntelligenceService": { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1/video_intelligence_service.annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1/video_intelligence_service.annotate_video.js new file mode 100644 index 00000000000..7ee3de84242 --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1/video_intelligence_service.annotate_video.js @@ -0,0 +1,95 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(features) { + // [START videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + */ + // const inputUri = 'abc123' + /** + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + */ + // const inputContent = 'Buffer.from('string')' + /** + * Required. Requested video annotation features. + */ + // const features = 1234 + /** + * Additional video context and/or feature-specific parameters. + */ + // const videoContext = '' + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + */ + // const outputUri = 'abc123' + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + */ + // const locationId = 'abc123' + + // Imports the Videointelligence library + const {VideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1; + + // Instantiates a client + const videointelligenceClient = new VideoIntelligenceServiceClient(); + + async function annotateVideo() { + // Construct request + const request = { + features, + }; + + // Run request + const [operation] = await videointelligenceClient.annotateVideo(request); + const [response] = await operation.promise(); + console.log(response); + } + + annotateVideo(); + // [END videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-videointelligence/samples/generated/v1beta2/video_intelligence_service.annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1beta2/video_intelligence_service.annotate_video.js new file mode 100644 index 00000000000..b24ac2f4520 --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1beta2/video_intelligence_service.annotate_video.js @@ -0,0 +1,94 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(features) { + // [START videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input video location. Currently, only + * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + * may include wildcards in `object-id`, and thus identify multiple videos. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` should be unset. + */ + // const inputUri = 'abc123' + /** + * The video data bytes. + * If unset, the input video(s) should be specified via `input_uri`. + * If set, `input_uri` should be unset. + */ + // const inputContent = 'Buffer.from('string')' + /** + * Required. Requested video annotation features. + */ + // const features = 1234 + /** + * Additional video context and/or feature-specific parameters. + */ + // const videoContext = '' + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + */ + // const outputUri = 'abc123' + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + * is specified, a region will be determined based on video file location. + */ + // const locationId = 'abc123' + + // Imports the Videointelligence library + const {VideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1beta2; + + // Instantiates a client + const videointelligenceClient = new VideoIntelligenceServiceClient(); + + async function annotateVideo() { + // Construct request + const request = { + features, + }; + + // Run request + const [operation] = await videointelligenceClient.annotateVideo(request); + const [response] = await operation.promise(); + console.log(response); + } + + annotateVideo(); + // [END videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/video_intelligence_service.annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/video_intelligence_service.annotate_video.js new file mode 100644 index 00000000000..3e38adc9897 --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/video_intelligence_service.annotate_video.js @@ -0,0 +1,94 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(features) { + // [START videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input video location. Currently, only + * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + * may include wildcards in `object-id`, and thus identify multiple videos. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` should be unset. + */ + // const inputUri = 'abc123' + /** + * The video data bytes. + * If unset, the input video(s) should be specified via `input_uri`. + * If set, `input_uri` should be unset. + */ + // const inputContent = 'Buffer.from('string')' + /** + * Required. Requested video annotation features. + */ + // const features = 1234 + /** + * Additional video context and/or feature-specific parameters. + */ + // const videoContext = '' + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + */ + // const outputUri = 'abc123' + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + * is specified, a region will be determined based on video file location. + */ + // const locationId = 'abc123' + + // Imports the Videointelligence library + const {VideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1p1beta1; + + // Instantiates a client + const videointelligenceClient = new VideoIntelligenceServiceClient(); + + async function annotateVideo() { + // Construct request + const request = { + features, + }; + + // Run request + const [operation] = await videointelligenceClient.annotateVideo(request); + const [response] = await operation.promise(); + console.log(response); + } + + annotateVideo(); + // [END videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/video_intelligence_service.annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/video_intelligence_service.annotate_video.js new file mode 100644 index 00000000000..25acb745d53 --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/video_intelligence_service.annotate_video.js @@ -0,0 +1,92 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(features) { + // [START videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input video location. Currently, only + * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + * [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + * A video URI may include wildcards in `object-id`, and thus identify + * multiple videos. Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` should be unset. + */ + // const inputUri = 'abc123' + /** + * The video data bytes. + * If unset, the input video(s) should be specified via `input_uri`. + * If set, `input_uri` should be unset. + */ + // const inputContent = 'Buffer.from('string')' + /** + * Required. Requested video annotation features. + */ + // const features = 1234 + /** + * Additional video context and/or feature-specific parameters. + */ + // const videoContext = '' + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + * [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + */ + // const outputUri = 'abc123' + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + * is specified, a region will be determined based on video file location. + */ + // const locationId = 'abc123' + + // Imports the Videointelligence library + const {VideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1p2beta1; + + // Instantiates a client + const videointelligenceClient = new VideoIntelligenceServiceClient(); + + async function annotateVideo() { + // Construct request + const request = { + features, + }; + + // Run request + const [operation] = await videointelligenceClient.annotateVideo(request); + const [response] = await operation.promise(); + console.log(response); + } + + annotateVideo(); + // [END videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/streaming_video_intelligence_service.streaming_annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/streaming_video_intelligence_service.streaming_annotate_video.js new file mode 100644 index 00000000000..b8c61184c0a --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/streaming_video_intelligence_service.streaming_annotate_video.js @@ -0,0 +1,73 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Provides information to the annotator, specifing how to process the + * request. The first `AnnotateStreamingVideoRequest` message must only + * contain a `video_config` message. + */ + // const videoConfig = '' + /** + * The video data to be annotated. Chunks of video data are sequentially + * sent in `StreamingAnnotateVideoRequest` messages. Except the initial + * `StreamingAnnotateVideoRequest` message containing only + * `video_config`, all subsequent `AnnotateStreamingVideoRequest` + * messages must only contain `input_content` field. + * Note: as with all bytes fields, protobuffers use a pure binary + * representation (not base64). + */ + // const inputContent = 'Buffer.from('string')' + + // Imports the Videointelligence library + const {StreamingVideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1p3beta1; + + // Instantiates a client + const videointelligenceClient = new StreamingVideoIntelligenceServiceClient(); + + async function streamingAnnotateVideo() { + // Construct request + const request = {}; + + // Run request + const stream = await videointelligenceClient.streamingAnnotateVideo(); + stream.on('data', response => { + console.log(response); + }); + stream.on('error', err => { + throw err; + }); + stream.on('end', () => { + /* API call completed */ + }); + stream.write(request); + stream.end(); + } + + streamingAnnotateVideo(); + // [END videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/video_intelligence_service.annotate_video.js b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/video_intelligence_service.annotate_video.js new file mode 100644 index 00000000000..76fa82cd8ac --- /dev/null +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/video_intelligence_service.annotate_video.js @@ -0,0 +1,95 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(features) { + // [START videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + */ + // const inputUri = 'abc123' + /** + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + */ + // const inputContent = 'Buffer.from('string')' + /** + * Required. Requested video annotation features. + */ + // const features = 1234 + /** + * Additional video context and/or feature-specific parameters. + */ + // const videoContext = '' + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + */ + // const outputUri = 'abc123' + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + */ + // const locationId = 'abc123' + + // Imports the Videointelligence library + const {VideoIntelligenceServiceClient} = + require('@google-cloud/video-intelligence').v1p3beta1; + + // Instantiates a client + const videointelligenceClient = new VideoIntelligenceServiceClient(); + + async function annotateVideo() { + // Construct request + const request = { + features, + }; + + // Run request + const [operation] = await videointelligenceClient.annotateVideo(request); + const [response] = await operation.promise(); + console.log(response); + } + + annotateVideo(); + // [END videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2));