#[non_exhaustive]pub struct UserCreds {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub state: State,
pub secure_password: String,
pub user_creds_identity: Option<UserCredsIdentity>,
/* private fields */
}Expand description
A Cloud Firestore User Creds.
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: StringIdentifier. The resource name of the UserCreds.
Format:
projects/{project}/databases/{database}/userCreds/{user_creds}
create_time: Option<Timestamp>Output only. The time the user creds were created.
update_time: Option<Timestamp>Output only. The time the user creds were last updated.
state: StateOutput only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation.
secure_password: StringOutput only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword.
user_creds_identity: Option<UserCredsIdentity>Identity associated with this User Creds.
Implementations§
Source§impl UserCreds
impl UserCreds
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = UserCreds::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = UserCreds::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = UserCreds::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = UserCreds::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = UserCreds::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = UserCreds::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_secure_password<T: Into<String>>(self, v: T) -> Self
pub fn set_secure_password<T: Into<String>>(self, v: T) -> Self
Sets the value of secure_password.
§Example
let x = UserCreds::new().set_secure_password("example");Sourcepub fn set_user_creds_identity<T: Into<Option<UserCredsIdentity>>>(
self,
v: T,
) -> Self
pub fn set_user_creds_identity<T: Into<Option<UserCredsIdentity>>>( self, v: T, ) -> Self
Sets the value of user_creds_identity.
Note that all the setters affecting user_creds_identity are mutually
exclusive.
§Example
use google_cloud_firestore_admin_v1::model::user_creds::ResourceIdentity;
let x = UserCreds::new().set_user_creds_identity(Some(
google_cloud_firestore_admin_v1::model::user_creds::UserCredsIdentity::ResourceIdentity(ResourceIdentity::default().into())));Sourcepub fn resource_identity(&self) -> Option<&Box<ResourceIdentity>>
pub fn resource_identity(&self) -> Option<&Box<ResourceIdentity>>
The value of user_creds_identity
if it holds a ResourceIdentity, None if the field is not set or
holds a different branch.
Sourcepub fn set_resource_identity<T: Into<Box<ResourceIdentity>>>(self, v: T) -> Self
pub fn set_resource_identity<T: Into<Box<ResourceIdentity>>>(self, v: T) -> Self
Sets the value of user_creds_identity
to hold a ResourceIdentity.
Note that all the setters affecting user_creds_identity are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::user_creds::ResourceIdentity;
let x = UserCreds::new().set_resource_identity(ResourceIdentity::default()/* use setters */);
assert!(x.resource_identity().is_some());