Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
data_policy_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/datapolicies/v1/datapolicy.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_H
21
22#include "google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h"
23#include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_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/datapolicies/v1/datapolicy.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using DataPolicyServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_datapolicies_v1_internal::DataPolicyServiceRetryTraits>;
40
41using DataPolicyServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_datapolicies_v1_internal::DataPolicyServiceRetryTraits>;
44
45using DataPolicyServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_datapolicies_v1_internal::DataPolicyServiceRetryTraits>;
48
49/**
50 * The `DataPolicyServiceConnection` object for `DataPolicyServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `DataPolicyServiceClient`. This allows users to inject custom
54 * behavior (e.g., with a Google Mock object) when writing tests that use
55 * objects of type `DataPolicyServiceClient`.
56 *
57 * To create a concrete instance, see `MakeDataPolicyServiceConnection()`.
58 *
59 * For mocking, see
60 * `bigquery_datapolicies_v1_mocks::MockDataPolicyServiceConnection`.
61 */
63 public:
64 virtual ~DataPolicyServiceConnection() = 0;
65
66 virtual Options options() { return Options{}; }
67
68 virtual StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>
70 google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const&
71 request);
72
73 virtual StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>
75 google::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest const&
76 request);
77
78 virtual StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>
80 google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const&
81 request);
82
84 google::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest const&
85 request);
86
87 virtual StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>
89 google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const&
90 request);
91
92 virtual StreamRange<google::cloud::bigquery::datapolicies::v1::DataPolicy>
94 google::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest
95 request);
96
97 virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
98 google::iam::v1::GetIamPolicyRequest const& request);
99
100 virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
101 google::iam::v1::SetIamPolicyRequest const& request);
102
103 virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
104 TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
105};
106
107/**
108 * A factory function to construct an object of type
109 * `DataPolicyServiceConnection`.
110 *
111 * The returned connection object should not be used directly; instead it
112 * should be passed as an argument to the constructor of
113 * DataPolicyServiceClient.
114 *
115 * The optional @p options argument may be used to configure aspects of the
116 * returned `DataPolicyServiceConnection`. Expected options are any of the types
117 * in the following option lists:
118 *
119 * - `google::cloud::CommonOptionList`
120 * - `google::cloud::GrpcOptionList`
121 * - `google::cloud::UnifiedCredentialsOptionList`
122 * -
123 * `google::cloud::bigquery_datapolicies_v1::DataPolicyServicePolicyOptionList`
124 *
125 * @note Unexpected options will be ignored. To log unexpected options instead,
126 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
127 *
128 * @param options (optional) Configure the `DataPolicyServiceConnection` created
129 * by this function.
130 */
132 Options options = {});
133
134GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
135} // namespace bigquery_datapolicies_v1
136} // namespace cloud
137} // namespace google
138
139#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_H
The DataPolicyServiceConnection object for DataPolicyServiceClient.
Definition: data_policy_connection.h:62
virtual Status DeleteDataPolicy(google::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest const &request)
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &request)
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &request)
virtual StreamRange< google::cloud::bigquery::datapolicies::v1::DataPolicy > ListDataPolicies(google::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest request)
virtual StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > CreateDataPolicy(google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const &request)
virtual Options options()
Definition: data_policy_connection.h:66
virtual StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > GetDataPolicy(google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const &request)
virtual StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > RenameDataPolicy(google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const &request)
virtual StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > UpdateDataPolicy(google::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest const &request)
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &request)
Definition: data_policy_client.h:32
std::shared_ptr< DataPolicyServiceConnection > MakeDataPolicyServiceConnection(Options options={})
A factory function to construct an object of type DataPolicyServiceConnection.
Definition: analytics_hub_client.h:30