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

File diff suppressed because it is too large Load Diff

205
gen/iap1/src/api/enums.rs Normal file
View File

@@ -0,0 +1,205 @@
use super::*;
// region AttributePropagationSettingOutputCredentialsEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Which output credentials attributes selected by the CEL expression should be propagated in. All attributes will be fully duplicated in each selected output credential.
pub enum AttributePropagationSettingOutputCredentialsEnum {
/// An output credential is required.
///
/// "OUTPUT_CREDENTIALS_UNSPECIFIED"
#[serde(rename="OUTPUT_CREDENTIALS_UNSPECIFIED")]
OUTPUTCREDENTIALSUNSPECIFIED,
/// Propagate attributes in the headers with "x-goog-iap-attr-" prefix.
///
/// "HEADER"
#[serde(rename="HEADER")]
HEADER,
/// Propagate attributes in the JWT of the form: `"additional_claims": { "my_attribute": ["value1", "value2"] }`
///
/// "JWT"
#[serde(rename="JWT")]
JWT,
/// Propagate attributes in the RCToken of the form: `"additional_claims": { "my_attribute": ["value1", "value2"] }`
///
/// "RCTOKEN"
#[serde(rename="RCTOKEN")]
RCTOKEN,
}
impl AsRef<str> for AttributePropagationSettingOutputCredentialsEnum {
fn as_ref(&self) -> &str {
match *self {
AttributePropagationSettingOutputCredentialsEnum::OUTPUTCREDENTIALSUNSPECIFIED => "OUTPUT_CREDENTIALS_UNSPECIFIED",
AttributePropagationSettingOutputCredentialsEnum::HEADER => "HEADER",
AttributePropagationSettingOutputCredentialsEnum::JWT => "JWT",
AttributePropagationSettingOutputCredentialsEnum::RCTOKEN => "RCTOKEN",
}
}
}
impl std::convert::TryFrom< &str> for AttributePropagationSettingOutputCredentialsEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"OUTPUT_CREDENTIALS_UNSPECIFIED" => Ok(AttributePropagationSettingOutputCredentialsEnum::OUTPUTCREDENTIALSUNSPECIFIED),
"HEADER" => Ok(AttributePropagationSettingOutputCredentialsEnum::HEADER),
"JWT" => Ok(AttributePropagationSettingOutputCredentialsEnum::JWT),
"RCTOKEN" => Ok(AttributePropagationSettingOutputCredentialsEnum::RCTOKEN),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AttributePropagationSettingOutputCredentialsEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ReauthSettingMethodEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Reauth method requested.
pub enum ReauthSettingMethodEnum {
/// Reauthentication disabled.
///
/// "METHOD_UNSPECIFIED"
#[serde(rename="METHOD_UNSPECIFIED")]
METHODUNSPECIFIED,
/// Prompts the user to log in again.
///
/// "LOGIN"
#[serde(rename="LOGIN")]
LOGIN,
/// "PASSWORD"
#[serde(rename="PASSWORD")]
PASSWORD,
/// User must use their secure key 2nd factor device.
///
/// "SECURE_KEY"
#[serde(rename="SECURE_KEY")]
SECUREKEY,
/// User can use any enabled 2nd factor.
///
/// "ENROLLED_SECOND_FACTORS"
#[serde(rename="ENROLLED_SECOND_FACTORS")]
ENROLLEDSECONDFACTORS,
}
impl AsRef<str> for ReauthSettingMethodEnum {
fn as_ref(&self) -> &str {
match *self {
ReauthSettingMethodEnum::METHODUNSPECIFIED => "METHOD_UNSPECIFIED",
ReauthSettingMethodEnum::LOGIN => "LOGIN",
ReauthSettingMethodEnum::PASSWORD => "PASSWORD",
ReauthSettingMethodEnum::SECUREKEY => "SECURE_KEY",
ReauthSettingMethodEnum::ENROLLEDSECONDFACTORS => "ENROLLED_SECOND_FACTORS",
}
}
}
impl std::convert::TryFrom< &str> for ReauthSettingMethodEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"METHOD_UNSPECIFIED" => Ok(ReauthSettingMethodEnum::METHODUNSPECIFIED),
"LOGIN" => Ok(ReauthSettingMethodEnum::LOGIN),
"PASSWORD" => Ok(ReauthSettingMethodEnum::PASSWORD),
"SECURE_KEY" => Ok(ReauthSettingMethodEnum::SECUREKEY),
"ENROLLED_SECOND_FACTORS" => Ok(ReauthSettingMethodEnum::ENROLLEDSECONDFACTORS),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ReauthSettingMethodEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ReauthSettingPolicyTypeEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// How IAP determines the effective policy in cases of hierarchical policies. Policies are merged from higher in the hierarchy to lower in the hierarchy.
pub enum ReauthSettingPolicyTypeEnum {
/// Default value. This value is unused.
///
/// "POLICY_TYPE_UNSPECIFIED"
#[serde(rename="POLICY_TYPE_UNSPECIFIED")]
POLICYTYPEUNSPECIFIED,
/// This policy acts as a minimum to other policies, lower in the hierarchy. Effective policy may only be the same or stricter.
///
/// "MINIMUM"
#[serde(rename="MINIMUM")]
MINIMUM,
/// This policy acts as a default if no other reauth policy is set.
///
/// "DEFAULT"
#[serde(rename="DEFAULT")]
DEFAULT,
}
impl AsRef<str> for ReauthSettingPolicyTypeEnum {
fn as_ref(&self) -> &str {
match *self {
ReauthSettingPolicyTypeEnum::POLICYTYPEUNSPECIFIED => "POLICY_TYPE_UNSPECIFIED",
ReauthSettingPolicyTypeEnum::MINIMUM => "MINIMUM",
ReauthSettingPolicyTypeEnum::DEFAULT => "DEFAULT",
}
}
}
impl std::convert::TryFrom< &str> for ReauthSettingPolicyTypeEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"POLICY_TYPE_UNSPECIFIED" => Ok(ReauthSettingPolicyTypeEnum::POLICYTYPEUNSPECIFIED),
"MINIMUM" => Ok(ReauthSettingPolicyTypeEnum::MINIMUM),
"DEFAULT" => Ok(ReauthSettingPolicyTypeEnum::DEFAULT),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ReauthSettingPolicyTypeEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion

