Skip to content

Commit

Permalink
Run generators and format their outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthart committed Jul 8, 2024
1 parent 04c8f58 commit 0f9d94d
Show file tree
Hide file tree
Showing 210 changed files with 18,080 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ci/etc/expected_install_directories
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,36 @@
./include/google/cloud/bigquery/storage/v1
./include/google/cloud/bigquery/storage/v1/internal
./include/google/cloud/bigquery/storage/v1/mocks
./include/google/cloud/bigquery/v2
./include/google/cloud/bigquerycontrol
./include/google/cloud/bigquerycontrol/dataset
./include/google/cloud/bigquerycontrol/dataset/v2
./include/google/cloud/bigquerycontrol/dataset/v2/internal
./include/google/cloud/bigquerycontrol/dataset/v2/mocks
./include/google/cloud/bigquerycontrol/job
./include/google/cloud/bigquerycontrol/job/v2
./include/google/cloud/bigquerycontrol/job/v2/internal
./include/google/cloud/bigquerycontrol/job/v2/mocks
./include/google/cloud/bigquerycontrol/model
./include/google/cloud/bigquerycontrol/model/v2
./include/google/cloud/bigquerycontrol/model/v2/internal
./include/google/cloud/bigquerycontrol/model/v2/mocks
./include/google/cloud/bigquerycontrol/project
./include/google/cloud/bigquerycontrol/project/v2
./include/google/cloud/bigquerycontrol/project/v2/internal
./include/google/cloud/bigquerycontrol/project/v2/mocks
./include/google/cloud/bigquerycontrol/routine
./include/google/cloud/bigquerycontrol/routine/v2
./include/google/cloud/bigquerycontrol/routine/v2/internal
./include/google/cloud/bigquerycontrol/routine/v2/mocks
./include/google/cloud/bigquerycontrol/row_access_policy
./include/google/cloud/bigquerycontrol/row_access_policy/v2
./include/google/cloud/bigquerycontrol/row_access_policy/v2/internal
./include/google/cloud/bigquerycontrol/row_access_policy/v2/mocks
./include/google/cloud/bigquerycontrol/table
./include/google/cloud/bigquerycontrol/table/v2
./include/google/cloud/bigquerycontrol/table/v2/internal
./include/google/cloud/bigquerycontrol/table/v2/mocks
./include/google/cloud/bigtable
./include/google/cloud/bigtable/admin
./include/google/cloud/bigtable/admin/internal
Expand Down Expand Up @@ -1272,6 +1302,8 @@
./lib64/cmake/google_cloud_cpp_beyondcorp_mocks
./lib64/cmake/google_cloud_cpp_bigquery
./lib64/cmake/google_cloud_cpp_bigquery_mocks
./lib64/cmake/google_cloud_cpp_bigquerycontrol
./lib64/cmake/google_cloud_cpp_bigquerycontrol_mocks
./lib64/cmake/google_cloud_cpp_bigtable
./lib64/cmake/google_cloud_cpp_bigtable_mocks
./lib64/cmake/google_cloud_cpp_billing
Expand Down
1 change: 1 addition & 0 deletions cmake/GoogleCloudCppFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(GOOGLE_CLOUD_CPP_NO_GRPC_FEATURES

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

Expand Down
6 changes: 6 additions & 0 deletions external/googleapis/protodeps/bigquerycontrol.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@com_google_googleapis//google/api:annotations_proto
@com_google_googleapis//google/api:client_proto
@com_google_googleapis//google/api:field_behavior_proto
@com_google_googleapis//google/api:http_proto
@com_google_googleapis//google/api:launch_stage_proto
@com_google_googleapis//google/api:resource_proto
44 changes: 44 additions & 0 deletions external/googleapis/protolists/bigquerycontrol.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@com_google_googleapis//google/cloud/bigquery/v2:biglake_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:clustering.proto
@com_google_googleapis//google/cloud/bigquery/v2:data_format_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:dataset.proto
@com_google_googleapis//google/cloud/bigquery/v2:dataset_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:decimal_target_types.proto
@com_google_googleapis//google/cloud/bigquery/v2:encryption_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:error.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_dataset_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_table_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_data_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_dataset_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:file_set_specification_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:hive_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:job.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_creation_reason.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_stats.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_status.proto
@com_google_googleapis//google/cloud/bigquery/v2:json_extension.proto
@com_google_googleapis//google/cloud/bigquery/v2:location_metadata.proto
@com_google_googleapis//google/cloud/bigquery/v2:map_target_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:model.proto
@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:partitioning_definition.proto
@com_google_googleapis//google/cloud/bigquery/v2:privacy_policy.proto
@com_google_googleapis//google/cloud/bigquery/v2:project.proto
@com_google_googleapis//google/cloud/bigquery/v2:query_parameter.proto
@com_google_googleapis//google/cloud/bigquery/v2:range_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:restriction_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:routine.proto
@com_google_googleapis//google/cloud/bigquery/v2:routine_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy.proto
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:session_info.proto
@com_google_googleapis//google/cloud/bigquery/v2:standard_sql.proto
@com_google_googleapis//google/cloud/bigquery/v2:system_variable.proto
@com_google_googleapis//google/cloud/bigquery/v2:table.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_constraints.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_schema.proto
@com_google_googleapis//google/cloud/bigquery/v2:time_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:udf_resource.proto
31 changes: 31 additions & 0 deletions google/cloud/bigquerycontrol/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//bazel:gapic.bzl", "cc_gapic_library")

package(default_visibility = ["//visibility:private"])

licenses(["notice"]) # Apache 2.0

service_dirs = ["table/v2/"]

googleapis_deps = [
"@com_google_googleapis//google/cloud/bigquery/v2:bigquerycontrol_cc_grpc",
]

cc_gapic_library(
name = "bigquerycontrol",
googleapis_deps = googleapis_deps,
service_dirs = service_dirs,
)
37 changes: 37 additions & 0 deletions google/cloud/bigquerycontrol/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ~~~
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~

include(GoogleCloudCppLibrary)

google_cloud_cpp_add_gapic_library(bigquerycontrol "BigQuery API" EXPERIMENTAL
SERVICE_DIRS "table/v2/")

if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
add_executable(bigquerycontrol_quickstart "quickstart/quickstart.cc")
target_link_libraries(
bigquerycontrol_quickstart
PRIVATE google-cloud-cpp::experimental-bigquerycontrol)
google_cloud_cpp_add_common_options(bigquerycontrol_quickstart)
add_test(
NAME bigquerycontrol_quickstart
COMMAND
cmake -P "${PROJECT_SOURCE_DIR}/cmake/quickstart-runner.cmake"
$<TARGET_FILE:bigquerycontrol_quickstart> GOOGLE_CLOUD_PROJECT
GOOGLE_CLOUD_CPP_TEST_REGION # EDIT HERE
)
set_tests_properties(bigquerycontrol_quickstart
PROPERTIES LABELS "integration-test;quickstart")
endif ()
67 changes: 67 additions & 0 deletions google/cloud/bigquerycontrol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# BigQuery API C++ Client Library

:construction:

This directory contains an idiomatic C++ client library for the \[BigQuery
API\]\[cloud-service-docs\].

A data platform for customers to create, manage, share and query data.

This library is **experimental**. Its APIs are subject to change without notice.

Please, note that the Google Cloud C++ client libraries do **not** follow
[Semantic Versioning](https://semver.org/).

## Quickstart

The [quickstart/](quickstart/README.md) directory contains a minimal environment
to get started using this client library in a larger project. The following
"Hello World" program is used in this quickstart, and should give you a taste of
this library.

<!-- inject-quickstart-start -->

```cc
#include "google/cloud/bigquerycontrol/table/v2/ EDIT HERE _client.h"
#include "google/cloud/location.h"
#include <iostream>

int main(int argc, char* argv[]) try {
if (argc != 3) {
std::cerr << "Usage: " << argv[0] << " project-id location-id\n";
return 1;
}

auto const location = google::cloud::Location(argv[1], argv[2]);

namespace bigquerycontrol = ::google::cloud::bigquerycontrol_table_v2;
auto client = bigquerycontrol::ServiceClient(
bigquerycontrol::MakeServiceConnection()); // EDIT HERE

for (auto r : client.List /*EDIT HERE*/ (location.FullName())) {
if (!r) throw std::move(r).status();
std::cout << r->DebugString() << "\n";
}

return 0;
} catch (google::cloud::Status const& status) {
std::cerr << "google::cloud::Status thrown: " << status << "\n";
return 1;
}
```
<!-- inject-quickstart-end -->
## More Information
- Official documentation about the \[BigQuery API\]\[cloud-service-docs\]
service
- \[Reference doxygen documentation\]\[doxygen-link\] for each release of this
client library
- Detailed header comments in our \[public `.h`\]\[source-link\] files
\[cloud-service-docs\]: https://cloud.google.com/bigquerycontrol \[EDIT HERE\]
\[doxygen-link\]:
https://cloud.google.com/cpp/docs/reference/bigquerycontrol/latest/
\[source-link\]:
https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/bigquerycontrol
91 changes: 91 additions & 0 deletions google/cloud/bigquerycontrol/dataset/v2/dataset_client.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated by the Codegen C++ plugin.
// If you make any local changes, they will be lost.
// source: google/cloud/bigquery/v2/dataset.proto

#include "google/cloud/bigquerycontrol/dataset/v2/dataset_client.h"
#include <memory>
#include <utility>

namespace google {
namespace cloud {
namespace bigquerycontrol_dataset_v2 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

DatasetServiceClient::DatasetServiceClient(
std::shared_ptr<DatasetServiceConnection> connection, Options opts)
: connection_(std::move(connection)),
options_(
internal::MergeOptions(std::move(opts), connection_->options())) {}
DatasetServiceClient::~DatasetServiceClient() = default;

StatusOr<google::cloud::bigquery::v2::Dataset> DatasetServiceClient::GetDataset(
google::cloud::bigquery::v2::GetDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->GetDataset(request);
}

StatusOr<google::cloud::bigquery::v2::Dataset>
DatasetServiceClient::InsertDataset(
google::cloud::bigquery::v2::InsertDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->InsertDataset(request);
}

StatusOr<google::cloud::bigquery::v2::Dataset>
DatasetServiceClient::PatchDataset(
google::cloud::bigquery::v2::UpdateOrPatchDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->PatchDataset(request);
}

StatusOr<google::cloud::bigquery::v2::Dataset>
DatasetServiceClient::UpdateDataset(
google::cloud::bigquery::v2::UpdateOrPatchDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->UpdateDataset(request);
}

Status DatasetServiceClient::DeleteDataset(
google::cloud::bigquery::v2::DeleteDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->DeleteDataset(request);
}

StreamRange<google::cloud::bigquery::v2::ListFormatDataset>
DatasetServiceClient::ListDatasets(
google::cloud::bigquery::v2::ListDatasetsRequest request, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->ListDatasets(std::move(request));
}

StatusOr<google::cloud::bigquery::v2::Dataset>
DatasetServiceClient::UndeleteDataset(
google::cloud::bigquery::v2::UndeleteDatasetRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->UndeleteDataset(request);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace bigquerycontrol_dataset_v2
} // namespace cloud
} // namespace google
Loading

0 comments on commit 0f9d94d

Please sign in to comment.