Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit c1d1b77

Browse files
authored
feat: upgrade googleapis and bigquery protos (#24)
1 parent 3b7a52d commit c1d1b77

File tree

5 files changed

+96
-15
lines changed

5 files changed

+96
-15
lines changed

CMakeLists.txt

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
3939
# downloaded from GitHub.
4040
set(
4141
GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL
42-
"https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz"
42+
"https://github.com/googleapis/googleapis/archive/c6e62c7e5e61e6dae7fdc3bc3de81f60e6a9445c.tar.gz"
4343
)
4444
set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
45-
"13af135d8cc9b81b47d6fbfc258fe790a151956d06e01fd16671aa49fe536ab1")
45+
"33520d6ac51fbb2ca136c06b32b5f5f04f9b5ae8596b161dbe0ae05b1927b4de")
4646

4747
set(GOOGLEAPIS_CPP_SOURCE
4848
"${CMAKE_BINARY_DIR}/external/googleapis/src/googleapis_download")
@@ -52,6 +52,7 @@ set(GOOGLEAPIS_CPP_PROTO_FILES
5252
"google/api/annotations.proto"
5353
"google/api/auth.proto"
5454
"google/api/client.proto"
55+
"google/api/field_behavior.proto"
5556
"google/api/label.proto"
5657
"google/api/launch_stage.proto"
5758
"google/api/metric.proto"
@@ -73,14 +74,20 @@ set(GOOGLEAPIS_CPP_PROTO_FILES
7374
"google/bigtable/admin/v2/table.proto"
7475
"google/bigtable/v2/bigtable.proto"
7576
"google/bigtable/v2/data.proto"
76-
"google/cloud/bigquery/v2/model_reference.proto"
77-
"google/cloud/bigquery/v2/standard_sql.proto"
78-
"google/cloud/bigquery/v2/model.proto"
77+
"google/cloud/bigquery/connection/v1beta1/connection.proto"
78+
"google/cloud/bigquery/datatransfer/v1/datasource.proto"
79+
"google/cloud/bigquery/datatransfer/v1/datatransfer.proto"
80+
"google/cloud/bigquery/datatransfer/v1/transfer.proto"
81+
"google/cloud/bigquery/logging/v1/audit_data.proto"
82+
"google/cloud/bigquery/storage/v1beta1/arrow.proto"
83+
"google/cloud/bigquery/storage/v1beta1/avro.proto"
7984
"google/cloud/bigquery/storage/v1beta1/read_options.proto"
8085
"google/cloud/bigquery/storage/v1beta1/storage.proto"
81-
"google/cloud/bigquery/storage/v1beta1/avro.proto"
8286
"google/cloud/bigquery/storage/v1beta1/table_reference.proto"
83-
"google/cloud/bigquery/storage/v1beta1/arrow.proto"
87+
"google/cloud/bigquery/v2/encryption_config.proto"
88+
"google/cloud/bigquery/v2/model.proto"
89+
"google/cloud/bigquery/v2/model_reference.proto"
90+
"google/cloud/bigquery/v2/standard_sql.proto"
8491
"google/spanner/admin/database/v1/spanner_database_admin.proto"
8592
"google/spanner/admin/instance/v1/spanner_instance_admin.proto"
8693
"google/spanner/v1/keys.proto"
@@ -189,6 +196,7 @@ googleapis_cpp_add_library("google/api/http.proto")
189196
googleapis_cpp_add_library("google/api/annotations.proto" api_http_protos)
190197
googleapis_cpp_add_library("google/api/auth.proto" api_annotations_protos)
191198
googleapis_cpp_add_library("google/api/client.proto")
199+
googleapis_cpp_add_library("google/api/field_behavior.proto")
192200
googleapis_cpp_add_library("google/api/label.proto")
193201
googleapis_cpp_add_library("google/api/launch_stage.proto")
194202
googleapis_cpp_add_library("google/api/metric.proto" api_launch_stage_protos
@@ -211,6 +219,7 @@ googleapis_cpp_add_library("google/iam/v1/policy.proto"
211219
googleapis_cpp_add_library("google/iam/v1/iam_policy.proto"
212220
api_annotations_protos
213221
api_client_protos
222+
api_field_behavior_protos
214223
iam_v1_options_protos
215224
iam_v1_policy_protos)
216225

@@ -226,22 +235,31 @@ googleapis_cpp_add_library("google/devtools/cloudtrace/v2/tracing.proto"
226235

227236
google_cloud_cpp_grpcpp_library(
228237
googleapis_cpp_cloud_bigquery_protos
229-
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model_reference.proto"
230-
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/standard_sql.proto"
231-
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model.proto"
238+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/connection/v1beta1/connection.proto"
239+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/datasource.proto"
240+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/datatransfer.proto"
241+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/transfer.proto"
242+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/logging/v1/audit_data.proto"
243+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/arrow.proto"
244+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/avro.proto"
232245
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/read_options.proto"
233246
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/storage.proto"
234-
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/avro.proto"
235247
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/table_reference.proto"
236-
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/arrow.proto"
248+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/encryption_config.proto"
249+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model.proto"
250+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model_reference.proto"
251+
"${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/standard_sql.proto"
237252
PROTO_PATH_DIRECTORIES
238253
"${GOOGLEAPIS_CPP_SOURCE}"
239254
"${PROTO_INCLUDE_DIR}")
240255
googleapis_cpp_set_version_and_alias(cloud_bigquery_protos)
241256
target_link_libraries(googleapis_cpp_cloud_bigquery_protos
242257
PUBLIC googleapis-c++::api_annotations_protos
243258
googleapis-c++::api_http_protos
259+
googleapis-c++::api_field_behavior_protos
244260
googleapis-c++::api_client_protos
261+
googleapis-c++::iam_v1_iam_policy_protos
262+
googleapis-c++::rpc_status_protos
245263
PRIVATE googleapis_cpp_common_flags)
246264

247265
google_cloud_cpp_grpcpp_library(
@@ -300,6 +318,7 @@ set(googleapis_cpp_installed_libraries_list
300318
googleapis_cpp_api_annotations_protos
301319
googleapis_cpp_api_auth_protos
302320
googleapis_cpp_api_client_protos
321+
googleapis_cpp_api_field_behavior_protos
303322
googleapis_cpp_api_resource_protos
304323
googleapis_cpp_devtools_cloudtrace_v2_trace_protos
305324
googleapis_cpp_devtools_cloudtrace_v2_tracing_protos
@@ -396,6 +415,8 @@ string(CONCAT GOOGLE_CLOUD_CPP_PC_REQUIRES
396415
" googleapis_cpp_longrunning_operations_protos"
397416
" googleapis_cpp_api_auth_protos"
398417
" googleapis_cpp_api_annotations_protos"
418+
" googleapis_cpp_api_client_protos"
419+
" googleapis_cpp_api_field_behavior_protos"
399420
" googleapis_cpp_api_http_protos"
400421
" googleapis_cpp_rpc_status_protos"
401422
" googleapis_cpp_rpc_error_details_protos"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ~~~
2+
# Copyright 2019 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ~~~
16+
17+
cmake_minimum_required(VERSION 3.5)
18+
19+
project(utilize-googleapis CXX C)
20+
21+
# Configure the compiler options, we will be using C++11 features.
22+
set(CMAKE_CXX_STANDARD 11)
23+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
24+
25+
find_package(googleapis REQUIRED)
26+
27+
add_executable(utilize-googleapis main.cc)
28+
target_link_libraries(utilize-googleapis googleapis-c++::cloud_bigquery_protos)

ci/test-install/bigquery/main.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2019 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+
// http://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+
#include <google/cloud/bigquery/storage/v1beta1/storage.grpc.pb.h>
16+
#include <grpcpp/grpcpp.h>
17+
18+
int main() {
19+
auto creds = grpc::InsecureChannelCredentials();
20+
auto channel = grpc::CreateChannel("localhost:12345", creds);
21+
auto stub = google::cloud::bigquery::storage::v1beta1::BigQueryStorage::NewStub(channel);
22+
}

ci/test-install/compile-test-projects.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@
1919

2020
set -eu
2121

22-
# For bigtable protos
22+
# For BigQuery protos
23+
cp -R /home/build/cpp-cmakefiles/ci/test-install/bigquery \
24+
/home/build/test-install-bigquery
25+
cd /home/build/test-install-bigquery
26+
cmake -H. -Bcmake-out
27+
cmake --build cmake-out -- -j "$(nproc)"
28+
cmake-out/utilize-googleapis
29+
30+
# For Bigtable protos
2331
cp -R /home/build/cpp-cmakefiles/ci/test-install/bigtable \
2432
/home/build/test-install-bigtable
2533
cd /home/build/test-install-bigtable

cmake/config.cmake.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ foreach (_target
2323
api_annotations
2424
api_auth
2525
api_client
26+
api_field_behavior
2627
api_http
2728
api_resource
2829
bigtable
29-
devtools_cloudtrace_v2_trace
30-
devtools_cloudtrace_v2_tracing
30+
cloud_bigquery
31+
devtools_cloudtrace_v2_trace
32+
devtools_cloudtrace_v2_tracing
3133
iam_v1_iam_policy
3234
iam_v1_options
3335
iam_v1_policy

0 commit comments

Comments
 (0)