Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bigqueryanalyticshub): generate library #9882

Merged
merged 3 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/etc/expected_install_directories
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
./include/google/cloud/beyondcorp/internal
./include/google/cloud/beyondcorp/mocks
./include/google/cloud/bigquery
./include/google/cloud/bigquery/analyticshub
./include/google/cloud/bigquery/analyticshub/v1
./include/google/cloud/bigquery/connection
./include/google/cloud/bigquery/connection/v1
./include/google/cloud/bigquery/datatransfer
Expand Down
1 change: 1 addition & 0 deletions external/googleapis/protolists/bigquery.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub.proto
@com_google_googleapis//google/cloud/bigquery/connection/v1:connection.proto
@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer.proto
@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:transfer.proto
Expand Down
3 changes: 2 additions & 1 deletion external/googleapis/update_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ declare -A -r LIBRARIES=(
"@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc" \
"@com_google_googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc" \
"@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc" \
"@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc"
"@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc" \
"@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc"
)"
["bigtable"]="$(
printf ",%s" \
Expand Down
7 changes: 7 additions & 0 deletions generator/generator_config.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ service {
retryable_status_codes: ["kUnavailable"]
}

service {
service_proto_path: "google/cloud/bigquery/analyticshub/v1/analyticshub.proto"
product_path: "google/cloud/bigquery"
initial_copyright_year: "2022"
retryable_status_codes: ["kUnavailable"]
}

