Skip to content

Commit 2844793

Browse files
Google APIscopybara-github
authored andcommitted
feat: generating GAPIC libraries for Google Cloud Functions v2beta
PiperOrigin-RevId: 459309277
1 parent d7f3a38 commit 2844793

4 files changed

Lines changed: 1546 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)