Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
metastore_connection.h
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#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_H
21
22#include "google/cloud/bigquery/biglake/v1/internal/metastore_retry_traits.h"
23#include "google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h"
24#include "google/cloud/backoff_policy.h"
25#include "google/cloud/options.h"
26#include "google/cloud/status_or.h"
27#include "google/cloud/stream_range.h"
28#include "google/cloud/version.h"
29#include <google/cloud/bigquery/biglake/v1/metastore.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
34namespace bigquery_biglake_v1 {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using MetastoreServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_biglake_v1_internal::MetastoreServiceRetryTraits>;
40
41using MetastoreServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_biglake_v1_internal::MetastoreServiceRetryTraits>;
44
45using MetastoreServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_biglake_v1_internal::MetastoreServiceRetryTraits>;
48
49/**
50 * The `MetastoreServiceConnection` object for `MetastoreServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `MetastoreServiceClient`. This allows users to inject custom behavior
54 * (e.g., with a Google Mock object) when writing tests that use objects of type
55 * `MetastoreServiceClient`.
56 *
57 * To create a concrete instance, see `MakeMetastoreServiceConnection()`.
58 *
59 * For mocking, see `bigquery_biglake_v1_mocks::MockMetastoreServiceConnection`.
60 */
62 public:
63 virtual ~MetastoreServiceConnection() = 0;
64
65 virtual Options options() { return Options{}; }
66
67 virtual StatusOr<google::cloud::bigquery::biglake::v1::Catalog> CreateCatalog(
68 google::cloud::bigquery::biglake::v1::CreateCatalogRequest const&
69 request);
70
71 virtual StatusOr<google::cloud::bigquery::biglake::v1::Catalog> DeleteCatalog(
72 google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const&
73 request);
74
75 virtual StatusOr<google::cloud::bigquery::biglake::v1::Catalog> GetCatalog(
76 google::cloud::bigquery::biglake::v1::GetCatalogRequest const& request);
77
78 virtual StreamRange<google::cloud::bigquery::biglake::v1::Catalog>
80 google::cloud::bigquery::biglake::v1::ListCatalogsRequest request);
81
82 virtual StatusOr<google::cloud::bigquery::biglake::v1::Database>
84 google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const&
85 request);
86
87 virtual StatusOr<google::cloud::bigquery::biglake::v1::Database>
89 google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const&
90 request);
91
92 virtual StatusOr<google::cloud::bigquery::biglake::v1::Database>
94 google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const&
95 request);
96
97 virtual StatusOr<google::cloud::bigquery::biglake::v1::Database> GetDatabase(
98 google::cloud::bigquery::biglake::v1::GetDatabaseRequest const& request);
99
100 virtual StreamRange<google::cloud::bigquery::biglake::v1::Database>
102 google::cloud::bigquery::biglake::v1::ListDatabasesRequest request);
103
104 virtual StatusOr<google::cloud::bigquery::biglake::v1::Table> CreateTable(
105 google::cloud::bigquery::biglake::v1::CreateTableRequest const& request);
106
107 virtual StatusOr<google::cloud::bigquery::biglake::v1::Table> DeleteTable(
108 google::cloud::bigquery::biglake::v1::DeleteTableRequest const& request);
109
110 virtual StatusOr<google::cloud::bigquery::biglake::v1::Table> UpdateTable(
111 google::cloud::bigquery::biglake::v1::UpdateTableRequest const& request);
112
113 virtual StatusOr<google::cloud::bigquery::biglake::v1::Table> RenameTable(
114 google::cloud::bigquery::biglake::v1::RenameTableRequest const& request);
115
116 virtual StatusOr<google::cloud::bigquery::biglake::v1::Table> GetTable(
117 google::cloud::bigquery::biglake::v1::GetTableRequest const& request);
118
119 virtual StreamRange<google::cloud::bigquery::biglake::v1::Table> ListTables(
120 google::cloud::bigquery::biglake::v1::ListTablesRequest request);
121};
122
123/**
124 * A factory function to construct an object of type
125 * `MetastoreServiceConnection`.
126 *
127 * The returned connection object should not be used directly; instead it
128 * should be passed as an argument to the constructor of MetastoreServiceClient.
129 *
130 * The optional @p options argument may be used to configure aspects of the
131 * returned `MetastoreServiceConnection`. Expected options are any of the types
132 * in the following option lists:
133 *
134 * - `google::cloud::CommonOptionList`
135 * - `google::cloud::GrpcOptionList`
136 * - `google::cloud::UnifiedCredentialsOptionList`
137 * - `google::cloud::bigquery_biglake_v1::MetastoreServicePolicyOptionList`
138 *
139 * @note Unexpected options will be ignored. To log unexpected options instead,
140 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
141 *
142 * @param options (optional) Configure the `MetastoreServiceConnection` created
143 * by this function.
144 */
146 Options options = {});
147
148GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
149} // namespace bigquery_biglake_v1
150} // namespace cloud
151} // namespace google
152
153#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_H
The MetastoreServiceConnection object for MetastoreServiceClient.
Definition: metastore_connection.h:61
virtual StatusOr< google::cloud::bigquery::biglake::v1::Catalog > GetCatalog(google::cloud::bigquery::biglake::v1::GetCatalogRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Table > UpdateTable(google::cloud::bigquery::biglake::v1::UpdateTableRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Database > UpdateDatabase(google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const &request)
virtual StreamRange< google::cloud::bigquery::biglake::v1::Catalog > ListCatalogs(google::cloud::bigquery::biglake::v1::ListCatalogsRequest request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Catalog > DeleteCatalog(google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const &request)
virtual StreamRange< google::cloud::bigquery::biglake::v1::Table > ListTables(google::cloud::bigquery::biglake::v1::ListTablesRequest request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Table > GetTable(google::cloud::bigquery::biglake::v1::GetTableRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Table > DeleteTable(google::cloud::bigquery::biglake::v1::DeleteTableRequest const &request)
virtual StreamRange< google::cloud::bigquery::biglake::v1::Database > ListDatabases(google::cloud::bigquery::biglake::v1::ListDatabasesRequest request)
virtual Options options()
Definition: metastore_connection.h:65
virtual StatusOr< google::cloud::bigquery::biglake::v1::Table > CreateTable(google::cloud::bigquery::biglake::v1::CreateTableRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Database > GetDatabase(google::cloud::bigquery::biglake::v1::GetDatabaseRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Catalog > CreateCatalog(google::cloud::bigquery::biglake::v1::CreateCatalogRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Table > RenameTable(google::cloud::bigquery::biglake::v1::RenameTableRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Database > CreateDatabase(google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const &request)
virtual StatusOr< google::cloud::bigquery::biglake::v1::Database > DeleteDatabase(google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const &request)
Definition: metastore_client.h:32
std::shared_ptr< MetastoreServiceConnection > MakeMetastoreServiceConnection(Options options={})
A factory function to construct an object of type MetastoreServiceConnection.
Definition: analytics_hub_client.h:30