make regen-apis

This commit is contained in:
OMGeeky
2024-05-16 21:23:40 +02:00
parent 52d2e89e51
commit ad85cafeef
5108 changed files with 1615625 additions and 992044 deletions

View File

@@ -0,0 +1,597 @@
use super::*;
// region AssignmentJobTypeEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Which type of jobs will use the reservation.
pub enum AssignmentJobTypeEnum {
/// Invalid type. Requests with this value will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
///
/// "JOB_TYPE_UNSPECIFIED"
#[serde(rename="JOB_TYPE_UNSPECIFIED")]
JOBTYPEUNSPECIFIED,
/// Pipeline (load/export) jobs from the project will use the reservation.
///
/// "PIPELINE"
#[serde(rename="PIPELINE")]
PIPELINE,
/// Query jobs from the project will use the reservation.
///
/// "QUERY"
#[serde(rename="QUERY")]
QUERY,
/// BigQuery ML jobs that use services external to BigQuery for model training. These jobs will not utilize idle slots from other reservations.
///
/// "ML_EXTERNAL"
#[serde(rename="ML_EXTERNAL")]
MLEXTERNAL,
/// Background jobs that BigQuery runs for the customers in the background.
///
/// "BACKGROUND"
#[serde(rename="BACKGROUND")]
BACKGROUND,
/// Continuous SQL jobs will use this reservation. Reservations with continuous assignments cannot be mixed with non-continuous assignments.
///
/// "CONTINUOUS"
#[serde(rename="CONTINUOUS")]
CONTINUOUS,
}
impl AsRef<str> for AssignmentJobTypeEnum {
fn as_ref(&self) -> &str {
match *self {
AssignmentJobTypeEnum::JOBTYPEUNSPECIFIED => "JOB_TYPE_UNSPECIFIED",
AssignmentJobTypeEnum::PIPELINE => "PIPELINE",
AssignmentJobTypeEnum::QUERY => "QUERY",
AssignmentJobTypeEnum::MLEXTERNAL => "ML_EXTERNAL",
AssignmentJobTypeEnum::BACKGROUND => "BACKGROUND",
AssignmentJobTypeEnum::CONTINUOUS => "CONTINUOUS",
}
}
}
impl std::convert::TryFrom< &str> for AssignmentJobTypeEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"JOB_TYPE_UNSPECIFIED" => Ok(AssignmentJobTypeEnum::JOBTYPEUNSPECIFIED),
"PIPELINE" => Ok(AssignmentJobTypeEnum::PIPELINE),
"QUERY" => Ok(AssignmentJobTypeEnum::QUERY),
"ML_EXTERNAL" => Ok(AssignmentJobTypeEnum::MLEXTERNAL),
"BACKGROUND" => Ok(AssignmentJobTypeEnum::BACKGROUND),
"CONTINUOUS" => Ok(AssignmentJobTypeEnum::CONTINUOUS),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AssignmentJobTypeEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region AssignmentStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. State of the assignment.
pub enum AssignmentStateEnum {
/// Invalid state value.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// Queries from assignee will be executed as on-demand, if related assignment is pending.
///
/// "PENDING"
#[serde(rename="PENDING")]
PENDING,
/// Assignment is ready.
///
/// "ACTIVE"
#[serde(rename="ACTIVE")]
ACTIVE,
}
impl AsRef<str> for AssignmentStateEnum {
fn as_ref(&self) -> &str {
match *self {
AssignmentStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
AssignmentStateEnum::PENDING => "PENDING",
AssignmentStateEnum::ACTIVE => "ACTIVE",
}
}
}
impl std::convert::TryFrom< &str> for AssignmentStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(AssignmentStateEnum::STATEUNSPECIFIED),
"PENDING" => Ok(AssignmentStateEnum::PENDING),
"ACTIVE" => Ok(AssignmentStateEnum::ACTIVE),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AssignmentStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region CapacityCommitmentEditionEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Edition of the capacity commitment.
pub enum CapacityCommitmentEditionEnum {
/// Default value, which will be treated as ENTERPRISE.
///
/// "EDITION_UNSPECIFIED"
#[serde(rename="EDITION_UNSPECIFIED")]
EDITIONUNSPECIFIED,
/// Standard edition.
///
/// "STANDARD"
#[serde(rename="STANDARD")]
STANDARD,
/// Enterprise edition.
///
/// "ENTERPRISE"
#[serde(rename="ENTERPRISE")]
ENTERPRISE,
/// Enterprise plus edition.
///
/// "ENTERPRISE_PLUS"
#[serde(rename="ENTERPRISE_PLUS")]
ENTERPRISEPLUS,
}
impl AsRef<str> for CapacityCommitmentEditionEnum {
fn as_ref(&self) -> &str {
match *self {
CapacityCommitmentEditionEnum::EDITIONUNSPECIFIED => "EDITION_UNSPECIFIED",
CapacityCommitmentEditionEnum::STANDARD => "STANDARD",
CapacityCommitmentEditionEnum::ENTERPRISE => "ENTERPRISE",
CapacityCommitmentEditionEnum::ENTERPRISEPLUS => "ENTERPRISE_PLUS",
}
}
}
impl std::convert::TryFrom< &str> for CapacityCommitmentEditionEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"EDITION_UNSPECIFIED" => Ok(CapacityCommitmentEditionEnum::EDITIONUNSPECIFIED),
"STANDARD" => Ok(CapacityCommitmentEditionEnum::STANDARD),
"ENTERPRISE" => Ok(CapacityCommitmentEditionEnum::ENTERPRISE),
"ENTERPRISE_PLUS" => Ok(CapacityCommitmentEditionEnum::ENTERPRISEPLUS),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CapacityCommitmentEditionEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region CapacityCommitmentPlanEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Capacity commitment commitment plan.
pub enum CapacityCommitmentPlanEnum {
/// Invalid plan value. Requests with this value will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
///
/// "COMMITMENT_PLAN_UNSPECIFIED"
#[serde(rename="COMMITMENT_PLAN_UNSPECIFIED")]
COMMITMENTPLANUNSPECIFIED,
/// Flex commitments have committed period of 1 minute after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time.
///
/// "FLEX"
#[serde(rename="FLEX")]
FLEX,
/// Same as FLEX, should only be used if flat-rate commitments are still available.
///
/// "FLEX_FLAT_RATE"
#[serde(rename="FLEX_FLAT_RATE")]
FLEXFLATRATE,
/// Trial commitments have a committed period of 182 days after becoming ACTIVE. After that, they are converted to a new commitment based on the `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so that it can be deleted right after committed period ends.
///
/// "TRIAL"
#[serde(rename="TRIAL")]
TRIAL,
/// Monthly commitments have a committed period of 30 days after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time.
///
/// "MONTHLY"
#[serde(rename="MONTHLY")]
MONTHLY,
/// Same as MONTHLY, should only be used if flat-rate commitments are still available.
///
/// "MONTHLY_FLAT_RATE"
#[serde(rename="MONTHLY_FLAT_RATE")]
MONTHLYFLATRATE,
/// Annual commitments have a committed period of 365 days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan.
///
/// "ANNUAL"
#[serde(rename="ANNUAL")]
ANNUAL,
/// Same as ANNUAL, should only be used if flat-rate commitments are still available.
///
/// "ANNUAL_FLAT_RATE"
#[serde(rename="ANNUAL_FLAT_RATE")]
ANNUALFLATRATE,
/// 3-year commitments have a committed period of 1095(3 * 365) days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan.
///
/// "THREE_YEAR"
#[serde(rename="THREE_YEAR")]
THREEYEAR,
/// Should only be used for `renewal_plan` and is only meaningful if edition is specified to values other than EDITION_UNSPECIFIED. Otherwise CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the renewal_plan is NONE, capacity commitment will be removed at the end of its commitment period.
///
/// "NONE"
#[serde(rename="NONE")]
NONE,
}
impl AsRef<str> for CapacityCommitmentPlanEnum {
fn as_ref(&self) -> &str {
match *self {
CapacityCommitmentPlanEnum::COMMITMENTPLANUNSPECIFIED => "COMMITMENT_PLAN_UNSPECIFIED",
CapacityCommitmentPlanEnum::FLEX => "FLEX",
CapacityCommitmentPlanEnum::FLEXFLATRATE => "FLEX_FLAT_RATE",
CapacityCommitmentPlanEnum::TRIAL => "TRIAL",
CapacityCommitmentPlanEnum::MONTHLY => "MONTHLY",
CapacityCommitmentPlanEnum::MONTHLYFLATRATE => "MONTHLY_FLAT_RATE",
CapacityCommitmentPlanEnum::ANNUAL => "ANNUAL",
CapacityCommitmentPlanEnum::ANNUALFLATRATE => "ANNUAL_FLAT_RATE",
CapacityCommitmentPlanEnum::THREEYEAR => "THREE_YEAR",
CapacityCommitmentPlanEnum::NONE => "NONE",
}
}
}
impl std::convert::TryFrom< &str> for CapacityCommitmentPlanEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"COMMITMENT_PLAN_UNSPECIFIED" => Ok(CapacityCommitmentPlanEnum::COMMITMENTPLANUNSPECIFIED),
"FLEX" => Ok(CapacityCommitmentPlanEnum::FLEX),
"FLEX_FLAT_RATE" => Ok(CapacityCommitmentPlanEnum::FLEXFLATRATE),
"TRIAL" => Ok(CapacityCommitmentPlanEnum::TRIAL),
"MONTHLY" => Ok(CapacityCommitmentPlanEnum::MONTHLY),
"MONTHLY_FLAT_RATE" => Ok(CapacityCommitmentPlanEnum::MONTHLYFLATRATE),
"ANNUAL" => Ok(CapacityCommitmentPlanEnum::ANNUAL),
"ANNUAL_FLAT_RATE" => Ok(CapacityCommitmentPlanEnum::ANNUALFLATRATE),
"THREE_YEAR" => Ok(CapacityCommitmentPlanEnum::THREEYEAR),
"NONE" => Ok(CapacityCommitmentPlanEnum::NONE),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CapacityCommitmentPlanEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region CapacityCommitmentRenewalPlanEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
pub enum CapacityCommitmentRenewalPlanEnum {
/// Invalid plan value. Requests with this value will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
///
/// "COMMITMENT_PLAN_UNSPECIFIED"
#[serde(rename="COMMITMENT_PLAN_UNSPECIFIED")]
COMMITMENTPLANUNSPECIFIED,
/// Flex commitments have committed period of 1 minute after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time.
///
/// "FLEX"
#[serde(rename="FLEX")]
FLEX,
/// Same as FLEX, should only be used if flat-rate commitments are still available.
///
/// "FLEX_FLAT_RATE"
#[serde(rename="FLEX_FLAT_RATE")]
FLEXFLATRATE,
/// Trial commitments have a committed period of 182 days after becoming ACTIVE. After that, they are converted to a new commitment based on the `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so that it can be deleted right after committed period ends.
///
/// "TRIAL"
#[serde(rename="TRIAL")]
TRIAL,
/// Monthly commitments have a committed period of 30 days after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time.
///
/// "MONTHLY"
#[serde(rename="MONTHLY")]
MONTHLY,
/// Same as MONTHLY, should only be used if flat-rate commitments are still available.
///
/// "MONTHLY_FLAT_RATE"
#[serde(rename="MONTHLY_FLAT_RATE")]
MONTHLYFLATRATE,
/// Annual commitments have a committed period of 365 days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan.
///
/// "ANNUAL"
#[serde(rename="ANNUAL")]
ANNUAL,
/// Same as ANNUAL, should only be used if flat-rate commitments are still available.
///
/// "ANNUAL_FLAT_RATE"
#[serde(rename="ANNUAL_FLAT_RATE")]
ANNUALFLATRATE,
/// 3-year commitments have a committed period of 1095(3 * 365) days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan.
///
/// "THREE_YEAR"
#[serde(rename="THREE_YEAR")]
THREEYEAR,
/// Should only be used for `renewal_plan` and is only meaningful if edition is specified to values other than EDITION_UNSPECIFIED. Otherwise CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the renewal_plan is NONE, capacity commitment will be removed at the end of its commitment period.
///
/// "NONE"
#[serde(rename="NONE")]
NONE,
}
impl AsRef<str> for CapacityCommitmentRenewalPlanEnum {
fn as_ref(&self) -> &str {
match *self {
CapacityCommitmentRenewalPlanEnum::COMMITMENTPLANUNSPECIFIED => "COMMITMENT_PLAN_UNSPECIFIED",
CapacityCommitmentRenewalPlanEnum::FLEX => "FLEX",
CapacityCommitmentRenewalPlanEnum::FLEXFLATRATE => "FLEX_FLAT_RATE",
CapacityCommitmentRenewalPlanEnum::TRIAL => "TRIAL",
CapacityCommitmentRenewalPlanEnum::MONTHLY => "MONTHLY",
CapacityCommitmentRenewalPlanEnum::MONTHLYFLATRATE => "MONTHLY_FLAT_RATE",
CapacityCommitmentRenewalPlanEnum::ANNUAL => "ANNUAL",
CapacityCommitmentRenewalPlanEnum::ANNUALFLATRATE => "ANNUAL_FLAT_RATE",
CapacityCommitmentRenewalPlanEnum::THREEYEAR => "THREE_YEAR",
CapacityCommitmentRenewalPlanEnum::NONE => "NONE",
}
}
}
impl std::convert::TryFrom< &str> for CapacityCommitmentRenewalPlanEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"COMMITMENT_PLAN_UNSPECIFIED" => Ok(CapacityCommitmentRenewalPlanEnum::COMMITMENTPLANUNSPECIFIED),
"FLEX" => Ok(CapacityCommitmentRenewalPlanEnum::FLEX),
"FLEX_FLAT_RATE" => Ok(CapacityCommitmentRenewalPlanEnum::FLEXFLATRATE),
"TRIAL" => Ok(CapacityCommitmentRenewalPlanEnum::TRIAL),
"MONTHLY" => Ok(CapacityCommitmentRenewalPlanEnum::MONTHLY),
"MONTHLY_FLAT_RATE" => Ok(CapacityCommitmentRenewalPlanEnum::MONTHLYFLATRATE),
"ANNUAL" => Ok(CapacityCommitmentRenewalPlanEnum::ANNUAL),
"ANNUAL_FLAT_RATE" => Ok(CapacityCommitmentRenewalPlanEnum::ANNUALFLATRATE),
"THREE_YEAR" => Ok(CapacityCommitmentRenewalPlanEnum::THREEYEAR),
"NONE" => Ok(CapacityCommitmentRenewalPlanEnum::NONE),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CapacityCommitmentRenewalPlanEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region CapacityCommitmentStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. State of the commitment.
pub enum CapacityCommitmentStateEnum {
/// Invalid state value.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// Capacity commitment is pending provisioning. Pending capacity commitment does not contribute to the project's slot_capacity.
///
/// "PENDING"
#[serde(rename="PENDING")]
PENDING,
/// Once slots are provisioned, capacity commitment becomes active. slot_count is added to the project's slot_capacity.
///
/// "ACTIVE"
#[serde(rename="ACTIVE")]
ACTIVE,
/// Capacity commitment is failed to be activated by the backend.
///
/// "FAILED"
#[serde(rename="FAILED")]
FAILED,
}
impl AsRef<str> for CapacityCommitmentStateEnum {
fn as_ref(&self) -> &str {
match *self {
CapacityCommitmentStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
CapacityCommitmentStateEnum::PENDING => "PENDING",
CapacityCommitmentStateEnum::ACTIVE => "ACTIVE",
CapacityCommitmentStateEnum::FAILED => "FAILED",
}
}
}
impl std::convert::TryFrom< &str> for CapacityCommitmentStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(CapacityCommitmentStateEnum::STATEUNSPECIFIED),
"PENDING" => Ok(CapacityCommitmentStateEnum::PENDING),
"ACTIVE" => Ok(CapacityCommitmentStateEnum::ACTIVE),
"FAILED" => Ok(CapacityCommitmentStateEnum::FAILED),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CapacityCommitmentStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ReservationEditionEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Edition of the reservation.
pub enum ReservationEditionEnum {
/// Default value, which will be treated as ENTERPRISE.
///
/// "EDITION_UNSPECIFIED"
#[serde(rename="EDITION_UNSPECIFIED")]
EDITIONUNSPECIFIED,
/// Standard edition.
///
/// "STANDARD"
#[serde(rename="STANDARD")]
STANDARD,
/// Enterprise edition.
///
/// "ENTERPRISE"
#[serde(rename="ENTERPRISE")]
ENTERPRISE,
/// Enterprise plus edition.
///
/// "ENTERPRISE_PLUS"
#[serde(rename="ENTERPRISE_PLUS")]
ENTERPRISEPLUS,
}
impl AsRef<str> for ReservationEditionEnum {
fn as_ref(&self) -> &str {
match *self {
ReservationEditionEnum::EDITIONUNSPECIFIED => "EDITION_UNSPECIFIED",
ReservationEditionEnum::STANDARD => "STANDARD",
ReservationEditionEnum::ENTERPRISE => "ENTERPRISE",
ReservationEditionEnum::ENTERPRISEPLUS => "ENTERPRISE_PLUS",
}
}
}
impl std::convert::TryFrom< &str> for ReservationEditionEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"EDITION_UNSPECIFIED" => Ok(ReservationEditionEnum::EDITIONUNSPECIFIED),
"STANDARD" => Ok(ReservationEditionEnum::STANDARD),
"ENTERPRISE" => Ok(ReservationEditionEnum::ENTERPRISE),
"ENTERPRISE_PLUS" => Ok(ReservationEditionEnum::ENTERPRISEPLUS),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ReservationEditionEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion

View File

@@ -0,0 +1,114 @@
use super::*;
/// Central instance to access all BigQueryReservation related resource activities
///
/// # Examples
///
/// Instantiate a new hub
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_bigqueryreservation1 as bigqueryreservation1;
/// use bigqueryreservation1::api::Reservation;
/// use bigqueryreservation1::{Result, Error};
/// use bigqueryreservation1::api::enums::*;
/// # async fn dox() {
/// use std::default::Default;
/// use bigqueryreservation1::{BigQueryReservation, oauth2, hyper, hyper_rustls, chrono, FieldMask};
///
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
/// // `client_secret`, among other things.
/// let secret: oauth2::ApplicationSecret = Default::default();
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
/// // unless you replace `None` with the desired Flow.
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
/// // retrieve them from storage.
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = BigQueryReservation::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // As the method needs a request, you would usually fill it with the desired information
/// // into the respective structure. Some of the parts shown here might not be applicable !
/// // Values shown here are possibly random and not representative !
/// let mut req = Reservation::default();
///
/// // You can configure optional parameters by calling the respective setters at will, and
/// // execute the final call using `doit()`.
/// // Values shown here are possibly random and not representative !
/// let result = hub.projects().locations_reservations_create(req, "parent")
/// .reservation_id("At")
/// .doit().await;
///
/// match result {
/// Err(e) => match e {
/// // The Error enum provides details about what exactly happened.
/// // You can also just use its `Debug`, `Display` or `Error` traits
/// Error::HttpError(_)
/// |Error::Io(_)
/// |Error::MissingAPIKey
/// |Error::MissingToken(_)
/// |Error::Cancelled
/// |Error::UploadSizeLimitExceeded(_, _)
/// |Error::Failure(_)
/// |Error::BadRequest(_)
/// |Error::FieldClash(_)
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
/// },
/// Ok(res) => println!("Success: {:?}", res),
/// }
/// # }
/// ```
#[derive(Clone)]
pub struct BigQueryReservation<S> {
pub client: hyper::Client<S, hyper::body::Body>,
pub auth: Box<dyn client::GetToken>,
pub(super) _user_agent: String,
pub(super) _base_url: String,
pub(super) _root_url: String,
}
impl<'a, S> client::Hub for BigQueryReservation<S> {}
impl<'a, S> BigQueryReservation<S> {
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> BigQueryReservation<S> {
BigQueryReservation {
client,
auth: Box::new(auth),
_user_agent: "google-api-rust-client/5.0.5".to_string(),
_base_url: "https://bigqueryreservation.googleapis.com/".to_string(),
_root_url: "https://bigqueryreservation.googleapis.com/".to_string(),
}
}
pub fn projects(&'a self) -> ProjectMethods<'a, S> {
ProjectMethods { hub: &self }
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/5.0.5`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
mem::replace(&mut self._user_agent, agent_name)
}
/// Set the base url to use in all requests to the server.
/// It defaults to `https://bigqueryreservation.googleapis.com/`.
///
/// Returns the previously set base url.
pub fn base_url(&mut self, new_base_url: String) -> String {
mem::replace(&mut self._base_url, new_base_url)
}
/// Set the root url to use in all requests to the server.
/// It defaults to `https://bigqueryreservation.googleapis.com/`.
///
/// Returns the previously set root url.
pub fn root_url(&mut self, new_root_url: String) -> String {
mem::replace(&mut self._root_url, new_root_url)
}
}

View File

@@ -0,0 +1,459 @@
use super::*;
/// A builder providing access to all methods supported on *project* resources.
/// It is not used directly, but through the [`BigQueryReservation`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_bigqueryreservation1 as bigqueryreservation1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use bigqueryreservation1::{BigQueryReservation, oauth2, hyper, hyper_rustls, chrono, FieldMask};
///
/// let secret: oauth2::ApplicationSecret = Default::default();
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = BigQueryReservation::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `locations_capacity_commitments_create(...)`, `locations_capacity_commitments_delete(...)`, `locations_capacity_commitments_get(...)`, `locations_capacity_commitments_list(...)`, `locations_capacity_commitments_merge(...)`, `locations_capacity_commitments_patch(...)`, `locations_capacity_commitments_split(...)`, `locations_get_bi_reservation(...)`, `locations_reservations_assignments_create(...)`, `locations_reservations_assignments_delete(...)`, `locations_reservations_assignments_list(...)`, `locations_reservations_assignments_move(...)`, `locations_reservations_assignments_patch(...)`, `locations_reservations_create(...)`, `locations_reservations_delete(...)`, `locations_reservations_failover_reservation(...)`, `locations_reservations_get(...)`, `locations_reservations_list(...)`, `locations_reservations_patch(...)`, `locations_search_all_assignments(...)`, `locations_search_assignments(...)` and `locations_update_bi_reservation(...)`
/// // to build up your call.
/// let rb = hub.projects();
/// # }
/// ```
pub struct ProjectMethods<'a, S>
where S: 'a {
pub(super) hub: &'a BigQueryReservation<S>,
}
impl<'a, S> client::MethodsBuilder for ProjectMethods<'a, S> {}
impl<'a, S> ProjectMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Creates a new capacity commitment resource.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US`
pub fn locations_capacity_commitments_create(&self, request: CapacityCommitment, parent: &str) -> ProjectLocationCapacityCommitmentCreateCall<'a, S> {
ProjectLocationCapacityCommitmentCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_enforce_single_admin_project_per_org: Default::default(),
_capacity_commitment_id: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
///
/// # Arguments
///
/// * `name` - Required. Resource name of the capacity commitment to delete. E.g., `projects/myproject/locations/US/capacityCommitments/123`
pub fn locations_capacity_commitments_delete(&self, name: &str) -> ProjectLocationCapacityCommitmentDeleteCall<'a, S> {
ProjectLocationCapacityCommitmentDeleteCall {
hub: self.hub,
_name: name.to_string(),
_force: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns information about the capacity commitment.
///
/// # Arguments
///
/// * `name` - Required. Resource name of the capacity commitment to retrieve. E.g., `projects/myproject/locations/US/capacityCommitments/123`
pub fn locations_capacity_commitments_get(&self, name: &str) -> ProjectLocationCapacityCommitmentGetCall<'a, S> {
ProjectLocationCapacityCommitmentGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists all the capacity commitments for the admin project.
///
/// # Arguments
///
/// * `parent` - Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US`
pub fn locations_capacity_commitments_list(&self, parent: &str) -> ProjectLocationCapacityCommitmentListCall<'a, S> {
ProjectLocationCapacityCommitmentListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Parent resource that identifies admin project and location e.g., `projects/myproject/locations/us`
pub fn locations_capacity_commitments_merge(&self, request: MergeCapacityCommitmentsRequest, parent: &str) -> ProjectLocationCapacityCommitmentMergeCall<'a, S> {
ProjectLocationCapacityCommitmentMergeCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
pub fn locations_capacity_commitments_patch(&self, request: CapacityCommitment, name: &str) -> ProjectLocationCapacityCommitmentPatchCall<'a, S> {
ProjectLocationCapacityCommitmentPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Splits capacity commitment to two commitments of the same plan and `commitment_end_time`. A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123`
pub fn locations_capacity_commitments_split(&self, request: SplitCapacityCommitmentRequest, name: &str) -> ProjectLocationCapacityCommitmentSplitCall<'a, S> {
ProjectLocationCapacityCommitmentSplitCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type. Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query. When creating assignments, it does not matter if other assignments exist at higher levels. Example: * The organization `organizationA` contains two projects, `project1` and `project2`. * Assignments for all three entities (`organizationA`, `project1`, and `project2`) could all be created and mapped to the same or different reservations. "None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: `projects/myproject/locations/US/reservations/none`. Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match location of the reservation.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent resource name of the assignment E.g. `projects/myproject/locations/US/reservations/team1-prod`
pub fn locations_reservations_assignments_create(&self, request: Assignment, parent: &str) -> ProjectLocationReservationAssignmentCreateCall<'a, S> {
ProjectLocationReservationAssignmentCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_assignment_id: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes a assignment. No expansion will happen. Example: * Organization `organizationA` contains two projects, `project1` and `project2`. * Reservation `res1` exists and was created previously. * CreateAssignment was used previously to define the following associations between entities and reservations: `` and `` In this example, deletion of the `` assignment won't affect the other assignment ``. After said deletion, queries from `project1` will still use `res1` while queries from `project2` will switch to use on-demand mode.
///
/// # Arguments
///
/// * `name` - Required. Name of the resource, e.g. `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
pub fn locations_reservations_assignments_delete(&self, name: &str) -> ProjectLocationReservationAssignmentDeleteCall<'a, S> {
ProjectLocationReservationAssignmentDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists assignments. Only explicitly created assignments will be returned. Example: * Organization `organizationA` contains two projects, `project1` and `project2`. * Reservation `res1` exists and was created previously. * CreateAssignment was used previously to define the following associations between entities and reservations: `` and `` In this example, ListAssignments will just return the above two assignments for reservation `res1`, and no expansion/merge will happen. The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed. **Note** "-" cannot be used for projects nor locations.
///
/// # Arguments
///
/// * `parent` - Required. The parent resource name e.g.: `projects/myproject/locations/US/reservations/team1-prod` Or: `projects/myproject/locations/US/reservations/-`
pub fn locations_reservations_assignments_list(&self, parent: &str) -> ProjectLocationReservationAssignmentListCall<'a, S> {
ProjectLocationReservationAssignmentListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Moves an assignment under a new reservation. This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. The resource name of the assignment, e.g. `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
pub fn locations_reservations_assignments_move(&self, request: MoveAssignmentRequest, name: &str) -> ProjectLocationReservationAssignmentMoveCall<'a, S> {
ProjectLocationReservationAssignmentMoveCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates an existing assignment. Only the `priority` field can be updated.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters.
pub fn locations_reservations_assignments_patch(&self, request: Assignment, name: &str) -> ProjectLocationReservationAssignmentPatchCall<'a, S> {
ProjectLocationReservationAssignmentPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new reservation resource.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. Project, location. E.g., `projects/myproject/locations/US`
pub fn locations_reservations_create(&self, request: Reservation, parent: &str) -> ProjectLocationReservationCreateCall<'a, S> {
ProjectLocationReservationCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_reservation_id: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.
///
/// # Arguments
///
/// * `name` - Required. Resource name of the reservation to retrieve. E.g., `projects/myproject/locations/US/reservations/team1-prod`
pub fn locations_reservations_delete(&self, name: &str) -> ProjectLocationReservationDeleteCall<'a, S> {
ProjectLocationReservationDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Failover a reservation to the secondary location. The operation should be done in the current secondary location, which will be promoted to the new primary location for the reservation. Attempting to failover a reservation in the current primary location will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. Resource name of the reservation to failover. E.g., `projects/myproject/locations/US/reservations/team1-prod`
pub fn locations_reservations_failover_reservation(&self, request: FailoverReservationRequest, name: &str) -> ProjectLocationReservationFailoverReservationCall<'a, S> {
ProjectLocationReservationFailoverReservationCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns information about the reservation.
///
/// # Arguments
///
/// * `name` - Required. Resource name of the reservation to retrieve. E.g., `projects/myproject/locations/US/reservations/team1-prod`
pub fn locations_reservations_get(&self, name: &str) -> ProjectLocationReservationGetCall<'a, S> {
ProjectLocationReservationGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists all the reservations for the project in the specified location.
///
/// # Arguments
///
/// * `parent` - Required. The parent resource name containing project and location, e.g.: `projects/myproject/locations/US`
pub fn locations_reservations_list(&self, parent: &str) -> ProjectLocationReservationListCall<'a, S> {
ProjectLocationReservationListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates an existing reservation resource.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The resource name of the reservation, e.g., `projects/*/locations/*/reservations/team1-prod`. The reservation_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
pub fn locations_reservations_patch(&self, request: Reservation, name: &str) -> ProjectLocationReservationPatchCall<'a, S> {
ProjectLocationReservationPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Retrieves a BI reservation.
///
/// # Arguments
///
/// * `name` - Required. Name of the requested reservation, for example: `projects/{project_id}/locations/{location_id}/biReservation`
pub fn locations_get_bi_reservation(&self, name: &str) -> ProjectLocationGetBiReservationCall<'a, S> {
ProjectLocationGetBiReservationCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. The same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.
///
/// # Arguments
///
/// * `parent` - Required. The resource name with location (project name could be the wildcard '-'), e.g.: `projects/-/locations/US`.
pub fn locations_search_all_assignments(&self, parent: &str) -> ProjectLocationSearchAllAssignmentCall<'a, S> {
ProjectLocationSearchAllAssignmentCall {
hub: self.hub,
_parent: parent.to_string(),
_query: Default::default(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. The same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`. **Note** "-" cannot be used for projects nor locations.
///
/// # Arguments
///
/// * `parent` - Required. The resource name of the admin project(containing project and location), e.g.: `projects/myproject/locations/US`.
pub fn locations_search_assignments(&self, parent: &str) -> ProjectLocationSearchAssignmentCall<'a, S> {
ProjectLocationSearchAssignmentCall {
hub: self.hub,
_parent: parent.to_string(),
_query: Default::default(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates a BI reservation. Only fields specified in the `field_mask` are updated. A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`.
pub fn locations_update_bi_reservation(&self, request: BiReservation, name: &str) -> ProjectLocationUpdateBiReservationCall<'a, S> {
ProjectLocationUpdateBiReservationCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}

View File

@@ -0,0 +1,35 @@
use std::collections::HashMap;
use std::cell::RefCell;
use std::default::Default;
use std::collections::BTreeSet;
use std::error::Error as StdError;
use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use hyper::client::connect;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::time::sleep;
use tower_service;
use serde::{Serialize, Deserialize};
use crate::{client, client::GetToken, client::serde_with};
mod utilities;
pub use utilities::*;
mod hub;
pub use hub::*;
mod schemas;
pub use schemas::*;
mod method_builders;
pub use method_builders::*;
mod call_builders;
pub use call_builders::*;
pub mod enums;
pub(crate) use enums::*;

View File

@@ -0,0 +1,495 @@
use super::*;
/// An assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations assignments create projects](ProjectLocationReservationAssignmentCreateCall) (request|response)
/// * [locations reservations assignments move projects](ProjectLocationReservationAssignmentMoveCall) (response)
/// * [locations reservations assignments patch projects](ProjectLocationReservationAssignmentPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Assignment {
/// The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.
pub assignee: Option<String>,
/// Which type of jobs will use the reservation.
#[serde(rename="jobType")]
pub job_type: Option<AssignmentJobTypeEnum>,
/// Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters.
pub name: Option<String>,
/// Output only. State of the assignment.
pub state: Option<AssignmentStateEnum>,
}
impl client::RequestValue for Assignment {}
impl client::ResponseResult for Assignment {}
/// Auto scaling settings.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Autoscale {
/// Output only. The slot capacity added to this reservation when autoscale happens. Will be between [0, max_slots].
#[serde(rename="currentSlots")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub current_slots: Option<i64>,
/// Number of slots to be scaled when needed.
#[serde(rename="maxSlots")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub max_slots: Option<i64>,
}
impl client::Part for Autoscale {}
/// Represents a BI Reservation.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations get bi reservation projects](ProjectLocationGetBiReservationCall) (response)
/// * [locations update bi reservation projects](ProjectLocationUpdateBiReservationCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct BiReservation {
/// The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`.
pub name: Option<String>,
/// Preferred tables to use BI capacity for.
#[serde(rename="preferredTables")]
pub preferred_tables: Option<Vec<TableReference>>,
/// Size of a reservation, in bytes.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub size: Option<i64>,
/// Output only. The last update timestamp of a reservation.
#[serde(rename="updateTime")]
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::RequestValue for BiReservation {}
impl client::ResponseResult for BiReservation {}
/// Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments create projects](ProjectLocationCapacityCommitmentCreateCall) (request|response)
/// * [locations capacity commitments get projects](ProjectLocationCapacityCommitmentGetCall) (response)
/// * [locations capacity commitments merge projects](ProjectLocationCapacityCommitmentMergeCall) (response)
/// * [locations capacity commitments patch projects](ProjectLocationCapacityCommitmentPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CapacityCommitment {
/// Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
#[serde(rename="commitmentEndTime")]
pub commitment_end_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
#[serde(rename="commitmentStartTime")]
pub commitment_start_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Edition of the capacity commitment.
pub edition: Option<CapacityCommitmentEditionEnum>,
/// Output only. For FAILED commitment plan, provides the reason of failure.
#[serde(rename="failureStatus")]
pub failure_status: Option<Status>,
/// Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment.
#[serde(rename="isFlatRate")]
pub is_flat_rate: Option<bool>,
/// Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
#[serde(rename="multiRegionAuxiliary")]
pub multi_region_auxiliary: Option<bool>,
/// Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
pub name: Option<String>,
/// Capacity commitment commitment plan.
pub plan: Option<CapacityCommitmentPlanEnum>,
/// The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
#[serde(rename="renewalPlan")]
pub renewal_plan: Option<CapacityCommitmentRenewalPlanEnum>,
/// Number of slots in this commitment.
#[serde(rename="slotCount")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub slot_count: Option<i64>,
/// Output only. State of the commitment.
pub state: Option<CapacityCommitmentStateEnum>,
}
impl client::RequestValue for CapacityCommitment {}
impl client::ResponseResult for CapacityCommitment {}
/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments delete projects](ProjectLocationCapacityCommitmentDeleteCall) (response)
/// * [locations reservations assignments delete projects](ProjectLocationReservationAssignmentDeleteCall) (response)
/// * [locations reservations delete projects](ProjectLocationReservationDeleteCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Empty { _never_set: Option<bool> }
impl client::ResponseResult for Empty {}
/// The request for ReservationService.FailoverReservation.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations failover reservation projects](ProjectLocationReservationFailoverReservationCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct FailoverReservationRequest { _never_set: Option<bool> }
impl client::RequestValue for FailoverReservationRequest {}
/// The response for ReservationService.ListAssignments.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations assignments list projects](ProjectLocationReservationAssignmentListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListAssignmentsResponse {
/// List of assignments visible to the user.
pub assignments: Option<Vec<Assignment>>,
/// Token to retrieve the next page of results, or empty if there are no more results in the list.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for ListAssignmentsResponse {}
/// The response for ReservationService.ListCapacityCommitments.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments list projects](ProjectLocationCapacityCommitmentListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListCapacityCommitmentsResponse {
/// List of capacity commitments visible to the user.
#[serde(rename="capacityCommitments")]
pub capacity_commitments: Option<Vec<CapacityCommitment>>,
/// Token to retrieve the next page of results, or empty if there are no more results in the list.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for ListCapacityCommitmentsResponse {}
/// The response for ReservationService.ListReservations.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations list projects](ProjectLocationReservationListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListReservationsResponse {
/// Token to retrieve the next page of results, or empty if there are no more results in the list.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// List of reservations visible to the user.
pub reservations: Option<Vec<Reservation>>,
}
impl client::ResponseResult for ListReservationsResponse {}
/// The request for ReservationService.MergeCapacityCommitments.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments merge projects](ProjectLocationCapacityCommitmentMergeCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct MergeCapacityCommitmentsRequest {
/// Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc
#[serde(rename="capacityCommitmentIds")]
pub capacity_commitment_ids: Option<Vec<String>>,
}
impl client::RequestValue for MergeCapacityCommitmentsRequest {}
/// The request for ReservationService.MoveAssignment. **Note**: “bigquery.reservationAssignments.create” permission is required on the destination_id. **Note**: “bigquery.reservationAssignments.create” and “bigquery.reservationAssignments.delete” permission are required on the related assignee.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations assignments move projects](ProjectLocationReservationAssignmentMoveCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct MoveAssignmentRequest {
/// The optional assignment ID. A new assignment name is generated if this field is empty. This field can contain only lowercase alphanumeric characters or dashes. Max length is 64 characters.
#[serde(rename="assignmentId")]
pub assignment_id: Option<String>,
/// The new reservation ID, e.g.: `projects/myotherproject/locations/US/reservations/team2-prod`
#[serde(rename="destinationId")]
pub destination_id: Option<String>,
}
impl client::RequestValue for MoveAssignmentRequest {}
/// A reservation is a mechanism used to guarantee slots to users.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations reservations create projects](ProjectLocationReservationCreateCall) (request|response)
/// * [locations reservations failover reservation projects](ProjectLocationReservationFailoverReservationCall) (response)
/// * [locations reservations get projects](ProjectLocationReservationGetCall) (response)
/// * [locations reservations patch projects](ProjectLocationReservationPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Reservation {
/// The configuration parameters for the auto scaling feature.
pub autoscale: Option<Autoscale>,
/// Job concurrency target which sets a soft upper bound on the number of jobs that can run concurrently in this reservation. This is a soft target due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency target will be automatically computed by the system. NOTE: this field is exposed as target job concurrency in the Information Schema, DDL and BQ CLI.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub concurrency: Option<i64>,
/// Output only. Creation time of the reservation.
#[serde(rename="creationTime")]
pub creation_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Edition of the reservation.
pub edition: Option<ReservationEditionEnum>,
/// If false, any query or pipeline job using this reservation will use idle slots from other reservations within the same admin project. If true, a query or pipeline job using this reservation will execute with the slot capacity specified in the slot_capacity field at most.
#[serde(rename="ignoreIdleSlots")]
pub ignore_idle_slots: Option<bool>,
/// Applicable only for reservations located within one of the BigQuery multi-regions (US or EU). If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
#[serde(rename="multiRegionAuxiliary")]
pub multi_region_auxiliary: Option<bool>,
/// The resource name of the reservation, e.g., `projects/*/locations/*/reservations/team1-prod`. The reservation_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
pub name: Option<String>,
/// Optional. The original primary location of the reservation which is set only during its creation and remains unchanged afterwards. It can be used by the customer to answer questions about disaster recovery billing. The field is output only for customers and should not be specified, however, the google.api.field_behavior is not set to OUTPUT_ONLY since these fields are set in rerouted requests sent across regions.
#[serde(rename="originalPrimaryLocation")]
pub original_primary_location: Option<String>,
/// Optional. The primary location of the reservation. The field is only meaningful for reservation used for cross region disaster recovery. The field is output only for customers and should not be specified, however, the google.api.field_behavior is not set to OUTPUT_ONLY since these fields are set in rerouted requests sent across regions.
#[serde(rename="primaryLocation")]
pub primary_location: Option<String>,
/// Optional. The secondary location of the reservation which is used for cross region disaster recovery purposes. Customer can set this in create/update reservation calls to create a failover reservation or convert a non-failover reservation to a failover reservation.
#[serde(rename="secondaryLocation")]
pub secondary_location: Option<String>,
/// Baseline slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false, or autoscaling is enabled. If edition is EDITION_UNSPECIFIED and total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. If edition is any value but EDITION_UNSPECIFIED, then the above requirement is not needed. The total slot_capacity of the reservation and its siblings may exceed the total slot_count of capacity commitments. In that case, the exceeding slots will be charged with the autoscale SKU. You can increase the number of baseline slots in a reservation every few minutes. If you want to decrease your baseline slots, you are limited to once an hour if you have recently changed your baseline slot capacity and your baseline slots exceed your committed slots. Otherwise, you can decrease your baseline slots every few minutes.
#[serde(rename="slotCapacity")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub slot_capacity: Option<i64>,
/// Output only. Last update time of the reservation.
#[serde(rename="updateTime")]
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::RequestValue for Reservation {}
impl client::ResponseResult for Reservation {}
/// The response for ReservationService.SearchAllAssignments.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations search all assignments projects](ProjectLocationSearchAllAssignmentCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SearchAllAssignmentsResponse {
/// List of assignments visible to the user.
pub assignments: Option<Vec<Assignment>>,
/// Token to retrieve the next page of results, or empty if there are no more results in the list.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for SearchAllAssignmentsResponse {}
/// The response for ReservationService.SearchAssignments.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations search assignments projects](ProjectLocationSearchAssignmentCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SearchAssignmentsResponse {
/// List of assignments visible to the user.
pub assignments: Option<Vec<Assignment>>,
/// Token to retrieve the next page of results, or empty if there are no more results in the list.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for SearchAssignmentsResponse {}
/// The request for ReservationService.SplitCapacityCommitment.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments split projects](ProjectLocationCapacityCommitmentSplitCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SplitCapacityCommitmentRequest {
/// Number of slots in the capacity commitment after the split.
#[serde(rename="slotCount")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub slot_count: Option<i64>,
}
impl client::RequestValue for SplitCapacityCommitmentRequest {}
/// The response for ReservationService.SplitCapacityCommitment.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations capacity commitments split projects](ProjectLocationCapacityCommitmentSplitCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SplitCapacityCommitmentResponse {
/// First capacity commitment, result of a split.
pub first: Option<CapacityCommitment>,
/// Second capacity commitment, result of a split.
pub second: Option<CapacityCommitment>,
}
impl client::ResponseResult for SplitCapacityCommitmentResponse {}
/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Status {
/// The status code, which should be an enum value of google.rpc.Code.
pub code: Option<i32>,
/// A list of messages that carry the error details. There is a common set of message types for APIs to use.
pub details: Option<Vec<HashMap<String, json::Value>>>,
/// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
pub message: Option<String>,
}
impl client::Part for Status {}
/// Fully qualified reference to BigQuery table. Internally stored as google.cloud.bi.v1.BqTableReference.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TableReference {
/// The ID of the dataset in the above project.
#[serde(rename="datasetId")]
pub dataset_id: Option<String>,
/// The assigned project ID of the project.
#[serde(rename="projectId")]
pub project_id: Option<String>,
/// The ID of the table in the above dataset.
#[serde(rename="tableId")]
pub table_id: Option<String>,
}
impl client::Part for TableReference {}