116
gen/iap1/src/api/hub.rs Normal file
View File

@@ -0,0 +1,116 @@
use super::*;
/// Central instance to access all CloudIAP related resource activities
///
/// # Examples
///
/// Instantiate a new hub
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_iap1 as iap1;
/// use iap1::api::IdentityAwareProxyClient;
/// use iap1::{Result, Error};
/// use iap1::api::enums::*;
/// # async fn dox() {
/// use std::default::Default;
/// use iap1::{CloudIAP, 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 = CloudIAP::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 = IdentityAwareProxyClient::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().brands_identity_aware_proxy_clients_create(req, "parent")
/// .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 CloudIAP<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 CloudIAP<S> {}
impl<'a, S> CloudIAP<S> {
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> CloudIAP<S> {
CloudIAP {
client,
auth: Box::new(auth),
_user_agent: "google-api-rust-client/5.0.5".to_string(),
_base_url: "https://iap.googleapis.com/".to_string(),
_root_url: "https://iap.googleapis.com/".to_string(),
}
}
pub fn methods(&'a self) -> MethodMethods<'a, S> {
MethodMethods { hub: &self }
}
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://iap.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://iap.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,432 @@
use super::*;
/// A builder providing access to all methods supported on *project* resources.
/// It is not used directly, but through the [`CloudIAP`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_iap1 as iap1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use iap1::{CloudIAP, 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 = CloudIAP::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 `brands_create(...)`, `brands_get(...)`, `brands_identity_aware_proxy_clients_create(...)`, `brands_identity_aware_proxy_clients_delete(...)`, `brands_identity_aware_proxy_clients_get(...)`, `brands_identity_aware_proxy_clients_list(...)`, `brands_identity_aware_proxy_clients_reset_secret(...)`, `brands_list(...)`, `iap_tunnel_locations_dest_groups_create(...)`, `iap_tunnel_locations_dest_groups_delete(...)`, `iap_tunnel_locations_dest_groups_get(...)`, `iap_tunnel_locations_dest_groups_list(...)` and `iap_tunnel_locations_dest_groups_patch(...)`
/// // to build up your call.
/// let rb = hub.projects();
/// # }
/// ```
pub struct ProjectMethods<'a, S>
where S: 'a {
pub(super) hub: &'a CloudIAP<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 an Identity Aware Proxy (IAP) OAuth client. The client is owned by IAP. Requires that the brand for the project exists and that it is set for internal-only use.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. Path to create the client in. In the following format: projects/{project_number/id}/brands/{brand}. The project must belong to a G Suite account.
pub fn brands_identity_aware_proxy_clients_create(&self, request: IdentityAwareProxyClient, parent: &str) -> ProjectBrandIdentityAwareProxyClientCreateCall<'a, S> {
ProjectBrandIdentityAwareProxyClientCreateCall {
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:
///
/// Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing obsolete clients, managing the number of clients in a given project, and cleaning up after tests. Requires that the client is owned by IAP.
///
/// # Arguments
///
/// * `name` - Required. Name of the Identity Aware Proxy client to be deleted. In the following format: projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
pub fn brands_identity_aware_proxy_clients_delete(&self, name: &str) -> ProjectBrandIdentityAwareProxyClientDeleteCall<'a, S> {
ProjectBrandIdentityAwareProxyClientDeleteCall {
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:
///
/// Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.
///
/// # Arguments
///
/// * `name` - Required. Name of the Identity Aware Proxy client to be fetched. In the following format: projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
pub fn brands_identity_aware_proxy_clients_get(&self, name: &str) -> ProjectBrandIdentityAwareProxyClientGetCall<'a, S> {
ProjectBrandIdentityAwareProxyClientGetCall {
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 the existing clients for the brand.
///
/// # Arguments
///
/// * `parent` - Required. Full brand path. In the following format: projects/{project_number/id}/brands/{brand}.
pub fn brands_identity_aware_proxy_clients_list(&self, parent: &str) -> ProjectBrandIdentityAwareProxyClientListCall<'a, S> {
ProjectBrandIdentityAwareProxyClientListCall {
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:
///
/// Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. Name of the Identity Aware Proxy client to that will have its secret reset. In the following format: projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
pub fn brands_identity_aware_proxy_clients_reset_secret(&self, request: ResetIdentityAwareProxyClientSecretRequest, name: &str) -> ProjectBrandIdentityAwareProxyClientResetSecretCall<'a, S> {
ProjectBrandIdentityAwareProxyClientResetSecretCall {
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:
///
/// Constructs a new OAuth brand for the project if one does not exist. The created brand is "internal only", meaning that OAuth clients created under it only accept requests from users who belong to the same Google Workspace organization as the project. The brand is created in an un-reviewed status. NOTE: The "internal only" status can be manually changed in the Google Cloud Console. Requires that a brand does not already exist for the project, and that the specified support email is owned by the caller.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. GCP Project number/id under which the brand is to be created. In the following format: projects/{project_number/id}.
pub fn brands_create(&self, request: Brand, parent: &str) -> ProjectBrandCreateCall<'a, S> {
ProjectBrandCreateCall {
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:
///
/// Retrieves the OAuth brand of the project.
///
/// # Arguments
///
/// * `name` - Required. Name of the brand to be fetched. In the following format: projects/{project_number/id}/brands/{brand}.
pub fn brands_get(&self, name: &str) -> ProjectBrandGetCall<'a, S> {
ProjectBrandGetCall {
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 the existing brands for the project.
///
/// # Arguments
///
/// * `parent` - Required. GCP Project number/id. In the following format: projects/{project_number/id}.
pub fn brands_list(&self, parent: &str) -> ProjectBrandListCall<'a, S> {
ProjectBrandListCall {
hub: self.hub,
_parent: parent.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new TunnelDestGroup.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. Google Cloud Project ID and location. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}`.
pub fn iap_tunnel_locations_dest_groups_create(&self, request: TunnelDestGroup, parent: &str) -> ProjectIapTunnelLocationDestGroupCreateCall<'a, S> {
ProjectIapTunnelLocationDestGroupCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_tunnel_dest_group_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 TunnelDestGroup.
///
/// # Arguments
///
/// * `name` - Required. Name of the TunnelDestGroup to delete. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
pub fn iap_tunnel_locations_dest_groups_delete(&self, name: &str) -> ProjectIapTunnelLocationDestGroupDeleteCall<'a, S> {
ProjectIapTunnelLocationDestGroupDeleteCall {
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:
///
/// Retrieves an existing TunnelDestGroup.
///
/// # Arguments
///
/// * `name` - Required. Name of the TunnelDestGroup to be fetched. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
pub fn iap_tunnel_locations_dest_groups_get(&self, name: &str) -> ProjectIapTunnelLocationDestGroupGetCall<'a, S> {
ProjectIapTunnelLocationDestGroupGetCall {
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 the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`
///
/// # Arguments
///
/// * `parent` - Required. Google Cloud Project ID and location. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}`. A `-` can be used for the location to group across all locations.
pub fn iap_tunnel_locations_dest_groups_list(&self, parent: &str) -> ProjectIapTunnelLocationDestGroupListCall<'a, S> {
ProjectIapTunnelLocationDestGroupListCall {
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 a TunnelDestGroup.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).
pub fn iap_tunnel_locations_dest_groups_patch(&self, request: TunnelDestGroup, name: &str) -> ProjectIapTunnelLocationDestGroupPatchCall<'a, S> {
ProjectIapTunnelLocationDestGroupPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}
/// A builder providing access to all free methods, which are not associated with a particular resource.
/// It is not used directly, but through the [`CloudIAP`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_iap1 as iap1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use iap1::{CloudIAP, 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 = CloudIAP::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 `get_iam_policy(...)`, `get_iap_settings(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `update_iap_settings(...)` and `validate_attribute_expression(...)`
/// // to build up your call.
/// let rb = hub.methods();
/// # }
/// ```
pub struct MethodMethods<'a, S>
where S: 'a {
pub(super) hub: &'a CloudIAP<S>,
}
impl<'a, S> client::MethodsBuilder for MethodMethods<'a, S> {}
impl<'a, S> MethodMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Gets the access control policy for an Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> MethodGetIamPolicyCall<'a, S> {
MethodGetIamPolicyCall {
hub: self.hub,
_request: request,
_resource: resource.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Gets the IAP settings on a particular IAP protected resource.
///
/// # Arguments
///
/// * `name` - Required. The resource name for which to retrieve the settings. Authorization: Requires the `getSettings` permission for the associated resource.
pub fn get_iap_settings(&self, name: &str) -> MethodGetIapSettingCall<'a, S> {
MethodGetIapSettingCall {
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:
///
/// Sets the access control policy for an Identity-Aware Proxy protected resource. Replaces any existing policy. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> MethodSetIamPolicyCall<'a, S> {
MethodSetIamPolicyCall {
hub: self.hub,
_request: request,
_resource: resource.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns permissions that a caller has on the Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> MethodTestIamPermissionCall<'a, S> {
MethodTestIamPermissionCall {
hub: self.hub,
_request: request,
_resource: resource.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the `update_mask` is set.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. The resource name of the IAP protected resource.
pub fn update_iap_settings(&self, request: IapSettings, name: &str) -> MethodUpdateIapSettingCall<'a, S> {
MethodUpdateIapSettingCall {
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:
///
/// Validates that a given CEL expression conforms to IAP restrictions.
///
/// # Arguments
///
/// * `name` - Required. The resource name of the IAP protected resource.
pub fn validate_attribute_expression(&self, name: &str) -> MethodValidateAttributeExpressionCall<'a, S> {
MethodValidateAttributeExpressionCall {
hub: self.hub,
_name: name.to_string(),
_expression: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}

35
gen/iap1/src/api/mod.rs Normal file
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::*;

699
gen/iap1/src/api/schemas.rs Normal file
View File

@@ -0,0 +1,699 @@
use super::*;
/// Custom content configuration for access denied page. IAP allows customers to define a custom URI to use as the error page when access is denied to users. If IAP prevents access to this page, the default IAP error page will be displayed instead.
///
/// 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 AccessDeniedPageSettings {
/// The URI to be redirected to when access is denied.
#[serde(rename="accessDeniedPageUri")]
pub access_denied_page_uri: Option<String>,
/// Whether to generate a troubleshooting URL on access denied events to this application.
#[serde(rename="generateTroubleshootingUri")]
pub generate_troubleshooting_uri: Option<bool>,
/// Whether to generate remediation token on access denied events to this application.
#[serde(rename="remediationTokenGenerationEnabled")]
pub remediation_token_generation_enabled: Option<bool>,
}
impl client::Part for AccessDeniedPageSettings {}
/// Access related settings for IAP protected apps.
///
/// 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 AccessSettings {
/// Settings to configure and enable allowed domains.
#[serde(rename="allowedDomainsSettings")]
pub allowed_domains_settings: Option<AllowedDomainsSettings>,
/// Configuration to allow cross-origin requests via IAP.
#[serde(rename="corsSettings")]
pub cors_settings: Option<CorsSettings>,
/// GCIP claims and endpoint configurations for 3p identity providers.
#[serde(rename="gcipSettings")]
pub gcip_settings: Option<GcipSettings>,
/// Settings to configure IAP's OAuth behavior.
#[serde(rename="oauthSettings")]
pub oauth_settings: Option<OAuthSettings>,
/// Settings to configure Policy delegation for apps hosted in tenant projects. INTERNAL_ONLY.
#[serde(rename="policyDelegationSettings")]
pub policy_delegation_settings: Option<PolicyDelegationSettings>,
/// Settings to configure reauthentication policies in IAP.
#[serde(rename="reauthSettings")]
pub reauth_settings: Option<ReauthSettings>,
}
impl client::Part for AccessSettings {}
/// Configuration for IAP allowed domains. Lets you to restrict access to an app and allow access to only the domains that you list.
///
/// 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 AllowedDomainsSettings {
/// List of trusted domains.
pub domains: Option<Vec<String>>,
/// Configuration for customers to opt in for the feature.
pub enable: Option<bool>,
}
impl client::Part for AllowedDomainsSettings {}
/// Wrapper over application specific settings for IAP.
///
/// 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 ApplicationSettings {
/// Customization for Access Denied page.
#[serde(rename="accessDeniedPageSettings")]
pub access_denied_page_settings: Option<AccessDeniedPageSettings>,
/// Settings to configure attribute propagation.
#[serde(rename="attributePropagationSettings")]
pub attribute_propagation_settings: Option<AttributePropagationSettings>,
/// The Domain value to set for cookies generated by IAP. This value is not validated by the API, but will be ignored at runtime if invalid.
#[serde(rename="cookieDomain")]
pub cookie_domain: Option<String>,
/// Settings to configure IAP's behavior for a service mesh.
#[serde(rename="csmSettings")]
pub csm_settings: Option<CsmSettings>,
}
impl client::Part for ApplicationSettings {}
/// Configuration for propagating attributes to applications protected by IAP.
///
/// 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 AttributePropagationSettings {
/// Whether the provided attribute propagation settings should be evaluated on user requests. If set to true, attributes returned from the expression will be propagated in the set output credentials.
pub enable: Option<bool>,
/// Raw string CEL expression. Must return a list of attributes. A maximum of 45 attributes can be selected. Expressions can select different attribute types from `attributes`: `attributes.saml_attributes`, `attributes.iap_attributes`. The following functions are supported: - filter `.filter(, )`: Returns a subset of `` where `` is true for every item. - in ` in `: Returns true if `` contains ``. - selectByName `.selectByName()`: Returns the attribute in `` with the given `` name, otherwise returns empty. - emitAs `.emitAs()`: Sets the `` name field to the given `` for propagation in selected output credentials. - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix for the provided `` when propagating with the `HEADER` output credential, such as request headers. - append `.append()` OR `.append()`: Appends the provided `` or `` to the end of ``. Example expression: `attributes.saml_attributes.filter(x, x.name in ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())`
pub expression: Option<String>,
/// Which output credentials attributes selected by the CEL expression should be propagated in. All attributes will be fully duplicated in each selected output credential.
#[serde(rename="outputCredentials")]
pub output_credentials: Option<Vec<AttributePropagationSettingOutputCredentialsEnum>>,
}
impl client::Part for AttributePropagationSettings {}
/// Associates `members`, or principals, with a `role`.
///
/// 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 Binding {
/// The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
pub condition: Option<Expr>,
/// Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
pub members: Option<Vec<String>>,
/// Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
pub role: Option<String>,
}
impl client::Part for Binding {}
/// OAuth brand data. NOTE: Only contains a portion of the data that describes a brand.
///
/// # 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*).
///
/// * [brands create projects](ProjectBrandCreateCall) (request|response)
/// * [brands get projects](ProjectBrandGetCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Brand {
/// Application name displayed on OAuth consent screen.
#[serde(rename="applicationTitle")]
pub application_title: Option<String>,
/// Output only. Identifier of the brand. NOTE: GCP project number achieves the same brand identification purpose as only one brand per project can be created.
pub name: Option<String>,
/// Output only. Whether the brand is only intended for usage inside the G Suite organization only.
#[serde(rename="orgInternalOnly")]
pub org_internal_only: Option<bool>,
/// Support email displayed on the OAuth consent screen.
#[serde(rename="supportEmail")]
pub support_email: Option<String>,
}
impl client::RequestValue for Brand {}
impl client::ResponseResult for Brand {}
/// Allows customers to configure HTTP request paths that'll allow HTTP OPTIONS call to bypass authentication and authorization.
///
/// 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 CorsSettings {
/// Configuration to allow HTTP OPTIONS calls to skip authorization. If undefined, IAP will not apply any special logic to OPTIONS requests.
#[serde(rename="allowHttpOptions")]
pub allow_http_options: Option<bool>,
}
impl client::Part for CorsSettings {}
/// Configuration for RCToken generated for service mesh workloads protected by IAP. RCToken are IAP generated JWTs that can be verified at the application. The RCToken is primarily used for service mesh deployments, and can be scoped to a single mesh by configuring the audience field accordingly.
///
/// 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 CsmSettings {
/// Audience claim set in the generated RCToken. This value is not validated by IAP.
#[serde(rename="rctokenAud")]
pub rctoken_aud: Option<String>,
}
impl client::Part for CsmSettings {}
/// 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*).
///
/// * [brands identity aware proxy clients delete projects](ProjectBrandIdentityAwareProxyClientDeleteCall) (response)
/// * [iap_tunnel locations dest groups delete projects](ProjectIapTunnelLocationDestGroupDeleteCall) (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 {}
/// Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
///
/// 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 Expr {
/// Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
pub description: Option<String>,
/// Textual representation of an expression in Common Expression Language syntax.
pub expression: Option<String>,
/// Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
pub location: Option<String>,
/// Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
pub title: Option<String>,
}
impl client::Part for Expr {}
/// Allows customers to configure tenant_id for GCIP instance per-app.
///
/// 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 GcipSettings {
/// Login page URI associated with the GCIP tenants. Typically, all resources within the same project share the same login page, though it could be overridden at the sub resource level.
#[serde(rename="loginPageUri")]
pub login_page_uri: Option<String>,
/// GCIP tenant ids that are linked to the IAP resource. tenant_ids could be a string beginning with a number character to indicate authenticating with GCIP tenant flow, or in the format of _ to indicate authenticating with GCIP agent flow. If agent flow is used, tenant_ids should only contain one single element, while for tenant flow, tenant_ids can contain multiple elements.
#[serde(rename="tenantIds")]
pub tenant_ids: Option<Vec<String>>,
}
impl client::Part for GcipSettings {}
/// Request message for `GetIamPolicy` method.
///
/// # 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*).
///
/// * [get iam policy](MethodGetIamPolicyCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct GetIamPolicyRequest {
/// OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
pub options: Option<GetPolicyOptions>,
}
impl client::RequestValue for GetIamPolicyRequest {}
/// Encapsulates settings provided to GetIamPolicy.
///
/// 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 GetPolicyOptions {
/// Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
#[serde(rename="requestedPolicyVersion")]
pub requested_policy_version: Option<i32>,
}
impl client::Part for GetPolicyOptions {}
/// The IAP configurable settings.
///
/// # 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*).
///
/// * [get iap settings](MethodGetIapSettingCall) (response)
/// * [update iap settings](MethodUpdateIapSettingCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct IapSettings {
/// Top level wrapper for all access related setting in IAP
#[serde(rename="accessSettings")]
pub access_settings: Option<AccessSettings>,
/// Top level wrapper for all application related settings in IAP
#[serde(rename="applicationSettings")]
pub application_settings: Option<ApplicationSettings>,
/// Required. The resource name of the IAP protected resource.
pub name: Option<String>,
}
impl client::RequestValue for IapSettings {}
impl client::ResponseResult for IapSettings {}
/// Contains the data that describes an Identity Aware Proxy owned client.
///
/// # 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*).
///
/// * [brands identity aware proxy clients create projects](ProjectBrandIdentityAwareProxyClientCreateCall) (request|response)
/// * [brands identity aware proxy clients get projects](ProjectBrandIdentityAwareProxyClientGetCall) (response)
/// * [brands identity aware proxy clients reset secret projects](ProjectBrandIdentityAwareProxyClientResetSecretCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct IdentityAwareProxyClient {
/// Human-friendly name given to the OAuth client.
#[serde(rename="displayName")]
pub display_name: Option<String>,
/// Output only. Unique identifier of the OAuth client.
pub name: Option<String>,
/// Output only. Client secret of the OAuth client.
pub secret: Option<String>,
}
impl client::RequestValue for IdentityAwareProxyClient {}
impl client::ResponseResult for IdentityAwareProxyClient {}
/// Response message for ListBrands.
///
/// # 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*).
///
/// * [brands list projects](ProjectBrandListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListBrandsResponse {
/// Brands existing in the project.
pub brands: Option<Vec<Brand>>,
}
impl client::ResponseResult for ListBrandsResponse {}
/// Response message for ListIdentityAwareProxyClients.
///
/// # 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*).
///
/// * [brands identity aware proxy clients list projects](ProjectBrandIdentityAwareProxyClientListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListIdentityAwareProxyClientsResponse {
/// Clients existing in the brand.
#[serde(rename="identityAwareProxyClients")]
pub identity_aware_proxy_clients: Option<Vec<IdentityAwareProxyClient>>,
/// A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for ListIdentityAwareProxyClientsResponse {}
/// The response from ListTunnelDestGroups.
///
/// # 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*).
///
/// * [iap_tunnel locations dest groups list projects](ProjectIapTunnelLocationDestGroupListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListTunnelDestGroupsResponse {
/// A token that you can send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// TunnelDestGroup existing in the project.
#[serde(rename="tunnelDestGroups")]
pub tunnel_dest_groups: Option<Vec<TunnelDestGroup>>,
}
impl client::ResponseResult for ListTunnelDestGroupsResponse {}
/// Configuration for OAuth login&consent flow behavior as well as for OAuth Credentials.
///
/// 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 OAuthSettings {
/// Domain hint to send as hd=? parameter in OAuth request flow. Enables redirect to primary IDP by skipping Google's login screen. https://developers.google.com/identity/protocols/OpenIDConnect#hd-param Note: IAP does not verify that the id token's hd claim matches this value since access behavior is managed by IAM policies.
#[serde(rename="loginHint")]
pub login_hint: Option<String>,
/// List of client ids allowed to use IAP programmatically.
#[serde(rename="programmaticClients")]
pub programmatic_clients: Option<Vec<String>>,
}
impl client::Part for OAuthSettings {}
/// An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** `{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }` **YAML example:** `bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
///
/// # 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*).
///
/// * [get iam policy](MethodGetIamPolicyCall) (response)
/// * [set iam policy](MethodSetIamPolicyCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Policy {
/// Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
pub bindings: Option<Vec<Binding>>,
/// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
pub etag: Option<Vec<u8>>,
/// Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
pub version: Option<i32>,
}
impl client::ResponseResult for Policy {}
/// PolicyDelegationConfig allows google-internal teams to use IAP for apps hosted in a tenant project. Using these settings, the app can delegate permission check to happen against the linked customer project. This is only ever supposed to be used by google internal teams, hence the restriction on the proto.
///
/// 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 PolicyDelegationSettings {
/// Permission to check in IAM.
#[serde(rename="iamPermission")]
pub iam_permission: Option<String>,
/// The DNS name of the service (e.g. "resourcemanager.googleapis.com"). This should be the domain name part of the full resource names (see https://aip.dev/122#full-resource-names), which is usually the same as IamServiceSpec.service of the service where the resource type is defined.
#[serde(rename="iamServiceName")]
pub iam_service_name: Option<String>,
/// Policy name to be checked
#[serde(rename="policyName")]
pub policy_name: Option<PolicyName>,
/// IAM resource to check permission on
pub resource: Option<Resource>,
}
impl client::Part for PolicyDelegationSettings {}
/// An internal name for an IAM policy, based on the resource to which the policy applies. Not to be confused with a resource's external full resource name. For more information on this distinction, see go/iam-full-resource-names.
///
/// 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 PolicyName {
/// Identifies an instance of the type. ID format varies by type. The ID format is defined in the IAM .service file that defines the type, either in path_mapping or in a comment.
pub id: Option<String>,
/// For Cloud IAM: The location of the Policy. Must be empty or "global" for Policies owned by global IAM. Must name a region from prodspec/cloud-iam-cloudspec for Regional IAM Policies, see go/iam-faq#where-is-iam-currently-deployed. For Local IAM: This field should be set to "local".
pub region: Option<String>,
/// Resource type. Types are defined in IAM's .service files. Valid values for type might be 'gce', 'gcs', 'project', 'account' etc.
#[serde(rename="type")]
pub type_: Option<String>,
}
impl client::Part for PolicyName {}
/// Configuration for IAP reauthentication policies.
///
/// 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 ReauthSettings {
/// Reauth session lifetime, how long before a user has to reauthenticate again.
#[serde(rename="maxAge")]
#[serde_as(as = "Option<::client::serde::duration::Wrapper>")]
pub max_age: Option<client::chrono::Duration>,
/// Reauth method requested.
pub method: Option<ReauthSettingMethodEnum>,
/// How IAP determines the effective policy in cases of hierarchical policies. Policies are merged from higher in the hierarchy to lower in the hierarchy.
#[serde(rename="policyType")]
pub policy_type: Option<ReauthSettingPolicyTypeEnum>,
}
impl client::Part for ReauthSettings {}
/// The request sent to ResetIdentityAwareProxyClientSecret.
///
/// # 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*).
///
/// * [brands identity aware proxy clients reset secret projects](ProjectBrandIdentityAwareProxyClientResetSecretCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ResetIdentityAwareProxyClientSecretRequest { _never_set: Option<bool> }
impl client::RequestValue for ResetIdentityAwareProxyClientSecretRequest {}
/// There is no detailed description.
///
/// 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 Resource {
/// The proto or JSON formatted expected next state of the resource, wrapped in a google.protobuf.Any proto, against which the policy rules are evaluated. Services not integrated with custom org policy can omit this field. Services integrated with custom org policy must populate this field for all requests where the API call changes the state of the resource. Custom org policy backend uses these attributes to enforce custom org policies. When a proto is wrapped, it is generally the One Platform API proto. When a JSON string is wrapped, use `google.protobuf.StringValue` for the inner value. For create operations, GCP service is expected to pass resource from customer request as is. For update/patch operations, GCP service is expected to compute the next state with the patch provided by the user. See go/custom-constraints-org-policy-integration-guide for additional details.
#[serde(rename="expectedNextState")]
pub expected_next_state: Option<HashMap<String, json::Value>>,
/// The service defined labels of the resource on which the conditions will be evaluated. The semantics - including the key names - are vague to IAM. If the effective condition has a reference to a `resource.labels[foo]` construct, IAM consults with this map to retrieve the values associated with `foo` key for Conditions evaluation. If the provided key is not found in the labels map, the condition would evaluate to false. This field is in limited use. If your intended use case is not expected to express resource.labels attribute in IAM Conditions, leave this field empty. Before planning on using this attribute please: * Read go/iam-conditions-labels-comm and ensure your service can meet the data availability and management requirements. * Talk to iam-conditions-eng@ about your use case.
pub labels: Option<HashMap<String, String>>,
/// The **relative** name of the resource, which is the URI path of the resource without the leading "/". See https://cloud.google.com/iam/docs/conditions-resource-attributes#resource-name for examples used by other GCP Services. This field is **required** for services integrated with resource-attribute-based IAM conditions and/or CustomOrgPolicy. This field requires special handling for parents-only permissions such as `create` and `list`. See the document linked below for further details. See go/iam-conditions-sig-g3#populate-resource-attributes for specific details on populating this field.
pub name: Option<String>,
/// The name of the service this resource belongs to. It is configured using the official_service_name of the Service as defined in service configurations under //configs/cloud/resourcetypes. For example, the official_service_name of cloud resource manager service is set as 'cloudresourcemanager.googleapis.com' according to //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml This field is **required** for services integrated with resource-attribute-based IAM conditions and/or CustomOrgPolicy. This field requires special handling for parents-only permissions such as `create` and `list`. See the document linked below for further details. See go/iam-conditions-sig-g3#populate-resource-attributes for specific details on populating this field.
pub service: Option<String>,
/// The public resource type name of the resource. It is configured using the official_name of the ResourceType as defined in service configurations under //configs/cloud/resourcetypes. For example, the official_name for GCP projects is set as 'cloudresourcemanager.googleapis.com/Project' according to //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml This field is **required** for services integrated with resource-attribute-based IAM conditions and/or CustomOrgPolicy. This field requires special handling for parents-only permissions such as `create` and `list`. See the document linked below for further details. See go/iam-conditions-sig-g3#populate-resource-attributes for specific details on populating this field.
#[serde(rename="type")]
pub type_: Option<String>,
}
impl client::Part for Resource {}
/// Request message for `SetIamPolicy` method.
///
/// # 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*).
///
/// * [set iam policy](MethodSetIamPolicyCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SetIamPolicyRequest {
/// REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
pub policy: Option<Policy>,
}
impl client::RequestValue for SetIamPolicyRequest {}
/// Request message for `TestIamPermissions` method.
///
/// # 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*).
///
/// * [test iam permissions](MethodTestIamPermissionCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TestIamPermissionsRequest {
/// The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
pub permissions: Option<Vec<String>>,
}
impl client::RequestValue for TestIamPermissionsRequest {}
/// Response message for `TestIamPermissions` method.
///
/// # 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*).
///
/// * [test iam permissions](MethodTestIamPermissionCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TestIamPermissionsResponse {
/// A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
pub permissions: Option<Vec<String>>,
}
impl client::ResponseResult for TestIamPermissionsResponse {}
/// A TunnelDestGroup.
///
/// # 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*).
///
/// * [iap_tunnel locations dest groups create projects](ProjectIapTunnelLocationDestGroupCreateCall) (request|response)
/// * [iap_tunnel locations dest groups get projects](ProjectIapTunnelLocationDestGroupGetCall) (response)
/// * [iap_tunnel locations dest groups patch projects](ProjectIapTunnelLocationDestGroupPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TunnelDestGroup {
/// Unordered list. List of CIDRs that this group applies to.
pub cidrs: Option<Vec<String>>,
/// Unordered list. List of FQDNs that this group applies to.
pub fqdns: Option<Vec<String>>,
/// Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).
pub name: Option<String>,
}
impl client::RequestValue for TunnelDestGroup {}
impl client::ResponseResult for TunnelDestGroup {}
/// API requires a return message, but currently all response strings will fit in the status and public message. In the future, this response can hold AST validation info.
///
/// # 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*).
///
/// * [validate attribute expression](MethodValidateAttributeExpressionCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ValidateIapAttributeExpressionResponse { _never_set: Option<bool> }
impl client::ResponseResult for ValidateIapAttributeExpressionResponse {}

