|
| 1 | +// Copyright 2023 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 | +// Generated by the Codegen C++ plugin. |
| 16 | +// If you make any local changes, they will be lost. |
| 17 | +// source: google/cloud/bigquery/biglake/v1/metastore.proto |
| 18 | + |
| 19 | +#include "google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h" |
| 20 | +#include <google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h> |
| 21 | +#include <memory> |
| 22 | + |
| 23 | +namespace google { |
| 24 | +namespace cloud { |
| 25 | +namespace bigquery_biglake_v1_internal { |
| 26 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN |
| 27 | + |
| 28 | +MetastoreServiceAuth::MetastoreServiceAuth( |
| 29 | + std::shared_ptr<google::cloud::internal::GrpcAuthenticationStrategy> auth, |
| 30 | + std::shared_ptr<MetastoreServiceStub> child) |
| 31 | + : auth_(std::move(auth)), child_(std::move(child)) {} |
| 32 | + |
| 33 | +StatusOr<google::cloud::bigquery::biglake::v1::Catalog> |
| 34 | +MetastoreServiceAuth::CreateCatalog( |
| 35 | + grpc::ClientContext& context, |
| 36 | + google::cloud::bigquery::biglake::v1::CreateCatalogRequest const& request) { |
| 37 | + auto status = auth_->ConfigureContext(context); |
| 38 | + if (!status.ok()) return status; |
| 39 | + return child_->CreateCatalog(context, request); |
| 40 | +} |
| 41 | + |
| 42 | +StatusOr<google::cloud::bigquery::biglake::v1::Catalog> |
| 43 | +MetastoreServiceAuth::DeleteCatalog( |
| 44 | + grpc::ClientContext& context, |
| 45 | + google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const& request) { |
| 46 | + auto status = auth_->ConfigureContext(context); |
| 47 | + if (!status.ok()) return status; |
| 48 | + return child_->DeleteCatalog(context, request); |
| 49 | +} |
| 50 | + |
| 51 | +StatusOr<google::cloud::bigquery::biglake::v1::Catalog> |
| 52 | +MetastoreServiceAuth::GetCatalog( |
| 53 | + grpc::ClientContext& context, |
| 54 | + google::cloud::bigquery::biglake::v1::GetCatalogRequest const& request) { |
| 55 | + auto status = auth_->ConfigureContext(context); |
| 56 | + if (!status.ok()) return status; |
| 57 | + return child_->GetCatalog(context, request); |
| 58 | +} |
| 59 | + |
| 60 | +StatusOr<google::cloud::bigquery::biglake::v1::ListCatalogsResponse> |
| 61 | +MetastoreServiceAuth::ListCatalogs( |
| 62 | + grpc::ClientContext& context, |
| 63 | + google::cloud::bigquery::biglake::v1::ListCatalogsRequest const& request) { |
| 64 | + auto status = auth_->ConfigureContext(context); |
| 65 | + if (!status.ok()) return status; |
| 66 | + return child_->ListCatalogs(context, request); |
| 67 | +} |
| 68 | + |
| 69 | +StatusOr<google::cloud::bigquery::biglake::v1::Database> |
| 70 | +MetastoreServiceAuth::CreateDatabase( |
| 71 | + grpc::ClientContext& context, |
| 72 | + google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const& |
| 73 | + request) { |
| 74 | + auto status = auth_->ConfigureContext(context); |
| 75 | + if (!status.ok()) return status; |
| 76 | + return child_->CreateDatabase(context, request); |
| 77 | +} |
| 78 | + |
| 79 | +StatusOr<google::cloud::bigquery::biglake::v1::Database> |
| 80 | +MetastoreServiceAuth::DeleteDatabase( |
| 81 | + grpc::ClientContext& context, |
| 82 | + google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const& |
| 83 | + request) { |
| 84 | + auto status = auth_->ConfigureContext(context); |
| 85 | + if (!status.ok()) return status; |
| 86 | + return child_->DeleteDatabase(context, request); |
| 87 | +} |
| 88 | + |
| 89 | +StatusOr<google::cloud::bigquery::biglake::v1::Database> |
| 90 | +MetastoreServiceAuth::UpdateDatabase( |
| 91 | + grpc::ClientContext& context, |
| 92 | + google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const& |
| 93 | + request) { |
| 94 | + auto status = auth_->ConfigureContext(context); |
| 95 | + if (!status.ok()) return status; |
| 96 | + return child_->UpdateDatabase(context, request); |
| 97 | +} |
| 98 | + |
| 99 | +StatusOr<google::cloud::bigquery::biglake::v1::Database> |
| 100 | +MetastoreServiceAuth::GetDatabase( |
| 101 | + grpc::ClientContext& context, |
| 102 | + google::cloud::bigquery::biglake::v1::GetDatabaseRequest const& request) { |
| 103 | + auto status = auth_->ConfigureContext(context); |
| 104 | + if (!status.ok()) return status; |
| 105 | + return child_->GetDatabase(context, request); |
| 106 | +} |
| 107 | + |
| 108 | +StatusOr<google::cloud::bigquery::biglake::v1::ListDatabasesResponse> |
| 109 | +MetastoreServiceAuth::ListDatabases( |
| 110 | + grpc::ClientContext& context, |
| 111 | + google::cloud::bigquery::biglake::v1::ListDatabasesRequest const& request) { |
| 112 | + auto status = auth_->ConfigureContext(context); |
| 113 | + if (!status.ok()) return status; |
| 114 | + return child_->ListDatabases(context, request); |
| 115 | +} |
| 116 | + |
| 117 | +StatusOr<google::cloud::bigquery::biglake::v1::Table> |
| 118 | +MetastoreServiceAuth::CreateTable( |
| 119 | + grpc::ClientContext& context, |
| 120 | + google::cloud::bigquery::biglake::v1::CreateTableRequest const& request) { |
| 121 | + auto status = auth_->ConfigureContext(context); |
| 122 | + if (!status.ok()) return status; |
| 123 | + return child_->CreateTable(context, request); |
| 124 | +} |
| 125 | + |
| 126 | +StatusOr<google::cloud::bigquery::biglake::v1::Table> |
| 127 | +MetastoreServiceAuth::DeleteTable( |
| 128 | + grpc::ClientContext& context, |
| 129 | + google::cloud::bigquery::biglake::v1::DeleteTableRequest const& request) { |
| 130 | + auto status = auth_->ConfigureContext(context); |
| 131 | + if (!status.ok()) return status; |
| 132 | + return child_->DeleteTable(context, request); |
| 133 | +} |
| 134 | + |
| 135 | +StatusOr<google::cloud::bigquery::biglake::v1::Table> |
| 136 | +MetastoreServiceAuth::UpdateTable( |
| 137 | + grpc::ClientContext& context, |
| 138 | + google::cloud::bigquery::biglake::v1::UpdateTableRequest const& request) { |
| 139 | + auto status = auth_->ConfigureContext(context); |
| 140 | + if (!status.ok()) return status; |
| 141 | + return child_->UpdateTable(context, request); |
| 142 | +} |
| 143 | + |
| 144 | +StatusOr<google::cloud::bigquery::biglake::v1::Table> |
| 145 | +MetastoreServiceAuth::RenameTable( |
| 146 | + grpc::ClientContext& context, |
| 147 | + google::cloud::bigquery::biglake::v1::RenameTableRequest const& request) { |
| 148 | + auto status = auth_->ConfigureContext(context); |
| 149 | + if (!status.ok()) return status; |
| 150 | + return child_->RenameTable(context, request); |
| 151 | +} |
| 152 | + |
| 153 | +StatusOr<google::cloud::bigquery::biglake::v1::Table> |
| 154 | +MetastoreServiceAuth::GetTable( |
| 155 | + grpc::ClientContext& context, |
| 156 | + google::cloud::bigquery::biglake::v1::GetTableRequest const& request) { |
| 157 | + auto status = auth_->ConfigureContext(context); |
| 158 | + if (!status.ok()) return status; |
| 159 | + return child_->GetTable(context, request); |
| 160 | +} |
| 161 | + |
| 162 | +StatusOr<google::cloud::bigquery::biglake::v1::ListTablesResponse> |
| 163 | +MetastoreServiceAuth::ListTables( |
| 164 | + grpc::ClientContext& context, |
| 165 | + google::cloud::bigquery::biglake::v1::ListTablesRequest const& request) { |
| 166 | + auto status = auth_->ConfigureContext(context); |
| 167 | + if (!status.ok()) return status; |
| 168 | + return child_->ListTables(context, request); |
| 169 | +} |
| 170 | + |
| 171 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END |
| 172 | +} // namespace bigquery_biglake_v1_internal |
| 173 | +} // namespace cloud |
| 174 | +} // namespace google |
0 commit comments