-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: auto-generate samples and update protos (#622)
* fix(ruby)!: Fix Ruby namespace for videointelligence/v1p3beta1 PiperOrigin-RevId: 399448269 Source-Link: googleapis/googleapis@f75ccc2 Source-Link: googleapis/googleapis-gen@6e2de21 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 <gcf-owl-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
dd719c8
commit 8dd95cc
Showing
8 changed files
with
546 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
...cloud-videointelligence/samples/generated/v1/video_intelligence_service.annotate_video.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
94 changes: 94 additions & 0 deletions
94
...-videointelligence/samples/generated/v1beta2/video_intelligence_service.annotate_video.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
94 changes: 94 additions & 0 deletions
94
...ideointelligence/samples/generated/v1p1beta1/video_intelligence_service.annotate_video.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
92 changes: 92 additions & 0 deletions
92
...ideointelligence/samples/generated/v1p2beta1/video_intelligence_service.annotate_video.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
Oops, something went wrong.