aws_sdk_iam/operation/delete_role/
_delete_role_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 DeleteRoleInput {
6    /// <p>The name of the role 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 role_name: ::std::option::Option<::std::string::String>,
9}
10impl DeleteRoleInput {
11    /// <p>The name of the role 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 role_name(&self) -> ::std::option::Option<&str> {
14        self.role_name.as_deref()
15    }
16}
17impl DeleteRoleInput {
18    /// Creates a new builder-style object to manufacture [`DeleteRoleInput`](crate::operation::delete_role::DeleteRoleInput).
19    pub fn builder() -> crate::operation::delete_role::builders::DeleteRoleInputBuilder {
20        crate::operation::delete_role::builders::DeleteRoleInputBuilder::default()
21    }
22}
23
24/// A builder for [`DeleteRoleInput`](crate::operation::delete_role::DeleteRoleInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DeleteRoleInputBuilder {
28    pub(crate) role_name: ::std::option::Option<::std::string::String>,
29}
30impl DeleteRoleInputBuilder {
31    /// <p>The name of the role 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 role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35        self.role_name = ::std::option::Option::Some(input.into());
36        self
37    }
38    /// <p>The name of the role 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_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41        self.role_name = input;
42        self
43    }
44    /// <p>The name of the role 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_role_name(&self) -> &::std::option::Option<::std::string::String> {
47        &self.role_name
48    }
49    /// Consumes the builder and constructs a [`DeleteRoleInput`](crate::operation::delete_role::DeleteRoleInput).
50    pub fn build(self) -> ::std::result::Result<crate::operation::delete_role::DeleteRoleInput, ::aws_smithy_types::error::operation::BuildError> {
51        ::std::result::Result::Ok(crate::operation::delete_role::DeleteRoleInput { role_name: self.role_name })
52    }
53}