Google Cloud BigQuery C++ Client  2.6.0
A C++ Client Library for Google Cloud BigQuery
analytics_hub_connection.h
Go to the documentation of this file.
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/analyticshub/v1/analyticshub.proto
18 
19 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H
21 
22 #include "google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h"
23 #include "google/cloud/bigquery/internal/analytics_hub_retry_traits.h"
24 #include "google/cloud/bigquery/internal/analytics_hub_stub.h"
25 #include "google/cloud/backoff_policy.h"
26 #include "google/cloud/options.h"
27 #include "google/cloud/status_or.h"
28 #include "google/cloud/stream_range.h"
29 #include "google/cloud/version.h"
30 #include <memory>
31 
32 namespace google {
33 namespace cloud {
34 namespace bigquery {
36 
37 using AnalyticsHubServiceRetryPolicy =
38  ::google::cloud::internal::TraitBasedRetryPolicy<
39  bigquery_internal::AnalyticsHubServiceRetryTraits>;
40 
41 using AnalyticsHubServiceLimitedTimeRetryPolicy =
42  ::google::cloud::internal::LimitedTimeRetryPolicy<
43  bigquery_internal::AnalyticsHubServiceRetryTraits>;
44 
45 using AnalyticsHubServiceLimitedErrorCountRetryPolicy =
46  ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47  bigquery_internal::AnalyticsHubServiceRetryTraits>;
48 
49 /**
50  * The `AnalyticsHubServiceConnection` object for `AnalyticsHubServiceClient`.
51  *
52  * This interface defines virtual methods for each of the user-facing overload
53  * sets in `AnalyticsHubServiceClient`. This allows users to inject custom
54  * behavior (e.g., with a Google Mock object) when writing tests that use
55  * objects of type `AnalyticsHubServiceClient`.
56  *
57  * To create a concrete instance, see `MakeAnalyticsHubServiceConnection()`.
58  *
59  * For mocking, see `bigquery_mocks::MockAnalyticsHubServiceConnection`.
60  */
62  public:
64 
65  virtual Options options() { return Options{}; }
66 
67  virtual StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
69  google::cloud::bigquery::analyticshub::v1::ListDataExchangesRequest
70  request);
71 
72  virtual StreamRange<google::cloud::bigquery::analyticshub::v1::DataExchange>
74  google::cloud::bigquery::analyticshub::v1::ListOrgDataExchangesRequest
75  request);
76 
77  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
79  google::cloud::bigquery::analyticshub::v1::GetDataExchangeRequest const&
80  request);
81 
82  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
83  CreateDataExchange(google::cloud::bigquery::analyticshub::v1::
84  CreateDataExchangeRequest const& request);
85 
86  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::DataExchange>
87  UpdateDataExchange(google::cloud::bigquery::analyticshub::v1::
88  UpdateDataExchangeRequest const& request);
89 
91  google::cloud::bigquery::analyticshub::v1::
92  DeleteDataExchangeRequest const& request);
93 
94  virtual StreamRange<google::cloud::bigquery::analyticshub::v1::Listing>
96  google::cloud::bigquery::analyticshub::v1::ListListingsRequest request);
97 
98  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
99  GetListing(google::cloud::bigquery::analyticshub::v1::GetListingRequest const&
100  request);
101 
102  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
104  google::cloud::bigquery::analyticshub::v1::CreateListingRequest const&
105  request);
106 
107  virtual StatusOr<google::cloud::bigquery::analyticshub::v1::Listing>
109  google::cloud::bigquery::analyticshub::v1::UpdateListingRequest const&
110  request);
111 
113  google::cloud::bigquery::analyticshub::v1::DeleteListingRequest const&
114  request);
115 
116  virtual StatusOr<
117  google::cloud::bigquery::analyticshub::v1::SubscribeListingResponse>
119  google::cloud::bigquery::analyticshub::v1::SubscribeListingRequest const&
120  request);
121 
122  virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
123  google::iam::v1::GetIamPolicyRequest const& request);
124 
125  virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
126  google::iam::v1::SetIamPolicyRequest const& request);
127 
128  virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
129  TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
130 };
131 
132 /**
133  * A factory function to construct an object of type
134  * `AnalyticsHubServiceConnection`.
135  *
136  * The returned connection object should not be used directly; instead it
137  * should be passed as an argument to the constructor of
138  * AnalyticsHubServiceClient.
139  *
140  * The optional @p options argument may be used to configure aspects of the
141  * returned `AnalyticsHubServiceConnection`. Expected options are any of the
142  * types in the following option lists:
143  *
144  * - `google::cloud::CommonOptionList`
145  * - `google::cloud::GrpcOptionList`
146  * - `google::cloud::UnifiedCredentialsOptionList`
147  * - `google::cloud::bigquery::AnalyticsHubServicePolicyOptionList`
148  *
149  * @note Unexpected options will be ignored. To log unexpected options instead,
150  * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
151  *
152  * @param options (optional) Configure the `AnalyticsHubServiceConnection`
153  * created by this function.
154  */
155 std::shared_ptr<AnalyticsHubServiceConnection>
157 
159 } // namespace bigquery
160 } // namespace cloud
161 } // namespace google
162 
163 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H