#[non_exhaustive]pub struct PasswordValidationPolicy {
pub min_length: Option<Int32Value>,
pub complexity: Complexity,
pub reuse_interval: Option<Int32Value>,
pub disallow_username_substring: Option<BoolValue>,
pub password_change_interval: Option<Duration>,
pub enable_password_policy: Option<BoolValue>,
pub disallow_compromised_credentials: Option<BoolValue>,
/* private fields */
}Expand description
Database instance local user password validation policy
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.min_length: Option<Int32Value>Minimum number of characters allowed.
complexity: ComplexityThe complexity of the password.
reuse_interval: Option<Int32Value>Number of previous passwords that cannot be reused.
disallow_username_substring: Option<BoolValue>Disallow username as a part of the password.
password_change_interval: Option<Duration>Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.
enable_password_policy: Option<BoolValue>Whether the password policy is enabled or not.
disallow_compromised_credentials: Option<BoolValue>This field is deprecated and will be removed in a future version of the API.
Implementations§
Source§impl PasswordValidationPolicy
impl PasswordValidationPolicy
pub fn new() -> Self
Sourcepub fn set_min_length<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
pub fn set_min_length<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
Sets the value of min_length.
§Example
use wkt::Int32Value;
let x = PasswordValidationPolicy::new().set_min_length(Int32Value::default()/* use setters */);Sourcepub fn set_or_clear_min_length<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int32Value>,
pub fn set_or_clear_min_length<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int32Value>,
Sets or clears the value of min_length.
§Example
use wkt::Int32Value;
let x = PasswordValidationPolicy::new().set_or_clear_min_length(Some(Int32Value::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_min_length(None::<Int32Value>);Sourcepub fn set_complexity<T: Into<Complexity>>(self, v: T) -> Self
pub fn set_complexity<T: Into<Complexity>>(self, v: T) -> Self
Sets the value of complexity.
§Example
use google_cloud_sql_v1::model::password_validation_policy::Complexity;
let x0 = PasswordValidationPolicy::new().set_complexity(Complexity::Default);Sourcepub fn set_reuse_interval<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
pub fn set_reuse_interval<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
Sets the value of reuse_interval.
§Example
use wkt::Int32Value;
let x = PasswordValidationPolicy::new().set_reuse_interval(Int32Value::default()/* use setters */);Sourcepub fn set_or_clear_reuse_interval<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int32Value>,
pub fn set_or_clear_reuse_interval<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int32Value>,
Sets or clears the value of reuse_interval.
§Example
use wkt::Int32Value;
let x = PasswordValidationPolicy::new().set_or_clear_reuse_interval(Some(Int32Value::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_reuse_interval(None::<Int32Value>);Sourcepub fn set_disallow_username_substring<T>(self, v: T) -> Self
pub fn set_disallow_username_substring<T>(self, v: T) -> Self
Sets the value of disallow_username_substring.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_disallow_username_substring(BoolValue::default()/* use setters */);Sourcepub fn set_or_clear_disallow_username_substring<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disallow_username_substring<T>(self, v: Option<T>) -> Self
Sets or clears the value of disallow_username_substring.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_or_clear_disallow_username_substring(Some(BoolValue::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_disallow_username_substring(None::<BoolValue>);Sourcepub fn set_password_change_interval<T>(self, v: T) -> Self
pub fn set_password_change_interval<T>(self, v: T) -> Self
Sets the value of password_change_interval.
§Example
use wkt::Duration;
let x = PasswordValidationPolicy::new().set_password_change_interval(Duration::default()/* use setters */);Sourcepub fn set_or_clear_password_change_interval<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_password_change_interval<T>(self, v: Option<T>) -> Self
Sets or clears the value of password_change_interval.
§Example
use wkt::Duration;
let x = PasswordValidationPolicy::new().set_or_clear_password_change_interval(Some(Duration::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_password_change_interval(None::<Duration>);Sourcepub fn set_enable_password_policy<T>(self, v: T) -> Self
pub fn set_enable_password_policy<T>(self, v: T) -> Self
Sets the value of enable_password_policy.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_enable_password_policy(BoolValue::default()/* use setters */);Sourcepub fn set_or_clear_enable_password_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable_password_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of enable_password_policy.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_or_clear_enable_password_policy(Some(BoolValue::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_enable_password_policy(None::<BoolValue>);Sourcepub fn set_disallow_compromised_credentials<T>(self, v: T) -> Self
👎Deprecated
pub fn set_disallow_compromised_credentials<T>(self, v: T) -> Self
Sets the value of disallow_compromised_credentials.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_disallow_compromised_credentials(BoolValue::default()/* use setters */);Sourcepub fn set_or_clear_disallow_compromised_credentials<T>(
self,
v: Option<T>,
) -> Self
👎Deprecated
pub fn set_or_clear_disallow_compromised_credentials<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of disallow_compromised_credentials.
§Example
use wkt::BoolValue;
let x = PasswordValidationPolicy::new().set_or_clear_disallow_compromised_credentials(Some(BoolValue::default()/* use setters */));
let x = PasswordValidationPolicy::new().set_or_clear_disallow_compromised_credentials(None::<BoolValue>);Trait Implementations§
Source§impl Clone for PasswordValidationPolicy
impl Clone for PasswordValidationPolicy
Source§fn clone(&self) -> PasswordValidationPolicy
fn clone(&self) -> PasswordValidationPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more