xref: /aosp_15_r20/external/googleapis/google/storage/v2/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    "ruby_cloud_gapic_library",
41    "ruby_gapic_assembly_pkg",
42    "ruby_grpc_library",
43    "ruby_proto_library",
44)
45
46# This is an API workspace, having public visibility by default makes perfect sense.
47package(default_visibility = ["//visibility:public"])
48
49proto_library(
50    name = "storage_proto",
51    srcs = [
52        "storage.proto",
53    ],
54    deps = [
55        "//google/api:client_proto",
56        "//google/api:field_behavior_proto",
57        "//google/api:resource_proto",
58        "//google/api:routing_proto",
59        "//google/iam/v1:iam_policy_proto",
60        "//google/iam/v1:policy_proto",
61        "//google/type:date_proto",
62        "@com_google_protobuf//:duration_proto",
63        "@com_google_protobuf//:empty_proto",
64        "@com_google_protobuf//:field_mask_proto",
65        "@com_google_protobuf//:timestamp_proto",
66    ],
67)
68
69proto_library_with_info(
70    name = "storage_proto_with_info",
71    deps = [
72        ":storage_proto",
73        "//google/cloud:common_resources_proto",
74    ],
75)
76
77java_proto_library(
78    name = "storage_java_proto",
79    deps = [":storage_proto"],
80)
81
82java_grpc_library(
83    name = "storage_java_grpc",
84    srcs = [":storage_proto"],
85    deps = [":storage_java_proto"],
86)
87
88java_gapic_library(
89    name = "storage_java_gapic",
90    srcs = [":storage_proto_with_info"],
91    grpc_service_config = "storage_grpc_service_config.json",
92    rest_numeric_enums = True,
93    service_yaml = "storage_v2.yaml",
94    test_deps = [
95        ":storage_java_grpc",
96        "//google/iam/v1:iam_java_grpc",
97    ],
98    transport = "grpc",
99    deps = [
100        ":storage_java_proto",
101        "//google/iam/v1:iam_java_proto",
102    ],
103)
104
105java_gapic_test(
106    name = "storage_java_gapic_test_suite",
107    test_classes = [
108        "com.google.storage.v2.StorageClientTest",
109    ],
110    runtime_deps = [":storage_java_gapic_test"],
111)
112
113# Open Source Packages
114java_gapic_assembly_gradle_pkg(
115    name = "google-cloud-storage-v2-java",
116    include_samples = True,
117    transport = "grpc",
118    deps = [
119        ":storage_java_gapic",
120        ":storage_java_grpc",
121        ":storage_java_proto",
122        ":storage_proto",
123    ],
124)
125
126go_proto_library(
127    name = "storage_go_proto",
128    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
129    importpath = "cloud.google.com/go/storage/internal/apiv2/storagepb",
130    protos = [":storage_proto"],
131    deps = [
132        "//google/api:annotations_go_proto",
133        "//google/api:routing_go_proto",
134        "//google/iam/v1:iam_go_proto",
135        "//google/type:date_go_proto",
136    ],
137)
138
139go_gapic_library(
140    name = "storage_go_gapic",
141    srcs = [":storage_proto_with_info"],
142    grpc_service_config = "storage_grpc_service_config.json",
143    importpath = "cloud.google.com/go/storage/internal/apiv2;storage",
144    metadata = True,
145    rest_numeric_enums = True,
146    service_yaml = "storage_v2.yaml",
147    transport = "grpc",
148    deps = [
149        ":storage_go_proto",
150        "//google/iam/v1:iam_go_proto",
151        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
152    ],
153)
154
155# Open Source Packages
156go_gapic_assembly_pkg(
157    name = "gapi-cloud-storage-v2-go",
158    deps = [
159        ":storage_go_gapic",
160        ":storage_go_gapic_srcjar-metadata.srcjar",
161        ":storage_go_gapic_srcjar-snippets.srcjar",
162        ":storage_go_gapic_srcjar-test.srcjar",
163        ":storage_go_proto",
164    ],
165)
166
167py_gapic_library(
168    name = "storage_py_gapic",
169    srcs = [":storage_proto"],
170    grpc_service_config = "storage_grpc_service_config.json",
171    rest_numeric_enums = True,
172    service_yaml = "storage_v2.yaml",
173    transport = "grpc",
174    deps = [
175        "//google/iam/v1:iam_policy_py_proto",
176        "//google/iam/v1:policy_py_proto",
177    ],
178)
179
180py_test(
181    name = "storage_py_gapic_test",
182    srcs = [
183        "storage_py_gapic_pytest.py",
184        "storage_py_gapic_test.py",
185    ],
186    legacy_create_init = False,
187    deps = [":storage_py_gapic"],
188)
189
190# Open Source Packages
191py_gapic_assembly_pkg(
192    name = "storage-v2-py",
193    deps = [
194        ":storage_py_gapic",
195    ],
196)
197
198php_proto_library(
199    name = "storage_php_proto",
200    deps = [":storage_proto"],
201)
202
203# PHP always supports gRPC and REST, but there is no PHP GAPIC for this API.
204php_gapic_library(
205    name = "storage_php_gapic",
206    srcs = [":storage_proto_with_info"],
207    grpc_service_config = "storage_grpc_service_config.json",
208    rest_numeric_enums = True,
209    service_yaml = "storage_v2.yaml",
210    transport = "grpc+rest",
211    deps = [":storage_php_proto"],
212)
213
214# Open Source Packages
215php_gapic_assembly_pkg(
216    name = "google-cloud-storage-v2-php",
217    deps = [
218        ":storage_php_gapic",
219        ":storage_php_proto",
220    ],
221)
222
223nodejs_gapic_library(
224    name = "storage_nodejs_gapic",
225    package_name = "@google-cloud/storage",
226    src = ":storage_proto_with_info",
227    extra_protoc_parameters = ["metadata"],
228    grpc_service_config = "storage_grpc_service_config.json",
229    package = "google.storage.v2",
230    rest_numeric_enums = True,
231    service_yaml = "storage_v2.yaml",
232    transport = "grpc",
233    deps = [],
234)
235
236nodejs_gapic_assembly_pkg(
237    name = "storage-v2-nodejs",
238    deps = [
239        ":storage_nodejs_gapic",
240        ":storage_proto",
241    ],
242)
243
244ruby_proto_library(
245    name = "storage_ruby_proto",
246    deps = [":storage_proto"],
247)
248
249ruby_grpc_library(
250    name = "storage_ruby_grpc",
251    srcs = [":storage_proto"],
252    deps = [":storage_ruby_proto"],
253)
254
255ruby_cloud_gapic_library(
256    name = "storage_ruby_gapic",
257    srcs = [":storage_proto_with_info"],
258    extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-storage-v2"],
259    grpc_service_config = "storage_grpc_service_config.json",
260    rest_numeric_enums = True,
261    service_yaml = "storage_v2.yaml",
262    deps = [
263        ":storage_ruby_grpc",
264        ":storage_ruby_proto",
265    ],
266)
267
268# Open Source Packages
269ruby_gapic_assembly_pkg(
270    name = "google-cloud-storage-v2-ruby",
271    deps = [
272        ":storage_ruby_gapic",
273        ":storage_ruby_grpc",
274        ":storage_ruby_proto",
275    ],
276)
277
278csharp_proto_library(
279    name = "storage_csharp_proto",
280    deps = [":storage_proto"],
281)
282
283csharp_grpc_library(
284    name = "storage_csharp_grpc",
285    srcs = [":storage_proto"],
286    deps = [":storage_csharp_proto"],
287)
288
289csharp_gapic_library(
290    name = "storage_csharp_gapic",
291    srcs = [":storage_proto_with_info"],
292    common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
293    grpc_service_config = "storage_grpc_service_config.json",
294    service_yaml = "storage_v2.yaml",
295    deps = [
296        ":storage_csharp_grpc",
297        ":storage_csharp_proto",
298    ],
299)
300
301# Open Source Packages
302csharp_gapic_assembly_pkg(
303    name = "google-cloud-storage-v2-csharp",
304    deps = [
305        ":storage_csharp_gapic",
306        ":storage_csharp_grpc",
307        ":storage_csharp_proto",
308    ],
309)
310
311cc_proto_library(
312    name = "storage_cc_proto",
313    deps = [":storage_proto"],
314)
315
316cc_grpc_library(
317    name = "storage_cc_grpc",
318    srcs = [":storage_proto"],
319    generate_mocks = True,
320    grpc_only = True,
321    deps = [":storage_cc_proto"],
322)
323