#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateUserInput {
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub engine: std::option::Option<std::string::String>,
#[doc(hidden)]
pub passwords: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub access_string: std::option::Option<std::string::String>,
#[doc(hidden)]
pub no_password_required: std::option::Option<bool>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
#[doc(hidden)]
pub authentication_mode: std::option::Option<crate::types::AuthenticationMode>,
}
impl CreateUserInput {
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
pub fn user_name(&self) -> std::option::Option<&str> {
self.user_name.as_deref()
}
pub fn engine(&self) -> std::option::Option<&str> {
self.engine.as_deref()
}
pub fn passwords(&self) -> std::option::Option<&[std::string::String]> {
self.passwords.as_deref()
}
pub fn access_string(&self) -> std::option::Option<&str> {
self.access_string.as_deref()
}
pub fn no_password_required(&self) -> std::option::Option<bool> {
self.no_password_required
}
pub fn tags(&self) -> std::option::Option<&[crate::types::Tag]> {
self.tags.as_deref()
}
pub fn authentication_mode(&self) -> std::option::Option<&crate::types::AuthenticationMode> {
self.authentication_mode.as_ref()
}
}
impl CreateUserInput {
pub fn builder() -> crate::operation::create_user::builders::CreateUserInputBuilder {
crate::operation::create_user::builders::CreateUserInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateUserInputBuilder {
pub(crate) user_id: std::option::Option<std::string::String>,
pub(crate) user_name: std::option::Option<std::string::String>,
pub(crate) engine: std::option::Option<std::string::String>,
pub(crate) passwords: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) access_string: std::option::Option<std::string::String>,
pub(crate) no_password_required: std::option::Option<bool>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
pub(crate) authentication_mode: std::option::Option<crate::types::AuthenticationMode>,
}
impl CreateUserInputBuilder {
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn user_name(mut self, input: impl Into<std::string::String>) -> Self {
self.user_name = Some(input.into());
self
}
pub fn set_user_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_name = input;
self
}
pub fn engine(mut self, input: impl Into<std::string::String>) -> Self {
self.engine = Some(input.into());
self
}
pub fn set_engine(mut self, input: std::option::Option<std::string::String>) -> Self {
self.engine = input;
self
}
pub fn passwords(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.passwords.unwrap_or_default();
v.push(input.into());
self.passwords = Some(v);
self
}
pub fn set_passwords(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.passwords = input;
self
}
pub fn access_string(mut self, input: impl Into<std::string::String>) -> Self {
self.access_string = Some(input.into());
self
}
pub fn set_access_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.access_string = input;
self
}
pub fn no_password_required(mut self, input: bool) -> Self {
self.no_password_required = Some(input);
self
}
pub fn set_no_password_required(mut self, input: std::option::Option<bool>) -> Self {
self.no_password_required = input;
self
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn authentication_mode(mut self, input: crate::types::AuthenticationMode) -> Self {
self.authentication_mode = Some(input);
self
}
pub fn set_authentication_mode(
mut self,
input: std::option::Option<crate::types::AuthenticationMode>,
) -> Self {
self.authentication_mode = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::create_user::CreateUserInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::create_user::CreateUserInput {
user_id: self.user_id,
user_name: self.user_name,
engine: self.engine,
passwords: self.passwords,
access_string: self.access_string,
no_password_required: self.no_password_required,
tags: self.tags,
authentication_mode: self.authentication_mode,
})
}
}