aws_sdk_iam/operation/delete_user/
_delete_user_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteUserInput {
6    /// <p>The name of the user to delete.</p>
7    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
8    pub user_name: ::std::option::Option<::std::string::String>,
9}
10impl DeleteUserInput {
11    /// <p>The name of the user to delete.</p>
12    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
13    pub fn user_name(&self) -> ::std::option::Option<&str> {
14        self.user_name.as_deref()
15    }
16}
17impl DeleteUserInput {
18    /// Creates a new builder-style object to manufacture [`DeleteUserInput`](crate::operation::delete_user::DeleteUserInput).
19    pub fn builder() -> crate::operation::delete_user::builders::DeleteUserInputBuilder {
20        crate::operation::delete_user::builders::DeleteUserInputBuilder::default()
21    }
22}
23
24/// A builder for [`DeleteUserInput`](crate::operation::delete_user::DeleteUserInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DeleteUserInputBuilder {
28    pub(crate) user_name: ::std::option::Option<::std::string::String>,
29}
30impl DeleteUserInputBuilder {
31    /// <p>The name of the user to delete.</p>
32    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
33    /// This field is required.
34    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35        self.user_name = ::std::option::Option::Some(input.into());
36        self
37    }
38    /// <p>The name of the user to delete.</p>
39    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
40    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41        self.user_name = input;
42        self
43    }
44    /// <p>The name of the user to delete.</p>
45    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
46    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
47        &self.user_name
48    }
49    /// Consumes the builder and constructs a [`DeleteUserInput`](crate::operation::delete_user::DeleteUserInput).
50    pub fn build(self) -> ::std::result::Result<crate::operation::delete_user::DeleteUserInput, ::aws_smithy_types::error::operation::BuildError> {
51        ::std::result::Result::Ok(crate::operation::delete_user::DeleteUserInput { user_name: self.user_name })
52    }
53}