/// Username and password authentication.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct UserAndPasswordAuthentication {
    #[builder(into)]
    #[serde(rename = "username")]
    username: String,
    #[serde(rename = "passwordSecretRid")]
    password_secret_rid: super::super::super::secrets::api::SecretRid,
}
impl UserAndPasswordAuthentication {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        username: impl Into<String>,
        password_secret_rid: super::super::super::secrets::api::SecretRid,
    ) -> Self {
        Self::builder()
            .username(username)
            .password_secret_rid(password_secret_rid)
            .build()
    }
    /// Username for registry authentication.
    #[inline]
    pub fn username(&self) -> &str {
        &*self.username
    }
    /// The RID of the secret containing the password for registry authentication.
    #[inline]
    pub fn password_secret_rid(&self) -> &super::super::super::secrets::api::SecretRid {
        &self.password_secret_rid
    }
}
