Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
connection_connection.h
1// Copyright 2022 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/connection/v1/connection.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_H
21
22#include "google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h"
23#include "google/cloud/bigquery/connection/v1/internal/connection_retry_traits.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/connection/v1/connection.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
34namespace bigquery_connection_v1 {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using ConnectionServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_connection_v1_internal::ConnectionServiceRetryTraits>;
40
41using ConnectionServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_connection_v1_internal::ConnectionServiceRetryTraits>;
44
45using ConnectionServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_connection_v1_internal::ConnectionServiceRetryTraits>;
48
49/**
50 * The `ConnectionServiceConnection` object for `ConnectionServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `ConnectionServiceClient`. This allows users to inject custom
54 * behavior (e.g., with a Google Mock object) when writing tests that use
55 * objects of type `ConnectionServiceClient`.
56 *
57 * To create a concrete instance, see `MakeConnectionServiceConnection()`.
58 *
59 * For mocking, see
60 * `bigquery_connection_v1_mocks::MockConnectionServiceConnection`.
61 */
63 public:
64 virtual ~ConnectionServiceConnection() = 0;
65
66 virtual Options options() { return Options{}; }
67
68 virtual StatusOr<google::cloud::bigquery::connection::v1::Connection>
70 google::cloud::bigquery::connection::v1::CreateConnectionRequest const&
71 request);
72
73 virtual StatusOr<google::cloud::bigquery::connection::v1::Connection>
75 google::cloud::bigquery::connection::v1::GetConnectionRequest const&
76 request);
77
78 virtual StreamRange<google::cloud::bigquery::connection::v1::Connection>
80 google::cloud::bigquery::connection::v1::ListConnectionsRequest request);
81
82 virtual StatusOr<google::cloud::bigquery::connection::v1::Connection>
84 google::cloud::bigquery::connection::v1::UpdateConnectionRequest const&
85 request);
86
88 google::cloud::bigquery::connection::v1::DeleteConnectionRequest const&
89 request);
90
91 virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
92 google::iam::v1::GetIamPolicyRequest const& request);
93
94 virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
95 google::iam::v1::SetIamPolicyRequest const& request);
96
97 virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
98 TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
99};
100
101/**
102 * A factory function to construct an object of type
103 * `ConnectionServiceConnection`.
104 *
105 * The returned connection object should not be used directly; instead it
106 * should be passed as an argument to the constructor of
107 * ConnectionServiceClient.
108 *
109 * The optional @p options argument may be used to configure aspects of the
110 * returned `ConnectionServiceConnection`. Expected options are any of the types
111 * in the following option lists:
112 *
113 * - `google::cloud::CommonOptionList`
114 * - `google::cloud::GrpcOptionList`
115 * - `google::cloud::UnifiedCredentialsOptionList`
116 * - `google::cloud::bigquery_connection_v1::ConnectionServicePolicyOptionList`
117 *
118 * @note Unexpected options will be ignored. To log unexpected options instead,
119 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
120 *
121 * @param options (optional) Configure the `ConnectionServiceConnection` created
122 * by this function.
123 */
125 Options options = {});
126
127GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
128} // namespace bigquery_connection_v1
129} // namespace cloud
130} // namespace google
131
132#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_H
The ConnectionServiceConnection object for ConnectionServiceClient.
Definition: connection_connection.h:62
virtual Options options()
Definition: connection_connection.h:66
virtual Status DeleteConnection(google::cloud::bigquery::connection::v1::DeleteConnectionRequest const &request)
virtual StatusOr< google::cloud::bigquery::connection::v1::Connection > GetConnection(google::cloud::bigquery::connection::v1::GetConnectionRequest const &request)
virtual StatusOr< google::cloud::bigquery::connection::v1::Connection > CreateConnection(google::cloud::bigquery::connection::v1::CreateConnectionRequest const &request)
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &request)
virtual StatusOr< google::cloud::bigquery::connection::v1::Connection > UpdateConnection(google::cloud::bigquery::connection::v1::UpdateConnectionRequest const &request)
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &request)
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &request)
virtual StreamRange< google::cloud::bigquery::connection::v1::Connection > ListConnections(google::cloud::bigquery::connection::v1::ListConnectionsRequest request)
Definition: connection_client.h:32
std::shared_ptr< ConnectionServiceConnection > MakeConnectionServiceConnection(Options options={})
A factory function to construct an object of type ConnectionServiceConnection.
Definition: analytics_hub_client.h:30