xref: /aosp_15_r20/external/googleapis/google/example/library/v1/BUILD.bazel (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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##############################################################################
13# Common
14##############################################################################
15load("@rules_proto//proto:defs.bzl", "proto_library")
16load(
17    "@com_google_googleapis_imports//:imports.bzl",
18    "cc_grpc_library",
19    "cc_proto_library",
20    "csharp_gapic_assembly_pkg",
21    "csharp_gapic_library",
22    "csharp_grpc_library",
23    "csharp_proto_library",
24    "go_gapic_assembly_pkg",
25    "go_gapic_library",
26    "go_proto_library",
27    "java_gapic_assembly_gradle_pkg",
28    "java_gapic_library",
29    "java_gapic_test",
30    "java_grpc_library",
31    "java_proto_library",
32    "nodejs_gapic_assembly_pkg",
33    "nodejs_gapic_library",
34    "php_gapic_assembly_pkg",
35    "php_gapic_library",
36    "php_proto_library",
37    "proto_library_with_info",
38    "py_gapic_assembly_pkg",
39    "py_gapic_library",
40    "py_test",
41    "ruby_cloud_gapic_library",
42    "ruby_gapic_assembly_pkg",
43    "ruby_grpc_library",
44    "ruby_proto_library",
45)
46
47# This is an API workspace, having public visibility by default makes perfect sense.
48package(default_visibility = ["//visibility:public"])
49
50proto_library(
51    name = "library_proto",
52    srcs = [
53        "library.proto",
54    ],
55    deps = [
56        "//google/api:annotations_proto",
57        "//google/api:client_proto",
58        "//google/api:field_behavior_proto",
59        "//google/api:resource_proto",
60        "@com_google_protobuf//:empty_proto",
61        "@com_google_protobuf//:field_mask_proto",
62    ],
63)
64
65proto_library_with_info(
66    name = "library_proto_with_info",
67    deps = [
68        ":library_proto",
69        "//google/cloud:common_resources_proto",
70    ],
71)
72
73java_proto_library(
74    name = "library_java_proto",
75    deps = [":library_proto"],
76)
77
78java_grpc_library(
79    name = "library_java_grpc",
80    srcs = [":library_proto"],
81    deps = [":library_java_proto"],
82)
83
84java_gapic_library(
85    name = "library_java_gapic",
86    srcs = [":library_proto_with_info"],
87    gapic_yaml = "library_example_gapic.yaml",
88    grpc_service_config = "library_grpc_service_config.json",
89    rest_numeric_enums = True,
90    service_yaml = "//google/example/library:library_example_v1.yaml",
91    test_deps = [
92        ":library_java_grpc",
93    ],
94    transport = "grpc+rest",
95    deps = [
96        ":library_java_proto",
97    ],
98)
99
100java_gapic_test(
101    name = "library_java_gapic_test_suite",
102    test_classes = [
103        "com.google.cloud.example.library.v1.LibraryServiceClientHttpJsonTest",
104        "com.google.cloud.example.library.v1.LibraryServiceClientTest",
105    ],
106    runtime_deps = [":library_java_gapic_test"],
107)
108
109# Open Source Packages
110java_gapic_assembly_gradle_pkg(
111    name = "google-cloud-example-library-v1-java",
112    include_samples = True,
113    transport = "grpc+rest",
114    deps = [
115        ":library_java_gapic",
116        ":library_java_grpc",
117        ":library_java_proto",
118        ":library_proto",
119    ],
120)
121
122go_proto_library(
123    name = "library_go_proto",
124    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
125    importpath = "google.golang.org/genproto/googleapis/example/library/v1",
126    protos = [":library_proto"],
127    deps = [
128        "//google/api:annotations_go_proto",
129    ],
130)
131
132go_gapic_library(
133    name = "library_go_gapic",
134    srcs = [":library_proto_with_info"],
135    grpc_service_config = "library_grpc_service_config.json",
136    importpath = "google.golang.org/google/example/library/v1;library",
137    metadata = True,
138    rest_numeric_enums = True,
139    service_yaml = "//google/example/library:library_example_v1.yaml",
140    transport = "grpc+rest",
141    deps = [
142        ":library_go_proto",
143    ],
144)
145
146# Open Source Packages
147go_gapic_assembly_pkg(
148    name = "gapi-cloud-example-library-v1-go",
149    deps = [
150        ":library_go_gapic",
151        ":library_go_gapic_srcjar-metadata.srcjar",
152        ":library_go_gapic_srcjar-snippets.srcjar",
153        ":library_go_gapic_srcjar-test.srcjar",
154        ":library_go_proto",
155    ],
156)
157
158py_gapic_library(
159    name = "library_py_gapic",
160    srcs = [":library_proto"],
161    grpc_service_config = "library_grpc_service_config.json",
162    rest_numeric_enums = True,
163    service_yaml = "//google/example/library:library_example_v1.yaml",
164    transport = "grpc+rest",
165)
166
167py_test(
168    name = "library_py_gapic_test",
169    srcs = [
170        "library_py_gapic_pytest.py",
171        "library_py_gapic_test.py",
172    ],
173    legacy_create_init = False,
174    deps = [":library_py_gapic"],
175)
176
177# Open Source Packages
178py_gapic_assembly_pkg(
179    name = "example-library-v1-py",
180    deps = [
181        ":library_py_gapic",
182    ],
183)
184
185php_proto_library(
186    name = "library_php_proto",
187    deps = [":library_proto"],
188)
189
190php_gapic_library(
191    name = "library_php_gapic",
192    srcs = [":library_proto_with_info"],
193    grpc_service_config = "library_grpc_service_config.json",
194    rest_numeric_enums = True,
195    service_yaml = "//google/example/library:library_example_v1.yaml",
196    transport = "grpc+rest",
197    deps = [":library_php_proto"],
198)
199
200# Open Source Packages
201php_gapic_assembly_pkg(
202    name = "google-cloud-example-library-v1-php",
203    deps = [
204        ":library_php_gapic",
205        ":library_php_proto",
206    ],
207)
208
209nodejs_gapic_library(
210    name = "library_nodejs_gapic",
211    package_name = "@google-cloud/library",
212    src = ":library_proto_with_info",
213    extra_protoc_parameters = ["metadata"],
214    grpc_service_config = "library_grpc_service_config.json",
215    package = "google.cloud.example.library.v1",
216    rest_numeric_enums = True,
217    service_yaml = "//google/example/library:library_example_v1.yaml",
218    transport = "grpc+rest",
219    deps = [],
220)
221
222nodejs_gapic_assembly_pkg(
223    name = "example-library-v1-nodejs",
224    deps = [
225        ":library_nodejs_gapic",
226        ":library_proto",
227    ],
228)
229
230ruby_proto_library(
231    name = "library_ruby_proto",
232    deps = [":library_proto"],
233)
234
235ruby_grpc_library(
236    name = "library_ruby_grpc",
237    srcs = [":library_proto"],
238    deps = [":library_ruby_proto"],
239)
240
241# Uncomment the following once the space issue has been fixed.
242ruby_cloud_gapic_library(
243    name = "library_ruby_gapic",
244    srcs = [":library_proto_with_info"],
245    extra_protoc_parameters = [
246        "ruby-cloud-gem-name=google-cloud-example_library-v1",
247        "ruby-cloud-env-prefix=LIBRARY",
248        "ruby-cloud-product-url=https://cloud.google.com",
249        "ruby-cloud-api-id=library-example.googleapis.com",
250        "ruby-cloud-api-shortname=library",
251    ],
252    grpc_service_config = "library_grpc_service_config.json",
253    rest_numeric_enums = True,
254    ruby_cloud_description = "This is a Google example service representing a simple digital library. It manages a collection of shelf resources, and each shelf owns a collection of book resources.",
255    ruby_cloud_title = "Example Library V1",
256    service_yaml = "//google/example/library:library_example_v1.yaml",
257    transport = "grpc+rest",
258    deps = [
259        ":library_ruby_grpc",
260        ":library_ruby_proto",
261    ],
262)
263
264# Open Source Packages
265ruby_gapic_assembly_pkg(
266    name = "google-cloud-example-library-v1-ruby",
267    deps = [
268        ":library_ruby_gapic",
269        ":library_ruby_grpc",
270        ":library_ruby_proto",
271    ],
272)
273
274csharp_proto_library(
275    name = "library_csharp_proto",
276    deps = [":library_proto"],
277)
278
279csharp_grpc_library(
280    name = "library_csharp_grpc",
281    srcs = [":library_proto"],
282    deps = [":library_csharp_proto"],
283)
284
285csharp_gapic_library(
286    name = "library_csharp_gapic",
287    srcs = [":library_proto_with_info"],
288    common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
289    grpc_service_config = "library_grpc_service_config.json",
290    rest_numeric_enums = True,
291    service_yaml = "//google/example/library:library_example_v1.yaml",
292    transport = "grpc+rest",
293    deps = [
294        ":library_csharp_grpc",
295        ":library_csharp_proto",
296    ],
297)
298
299# Open Source Packages
300csharp_gapic_assembly_pkg(
301    name = "google-cloud-example-library-v1-csharp",
302    deps = [
303        ":library_csharp_gapic",
304        ":library_csharp_grpc",
305        ":library_csharp_proto",
306    ],
307)
308
309cc_proto_library(
310    name = "library_cc_proto",
311    deps = [":library_proto"],
312)
313
314cc_grpc_library(
315    name = "library_cc_grpc",
316    srcs = [":library_proto"],
317    grpc_only = True,
318    deps = [":library_cc_proto"],
319)
320