Skip to content

Commit 1c56e2c

Browse files
Google APIscopybara-github
authored andcommitted
chore: migrate videointelligence to the PHP microgenerator
Committer: @miraleung PiperOrigin-RevId: 371236895
1 parent d06e39c commit 1c56e2c

11 files changed

Lines changed: 57 additions & 284 deletions

File tree

google/cloud/videointelligence/v1/BUILD.bazel

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,14 @@ py_gapic_assembly_pkg(
167167

168168
##############################################################################
169169
# PHP
170+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
170171
##############################################################################
171172
load(
172173
"@com_google_googleapis_imports//:imports.bzl",
173-
"php_gapic_assembly_pkg",
174-
"php_gapic_library",
175-
"php_grpc_library",
176-
"php_proto_library",
174+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
175+
php_gapic_library = "php_gapic_library2",
176+
php_grpc_library = "php_grpc_library2",
177+
php_proto_library = "php_proto_library2",
177178
)
178179

179180
php_proto_library(
@@ -189,11 +190,9 @@ php_grpc_library(
189190

190191
php_gapic_library(
191192
name = "videointelligence_php_gapic",
192-
src = ":videointelligence_proto_with_info",
193+
srcs = [":videointelligence_proto_with_info"],
193194
# Do not change this to the videointelligence_gapic.yaml, see tracking bug.
194195
gapic_yaml = "videointelligence_gapic.legacy.yaml",
195-
package = "google.cloud.videointelligence.v1",
196-
service_yaml = "videointelligence_v1.yaml",
197196
deps = [
198197
":videointelligence_php_grpc",
199198
":videointelligence_php_proto",
@@ -244,8 +243,8 @@ nodejs_gapic_assembly_pkg(
244243
##############################################################################
245244
load(
246245
"@com_google_googleapis_imports//:imports.bzl",
247-
"ruby_gapic_assembly_pkg",
248246
"ruby_cloud_gapic_library",
247+
"ruby_gapic_assembly_pkg",
249248
"ruby_grpc_library",
250249
"ruby_proto_library",
251250
)

google/cloud/videointelligence/v1beta2/BUILD.bazel

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,14 @@ py_gapic_assembly_pkg(
167167

168168
##############################################################################
169169
# PHP
170+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
170171
##############################################################################
171172
load(
172173
"@com_google_googleapis_imports//:imports.bzl",
173-
"php_gapic_assembly_pkg",
174-
"php_gapic_library",
175-
"php_grpc_library",
176-
"php_proto_library",
174+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
175+
php_gapic_library = "php_gapic_library2",
176+
php_grpc_library = "php_grpc_library2",
177+
php_proto_library = "php_proto_library2",
177178
)
178179

179180
php_proto_library(
@@ -189,10 +190,8 @@ php_grpc_library(
189190

190191
php_gapic_library(
191192
name = "videointelligence_php_gapic",
192-
src = ":videointelligence_proto_with_info",
193-
# Do not change this to the videointelligence_gapic.yaml, see tracking bug.
194-
gapic_yaml = "videointelligence_gapic.legacy.yaml",
195-
package = "google.cloud.videointelligence.v1beta2",
193+
srcs = [":videointelligence_proto_with_info"],
194+
gapic_yaml = "videointelligence_gapic.yaml",
196195
service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml",
197196
deps = [
198197
":videointelligence_php_grpc",
@@ -244,8 +243,8 @@ nodejs_gapic_assembly_pkg(
244243
##############################################################################
245244
load(
246245
"@com_google_googleapis_imports//:imports.bzl",
247-
"ruby_gapic_assembly_pkg",
248246
"ruby_cloud_gapic_library",
247+
"ruby_gapic_assembly_pkg",
249248
"ruby_grpc_library",
250249
"ruby_proto_library",
251250
)

google/cloud/videointelligence/v1beta2/video_intelligence.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ message AnnotateVideoRequest {
6464
// supported, which must be specified in the following format:
6565
// `gs://bucket-id/object-id` (other URI formats return
6666
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
67-
// more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). A video
68-
// URI may include wildcards in `object-id`, and thus identify multiple
69-
// videos. Supported wildcards: '*' to match 0 or more characters;
67+
// more information, see [Request
68+
// URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
69+
// may include wildcards in `object-id`, and thus identify multiple videos.
70+
// Supported wildcards: '*' to match 0 or more characters;
7071
// '?' to match 1 character. If unset, the input video should be embedded
7172
// in the request as `input_content`. If set, `input_content` should be unset.
7273
string input_uri = 1;
@@ -87,7 +88,8 @@ message AnnotateVideoRequest {
8788
// URIs are supported, which must be specified in the following format:
8889
// `gs://bucket-id/object-id` (other URI formats return
8990
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
90-
// more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
91+
// more information, see [Request
92+
// URIs](https://cloud.google.com/storage/docs/request-endpoints).
9193
string output_uri = 4 [(google.api.field_behavior) = OPTIONAL];
9294

9395
// Optional. Cloud region where annotation should take place. Supported cloud
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
type: com.google.api.codegen.ConfigProto
22
config_schema_version: 2.0.0
3-
language_settings:
4-
python:
5-
package_name: google.cloud.videointelligence_v1beta2.gapic
6-
go:
7-
package_name: cloud.google.com/go/videointelligence/apiv1beta2
8-
csharp:
9-
package_name: Google.Cloud.VideoIntelligence.V1Beta2
10-
ruby:
11-
package_name: Google::Cloud::VideoIntelligence::V1beta2
12-
release_level: GA
13-
php:
14-
package_name: Google\Cloud\VideoIntelligence\V1beta2
15-
nodejs:
16-
package_name: video-intelligence.v1beta2
17-
domain_layer_location: google-cloud
183
interfaces:
194
- name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService
205
methods:
@@ -24,6 +9,3 @@ interfaces:
249
poll_delay_multiplier: 1.5
2510
max_poll_delay_millis: 45000
2611
total_poll_timeout_millis: 86400000
27-
sample_code_init_fields:
28-
- input_uri=gs://cloud-samples-data/video/cat.mp4
29-
- features[0]=LABEL_DETECTION

google/cloud/videointelligence/v1p1beta1/BUILD.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,14 @@ py_gapic_assembly_pkg(
167167

168168
##############################################################################
169169
# PHP
170+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
170171
##############################################################################
171172
load(
172173
"@com_google_googleapis_imports//:imports.bzl",
173-
"php_gapic_assembly_pkg",
174-
"php_gapic_library",
175-
"php_grpc_library",
176-
"php_proto_library",
174+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
175+
php_gapic_library = "php_gapic_library2",
176+
php_grpc_library = "php_grpc_library2",
177+
php_proto_library = "php_proto_library2",
177178
)
178179

179180
php_proto_library(
@@ -189,10 +190,9 @@ php_grpc_library(
189190

190191
php_gapic_library(
191192
name = "videointelligence_php_gapic",
192-
src = ":videointelligence_proto_with_info",
193+
srcs = [":videointelligence_proto_with_info"],
193194
gapic_yaml = "videointelligence_gapic.yaml",
194195
grpc_service_config = "videointelligence_grpc_service_config.json",
195-
package = "google.cloud.videointelligence.v1p1beta1",
196196
service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml",
197197
deps = [
198198
":videointelligence_php_grpc",
@@ -244,8 +244,8 @@ nodejs_gapic_assembly_pkg(
244244
##############################################################################
245245
load(
246246
"@com_google_googleapis_imports//:imports.bzl",
247-
"ruby_gapic_assembly_pkg",
248247
"ruby_cloud_gapic_library",
248+
"ruby_gapic_assembly_pkg",
249249
"ruby_grpc_library",
250250
"ruby_proto_library",
251251
)

google/cloud/videointelligence/v1p1beta1/video_intelligence.proto

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1p1beta1";
3636
// Service that implements Google Cloud Video Intelligence API.
3737
service VideoIntelligenceService {
3838
option (google.api.default_host) = "videointelligence.googleapis.com";
39-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
39+
option (google.api.oauth_scopes) =
40+
"https://www.googleapis.com/auth/cloud-platform";
4041

4142
// Performs asynchronous video annotation. Progress and results can be
4243
// retrieved through the `google.longrunning.Operations` interface.
4344
// `Operation.metadata` contains `AnnotateVideoProgress` (progress).
4445
// `Operation.response` contains `AnnotateVideoResponse` (results).
45-
rpc AnnotateVideo(AnnotateVideoRequest) returns (google.longrunning.Operation) {
46+
rpc AnnotateVideo(AnnotateVideoRequest)
47+
returns (google.longrunning.Operation) {
4648
option (google.api.http) = {
4749
post: "/v1p1beta1/videos:annotate"
4850
body: "*"
@@ -61,10 +63,11 @@ message AnnotateVideoRequest {
6163
// [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
6264
// supported, which must be specified in the following format:
6365
// `gs://bucket-id/object-id` (other URI formats return
64-
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
65-
// [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
66-
// A video URI may include wildcards in `object-id`, and thus identify
67-
// multiple videos. Supported wildcards: '*' to match 0 or more characters;
66+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
67+
// more information, see [Request
68+
// URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
69+
// may include wildcards in `object-id`, and thus identify multiple videos.
70+
// Supported wildcards: '*' to match 0 or more characters;
6871
// '?' to match 1 character. If unset, the input video should be embedded
6972
// in the request as `input_content`. If set, `input_content` should be unset.
7073
string input_uri = 1;
@@ -84,8 +87,9 @@ message AnnotateVideoRequest {
8487
// Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
8588
// URIs are supported, which must be specified in the following format:
8689
// `gs://bucket-id/object-id` (other URI formats return
87-
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
88-
// [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
90+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
91+
// more information, see [Request
92+
// URIs](https://cloud.google.com/storage/docs/request-endpoints).
8993
string output_uri = 4 [(google.api.field_behavior) = OPTIONAL];
9094

9195
// Optional. Cloud region where annotation should take place. Supported cloud
@@ -316,15 +320,17 @@ message SpeechTranscriptionConfig {
316320
bool filter_profanity = 3 [(google.api.field_behavior) = OPTIONAL];
317321

318322
// Optional. A means to provide context to assist the speech recognition.
319-
repeated SpeechContext speech_contexts = 4 [(google.api.field_behavior) = OPTIONAL];
323+
repeated SpeechContext speech_contexts = 4
324+
[(google.api.field_behavior) = OPTIONAL];
320325

321326
// Optional. If 'true', adds punctuation to recognition result hypotheses.
322327
// This feature is only available in select languages. Setting this for
323328
// requests in other languages has no effect at all. The default 'false' value
324329
// does not add punctuation to result hypotheses. NOTE: "This is currently
325330
// offered as an experimental service, complimentary to all users. In the
326331
// future this may be exclusively available as a premium feature."
327-
bool enable_automatic_punctuation = 5 [(google.api.field_behavior) = OPTIONAL];
332+
bool enable_automatic_punctuation = 5
333+
[(google.api.field_behavior) = OPTIONAL];
328334

329335
// Optional. For file formats, such as MXF or MKV, supporting multiple audio
330336
// tracks, specify up to two tracks. Default: track 0.
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
type: com.google.api.codegen.ConfigProto
22
config_schema_version: 2.0.0
3-
language_settings:
4-
python:
5-
package_name: google.cloud.videointelligence_v1p1beta1.gapic
6-
go:
7-
package_name: cloud.google.com/go/videointelligence/apiv1p1beta1
8-
csharp:
9-
package_name: Google.Cloud.VideoIntelligence.V1P1Beta1
10-
ruby:
11-
package_name: Google::Cloud::VideoIntelligence::V1p1beta1
12-
release_level: BETA
13-
php:
14-
package_name: Google\Cloud\VideoIntelligence\V1p1beta1
15-
nodejs:
16-
package_name: video-intelligence.v1p1beta1
17-
domain_layer_location: google-cloud
183
interfaces:
194
- name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService
20-
smoke_test:
21-
method: AnnotateVideo
22-
init_fields:
23-
- input_uri=gs://cloud-samples-data/video/cat.mp4
24-
- features[0]=LABEL_DETECTION
255
methods:
266
- name: AnnotateVideo
277
long_running:
@@ -31,6 +11,3 @@ interfaces:
3111
total_poll_timeout_millis: 86400000
3212
retry_codes_name: idempotent
3313
retry_params_name: default
34-
sample_code_init_fields:
35-
- input_uri=gs://cloud-samples-data/video/cat.mp4
36-
- features[0]=LABEL_DETECTION

google/cloud/videointelligence/v1p2beta1/BUILD.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,14 @@ py_gapic_assembly_pkg(
167167

168168
##############################################################################
169169
# PHP
170+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
170171
##############################################################################
171172
load(
172173
"@com_google_googleapis_imports//:imports.bzl",
173-
"php_gapic_assembly_pkg",
174-
"php_gapic_library",
175-
"php_grpc_library",
176-
"php_proto_library",
174+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
175+
php_gapic_library = "php_gapic_library2",
176+
php_grpc_library = "php_grpc_library2",
177+
php_proto_library = "php_proto_library2",
177178
)
178179

179180
php_proto_library(
@@ -189,10 +190,9 @@ php_grpc_library(
189190

190191
php_gapic_library(
191192
name = "videointelligence_php_gapic",
192-
src = ":videointelligence_proto_with_info",
193+
srcs = [":videointelligence_proto_with_info"],
193194
gapic_yaml = "videointelligence_gapic.yaml",
194195
grpc_service_config = "videointelligence_grpc_service_config.json",
195-
package = "google.cloud.videointelligence.v1p2beta1",
196196
service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml",
197197
deps = [
198198
":videointelligence_php_grpc",
@@ -244,8 +244,8 @@ nodejs_gapic_assembly_pkg(
244244
##############################################################################
245245
load(
246246
"@com_google_googleapis_imports//:imports.bzl",
247-
"ruby_gapic_assembly_pkg",
248247
"ruby_cloud_gapic_library",
248+
"ruby_gapic_assembly_pkg",
249249
"ruby_grpc_library",
250250
"ruby_proto_library",
251251
)
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
11
type: com.google.api.codegen.ConfigProto
22
config_schema_version: 2.0.0
3-
language_settings:
4-
python:
5-
package_name: google.cloud.videointelligence_v1p2beta1.gapic
6-
go:
7-
package_name: cloud.google.com/go/videointelligence/apiv1p2beta1
8-
csharp:
9-
package_name: Google.Cloud.VideoIntelligence.V1P2Beta1
10-
ruby:
11-
package_name: Google::Cloud::VideoIntelligence::V1p2beta1
12-
release_level: BETA
13-
php:
14-
package_name: Google\Cloud\VideoIntelligence\V1p2beta1
15-
nodejs:
16-
package_name: video-intelligence.v1p2beta1
17-
domain_layer_location: google-cloud
183
interfaces:
194
- name: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService
20-
smoke_test:
21-
method: AnnotateVideo
22-
init_fields:
23-
- input_uri=gs://cloud-samples-data/video/cat.mp4
24-
- features[0]=LABEL_DETECTION
255
methods:
266
- name: AnnotateVideo
277
long_running:
288
initial_poll_delay_millis: 20000
299
poll_delay_multiplier: 1.5
3010
max_poll_delay_millis: 45000
3111
total_poll_timeout_millis: 86400000
32-
sample_code_init_fields:
33-
- input_uri=gs://cloud-samples-data/video/cat.mp4
34-
- features[0]=LABEL_DETECTION

google/cloud/videointelligence/v1p3beta1/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,14 @@ py_gapic_assembly_pkg(
168168

169169
##############################################################################
170170
# PHP
171+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
171172
##############################################################################
172173
load(
173174
"@com_google_googleapis_imports//:imports.bzl",
174-
"php_gapic_assembly_pkg",
175-
"php_gapic_library",
176-
"php_grpc_library",
177-
"php_proto_library",
175+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
176+
php_gapic_library = "php_gapic_library2",
177+
php_grpc_library = "php_grpc_library2",
178+
php_proto_library = "php_proto_library2",
178179
)
179180

180181
php_proto_library(
@@ -190,10 +191,9 @@ php_grpc_library(
190191

191192
php_gapic_library(
192193
name = "videointelligence_php_gapic",
193-
src = ":videointelligence_proto_with_info",
194+
srcs = [":videointelligence_proto_with_info"],
194195
gapic_yaml = "videointelligence_gapic.yaml",
195196
grpc_service_config = "videointelligence_grpc_service_config.json",
196-
package = "google.cloud.videointelligence.v1p3beta1",
197197
service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml",
198198
deps = [
199199
":videointelligence_php_grpc",

0 commit comments

Comments
 (0)