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: i32,
pub password_policy: Option<UserPasswordValidationPolicy>,
pub dual_password_type: Option<i32>,
pub user_details: Option<UserDetails>,
}
Expand description
A Cloud SQL user resource.
Fields§
§kind: String
This is always sql#user
.
password: String
The password for the user.
etag: String
This field is deprecated and will be removed from a future version of the API.
name: String
The name of the user in the Cloud SQL instance. Can be omitted for
update
because it is already specified in the URL.
host: String
Optional. 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: String
The 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: String
The 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: i32
The 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<i32>
Dual password status for the user.
user_details: Option<UserDetails>
User details for specific database type
Implementations§
source§impl User
impl User
sourcepub fn type(&self) -> SqlUserType
pub fn type(&self) -> SqlUserType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: SqlUserType)
pub fn set_type(&mut self, value: SqlUserType)
Sets type
to the provided enum value.
sourcepub fn dual_password_type(&self) -> DualPasswordType
pub fn dual_password_type(&self) -> DualPasswordType
Returns the enum value of dual_password_type
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_dual_password_type(&mut self, value: DualPasswordType)
pub fn set_dual_password_type(&mut self, value: DualPasswordType)
Sets dual_password_type
to the provided enum value.
Trait Implementations§
source§impl Message for User
impl Message for User
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for User
impl PartialEq for User
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request