Skip to content

Commit 8f48b97

Browse files
Google APIscopybara-github
authored andcommitted
feat: TPU v2alpha1 public protos
Committer: @rosbo PiperOrigin-RevId: 403400668
1 parent 85633a2 commit 8f48b97

4 files changed

Lines changed: 1215 additions & 0 deletions

File tree

Lines changed: 342 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,342 @@
1+
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
11+
12+
# This is an API workspace, having public visibility by default makes perfect sense.
13+
package(default_visibility = ["//visibility:public"])
14+
15+
##############################################################################
16+
# Common
17+
##############################################################################
18+
load("@rules_proto//proto:defs.bzl", "proto_library")
19+
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
20+
21+
proto_library(
22+
name = "tpu_proto",
23+
srcs = [
24+
"cloud_tpu.proto",
25+
],
26+
deps = [
27+
"//google/api:annotations_proto",
28+
"//google/api:client_proto",
29+
"//google/api:field_behavior_proto",
30+
"//google/api:resource_proto",
31+
"//google/longrunning:operations_proto",
32+
"@com_google_protobuf//:field_mask_proto",
33+
"@com_google_protobuf//:timestamp_proto",
34+
],
35+
)
36+
37+
proto_library_with_info(
38+
name = "tpu_proto_with_info",
39+
deps = [
40+
":tpu_proto",
41+
"//google/cloud:common_resources_proto",
42+
],
43+
)
44+
45+
##############################################################################
46+
# Java
47+
##############################################################################
48+
load(
49+
"@com_google_googleapis_imports//:imports.bzl",
50+
"java_gapic_assembly_gradle_pkg",
51+
"java_gapic_library",
52+
"java_gapic_test",
53+
"java_grpc_library",
54+
"java_proto_library",
55+
)
56+
57+
java_proto_library(
58+
name = "tpu_java_proto",
59+
deps = [":tpu_proto"],
60+
)
61+
62+
java_grpc_library(
63+
name = "tpu_java_grpc",
64+
srcs = [":tpu_proto"],
65+
deps = [":tpu_java_proto"],
66+
)
67+
68+
java_gapic_library(
69+
name = "tpu_java_gapic",
70+
srcs = [":tpu_proto_with_info"],
71+
gapic_yaml = None,
72+
grpc_service_config = "tpu_grpc_service_config.json",
73+
service_yaml = "tpu.yaml",
74+
test_deps = [
75+
":tpu_java_grpc",
76+
],
77+
deps = [
78+
":tpu_java_proto",
79+
"//google/api:api_java_proto",
80+
],
81+
)
82+
83+
java_gapic_test(
84+
name = "tpu_java_gapic_test_suite",
85+
test_classes = [
86+
"com.google.cloud.tpu.v2alpha1.TpuClientTest",
87+
],
88+
runtime_deps = [":tpu_java_gapic_test"],
89+
)
90+
91+
# Open Source Packages
92+
java_gapic_assembly_gradle_pkg(
93+
name = "google-cloud-tpu-v2alpha1-java",
94+
deps = [
95+
":tpu_java_gapic",
96+
":tpu_java_grpc",
97+
":tpu_java_proto",
98+
":tpu_proto",
99+
],
100+
)
101+
102+
##############################################################################
103+
# Go
104+
##############################################################################
105+
load(
106+
"@com_google_googleapis_imports//:imports.bzl",
107+
"go_gapic_assembly_pkg",
108+
"go_gapic_library",
109+
"go_proto_library",
110+
"go_test",
111+
)
112+
113+
go_proto_library(
114+
name = "tpu_go_proto",
115+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
116+
importpath = "google.golang.org/genproto/googleapis/cloud/tpu/v2alpha1",
117+
protos = [":tpu_proto"],
118+
deps = [
119+
"//google/api:annotations_go_proto",
120+
"//google/longrunning:longrunning_go_proto",
121+
],
122+
)
123+
124+
go_gapic_library(
125+
name = "tpu_go_gapic",
126+
srcs = [":tpu_proto_with_info"],
127+
grpc_service_config = "tpu_grpc_service_config.json",
128+
importpath = "cloud.google.com/go/tpu/apiv2alpha1;tpu",
129+
metadata = True,
130+
service_yaml = "tpu.yaml",
131+
deps = [
132+
":tpu_go_proto",
133+
"//google/longrunning:longrunning_go_proto",
134+
"@com_google_cloud_go//longrunning:go_default_library",
135+
"@com_google_cloud_go//longrunning/autogen:go_default_library",
136+
],
137+
)
138+
139+
go_test(
140+
name = "tpu_go_gapic_test",
141+
srcs = [":tpu_go_gapic_srcjar_test"],
142+
embed = [":tpu_go_gapic"],
143+
importpath = "cloud.google.com/go/tpu/apiv2alpha1",
144+
)
145+
146+
# Open Source Packages
147+
go_gapic_assembly_pkg(
148+
name = "gapi-cloud-tpu-v2alpha1-go",
149+
deps = [
150+
":tpu_go_gapic",
151+
":tpu_go_gapic_srcjar-metadata.srcjar",
152+
":tpu_go_gapic_srcjar-test.srcjar",
153+
":tpu_go_proto",
154+
],
155+
)
156+
157+
##############################################################################
158+
# Python
159+
##############################################################################
160+
load(
161+
"@com_google_googleapis_imports//:imports.bzl",
162+
"py_gapic_assembly_pkg",
163+
"py_gapic_library",
164+
)
165+
166+
py_gapic_library(
167+
name = "tpu_py_gapic",
168+
srcs = [":tpu_proto"],
169+
grpc_service_config = "tpu_grpc_service_config.json",
170+
)
171+
172+
# Open Source Packages
173+
py_gapic_assembly_pkg(
174+
name = "tpu-v2alpha1-py",
175+
deps = [
176+
":tpu_py_gapic",
177+
],
178+
)
179+
180+
##############################################################################
181+
# PHP
182+
##############################################################################
183+
load(
184+
"@com_google_googleapis_imports//:imports.bzl",
185+
"php_gapic_assembly_pkg",
186+
"php_gapic_library",
187+
"php_grpc_library",
188+
"php_proto_library",
189+
)
190+
191+
php_proto_library(
192+
name = "tpu_php_proto",
193+
deps = [":tpu_proto"],
194+
)
195+
196+
php_grpc_library(
197+
name = "tpu_php_grpc",
198+
srcs = [":tpu_proto"],
199+
deps = [":tpu_php_proto"],
200+
)
201+
202+
php_gapic_library(
203+
name = "tpu_php_gapic",
204+
srcs = [":tpu_proto_with_info"],
205+
grpc_service_config = "tpu_grpc_service_config.json",
206+
service_yaml = "tpu.yaml",
207+
deps = [
208+
":tpu_php_grpc",
209+
":tpu_php_proto",
210+
],
211+
)
212+
213+
# Open Source Packages
214+
php_gapic_assembly_pkg(
215+
name = "google-cloud-tpu-v2alpha1-php",
216+
deps = [
217+
":tpu_php_gapic",
218+
":tpu_php_grpc",
219+
":tpu_php_proto",
220+
],
221+
)
222+
223+
##############################################################################
224+
# Node.js
225+
##############################################################################
226+
load(
227+
"@com_google_googleapis_imports//:imports.bzl",
228+
"nodejs_gapic_assembly_pkg",
229+
"nodejs_gapic_library",
230+
)
231+
232+
nodejs_gapic_library(
233+
name = "tpu_nodejs_gapic",
234+
package_name = "@google-cloud/tpu",
235+
src = ":tpu_proto_with_info",
236+
extra_protoc_parameters = ["metadata"],
237+
grpc_service_config = "tpu_grpc_service_config.json",
238+
package = "google.cloud.tpu.v2alpha1",
239+
service_yaml = "tpu.yaml",
240+
deps = [],
241+
)
242+
243+
nodejs_gapic_assembly_pkg(
244+
name = "tpu-v2alpha1-nodejs",
245+
deps = [
246+
":tpu_nodejs_gapic",
247+
":tpu_proto",
248+
],
249+
)
250+
251+
##############################################################################
252+
# Ruby
253+
##############################################################################
254+
load(
255+
"@com_google_googleapis_imports//:imports.bzl",
256+
"ruby_cloud_gapic_library",
257+
"ruby_gapic_assembly_pkg",
258+
"ruby_grpc_library",
259+
"ruby_proto_library",
260+
)
261+
262+
ruby_proto_library(
263+
name = "tpu_ruby_proto",
264+
deps = [":tpu_proto"],
265+
)
266+
267+
ruby_grpc_library(
268+
name = "tpu_ruby_grpc",
269+
srcs = [":tpu_proto"],
270+
deps = [":tpu_ruby_proto"],
271+
)
272+
273+
ruby_cloud_gapic_library(
274+
name = "tpu_ruby_gapic",
275+
srcs = [":tpu_proto_with_info"],
276+
extra_protoc_parameters = [
277+
"ruby-cloud-gem-name=google-cloud-tpu-v2alpha1",
278+
],
279+
grpc_service_config = "tpu_grpc_service_config.json",
280+
deps = [
281+
":tpu_ruby_grpc",
282+
":tpu_ruby_proto",
283+
],
284+
)
285+
286+
# Open Source Packages
287+
ruby_gapic_assembly_pkg(
288+
name = "google-cloud-tpu-v2alpha1-ruby",
289+
deps = [
290+
":tpu_ruby_gapic",
291+
":tpu_ruby_grpc",
292+
":tpu_ruby_proto",
293+
],
294+
)
295+
296+
##############################################################################
297+
# C#
298+
##############################################################################
299+
load(
300+
"@com_google_googleapis_imports//:imports.bzl",
301+
"csharp_gapic_assembly_pkg",
302+
"csharp_gapic_library",
303+
"csharp_grpc_library",
304+
"csharp_proto_library",
305+
)
306+
307+
csharp_proto_library(
308+
name = "tpu_csharp_proto",
309+
deps = [":tpu_proto"],
310+
)
311+
312+
csharp_grpc_library(
313+
name = "tpu_csharp_grpc",
314+
srcs = [":tpu_proto"],
315+
deps = [":tpu_csharp_proto"],
316+
)
317+
318+
csharp_gapic_library(
319+
name = "tpu_csharp_gapic",
320+
srcs = [":tpu_proto_with_info"],
321+
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
322+
grpc_service_config = "tpu_grpc_service_config.json",
323+
deps = [
324+
":tpu_csharp_grpc",
325+
":tpu_csharp_proto",
326+
],
327+
)
328+
329+
# Open Source Packages
330+
csharp_gapic_assembly_pkg(
331+
name = "google-cloud-tpu-v2alpha1-csharp",
332+
deps = [
333+
":tpu_csharp_gapic",
334+
":tpu_csharp_grpc",
335+
":tpu_csharp_proto",
336+
],
337+
)
338+
339+
##############################################################################
340+
# C++
341+
##############################################################################
342+
# Put your C++ rules here

0 commit comments

Comments
 (0)