View File

@@ -0,0 +1,24 @@
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 {
/// 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::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
}
}
}
impl Default for Scope {
fn default() -> Scope {
Scope::CloudPlatform
}
}

View File

@@ -2,14 +2,14 @@
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *Cloud IAP* crate version *5.0.4+20240224*, where *20240224* is the exact revision of the *iap:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
//! This documentation was generated from *Cloud IAP* crate version *5.0.5+20240412*, where *20240412* is the exact revision of the *iap:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
//!
//! Everything else about the *Cloud IAP* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/iap).
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/iap1).
//! # Features
//!
//! Handle the following *Resources* with ease from the central [hub](CloudIAP) ...
//! Handle the following *Resources* with ease from the central [hub](CloudIAP) ...
//!
//! * projects
//! * [*brands create*](api::ProjectBrandCreateCall), [*brands get*](api::ProjectBrandGetCall), [*brands identity aware proxy clients create*](api::ProjectBrandIdentityAwareProxyClientCreateCall), [*brands identity aware proxy clients delete*](api::ProjectBrandIdentityAwareProxyClientDeleteCall), [*brands identity aware proxy clients get*](api::ProjectBrandIdentityAwareProxyClientGetCall), [*brands identity aware proxy clients list*](api::ProjectBrandIdentityAwareProxyClientListCall), [*brands identity aware proxy clients reset secret*](api::ProjectBrandIdentityAwareProxyClientResetSecretCall), [*brands list*](api::ProjectBrandListCall), [*iap_tunnel locations dest groups create*](api::ProjectIapTunnelLocationDestGroupCreateCall), [*iap_tunnel locations dest groups delete*](api::ProjectIapTunnelLocationDestGroupDeleteCall), [*iap_tunnel locations dest groups get*](api::ProjectIapTunnelLocationDestGroupGetCall), [*iap_tunnel locations dest groups list*](api::ProjectIapTunnelLocationDestGroupListCall) and [*iap_tunnel locations dest groups patch*](api::ProjectIapTunnelLocationDestGroupPatchCall)
@@ -60,8 +60,8 @@
//! let r = hub.projects().brands_identity_aware_proxy_clients_reset_secret(...).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.
//!
@@ -86,23 +86,24 @@
//! extern crate google_iap1 as iap1;
//! use iap1::api::IdentityAwareProxyClient;
//! use iap1::{Result, Error};
//! use iap1::api::enums::*;
//! # async fn dox() {
//! use std::default::Default;
//! use iap1::{CloudIAP, 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 = CloudIAP::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
//! let mut hub = CloudIAP::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 !
@@ -136,10 +137,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
@@ -149,25 +150,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