#[non_exhaustive]pub struct GenerateIdTokenRequest {
pub name: String,
pub delegates: Vec<String>,
pub audience: String,
pub include_email: bool,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The resource name of the service account for which the credentials
are requested, in the following format:
projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard
character is required; replacing it with a project ID is invalid.
delegates: Vec<String>The sequence of service accounts in a delegation chain. Each service
account must be granted the roles/iam.serviceAccountTokenCreator role
on its next service account in the chain. The last service account in the
chain must be granted the roles/iam.serviceAccountTokenCreator role
on the service account that is specified in the name field of the
request.
The delegates must have the following format:
projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard
character is required; replacing it with a project ID is invalid.
audience: StringRequired. The audience for the token, such as the API or account that this token grants access to.
include_email: boolInclude the service account email in the token. If set to true, the
token will contain email and email_verified claims.
Implementations§
Source§impl GenerateIdTokenRequest
impl GenerateIdTokenRequest
pub fn new() -> Self
Sourcepub fn set_delegates<T, V>(self, v: T) -> Self
pub fn set_delegates<T, V>(self, v: T) -> Self
Sourcepub fn set_audience<T: Into<String>>(self, v: T) -> Self
pub fn set_audience<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_include_email<T: Into<bool>>(self, v: T) -> Self
pub fn set_include_email<T: Into<bool>>(self, v: T) -> Self
Sets the value of include_email.
§Example
let x = GenerateIdTokenRequest::new().set_include_email(true);Trait Implementations§
Source§impl Clone for GenerateIdTokenRequest
impl Clone for GenerateIdTokenRequest
Source§fn clone(&self) -> GenerateIdTokenRequest
fn clone(&self) -> GenerateIdTokenRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more