#[non_exhaustive]pub struct SqlUsersUpdateRequest {
pub host: String,
pub instance: String,
pub name: String,
pub project: String,
pub database_roles: Vec<String>,
pub revoke_existing_roles: Option<bool>,
pub server_roles: Vec<String>,
pub revoke_existing_server_roles: Option<bool>,
pub body: Option<User>,
/* 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.host: StringOptional. Host of the user in the instance.
instance: StringDatabase instance ID. This does not include the project ID.
name: StringName of the user in the instance.
project: StringProject ID of the project that contains the instance.
database_roles: Vec<String>Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.
revoke_existing_roles: Option<bool>Optional. Specifies whether to revoke existing roles that are not present
in the database_roles field. If false or unset, the database roles
specified in database_roles are added to the user’s existing roles.
server_roles: Vec<String>Optional. The server roles to grant to the SQL Server login. Existing server roles will not be revoked if revoke_existing_roles is false. body.server_roles will be ignored for update request.
revoke_existing_server_roles: Option<bool>Optional. Specifies whether to revoke existing roles that are not present
in the server_roles field. If false or unset, the server roles
specified in server_roles are added to the user’s existing server roles.
body: Option<User>Implementations§
Source§impl SqlUsersUpdateRequest
impl SqlUsersUpdateRequest
Sourcepub fn set_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_instance<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_database_roles<T, V>(self, v: T) -> Self
pub fn set_database_roles<T, V>(self, v: T) -> Self
Sets the value of database_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_database_roles(["a", "b", "c"]);Sourcepub fn set_revoke_existing_roles<T>(self, v: T) -> Self
pub fn set_revoke_existing_roles<T>(self, v: T) -> Self
Sets the value of revoke_existing_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_revoke_existing_roles(true);Sourcepub fn set_or_clear_revoke_existing_roles<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_revoke_existing_roles<T>(self, v: Option<T>) -> Self
Sets or clears the value of revoke_existing_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_or_clear_revoke_existing_roles(Some(false));
let x = SqlUsersUpdateRequest::new().set_or_clear_revoke_existing_roles(None::<bool>);Sourcepub fn set_server_roles<T, V>(self, v: T) -> Self
pub fn set_server_roles<T, V>(self, v: T) -> Self
Sets the value of server_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_server_roles(["a", "b", "c"]);Sourcepub fn set_revoke_existing_server_roles<T>(self, v: T) -> Self
pub fn set_revoke_existing_server_roles<T>(self, v: T) -> Self
Sets the value of revoke_existing_server_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_revoke_existing_server_roles(true);Sourcepub fn set_or_clear_revoke_existing_server_roles<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_revoke_existing_server_roles<T>(self, v: Option<T>) -> Self
Sets or clears the value of revoke_existing_server_roles.
§Example
let x = SqlUsersUpdateRequest::new().set_or_clear_revoke_existing_server_roles(Some(false));
let x = SqlUsersUpdateRequest::new().set_or_clear_revoke_existing_server_roles(None::<bool>);Sourcepub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for SqlUsersUpdateRequest
impl Clone for SqlUsersUpdateRequest
Source§fn clone(&self) -> SqlUsersUpdateRequest
fn clone(&self) -> SqlUsersUpdateRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more