aws_sdk_iam/operation/update_group/_update_group_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 UpdateGroupInput {
6 /// <p>Name of the IAM group to update. If you're changing the name of the group, this is the original name.</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 group_name: ::std::option::Option<::std::string::String>,
9 /// <p>New path for the IAM group. Only include this if changing the group's path.</p>
10 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
11 pub new_path: ::std::option::Option<::std::string::String>,
12 /// <p>New name for the IAM group. Only include this if changing the group's name.</p>
13 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
14 pub new_group_name: ::std::option::Option<::std::string::String>,
15}
16impl UpdateGroupInput {
17 /// <p>Name of the IAM group to update. If you're changing the name of the group, this is the original name.</p>
18 /// <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>
19 pub fn group_name(&self) -> ::std::option::Option<&str> {
20 self.group_name.as_deref()
21 }
22 /// <p>New path for the IAM group. Only include this if changing the group's path.</p>
23 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
24 pub fn new_path(&self) -> ::std::option::Option<&str> {
25 self.new_path.as_deref()
26 }
27 /// <p>New name for the IAM group. Only include this if changing the group's name.</p>
28 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
29 pub fn new_group_name(&self) -> ::std::option::Option<&str> {
30 self.new_group_name.as_deref()
31 }
32}
33impl UpdateGroupInput {
34 /// Creates a new builder-style object to manufacture [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
35 pub fn builder() -> crate::operation::update_group::builders::UpdateGroupInputBuilder {
36 crate::operation::update_group::builders::UpdateGroupInputBuilder::default()
37 }
38}
39
40/// A builder for [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateGroupInputBuilder {
44 pub(crate) group_name: ::std::option::Option<::std::string::String>,
45 pub(crate) new_path: ::std::option::Option<::std::string::String>,
46 pub(crate) new_group_name: ::std::option::Option<::std::string::String>,
47}
48impl UpdateGroupInputBuilder {
49 /// <p>Name of the IAM group to update. If you're changing the name of the group, this is the original name.</p>
50 /// <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>
51 /// This field is required.
52 pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.group_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>Name of the IAM group to update. If you're changing the name of the group, this is the original name.</p>
57 /// <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>
58 pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.group_name = input;
60 self
61 }
62 /// <p>Name of the IAM group to update. If you're changing the name of the group, this is the original name.</p>
63 /// <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>
64 pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
65 &self.group_name
66 }
67 /// <p>New path for the IAM group. Only include this if changing the group's path.</p>
68 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
69 pub fn new_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.new_path = ::std::option::Option::Some(input.into());
71 self
72 }
73 /// <p>New path for the IAM group. Only include this if changing the group's path.</p>
74 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
75 pub fn set_new_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.new_path = input;
77 self
78 }
79 /// <p>New path for the IAM group. Only include this if changing the group's path.</p>
80 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
81 pub fn get_new_path(&self) -> &::std::option::Option<::std::string::String> {
82 &self.new_path
83 }
84 /// <p>New name for the IAM group. Only include this if changing the group's name.</p>
85 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
86 pub fn new_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.new_group_name = ::std::option::Option::Some(input.into());
88 self
89 }
90 /// <p>New name for the IAM group. Only include this if changing the group's name.</p>
91 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
92 pub fn set_new_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.new_group_name = input;
94 self
95 }
96 /// <p>New name for the IAM group. Only include this if changing the group's name.</p>
97 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
98 pub fn get_new_group_name(&self) -> &::std::option::Option<::std::string::String> {
99 &self.new_group_name
100 }
101 /// Consumes the builder and constructs a [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
102 pub fn build(self) -> ::std::result::Result<crate::operation::update_group::UpdateGroupInput, ::aws_smithy_types::error::operation::BuildError> {
103 ::std::result::Result::Ok(crate::operation::update_group::UpdateGroupInput {
104 group_name: self.group_name,
105 new_path: self.new_path,
106 new_group_name: self.new_group_name,
107 })
108 }
109}