Skip to content

Commit 93c3e0e

Browse files
Google APIscopybara-github
authored andcommitted
feat: publishing TPU v2 API
fix!: fix incorrect resource annotations for TPU v2alpha1 API PiperOrigin-RevId: 493327922
1 parent 0bf62f4 commit 93c3e0e

7 files changed

Lines changed: 1787 additions & 91 deletions

File tree

google/cloud/tpu/v2/BUILD.bazel

Lines changed: 391 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,391 @@
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+
"//google/cloud/location:location_proto",
43+
],
44+
)
45+
46+
##############################################################################
47+
# Java
48+
##############################################################################
49+
load(
50+
"@com_google_googleapis_imports//:imports.bzl",
51+
"java_gapic_assembly_gradle_pkg",
52+
"java_gapic_library",
53+
"java_gapic_test",
54+
"java_grpc_library",
55+
"java_proto_library",
56+
)
57+
58+
java_proto_library(
59+
name = "tpu_java_proto",
60+
deps = [":tpu_proto"],
61+
)
62+
63+
java_grpc_library(
64+
name = "tpu_java_grpc",
65+
srcs = [":tpu_proto"],
66+
deps = [":tpu_java_proto"],
67+
)
68+
69+
java_gapic_library(
70+
name = "tpu_java_gapic",
71+
srcs = [":tpu_proto_with_info"],
72+
gapic_yaml = None,
73+
grpc_service_config = "tpu_grpc_service_config.json",
74+
rest_numeric_enums = True,
75+
service_yaml = "tpu.yaml",
76+
test_deps = [
77+
":tpu_java_grpc",
78+
"//google/cloud/location:location_java_grpc",
79+
],
80+
transport = "grpc+rest",
81+
deps = [
82+
":tpu_java_proto",
83+
"//google/api:api_java_proto",
84+
"//google/cloud/location:location_java_proto",
85+
],
86+
)
87+
88+
java_gapic_test(
89+
name = "tpu_java_gapic_test_suite",
90+
test_classes = [
91+
"com.google.cloud.tpu.v2.TpuClientHttpJsonTest",
92+
"com.google.cloud.tpu.v2.TpuClientTest",
93+
],
94+
runtime_deps = [":tpu_java_gapic_test"],
95+
)
96+
97+
# Open Source Packages
98+
java_gapic_assembly_gradle_pkg(
99+
name = "google-cloud-tpu-v2-java",
100+
include_samples = True,
101+
transport = "grpc+rest",
102+
deps = [
103+
":tpu_java_gapic",
104+
":tpu_java_grpc",
105+
":tpu_java_proto",
106+
":tpu_proto",
107+
],
108+
)
109+
110+
##############################################################################
111+
# Go
112+
##############################################################################
113+
load(
114+
"@com_google_googleapis_imports//:imports.bzl",
115+
"go_gapic_assembly_pkg",
116+
"go_gapic_library",
117+
"go_proto_library",
118+
"go_test",
119+
)
120+
121+
go_proto_library(
122+
name = "tpu_go_proto",
123+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
124+
importpath = "google.golang.org/genproto/googleapis/cloud/tpu/v2",
125+
protos = [":tpu_proto"],
126+
deps = [
127+
"//google/api:annotations_go_proto",
128+
"//google/longrunning:longrunning_go_proto",
129+
],
130+
)
131+
132+
go_gapic_library(
133+
name = "tpu_go_gapic",
134+
srcs = [":tpu_proto_with_info"],
135+
grpc_service_config = "tpu_grpc_service_config.json",
136+
importpath = "cloud.google.com/go/tpu/apiv2;tpu",
137+
metadata = True,
138+
rest_numeric_enums = True,
139+
service_yaml = "tpu.yaml",
140+
transport = "grpc+rest",
141+
deps = [
142+
":tpu_go_proto",
143+
"//google/cloud/location:location_go_proto",
144+
"//google/longrunning:longrunning_go_proto",
145+
"@com_google_cloud_go//longrunning:go_default_library",
146+
"@com_google_cloud_go//longrunning/autogen:go_default_library",
147+
],
148+
)
149+
150+
go_test(
151+
name = "tpu_go_gapic_test",
152+
srcs = [":tpu_go_gapic_srcjar_test"],
153+
embed = [":tpu_go_gapic"],
154+
importpath = "cloud.google.com/go/tpu/apiv2",
155+
)
156+
157+
# Open Source Packages
158+
go_gapic_assembly_pkg(
159+
name = "gapi-cloud-tpu-v2-go",
160+
deps = [
161+
":tpu_go_gapic",
162+
":tpu_go_gapic_srcjar-metadata.srcjar",
163+
":tpu_go_gapic_srcjar-test.srcjar",
164+
":tpu_go_proto",
165+
],
166+
)
167+
168+
##############################################################################
169+
# Python
170+
##############################################################################
171+
load(
172+
"@com_google_googleapis_imports//:imports.bzl",
173+
"py_gapic_assembly_pkg",
174+
"py_gapic_library",
175+
"py_test",
176+
)
177+
178+
py_gapic_library(
179+
name = "tpu_py_gapic",
180+
srcs = [":tpu_proto"],
181+
grpc_service_config = "tpu_grpc_service_config.json",
182+
rest_numeric_enums = True,
183+
service_yaml = "tpu.yaml",
184+
transport = "grpc+rest",
185+
deps = [
186+
],
187+
)
188+
189+
py_test(
190+
name = "tpu_py_gapic_test",
191+
srcs = [
192+
"tpu_py_gapic_pytest.py",
193+
"tpu_py_gapic_test.py",
194+
],
195+
legacy_create_init = False,
196+
deps = [":tpu_py_gapic"],
197+
)
198+
199+
# Open Source Packages
200+
py_gapic_assembly_pkg(
201+
name = "tpu-v2-py",
202+
deps = [
203+
":tpu_py_gapic",
204+
],
205+
)
206+
207+
##############################################################################
208+
# PHP
209+
##############################################################################
210+
load(
211+
"@com_google_googleapis_imports//:imports.bzl",
212+
"php_gapic_assembly_pkg",
213+
"php_gapic_library",
214+
"php_grpc_library",
215+
"php_proto_library",
216+
)
217+
218+
php_proto_library(
219+
name = "tpu_php_proto",
220+
deps = [":tpu_proto"],
221+
)
222+
223+
php_grpc_library(
224+
name = "tpu_php_grpc",
225+
srcs = [":tpu_proto"],
226+
deps = [":tpu_php_proto"],
227+
)
228+
229+
php_gapic_library(
230+
name = "tpu_php_gapic",
231+
srcs = [":tpu_proto_with_info"],
232+
grpc_service_config = "tpu_grpc_service_config.json",
233+
rest_numeric_enums = True,
234+
service_yaml = "tpu.yaml",
235+
transport = "grpc+rest",
236+
deps = [
237+
":tpu_php_grpc",
238+
":tpu_php_proto",
239+
],
240+
)
241+
242+
# Open Source Packages
243+
php_gapic_assembly_pkg(
244+
name = "google-cloud-tpu-v2-php",
245+
deps = [
246+
":tpu_php_gapic",
247+
":tpu_php_grpc",
248+
":tpu_php_proto",
249+
],
250+
)
251+
252+
##############################################################################
253+
# Node.js
254+
##############################################################################
255+
load(
256+
"@com_google_googleapis_imports//:imports.bzl",
257+
"nodejs_gapic_assembly_pkg",
258+
"nodejs_gapic_library",
259+
)
260+
261+
nodejs_gapic_library(
262+
name = "tpu_nodejs_gapic",
263+
package_name = "@google-cloud/tpu",
264+
src = ":tpu_proto_with_info",
265+
extra_protoc_parameters = ["metadata"],
266+
grpc_service_config = "tpu_grpc_service_config.json",
267+
package = "google.cloud.tpu.v2",
268+
rest_numeric_enums = True,
269+
service_yaml = "tpu.yaml",
270+
transport = "grpc+rest",
271+
deps = [],
272+
)
273+
274+
nodejs_gapic_assembly_pkg(
275+
name = "tpu-v2-nodejs",
276+
deps = [
277+
":tpu_nodejs_gapic",
278+
":tpu_proto",
279+
],
280+
)
281+
282+
##############################################################################
283+
# Ruby
284+
##############################################################################
285+
load(
286+
"@com_google_googleapis_imports//:imports.bzl",
287+
"ruby_cloud_gapic_library",
288+
"ruby_gapic_assembly_pkg",
289+
"ruby_grpc_library",
290+
"ruby_proto_library",
291+
)
292+
293+
ruby_proto_library(
294+
name = "tpu_ruby_proto",
295+
deps = [":tpu_proto"],
296+
)
297+
298+
ruby_grpc_library(
299+
name = "tpu_ruby_grpc",
300+
srcs = [":tpu_proto"],
301+
deps = [":tpu_ruby_proto"],
302+
)
303+
304+
ruby_cloud_gapic_library(
305+
name = "tpu_ruby_gapic",
306+
srcs = [":tpu_proto_with_info"],
307+
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-tpu-v2"],
308+
grpc_service_config = "tpu_grpc_service_config.json",
309+
rest_numeric_enums = True,
310+
service_yaml = "tpu.yaml",
311+
deps = [
312+
":tpu_ruby_grpc",
313+
":tpu_ruby_proto",
314+
],
315+
)
316+
317+
# Open Source Packages
318+
ruby_gapic_assembly_pkg(
319+
name = "google-cloud-tpu-v2-ruby",
320+
deps = [
321+
":tpu_ruby_gapic",
322+
":tpu_ruby_grpc",
323+
":tpu_ruby_proto",
324+
],
325+
)
326+
327+
##############################################################################
328+
# C#
329+
##############################################################################
330+
load(
331+
"@com_google_googleapis_imports//:imports.bzl",
332+
"csharp_gapic_assembly_pkg",
333+
"csharp_gapic_library",
334+
"csharp_grpc_library",
335+
"csharp_proto_library",
336+
)
337+
338+
csharp_proto_library(
339+
name = "tpu_csharp_proto",
340+
deps = [":tpu_proto"],
341+
)
342+
343+
csharp_grpc_library(
344+
name = "tpu_csharp_grpc",
345+
srcs = [":tpu_proto"],
346+
deps = [":tpu_csharp_proto"],
347+
)
348+
349+
csharp_gapic_library(
350+
name = "tpu_csharp_gapic",
351+
srcs = [":tpu_proto_with_info"],
352+
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
353+
grpc_service_config = "tpu_grpc_service_config.json",
354+
rest_numeric_enums = True,
355+
service_yaml = "tpu.yaml",
356+
deps = [
357+
":tpu_csharp_grpc",
358+
":tpu_csharp_proto",
359+
],
360+
)
361+
362+
# Open Source Packages
363+
csharp_gapic_assembly_pkg(
364+
name = "google-cloud-tpu-v2-csharp",
365+
deps = [
366+
":tpu_csharp_gapic",
367+
":tpu_csharp_grpc",
368+
":tpu_csharp_proto",
369+
],
370+
)
371+
372+
##############################################################################
373+
# C++
374+
##############################################################################
375+
load(
376+
"@com_google_googleapis_imports//:imports.bzl",
377+
"cc_grpc_library",
378+
"cc_proto_library",
379+
)
380+
381+
cc_proto_library(
382+
name = "tpu_cc_proto",
383+
deps = [":tpu_proto"],
384+
)
385+
386+
cc_grpc_library(
387+
name = "tpu_cc_grpc",
388+
srcs = [":tpu_proto"],
389+
grpc_only = True,
390+
deps = [":tpu_cc_proto"],
391+
)

0 commit comments

Comments
 (0)