Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
reservation_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/reservation/v1/reservation.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_H
21
22#include "google/cloud/bigquery/reservation/v1/internal/reservation_retry_traits.h"
23#include "google/cloud/bigquery/reservation/v1/reservation_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/reservation/v1/reservation.pb.h>
30#include <memory>
31
32namespace google {
33namespace cloud {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37using ReservationServiceRetryPolicy =
38 ::google::cloud::internal::TraitBasedRetryPolicy<
39 bigquery_reservation_v1_internal::ReservationServiceRetryTraits>;
40
41using ReservationServiceLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 bigquery_reservation_v1_internal::ReservationServiceRetryTraits>;
44
45using ReservationServiceLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 bigquery_reservation_v1_internal::ReservationServiceRetryTraits>;
48
49/**
50 * The `ReservationServiceConnection` object for `ReservationServiceClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `ReservationServiceClient`. This allows users to inject custom
54 * behavior (e.g., with a Google Mock object) when writing tests that use
55 * objects of type `ReservationServiceClient`.
56 *
57 * To create a concrete instance, see `MakeReservationServiceConnection()`.
58 *
59 * For mocking, see
60 * `bigquery_reservation_v1_mocks::MockReservationServiceConnection`.
61 */
63 public:
64 virtual ~ReservationServiceConnection() = 0;
65
66 virtual Options options() { return Options{}; }
67
68 virtual StatusOr<google::cloud::bigquery::reservation::v1::Reservation>
70 google::cloud::bigquery::reservation::v1::CreateReservationRequest const&
71 request);
72
73 virtual StreamRange<google::cloud::bigquery::reservation::v1::Reservation>
75 google::cloud::bigquery::reservation::v1::ListReservationsRequest
76 request);
77
78 virtual StatusOr<google::cloud::bigquery::reservation::v1::Reservation>
80 google::cloud::bigquery::reservation::v1::GetReservationRequest const&
81 request);
82
84 google::cloud::bigquery::reservation::v1::DeleteReservationRequest const&
85 request);
86
87 virtual StatusOr<google::cloud::bigquery::reservation::v1::Reservation>
89 google::cloud::bigquery::reservation::v1::UpdateReservationRequest const&
90 request);
91
92 virtual StatusOr<google::cloud::bigquery::reservation::v1::CapacityCommitment>
94 CreateCapacityCommitmentRequest const& request);
95
96 virtual StreamRange<
97 google::cloud::bigquery::reservation::v1::CapacityCommitment>
99 google::cloud::bigquery::reservation::v1::ListCapacityCommitmentsRequest
100 request);
101
102 virtual StatusOr<google::cloud::bigquery::reservation::v1::CapacityCommitment>
103 GetCapacityCommitment(google::cloud::bigquery::reservation::v1::
104 GetCapacityCommitmentRequest const& request);
105
107 google::cloud::bigquery::reservation::v1::
108 DeleteCapacityCommitmentRequest const& request);
109
110 virtual StatusOr<google::cloud::bigquery::reservation::v1::CapacityCommitment>
111 UpdateCapacityCommitment(google::cloud::bigquery::reservation::v1::
112 UpdateCapacityCommitmentRequest const& request);
113
114 virtual StatusOr<
115 google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse>
116 SplitCapacityCommitment(google::cloud::bigquery::reservation::v1::
117 SplitCapacityCommitmentRequest const& request);
118
119 virtual StatusOr<google::cloud::bigquery::reservation::v1::CapacityCommitment>
120 MergeCapacityCommitments(google::cloud::bigquery::reservation::v1::
121 MergeCapacityCommitmentsRequest const& request);
122
123 virtual StatusOr<google::cloud::bigquery::reservation::v1::Assignment>
125 google::cloud::bigquery::reservation::v1::CreateAssignmentRequest const&
126 request);
127
128 virtual StreamRange<google::cloud::bigquery::reservation::v1::Assignment>
130 google::cloud::bigquery::reservation::v1::ListAssignmentsRequest request);
131
132 virtual Status DeleteAssignment(
133 google::cloud::bigquery::reservation::v1::DeleteAssignmentRequest const&
134 request);
135
136 virtual StreamRange<google::cloud::bigquery::reservation::v1::Assignment>
138 google::cloud::bigquery::reservation::v1::SearchAssignmentsRequest
139 request);
140
141 virtual StreamRange<google::cloud::bigquery::reservation::v1::Assignment>
143 google::cloud::bigquery::reservation::v1::SearchAllAssignmentsRequest
144 request);
145
146 virtual StatusOr<google::cloud::bigquery::reservation::v1::Assignment>
148 google::cloud::bigquery::reservation::v1::MoveAssignmentRequest const&
149 request);
150
151 virtual StatusOr<google::cloud::bigquery::reservation::v1::Assignment>
153 google::cloud::bigquery::reservation::v1::UpdateAssignmentRequest const&
154 request);
155
156 virtual StatusOr<google::cloud::bigquery::reservation::v1::BiReservation>
158 google::cloud::bigquery::reservation::v1::GetBiReservationRequest const&
159 request);
160
161 virtual StatusOr<google::cloud::bigquery::reservation::v1::BiReservation>
162 UpdateBiReservation(google::cloud::bigquery::reservation::v1::
163 UpdateBiReservationRequest const& request);
164};
165
166/**
167 * A factory function to construct an object of type
168 * `ReservationServiceConnection`.
169 *
170 * The returned connection object should not be used directly; instead it
171 * should be passed as an argument to the constructor of
172 * ReservationServiceClient.
173 *
174 * The optional @p options argument may be used to configure aspects of the
175 * returned `ReservationServiceConnection`. Expected options are any of the
176 * types in the following option lists:
177 *
178 * - `google::cloud::CommonOptionList`
179 * - `google::cloud::GrpcOptionList`
180 * - `google::cloud::UnifiedCredentialsOptionList`
181 * -
182 * `google::cloud::bigquery_reservation_v1::ReservationServicePolicyOptionList`
183 *
184 * @note Unexpected options will be ignored. To log unexpected options instead,
185 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
186 *
187 * @param options (optional) Configure the `ReservationServiceConnection`
188 * created by this function.
189 */
191 Options options = {});
192
193GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
194} // namespace bigquery_reservation_v1
195} // namespace cloud
196} // namespace google
197
198#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_H
The ReservationServiceConnection object for ReservationServiceClient.
Definition: reservation_connection.h:62
virtual StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > UpdateBiReservation(google::cloud::bigquery::reservation::v1::UpdateBiReservationRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > GetCapacityCommitment(google::cloud::bigquery::reservation::v1::GetCapacityCommitmentRequest const &request)
virtual StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAssignments(google::cloud::bigquery::reservation::v1::SearchAssignmentsRequest request)
virtual StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAllAssignments(google::cloud::bigquery::reservation::v1::SearchAllAssignmentsRequest request)
virtual Status DeleteReservation(google::cloud::bigquery::reservation::v1::DeleteReservationRequest const &request)
virtual Options options()
Definition: reservation_connection.h:66
virtual StatusOr< google::cloud::bigquery::reservation::v1::Reservation > CreateReservation(google::cloud::bigquery::reservation::v1::CreateReservationRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse > SplitCapacityCommitment(google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::Reservation > GetReservation(google::cloud::bigquery::reservation::v1::GetReservationRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::Assignment > UpdateAssignment(google::cloud::bigquery::reservation::v1::UpdateAssignmentRequest const &request)
virtual Status DeleteAssignment(google::cloud::bigquery::reservation::v1::DeleteAssignmentRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > GetBiReservation(google::cloud::bigquery::reservation::v1::GetBiReservationRequest const &request)
virtual Status DeleteCapacityCommitment(google::cloud::bigquery::reservation::v1::DeleteCapacityCommitmentRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::Assignment > CreateAssignment(google::cloud::bigquery::reservation::v1::CreateAssignmentRequest const &request)
virtual StreamRange< google::cloud::bigquery::reservation::v1::Reservation > ListReservations(google::cloud::bigquery::reservation::v1::ListReservationsRequest request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::Reservation > UpdateReservation(google::cloud::bigquery::reservation::v1::UpdateReservationRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > UpdateCapacityCommitment(google::cloud::bigquery::reservation::v1::UpdateCapacityCommitmentRequest const &request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::Assignment > MoveAssignment(google::cloud::bigquery::reservation::v1::MoveAssignmentRequest const &request)
virtual StreamRange< google::cloud::bigquery::reservation::v1::CapacityCommitment > ListCapacityCommitments(google::cloud::bigquery::reservation::v1::ListCapacityCommitmentsRequest request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > MergeCapacityCommitments(google::cloud::bigquery::reservation::v1::MergeCapacityCommitmentsRequest const &request)
virtual StreamRange< google::cloud::bigquery::reservation::v1::Assignment > ListAssignments(google::cloud::bigquery::reservation::v1::ListAssignmentsRequest request)
virtual StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > CreateCapacityCommitment(google::cloud::bigquery::reservation::v1::CreateCapacityCommitmentRequest const &request)
Definition: reservation_client.h:32
std::shared_ptr< ReservationServiceConnection > MakeReservationServiceConnection(Options options={})
A factory function to construct an object of type ReservationServiceConnection.
Definition: analytics_hub_client.h:30