View File

@@ -0,0 +1,28 @@
use super::*;
/// Identifies the an OAuth2 authorization scope.
/// A scope is needed when requesting an
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
pub enum Scope {
/// View and manage your data in Google BigQuery and see the email address for your Google Account
Bigquery,
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
CloudPlatform,
}
impl AsRef<str> for Scope {
fn as_ref(&self) -> &str {
match *self {
Scope::Bigquery => "https://www.googleapis.com/auth/bigquery",
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
}
}
}
impl Default for Scope {
fn default() -> Scope {
Scope::Bigquery
}
}

View File

@@ -2,17 +2,17 @@
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *BigQuery Reservation* crate version *5.0.4+20240227*, where *20240227* is the exact revision of the *bigqueryreservation:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
//! This documentation was generated from *BigQuery Reservation* crate version *5.0.5+20240328*, where *20240328* is the exact revision of the *bigqueryreservation:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
//!
//! Everything else about the *BigQuery Reservation* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/bigquery/).
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/bigqueryreservation1).
//! # Features
//!
//! Handle the following *Resources* with ease from the central [hub](BigQueryReservation) ...
//! Handle the following *Resources* with ease from the central [hub](BigQueryReservation) ...
//!
//! * projects
//! * [*locations capacity commitments create*](api::ProjectLocationCapacityCommitmentCreateCall), [*locations capacity commitments delete*](api::ProjectLocationCapacityCommitmentDeleteCall), [*locations capacity commitments get*](api::ProjectLocationCapacityCommitmentGetCall), [*locations capacity commitments list*](api::ProjectLocationCapacityCommitmentListCall), [*locations capacity commitments merge*](api::ProjectLocationCapacityCommitmentMergeCall), [*locations capacity commitments patch*](api::ProjectLocationCapacityCommitmentPatchCall), [*locations capacity commitments split*](api::ProjectLocationCapacityCommitmentSplitCall), [*locations get bi reservation*](api::ProjectLocationGetBiReservationCall), [*locations reservations assignments create*](api::ProjectLocationReservationAssignmentCreateCall), [*locations reservations assignments delete*](api::ProjectLocationReservationAssignmentDeleteCall), [*locations reservations assignments list*](api::ProjectLocationReservationAssignmentListCall), [*locations reservations assignments move*](api::ProjectLocationReservationAssignmentMoveCall), [*locations reservations assignments patch*](api::ProjectLocationReservationAssignmentPatchCall), [*locations reservations create*](api::ProjectLocationReservationCreateCall), [*locations reservations delete*](api::ProjectLocationReservationDeleteCall), [*locations reservations get*](api::ProjectLocationReservationGetCall), [*locations reservations list*](api::ProjectLocationReservationListCall), [*locations reservations patch*](api::ProjectLocationReservationPatchCall), [*locations search all assignments*](api::ProjectLocationSearchAllAssignmentCall), [*locations search assignments*](api::ProjectLocationSearchAssignmentCall) and [*locations update bi reservation*](api::ProjectLocationUpdateBiReservationCall)
//! * [*locations capacity commitments create*](api::ProjectLocationCapacityCommitmentCreateCall), [*locations capacity commitments delete*](api::ProjectLocationCapacityCommitmentDeleteCall), [*locations capacity commitments get*](api::ProjectLocationCapacityCommitmentGetCall), [*locations capacity commitments list*](api::ProjectLocationCapacityCommitmentListCall), [*locations capacity commitments merge*](api::ProjectLocationCapacityCommitmentMergeCall), [*locations capacity commitments patch*](api::ProjectLocationCapacityCommitmentPatchCall), [*locations capacity commitments split*](api::ProjectLocationCapacityCommitmentSplitCall), [*locations get bi reservation*](api::ProjectLocationGetBiReservationCall), [*locations reservations assignments create*](api::ProjectLocationReservationAssignmentCreateCall), [*locations reservations assignments delete*](api::ProjectLocationReservationAssignmentDeleteCall), [*locations reservations assignments list*](api::ProjectLocationReservationAssignmentListCall), [*locations reservations assignments move*](api::ProjectLocationReservationAssignmentMoveCall), [*locations reservations assignments patch*](api::ProjectLocationReservationAssignmentPatchCall), [*locations reservations create*](api::ProjectLocationReservationCreateCall), [*locations reservations delete*](api::ProjectLocationReservationDeleteCall), [*locations reservations failover reservation*](api::ProjectLocationReservationFailoverReservationCall), [*locations reservations get*](api::ProjectLocationReservationGetCall), [*locations reservations list*](api::ProjectLocationReservationListCall), [*locations reservations patch*](api::ProjectLocationReservationPatchCall), [*locations search all assignments*](api::ProjectLocationSearchAllAssignmentCall), [*locations search assignments*](api::ProjectLocationSearchAssignmentCall) and [*locations update bi reservation*](api::ProjectLocationUpdateBiReservationCall)
//!
//!
//!
@@ -47,14 +47,14 @@
//! Or specifically ...
//!
//! ```ignore
//! let r = hub.projects().locations_capacity_commitments_create(...).doit().await
//! let r = hub.projects().locations_capacity_commitments_get(...).doit().await
//! let r = hub.projects().locations_capacity_commitments_merge(...).doit().await
//! let r = hub.projects().locations_capacity_commitments_patch(...).doit().await
//! let r = hub.projects().locations_reservations_create(...).doit().await
//! let r = hub.projects().locations_reservations_failover_reservation(...).doit().await
//! let r = hub.projects().locations_reservations_get(...).doit().await
//! let r = hub.projects().locations_reservations_patch(...).doit().await
//! ```
//!
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
//! The `doit()` method performs the actual communication with the server and returns the respective result.
//!
@@ -77,36 +77,36 @@
//! extern crate hyper;
//! extern crate hyper_rustls;
//! extern crate google_bigqueryreservation1 as bigqueryreservation1;
//! use bigqueryreservation1::api::CapacityCommitment;
//! use bigqueryreservation1::api::Reservation;
//! use bigqueryreservation1::{Result, Error};
//! use bigqueryreservation1::api::enums::*;
//! # async fn dox() {
//! use std::default::Default;
//! use bigqueryreservation1::{BigQueryReservation, oauth2, hyper, hyper_rustls, chrono, FieldMask};
//!
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // `client_secret`, among other things.
//! let secret: oauth2::ApplicationSecret = Default::default();
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // unless you replace `None` with the desired Flow.
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
//! // retrieve them from storage.
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
//! secret,
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
//! ).build().await.unwrap();
//! let mut hub = BigQueryReservation::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
//! let mut hub = BigQueryReservation::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
//! // As the method needs a request, you would usually fill it with the desired information
//! // into the respective structure. Some of the parts shown here might not be applicable !
//! // Values shown here are possibly random and not representative !
//! let mut req = CapacityCommitment::default();
//! let mut req = Reservation::default();
//!
//! // You can configure optional parameters by calling the respective setters at will, and
//! // execute the final call using `doit()`.
//! // Values shown here are possibly random and not representative !
//! let result = hub.projects().locations_capacity_commitments_create(req, "parent")
//! .enforce_single_admin_project_per_org(false)
//! .capacity_commitment_id("amet.")
//! let result = hub.projects().locations_reservations_create(req, "parent")
//! .reservation_id("ipsum")
//! .doit().await;
//!
//! match result {
@@ -131,10 +131,10 @@
//! ## Handling Errors
//!
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
//! the doit() methods, or handed as possibly intermediate results to either the
//! the doit() methods, or handed as possibly intermediate results to either the
//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
//!
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! makes the system potentially resilient to all kinds of errors.
//!
//! ## Uploads and Downloads
@@ -144,25 +144,25 @@
//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
//! this call: `.param("alt", "media")`.
//!
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
//!
//! ## Customization and Callbacks
//!
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! retry on failure.
//!
//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
//!
//! ## Optional Parts in Server-Requests
//!
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! are valid.
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! the server to indicate either the set parts of the request or the desired parts in the response.
//!
//! ## Builder Arguments