Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
mock_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_MOCKS_MOCK_DATA_POLICY_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_MOCKS_MOCK_DATA_POLICY_CONNECTION_H
21
22#include "google/cloud/bigquery/datapolicies/v1/data_policy_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `DataPolicyServiceConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `DataPolicyServiceClient`. To do so,
35 * construct an object of type `DataPolicyServiceClient` with an instance of
36 * this class. Then use the Google Test framework functions to program the
37 * behavior of this mock.
38 *
39 * @see [This example][bq-mock] for how to test your application with GoogleTest.
40 * While the example showcases types from the BigQuery library, the underlying
41 * principles apply for any pair of `*Client` and `*Connection`.
42 *
43 * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock}
44 */
47 public:
48 MOCK_METHOD(Options, options, (), (override));
49
50 MOCK_METHOD(
51 StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>,
52 CreateDataPolicy,
53 (google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const&
54 request),
55 (override));
56
57 MOCK_METHOD(
58 StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>,
59 UpdateDataPolicy,
60 (google::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest const&
61 request),
62 (override));
63
64 MOCK_METHOD(
65 StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>,
66 RenameDataPolicy,
67 (google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const&
68 request),
69 (override));
70
71 MOCK_METHOD(
72 Status, DeleteDataPolicy,
73 (google::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest const&
74 request),
75 (override));
76
77 MOCK_METHOD(
78 StatusOr<google::cloud::bigquery::datapolicies::v1::DataPolicy>,
79 GetDataPolicy,
80 (google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const&
81 request),
82 (override));
83
84 MOCK_METHOD(
85 StreamRange<google::cloud::bigquery::datapolicies::v1::DataPolicy>,
86 ListDataPolicies,
87 (google::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest
88 request),
89 (override));
90
91 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, GetIamPolicy,
92 (google::iam::v1::GetIamPolicyRequest const& request),
93 (override));
94
95 MOCK_METHOD(StatusOr<google::iam::v1::Policy>, SetIamPolicy,
96 (google::iam::v1::SetIamPolicyRequest const& request),
97 (override));
98
99 MOCK_METHOD(StatusOr<google::iam::v1::TestIamPermissionsResponse>,
100 TestIamPermissions,
101 (google::iam::v1::TestIamPermissionsRequest const& request),
102 (override));
103};
104
105GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
106} // namespace bigquery_datapolicies_v1_mocks
107} // namespace cloud
108} // namespace google
109
110#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_MOCKS_MOCK_DATA_POLICY_CONNECTION_H
The DataPolicyServiceConnection object for DataPolicyServiceClient.
Definition: data_policy_connection.h:62
A class to mock DataPolicyServiceConnection.
Definition: mock_data_policy_connection.h:46
Definition: mock_data_policy_connection.h:27
Definition: data_policy_client.h:32
Definition: analytics_hub_client.h:30