# Bigtable
service {
service_proto_path: "google/bigtable/v2/bigtable.proto"
Expand Down
1 change: 1 addition & 0 deletions google/cloud/bigquery/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cc_library(
deps = [
"//:common",
"//:grpc_utils",
"@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc",
"@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc",
"@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc",
"@com_google_googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc",
Expand Down
23 changes: 23 additions & 0 deletions google/cloud/bigquery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ include(GoogleCloudCppCommon)
# configure_file(version_info.h.in ${CMAKE_CURRENT_SOURCE_DIR}/version_info.h)
add_library(
google_cloud_cpp_bigquery # cmake-format: sort
analytics_hub_client.cc
analytics_hub_client.h
analytics_hub_connection.cc
analytics_hub_connection.h
analytics_hub_connection_idempotency_policy.cc
analytics_hub_connection_idempotency_policy.h
analytics_hub_options.h
bigquery_read_client.cc
bigquery_read_client.h
bigquery_read_connection.cc
Expand Down Expand Up @@ -59,6 +66,21 @@ add_library(
data_transfer_connection_idempotency_policy.cc
data_transfer_connection_idempotency_policy.h
data_transfer_options.h
internal/analytics_hub_auth_decorator.cc
internal/analytics_hub_auth_decorator.h
internal/analytics_hub_connection_impl.cc
internal/analytics_hub_connection_impl.h
internal/analytics_hub_logging_decorator.cc
internal/analytics_hub_logging_decorator.h
internal/analytics_hub_metadata_decorator.cc
internal/analytics_hub_metadata_decorator.h
internal/analytics_hub_option_defaults.cc
internal/analytics_hub_option_defaults.h
internal/analytics_hub_retry_traits.h
internal/analytics_hub_stub.cc
internal/analytics_hub_stub.h
internal/analytics_hub_stub_factory.cc
internal/analytics_hub_stub_factory.h
internal/bigquery_read_auth_decorator.cc
internal/bigquery_read_auth_decorator.h
internal/bigquery_read_connection_impl.cc
Expand Down Expand Up @@ -199,6 +221,7 @@ add_library(google_cloud_cpp_bigquery_mocks INTERFACE)
target_sources(
google_cloud_cpp_bigquery_mocks
INTERFACE # cmake-format: sort
${CMAKE_CURRENT_SOURCE_DIR}/mocks/mock_analytics_hub_connection.h
${CMAKE_CURRENT_SOURCE_DIR}/mocks/mock_bigquery_read_connection.h
${CMAKE_CURRENT_SOURCE_DIR}/mocks/mock_bigquery_write_connection.h
${CMAKE_CURRENT_SOURCE_DIR}/mocks/mock_connection_connection.h
Expand Down
277 changes: 277 additions & 0 deletions google/cloud/bigquery/analytics_hub_client.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
// Copyright 2022 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/analyticshub/v1/analyticshub.proto

#include "google/cloud/bigquery/analytics_hub_client.h"
#include <memory>

namespace google {
namespace cloud {
namespace bigquery {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

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

StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::ListDataExchanges(std::string const& parent,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::ListDataExchangesRequest request;
request.set_parent(parent);
return connection_->ListDataExchanges(request);
}

StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::ListDataExchanges(
google::cloud::bigquery::analyticshub::v1::ListDataExchangesRequest request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->ListDataExchanges(std::move(request));
}

StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::ListOrgDataExchanges(std::string const& organization,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::ListOrgDataExchangesRequest
request;
request.set_organization(organization);
return connection_->ListOrgDataExchanges(request);
}

StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::ListOrgDataExchanges(
google::cloud::bigquery::analyticshub::v1::ListOrgDataExchangesRequest
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->ListOrgDataExchanges(std::move(request));
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::GetDataExchange(std::string const& name,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::GetDataExchangeRequest request;
request.set_name(name);
return connection_->GetDataExchange(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::GetDataExchange(
google::cloud::bigquery::analyticshub::v1::GetDataExchangeRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->GetDataExchange(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::CreateDataExchange(
std::string const& parent,
google::cloud::bigquery::analyticshub::v1::DataExchange const&
data_exchange,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::CreateDataExchangeRequest request;
request.set_parent(parent);
*request.mutable_data_exchange() = data_exchange;
return connection_->CreateDataExchange(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::CreateDataExchange(
google::cloud::bigquery::analyticshub::v1::CreateDataExchangeRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->CreateDataExchange(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::UpdateDataExchange(
google::cloud::bigquery::analyticshub::v1::DataExchange const&
data_exchange,
google::protobuf::FieldMask const& update_mask, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::UpdateDataExchangeRequest request;
*request.mutable_data_exchange() = data_exchange;
*request.mutable_update_mask() = update_mask;
return connection_->UpdateDataExchange(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
AnalyticsHubServiceClient::UpdateDataExchange(
google::cloud::bigquery::analyticshub::v1::UpdateDataExchangeRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->UpdateDataExchange(request);
}

Status AnalyticsHubServiceClient::DeleteDataExchange(std::string const& name,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::DeleteDataExchangeRequest request;
request.set_name(name);
return connection_->DeleteDataExchange(request);
}

Status AnalyticsHubServiceClient::DeleteDataExchange(
google::cloud::bigquery::analyticshub::v1::DeleteDataExchangeRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->DeleteDataExchange(request);
}

StreamRange<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::ListListings(std::string const& parent,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::ListListingsRequest request;
request.set_parent(parent);
return connection_->ListListings(request);
}

StreamRange<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::ListListings(
google::cloud::bigquery::analyticshub::v1::ListListingsRequest request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->ListListings(std::move(request));
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::GetListing(std::string const& name, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::GetListingRequest request;
request.set_name(name);
return connection_->GetListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::GetListing(
google::cloud::bigquery::analyticshub::v1::GetListingRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->GetListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::CreateListing(
std::string const& parent,
google::cloud::bigquery::analyticshub::v1::Listing const& listing,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::CreateListingRequest request;
request.set_parent(parent);
*request.mutable_listing() = listing;
return connection_->CreateListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::CreateListing(
google::cloud::bigquery::analyticshub::v1::CreateListingRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->CreateListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::UpdateListing(
google::cloud::bigquery::analyticshub::v1::Listing const& listing,
google::protobuf::FieldMask const& update_mask, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::UpdateListingRequest request;
*request.mutable_listing() = listing;
*request.mutable_update_mask() = update_mask;
return connection_->UpdateListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
AnalyticsHubServiceClient::UpdateListing(
google::cloud::bigquery::analyticshub::v1::UpdateListingRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->UpdateListing(request);
}

Status AnalyticsHubServiceClient::DeleteListing(std::string const& name,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::DeleteListingRequest request;
request.set_name(name);
return connection_->DeleteListing(request);
}

Status AnalyticsHubServiceClient::DeleteListing(
google::cloud::bigquery::analyticshub::v1::DeleteListingRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->DeleteListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::SubscribeListingResponse>
AnalyticsHubServiceClient::SubscribeListing(std::string const& name,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::bigquery::analyticshub::v1::SubscribeListingRequest request;
request.set_name(name);
return connection_->SubscribeListing(request);
}

StatusOr<google::cloud::bigquery::analyticshub::v1::SubscribeListingResponse>
AnalyticsHubServiceClient::SubscribeListing(
google::cloud::bigquery::analyticshub::v1::SubscribeListingRequest const&
request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->SubscribeListing(request);
}

StatusOr<google::iam::v1::Policy> AnalyticsHubServiceClient::GetIamPolicy(
google::iam::v1::GetIamPolicyRequest const& request, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->GetIamPolicy(request);
}

StatusOr<google::iam::v1::Policy> AnalyticsHubServiceClient::SetIamPolicy(
google::iam::v1::SetIamPolicyRequest const& request, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->SetIamPolicy(request);
}

StatusOr<google::iam::v1::TestIamPermissionsResponse>
AnalyticsHubServiceClient::TestIamPermissions(
google::iam::v1::TestIamPermissionsRequest const& request, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->TestIamPermissions(request);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace bigquery
} // namespace cloud
} // namespace google
Loading