#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateUserInput {
pub user_id: ::std::option::Option<::std::string::String>,
pub user_name: ::std::option::Option<::std::string::String>,
pub engine: ::std::option::Option<::std::string::String>,
pub passwords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub access_string: ::std::option::Option<::std::string::String>,
pub no_password_required: ::std::option::Option<bool>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
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::string::String] {
self.passwords.as_deref().unwrap_or_default()
}
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) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
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 ::std::convert::Into<::std::string::String>) -> Self {
self.user_id = ::std::option::Option::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 get_user_id(&self) -> &::std::option::Option<::std::string::String> {
&self.user_id
}
pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_name = ::std::option::Option::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 get_user_name(&self) -> &::std::option::Option<::std::string::String> {
&self.user_name
}
pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.engine = ::std::option::Option::Some(input.into());
self
}
pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.engine = input;
self
}
pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
&self.engine
}
pub fn passwords(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.passwords.unwrap_or_default();
v.push(input.into());
self.passwords = ::std::option::Option::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 get_passwords(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.passwords
}
pub fn access_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_string = ::std::option::Option::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 get_access_string(&self) -> &::std::option::Option<::std::string::String> {
&self.access_string
}
pub fn no_password_required(mut self, input: bool) -> Self {
self.no_password_required = ::std::option::Option::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 get_no_password_required(&self) -> &::std::option::Option<bool> {
&self.no_password_required
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::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 get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn authentication_mode(mut self, input: crate::types::AuthenticationMode) -> Self {
self.authentication_mode = ::std::option::Option::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 get_authentication_mode(&self) -> &::std::option::Option<crate::types::AuthenticationMode> {
&self.authentication_mode
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_user::CreateUserInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::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,
})
}
}