-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bigquery): add BigLake API (#11882)
- Loading branch information
Showing
40 changed files
with
5,069 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"api_id": "biglake.googleapis.com", | ||
"api_shortname": "biglake", | ||
"client_documentation": "https://cloud.google.com/cpp/docs/reference/bigquery/latest", | ||
"distribution_name": "google-cloud-cpp", | ||
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:187149%20status=open", | ||
"language": "cpp", | ||
"library_type": "GAPIC_AUTO", | ||
"name_pretty": "BigLake API", | ||
"product_documentation": "https://cloud.google.com/bigquery/docs/iceberg-tables#create-using-biglake-metastore", | ||
"release_level": "stable", | ||
"repo": "googleapis/google-cloud-cpp", | ||
"requires_billing": true | ||
} |
174 changes: 174 additions & 0 deletions
174
google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
// Copyright 2023 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/biglake/v1/metastore.proto | ||
|
||
#include "google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h" | ||
#include <google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h> | ||
#include <memory> | ||
|
||
namespace google { | ||
namespace cloud { | ||
namespace bigquery_biglake_v1_internal { | ||
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN | ||
|
||
MetastoreServiceAuth::MetastoreServiceAuth( | ||
std::shared_ptr<google::cloud::internal::GrpcAuthenticationStrategy> auth, | ||
std::shared_ptr<MetastoreServiceStub> child) | ||
: auth_(std::move(auth)), child_(std::move(child)) {} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> | ||
MetastoreServiceAuth::CreateCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateCatalogRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->CreateCatalog(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> | ||
MetastoreServiceAuth::DeleteCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->DeleteCatalog(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> | ||
MetastoreServiceAuth::GetCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetCatalogRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->GetCatalog(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListCatalogsResponse> | ||
MetastoreServiceAuth::ListCatalogs( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListCatalogsRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->ListCatalogs(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> | ||
MetastoreServiceAuth::CreateDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const& | ||
request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->CreateDatabase(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> | ||
MetastoreServiceAuth::DeleteDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const& | ||
request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->DeleteDatabase(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> | ||
MetastoreServiceAuth::UpdateDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const& | ||
request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->UpdateDatabase(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> | ||
MetastoreServiceAuth::GetDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetDatabaseRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->GetDatabase(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListDatabasesResponse> | ||
MetastoreServiceAuth::ListDatabases( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListDatabasesRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->ListDatabases(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> | ||
MetastoreServiceAuth::CreateTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateTableRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->CreateTable(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> | ||
MetastoreServiceAuth::DeleteTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteTableRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->DeleteTable(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> | ||
MetastoreServiceAuth::UpdateTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::UpdateTableRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->UpdateTable(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> | ||
MetastoreServiceAuth::RenameTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::RenameTableRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->RenameTable(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> | ||
MetastoreServiceAuth::GetTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetTableRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->GetTable(context, request); | ||
} | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListTablesResponse> | ||
MetastoreServiceAuth::ListTables( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListTablesRequest const& request) { | ||
auto status = auth_->ConfigureContext(context); | ||
if (!status.ok()) return status; | ||
return child_->ListTables(context, request); | ||
} | ||
|
||
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END | ||
} // namespace bigquery_biglake_v1_internal | ||
} // namespace cloud | ||
} // namespace google |
127 changes: 127 additions & 0 deletions
127
google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// Copyright 2023 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/biglake/v1/metastore.proto | ||
|
||
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_AUTH_DECORATOR_H | ||
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_AUTH_DECORATOR_H | ||
|
||
#include "google/cloud/bigquery/biglake/v1/internal/metastore_stub.h" | ||
#include "google/cloud/internal/unified_grpc_credentials.h" | ||
#include "google/cloud/version.h" | ||
#include <memory> | ||
#include <set> | ||
#include <string> | ||
|
||
namespace google { | ||
namespace cloud { | ||
namespace bigquery_biglake_v1_internal { | ||
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN | ||
|
||
class MetastoreServiceAuth : public MetastoreServiceStub { | ||
public: | ||
~MetastoreServiceAuth() override = default; | ||
MetastoreServiceAuth( | ||
std::shared_ptr<google::cloud::internal::GrpcAuthenticationStrategy> auth, | ||
std::shared_ptr<MetastoreServiceStub> child); | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> CreateCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateCatalogRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> DeleteCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Catalog> GetCatalog( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetCatalogRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListCatalogsResponse> | ||
ListCatalogs(grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListCatalogsRequest const& | ||
request) override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> CreateDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const& | ||
request) override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> DeleteDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const& | ||
request) override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> UpdateDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const& | ||
request) override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Database> GetDatabase( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetDatabaseRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListDatabasesResponse> | ||
ListDatabases( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListDatabasesRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> CreateTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::CreateTableRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> DeleteTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::DeleteTableRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> UpdateTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::UpdateTableRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> RenameTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::RenameTableRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::Table> GetTable( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::GetTableRequest const& request) | ||
override; | ||
|
||
StatusOr<google::cloud::bigquery::biglake::v1::ListTablesResponse> ListTables( | ||
grpc::ClientContext& context, | ||
google::cloud::bigquery::biglake::v1::ListTablesRequest const& request) | ||
override; | ||
|
||
private: | ||
std::shared_ptr<google::cloud::internal::GrpcAuthenticationStrategy> auth_; | ||
std::shared_ptr<MetastoreServiceStub> child_; | ||
}; | ||
|
||
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END | ||
} // namespace bigquery_biglake_v1_internal | ||
} // namespace cloud | ||
} // namespace google | ||
|
||
#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_AUTH_DECORATOR_H |
Oops, something went wrong.