aws_sdk_iam/operation/get_role/_get_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 GetRoleInput {
6 /// <p>The name of the IAM role to get information about.</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 GetRoleInput {
11 /// <p>The name of the IAM role to get information about.</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 GetRoleInput {
18 /// Creates a new builder-style object to manufacture [`GetRoleInput`](crate::operation::get_role::GetRoleInput).
19 pub fn builder() -> crate::operation::get_role::builders::GetRoleInputBuilder {
20 crate::operation::get_role::builders::GetRoleInputBuilder::default()
21 }
22}
23
24/// A builder for [`GetRoleInput`](crate::operation::get_role::GetRoleInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct GetRoleInputBuilder {
28 pub(crate) role_name: ::std::option::Option<::std::string::String>,
29}
30impl GetRoleInputBuilder {
31 /// <p>The name of the IAM role to get information about.</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 IAM role to get information about.</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 IAM role to get information about.</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 [`GetRoleInput`](crate::operation::get_role::GetRoleInput).
50 pub fn build(self) -> ::std::result::Result<crate::operation::get_role::GetRoleInput, ::aws_smithy_types::error::operation::BuildError> {
51 ::std::result::Result::Ok(crate::operation::get_role::GetRoleInput { role_name: self.role_name })
52 }
53}