aws-sdk-qapps 1.64.0

AWS SDK for QApps
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A user of an Amazon Q App.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct User {
    /// <p>The unique identifier of a user.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
}
impl User {
    /// <p>The unique identifier of a user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
impl User {
    /// Creates a new builder-style object to manufacture [`User`](crate::types::User).
    pub fn builder() -> crate::types::builders::UserBuilder {
        crate::types::builders::UserBuilder::default()
    }
}

/// A builder for [`User`](crate::types::User).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UserBuilder {
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
}
impl UserBuilder {
    /// <p>The unique identifier of a user.</p>
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of a user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The unique identifier of a user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// Consumes the builder and constructs a [`User`](crate::types::User).
    pub fn build(self) -> crate::types::User {
        crate::types::User { user_id: self.user_id }
    }
}