#[non_exhaustive]pub struct User {
pub kind: String,
pub password: String,
pub etag: String,
pub name: String,
pub host: String,
pub instance: String,
pub project: String,
pub type: SqlUserType,
pub password_policy: Option<UserPasswordValidationPolicy>,
pub dual_password_type: Option<DualPasswordType>,
pub user_details: Option<UserDetails>,
/* private fields */
}Expand description
A Cloud SQL user resource.
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.kind: StringThis is always sql#user.
password: StringThe password for the user.
etag: StringThis field is deprecated and will be removed from a future version of the API.
name: StringThe name of the user in the Cloud SQL instance. Can be omitted for
update because it is already specified in the URL.
host: StringOptional. The host from which the user can connect. For insert
operations, host defaults to an empty string. For update
operations, host is specified as part of the request URL. The host name
cannot be updated after insertion. For a MySQL instance, it’s required;
for a PostgreSQL or SQL Server instance, it’s optional.
instance: StringThe name of the Cloud SQL instance. This does not include the project ID.
Can be omitted for update because it is already specified on the
URL.
project: StringThe project ID of the project containing the Cloud SQL database. The Google
apps domain is prefixed if applicable. Can be omitted for update because
it is already specified on the URL.
type: SqlUserTypeThe user type. It determines the method to authenticate the user during login. The default is the database’s built-in user type.
password_policy: Option<UserPasswordValidationPolicy>User level password validation policy.
dual_password_type: Option<DualPasswordType>Dual password status for the user.
user_details: Option<UserDetails>User details for specific database type
Implementations§
Source§impl User
impl User
pub fn new() -> Self
Sourcepub fn set_password<T: Into<String>>(self, v: T) -> Self
pub fn set_password<T: Into<String>>(self, v: T) -> Self
Sets the value of password.
Sourcepub fn set_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_instance<T: Into<String>>(self, v: T) -> Self
Sets the value of instance.
Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sets the value of project.
Sourcepub fn set_type<T: Into<SqlUserType>>(self, v: T) -> Self
pub fn set_type<T: Into<SqlUserType>>(self, v: T) -> Self
Sets the value of r#type.
Sourcepub fn set_password_policy<T>(self, v: T) -> Selfwhere
T: Into<UserPasswordValidationPolicy>,
pub fn set_password_policy<T>(self, v: T) -> Selfwhere
T: Into<UserPasswordValidationPolicy>,
Sets the value of password_policy.
Sourcepub fn set_or_clear_password_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<UserPasswordValidationPolicy>,
pub fn set_or_clear_password_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<UserPasswordValidationPolicy>,
Sets or clears the value of password_policy.
Sourcepub fn set_dual_password_type<T>(self, v: T) -> Selfwhere
T: Into<DualPasswordType>,
pub fn set_dual_password_type<T>(self, v: T) -> Selfwhere
T: Into<DualPasswordType>,
Sets the value of dual_password_type.
Sourcepub fn set_or_clear_dual_password_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<DualPasswordType>,
pub fn set_or_clear_dual_password_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<DualPasswordType>,
Sets or clears the value of dual_password_type.
Sourcepub fn set_user_details<T: Into<Option<UserDetails>>>(self, v: T) -> Self
pub fn set_user_details<T: Into<Option<UserDetails>>>(self, v: T) -> Self
Sets the value of user_details.
Note that all the setters affecting user_details are mutually
exclusive.
Sourcepub fn sqlserver_user_details(&self) -> Option<&Box<SqlServerUserDetails>>
pub fn sqlserver_user_details(&self) -> Option<&Box<SqlServerUserDetails>>
The value of user_details
if it holds a SqlserverUserDetails, None if the field is not set or
holds a different branch.
Sourcepub fn set_sqlserver_user_details<T: Into<Box<SqlServerUserDetails>>>(
self,
v: T,
) -> Self
pub fn set_sqlserver_user_details<T: Into<Box<SqlServerUserDetails>>>( self, v: T, ) -> Self
Sets the value of user_details
to hold a SqlserverUserDetails.
Note that all the setters affecting user_details are
mutually exclusive.