Skip to content

Commit 70f3f00

Browse files
authored
feat(bigquerycontrol): generate library (#14450)
1 parent 0d5c654 commit 70f3f00

216 files changed

Lines changed: 18305 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ breaking changes in the upcoming 3.x release. This release is scheduled for
1010
these distros are EOL or in some form of "security only" support period.
1111
Note that we used CentOS 7 as a proxy for testing RedHat Enterprise Linux 7.
1212

13+
### New Libraries
14+
15+
The following experimental libraries are now available:
16+
17+
- [Cloud BigQuery Control API](/google/cloud/bigquerycontrol/README.md) -
18+
This library provides support for the Dataset, Job, Model, Project, Routine,
19+
RowAccessPolicy, and Table REST resources.
20+
1321
### [OpenTelemetry](/google/cloud/opentelemetry/README.md)
1422

1523
#### Bazel

ci/cloudbuild/builds/cmake-install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ expected_dirs+=(
7373
# no RPC services in google/cloud/bigquery/logging
7474
./include/google/cloud/bigquery/logging
7575
./include/google/cloud/bigquery/logging/v1
76-
./include/google/cloud/bigquery/v2
7776
./include/google/cloud/bigquery/v2/minimal
7877
./include/google/cloud/bigquery/v2/minimal/internal
7978
./include/google/cloud/bigquery/v2/minimal/mocks

ci/etc/expected_install_directories

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@
148148
./include/google/cloud/bigquery/storage/v1
149149
./include/google/cloud/bigquery/storage/v1/internal
150150
./include/google/cloud/bigquery/storage/v1/mocks
151+
./include/google/cloud/bigquery/v2
152+
./include/google/cloud/bigquerycontrol
153+
./include/google/cloud/bigquerycontrol/v2
154+
./include/google/cloud/bigquerycontrol/v2/internal
155+
./include/google/cloud/bigquerycontrol/v2/mocks
151156
./include/google/cloud/bigtable
152157
./include/google/cloud/bigtable/admin
153158
./include/google/cloud/bigtable/admin/internal
@@ -1272,6 +1277,8 @@
12721277
./lib64/cmake/google_cloud_cpp_beyondcorp_mocks
12731278
./lib64/cmake/google_cloud_cpp_bigquery
12741279
./lib64/cmake/google_cloud_cpp_bigquery_mocks
1280+
./lib64/cmake/google_cloud_cpp_bigquerycontrol
1281+
./lib64/cmake/google_cloud_cpp_bigquerycontrol_mocks
12751282
./lib64/cmake/google_cloud_cpp_bigtable
12761283
./lib64/cmake/google_cloud_cpp_bigtable_mocks
12771284
./lib64/cmake/google_cloud_cpp_billing

cmake/GoogleCloudCppFeatures.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ set(GOOGLE_CLOUD_CPP_NO_GRPC_FEATURES
3333

3434
set(GOOGLE_CLOUD_CPP_EXPERIMENTAL_LIBRARIES
3535
# cmake-format: sort
36+
"bigquerycontrol" # Some proto RPC comments indicate experimental methods.
3637
"pubsublite" # This is WIP, it needs a number of hand-crafted APIs.
3738
)
3839

@@ -369,6 +370,7 @@ macro (google_cloud_cpp_enable_cleanup)
369370
set(compute_features ${GOOGLE_CLOUD_CPP_ENABLE})
370371
list(FILTER compute_features INCLUDE REGEX "^compute_.*")
371372
if ((storage IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
373+
OR (bigquerycontrol IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
372374
OR (compute IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
373375
OR (compute_features)
374376
OR (experimental-bigquery_rest IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@com_google_googleapis//google/api:annotations_proto
2+
@com_google_googleapis//google/api:client_proto
3+
@com_google_googleapis//google/api:field_behavior_proto
4+
@com_google_googleapis//google/api:http_proto
5+
@com_google_googleapis//google/api:launch_stage_proto
6+
@com_google_googleapis//google/api:resource_proto
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@com_google_googleapis//google/cloud/bigquery/v2:biglake_config.proto
2+
@com_google_googleapis//google/cloud/bigquery/v2:clustering.proto
3+
@com_google_googleapis//google/cloud/bigquery/v2:data_format_options.proto
4+
@com_google_googleapis//google/cloud/bigquery/v2:dataset.proto
5+
@com_google_googleapis//google/cloud/bigquery/v2:dataset_reference.proto
6+
@com_google_googleapis//google/cloud/bigquery/v2:decimal_target_types.proto
7+
@com_google_googleapis//google/cloud/bigquery/v2:encryption_config.proto
8+
@com_google_googleapis//google/cloud/bigquery/v2:error.proto
9+
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_dataset_options.proto
10+
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_table_options.proto
11+
@com_google_googleapis//google/cloud/bigquery/v2:external_data_config.proto
12+
@com_google_googleapis//google/cloud/bigquery/v2:external_dataset_reference.proto
13+
@com_google_googleapis//google/cloud/bigquery/v2:file_set_specification_type.proto
14+
@com_google_googleapis//google/cloud/bigquery/v2:hive_partitioning.proto
15+
@com_google_googleapis//google/cloud/bigquery/v2:job.proto
16+
@com_google_googleapis//google/cloud/bigquery/v2:job_config.proto
17+
@com_google_googleapis//google/cloud/bigquery/v2:job_creation_reason.proto
18+
@com_google_googleapis//google/cloud/bigquery/v2:job_reference.proto
19+
@com_google_googleapis//google/cloud/bigquery/v2:job_stats.proto
20+
@com_google_googleapis//google/cloud/bigquery/v2:job_status.proto
21+
@com_google_googleapis//google/cloud/bigquery/v2:json_extension.proto
22+
@com_google_googleapis//google/cloud/bigquery/v2:location_metadata.proto
23+
@com_google_googleapis//google/cloud/bigquery/v2:map_target_type.proto
24+
@com_google_googleapis//google/cloud/bigquery/v2:model.proto
25+
@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto
26+
@com_google_googleapis//google/cloud/bigquery/v2:partitioning_definition.proto
27+
@com_google_googleapis//google/cloud/bigquery/v2:privacy_policy.proto
28+
@com_google_googleapis//google/cloud/bigquery/v2:project.proto
29+
@com_google_googleapis//google/cloud/bigquery/v2:query_parameter.proto
30+
@com_google_googleapis//google/cloud/bigquery/v2:range_partitioning.proto
31+
@com_google_googleapis//google/cloud/bigquery/v2:restriction_config.proto
32+
@com_google_googleapis//google/cloud/bigquery/v2:routine.proto
33+
@com_google_googleapis//google/cloud/bigquery/v2:routine_reference.proto
34+
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy.proto
35+
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy_reference.proto
36+
@com_google_googleapis//google/cloud/bigquery/v2:session_info.proto
37+
@com_google_googleapis//google/cloud/bigquery/v2:standard_sql.proto
38+
@com_google_googleapis//google/cloud/bigquery/v2:system_variable.proto
39+
@com_google_googleapis//google/cloud/bigquery/v2:table.proto
40+
@com_google_googleapis//google/cloud/bigquery/v2:table_constraints.proto
41+
@com_google_googleapis//google/cloud/bigquery/v2:table_reference.proto
42+
@com_google_googleapis//google/cloud/bigquery/v2:table_schema.proto
43+
@com_google_googleapis//google/cloud/bigquery/v2:time_partitioning.proto
44+
@com_google_googleapis//google/cloud/bigquery/v2:udf_resource.proto

external/googleapis/update_libraries.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ declare -A -r LIBRARIES=(
7373
"@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc" \
7474
"@com_google_googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc"
7575
)"
76+
["bigquerycontrol"]="@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto"
7677
["bigtable"]="$(
7778
printf ",%s" \
7879
"@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc" \

generator/generator_config.textproto

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,71 @@ service {
482482
retryable_status_codes: ["kUnavailable"]
483483
}
484484

485+
486+
# BigQueryControl
487+
service {
488+
service_proto_path: "google/cloud/bigquery/v2/dataset.proto"
489+
product_path: "google/cloud/bigquerycontrol/v2"
490+
initial_copyright_year: "2024"
491+
retryable_status_codes: ["kUnavailable"]
492+
generate_rest_transport: true
493+
generate_grpc_transport: false
494+
}
495+
496+
service {
497+
service_proto_path: "google/cloud/bigquery/v2/job.proto"
498+
product_path: "google/cloud/bigquerycontrol/v2"
499+
initial_copyright_year: "2024"
500+
retryable_status_codes: ["kUnavailable"]
501+
generate_rest_transport: true
502+
generate_grpc_transport: false
503+
}
504+
505+
service {
506+
service_proto_path: "google/cloud/bigquery/v2/model.proto"
507+
product_path: "google/cloud/bigquerycontrol/v2"
508+
initial_copyright_year: "2024"
509+
retryable_status_codes: ["kUnavailable"]
510+
generate_rest_transport: true
511+
generate_grpc_transport: false
512+
}
513+
514+
service {
515+
service_proto_path: "google/cloud/bigquery/v2/project.proto"
516+
product_path: "google/cloud/bigquerycontrol/v2"
517+
initial_copyright_year: "2024"
518+
retryable_status_codes: ["kUnavailable"]
519+
generate_rest_transport: true
520+
generate_grpc_transport: false
521+
}
522+
523+
service {
524+
service_proto_path: "google/cloud/bigquery/v2/routine.proto"
525+
product_path: "google/cloud/bigquerycontrol/v2"
526+
initial_copyright_year: "2024"
527+
retryable_status_codes: ["kUnavailable"]
528+
generate_rest_transport: true
529+
generate_grpc_transport: false
530+
}
531+
532+
service {
533+
service_proto_path: "google/cloud/bigquery/v2/row_access_policy.proto"
534+
product_path: "google/cloud/bigquerycontrol/v2"
535+
initial_copyright_year: "2024"
536+
retryable_status_codes: ["kUnavailable"]
537+
generate_rest_transport: true
538+
generate_grpc_transport: false
539+
}
540+
541+
service {
542+
service_proto_path: "google/cloud/bigquery/v2/table.proto"
543+
product_path: "google/cloud/bigquerycontrol/v2"
544+
initial_copyright_year: "2024"
545+
retryable_status_codes: ["kUnavailable"]
546+
generate_rest_transport: true
547+
generate_grpc_transport: false
548+
}
549+
485550
# Bigtable
486551
service {
487552
service_proto_path: "google/bigtable/v2/bigtable.proto"
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
package(default_visibility = ["//visibility:private"])
16+
17+
licenses(["notice"]) # Apache 2.0
18+
19+
service_dirs = [
20+
"v2/",
21+
]
22+
23+
code_glob = [d + i + f for d in service_dirs for i in [
24+
"",
25+
"internal/",
26+
] for f in [
27+
"*.h",
28+
"*.cc",
29+
]]
30+
31+
sources_glob = [d + "internal/*_sources.cc" for d in service_dirs]
32+
33+
filegroup(
34+
name = "srcs",
35+
srcs = glob(sources_glob),
36+
)
37+
38+
filegroup(
39+
name = "hdrs",
40+
srcs = glob(
41+
include = code_glob,
42+
exclude = sources_glob,
43+
),
44+
)
45+
46+
filegroup(
47+
name = "public_hdrs",
48+
srcs = glob([d + "*.h" for d in service_dirs]),
49+
visibility = ["//:__pkg__"],
50+
)
51+
52+
filegroup(
53+
name = "mocks",
54+
srcs = glob([d + "mocks/*.h" for d in service_dirs]),
55+
visibility = ["//:__pkg__"],
56+
)
57+
58+
cc_library(
59+
name = "google_cloud_cpp_bigquerycontrol",
60+
srcs = [":srcs"],
61+
hdrs = [":hdrs"],
62+
visibility = ["//:__pkg__"],
63+
deps = [
64+
"//:common",
65+
"//:grpc_utils",
66+
"//google/cloud:google_cloud_cpp_rest_internal",
67+
"//google/cloud:google_cloud_cpp_rest_protobuf_internal",
68+
"@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto",
69+
],
70+
)
71+
72+
cc_library(
73+
name = "google_cloud_cpp_bigquerycontrol_mocks",
74+
hdrs = [":mocks"],
75+
visibility = ["//:__pkg__"],
76+
deps = [
77+
":google_cloud_cpp_bigquerycontrol",
78+
"@com_google_googletest//:gtest",
79+
],
80+
)
81+
82+
[cc_test(
83+
name = sample.replace("/", "_").replace(".cc", ""),
84+
srcs = [sample],
85+
tags = ["integration-test"],
86+
deps = [
87+
"//:experimental-bigquerycontrol",
88+
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
89+
],
90+
) for sample in glob([d + "samples/*.cc" for d in service_dirs])]

0 commit comments

Comments
 (0)