#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reservation {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub slot_capacity: i64,
#[prost(bool, tag = "4")]
pub ignore_idle_slots: bool,
#[prost(message, optional, tag = "7")]
pub autoscale: ::core::option::Option<reservation::Autoscale>,
#[prost(int64, tag = "16")]
pub concurrency: i64,
#[prost(message, optional, tag = "8")]
pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "14")]
pub multi_region_auxiliary: bool,
#[prost(enumeration = "Edition", tag = "17")]
pub edition: i32,
}
pub mod reservation {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Autoscale {
#[prost(int64, tag = "1")]
pub current_slots: i64,
#[prost(int64, tag = "2")]
pub max_slots: i64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CapacityCommitment {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub slot_count: i64,
#[prost(enumeration = "capacity_commitment::CommitmentPlan", tag = "3")]
pub plan: i32,
#[prost(enumeration = "capacity_commitment::State", tag = "4")]
pub state: i32,
#[prost(message, optional, tag = "9")]
pub commitment_start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub commitment_end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub failure_status: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(enumeration = "capacity_commitment::CommitmentPlan", tag = "8")]
pub renewal_plan: i32,
#[prost(bool, tag = "10")]
pub multi_region_auxiliary: bool,
#[prost(enumeration = "Edition", tag = "12")]
pub edition: i32,
}
pub mod capacity_commitment {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CommitmentPlan {
Unspecified = 0,
Flex = 3,
FlexFlatRate = 7,
Trial = 5,
Monthly = 2,
MonthlyFlatRate = 8,
Annual = 4,
AnnualFlatRate = 9,
ThreeYear = 10,
None = 6,
}
impl CommitmentPlan {
pub fn as_str_name(&self) -> &'static str {
match self {
CommitmentPlan::Unspecified => "COMMITMENT_PLAN_UNSPECIFIED",
CommitmentPlan::Flex => "FLEX",
CommitmentPlan::FlexFlatRate => "FLEX_FLAT_RATE",
CommitmentPlan::Trial => "TRIAL",
CommitmentPlan::Monthly => "MONTHLY",
CommitmentPlan::MonthlyFlatRate => "MONTHLY_FLAT_RATE",
CommitmentPlan::Annual => "ANNUAL",
CommitmentPlan::AnnualFlatRate => "ANNUAL_FLAT_RATE",
CommitmentPlan::ThreeYear => "THREE_YEAR",
CommitmentPlan::None => "NONE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMMITMENT_PLAN_UNSPECIFIED" => Some(Self::Unspecified),
"FLEX" => Some(Self::Flex),
"FLEX_FLAT_RATE" => Some(Self::FlexFlatRate),
"TRIAL" => Some(Self::Trial),
"MONTHLY" => Some(Self::Monthly),
"MONTHLY_FLAT_RATE" => Some(Self::MonthlyFlatRate),
"ANNUAL" => Some(Self::Annual),
"ANNUAL_FLAT_RATE" => Some(Self::AnnualFlatRate),
"THREE_YEAR" => Some(Self::ThreeYear),
"NONE" => Some(Self::None),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Pending = 1,
Active = 2,
Failed = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Pending => "PENDING",
State::Active => "ACTIVE",
State::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"ACTIVE" => Some(Self::Active),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateReservationRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub reservation_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub reservation: ::core::option::Option<Reservation>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReservationsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReservationsResponse {
#[prost(message, repeated, tag = "1")]
pub reservations: ::prost::alloc::vec::Vec<Reservation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReservationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteReservationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateReservationRequest {
#[prost(message, optional, tag = "1")]
pub reservation: ::core::option::Option<Reservation>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCapacityCommitmentRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub capacity_commitment: ::core::option::Option<CapacityCommitment>,
#[prost(bool, tag = "4")]
pub enforce_single_admin_project_per_org: bool,
#[prost(string, tag = "5")]
pub capacity_commitment_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCapacityCommitmentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCapacityCommitmentsResponse {
#[prost(message, repeated, tag = "1")]
pub capacity_commitments: ::prost::alloc::vec::Vec<CapacityCommitment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCapacityCommitmentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCapacityCommitmentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub force: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCapacityCommitmentRequest {
#[prost(message, optional, tag = "1")]
pub capacity_commitment: ::core::option::Option<CapacityCommitment>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitCapacityCommitmentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub slot_count: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitCapacityCommitmentResponse {
#[prost(message, optional, tag = "1")]
pub first: ::core::option::Option<CapacityCommitment>,
#[prost(message, optional, tag = "2")]
pub second: ::core::option::Option<CapacityCommitment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MergeCapacityCommitmentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub capacity_commitment_ids: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Assignment {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub assignee: ::prost::alloc::string::String,
#[prost(enumeration = "assignment::JobType", tag = "3")]
pub job_type: i32,
#[prost(enumeration = "assignment::State", tag = "6")]
pub state: i32,
}
pub mod assignment {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JobType {
Unspecified = 0,
Pipeline = 1,
Query = 2,
MlExternal = 3,
Background = 4,
}
impl JobType {
pub fn as_str_name(&self) -> &'static str {
match self {
JobType::Unspecified => "JOB_TYPE_UNSPECIFIED",
JobType::Pipeline => "PIPELINE",
JobType::Query => "QUERY",
JobType::MlExternal => "ML_EXTERNAL",
JobType::Background => "BACKGROUND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PIPELINE" => Some(Self::Pipeline),
"QUERY" => Some(Self::Query),
"ML_EXTERNAL" => Some(Self::MlExternal),
"BACKGROUND" => Some(Self::Background),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Pending = 1,
Active = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Pending => "PENDING",
State::Active => "ACTIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"ACTIVE" => Some(Self::Active),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAssignmentRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub assignment: ::core::option::Option<Assignment>,
#[prost(string, tag = "4")]
pub assignment_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAssignmentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAssignmentsResponse {
#[prost(message, repeated, tag = "1")]
pub assignments: ::prost::alloc::vec::Vec<Assignment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAssignmentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAssignmentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAllAssignmentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAssignmentsResponse {
#[prost(message, repeated, tag = "1")]
pub assignments: ::prost::alloc::vec::Vec<Assignment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAllAssignmentsResponse {
#[prost(message, repeated, tag = "1")]
pub assignments: ::prost::alloc::vec::Vec<Assignment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveAssignmentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub destination_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub assignment_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAssignmentRequest {
#[prost(message, optional, tag = "1")]
pub assignment: ::core::option::Option<Assignment>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableReference {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub table_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BiReservation {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "4")]
pub size: i64,
#[prost(message, repeated, tag = "5")]
pub preferred_tables: ::prost::alloc::vec::Vec<TableReference>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBiReservationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBiReservationRequest {
#[prost(message, optional, tag = "1")]
pub bi_reservation: ::core::option::Option<BiReservation>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Edition {
Unspecified = 0,
Standard = 1,
Enterprise = 2,
EnterprisePlus = 3,
}
impl Edition {
pub fn as_str_name(&self) -> &'static str {
match self {
Edition::Unspecified => "EDITION_UNSPECIFIED",
Edition::Standard => "STANDARD",
Edition::Enterprise => "ENTERPRISE",
Edition::EnterprisePlus => "ENTERPRISE_PLUS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EDITION_UNSPECIFIED" => Some(Self::Unspecified),
"STANDARD" => Some(Self::Standard),
"ENTERPRISE" => Some(Self::Enterprise),
"ENTERPRISE_PLUS" => Some(Self::EnterprisePlus),
_ => None,
}
}
}
pub mod reservation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ReservationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReservationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReservationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ReservationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_reservation(
&mut self,
request: impl tonic::IntoRequest<super::CreateReservationRequest>,
) -> std::result::Result<tonic::Response<super::Reservation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/CreateReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"CreateReservation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_reservations(
&mut self,
request: impl tonic::IntoRequest<super::ListReservationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListReservationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/ListReservations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"ListReservations",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_reservation(
&mut self,
request: impl tonic::IntoRequest<super::GetReservationRequest>,
) -> std::result::Result<tonic::Response<super::Reservation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/GetReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"GetReservation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_reservation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteReservationRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/DeleteReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"DeleteReservation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_reservation(
&mut self,
request: impl tonic::IntoRequest<super::UpdateReservationRequest>,
) -> std::result::Result<tonic::Response<super::Reservation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/UpdateReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"UpdateReservation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_capacity_commitment(
&mut self,
request: impl tonic::IntoRequest<super::CreateCapacityCommitmentRequest>,
) -> std::result::Result<
tonic::Response<super::CapacityCommitment>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/CreateCapacityCommitment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"CreateCapacityCommitment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_capacity_commitments(
&mut self,
request: impl tonic::IntoRequest<super::ListCapacityCommitmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ListCapacityCommitmentsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/ListCapacityCommitments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"ListCapacityCommitments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_capacity_commitment(
&mut self,
request: impl tonic::IntoRequest<super::GetCapacityCommitmentRequest>,
) -> std::result::Result<
tonic::Response<super::CapacityCommitment>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/GetCapacityCommitment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"GetCapacityCommitment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_capacity_commitment(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCapacityCommitmentRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/DeleteCapacityCommitment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"DeleteCapacityCommitment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_capacity_commitment(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCapacityCommitmentRequest>,
) -> std::result::Result<
tonic::Response<super::CapacityCommitment>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/UpdateCapacityCommitment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"UpdateCapacityCommitment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn split_capacity_commitment(
&mut self,
request: impl tonic::IntoRequest<super::SplitCapacityCommitmentRequest>,
) -> std::result::Result<
tonic::Response<super::SplitCapacityCommitmentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/SplitCapacityCommitment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"SplitCapacityCommitment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn merge_capacity_commitments(
&mut self,
request: impl tonic::IntoRequest<super::MergeCapacityCommitmentsRequest>,
) -> std::result::Result<
tonic::Response<super::CapacityCommitment>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/MergeCapacityCommitments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"MergeCapacityCommitments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_assignment(
&mut self,
request: impl tonic::IntoRequest<super::CreateAssignmentRequest>,
) -> std::result::Result<tonic::Response<super::Assignment>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/CreateAssignment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"CreateAssignment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_assignments(
&mut self,
request: impl tonic::IntoRequest<super::ListAssignmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ListAssignmentsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/ListAssignments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"ListAssignments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_assignment(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAssignmentRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/DeleteAssignment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"DeleteAssignment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_assignments(
&mut self,
request: impl tonic::IntoRequest<super::SearchAssignmentsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchAssignmentsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/SearchAssignments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"SearchAssignments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_all_assignments(
&mut self,
request: impl tonic::IntoRequest<super::SearchAllAssignmentsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchAllAssignmentsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/SearchAllAssignments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"SearchAllAssignments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn move_assignment(
&mut self,
request: impl tonic::IntoRequest<super::MoveAssignmentRequest>,
) -> std::result::Result<tonic::Response<super::Assignment>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/MoveAssignment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"MoveAssignment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_assignment(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAssignmentRequest>,
) -> std::result::Result<tonic::Response<super::Assignment>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/UpdateAssignment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"UpdateAssignment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_bi_reservation(
&mut self,
request: impl tonic::IntoRequest<super::GetBiReservationRequest>,
) -> std::result::Result<tonic::Response<super::BiReservation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/GetBiReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"GetBiReservation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_bi_reservation(
&mut self,
request: impl tonic::IntoRequest<super::UpdateBiReservationRequest>,
) -> std::result::Result<tonic::Response<super::BiReservation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.reservation.v1.ReservationService/UpdateBiReservation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.reservation.v1.ReservationService",
"UpdateBiReservation",
),
);
self.inner.unary(req, path, codec).await
}
}
}