aws_sdk_workmail/operation/associate_member_to_group/_associate_member_to_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 AssociateMemberToGroupInput {
6 /// <p>The organization under which the group exists.</p>
7 pub organization_id: ::std::option::Option<::std::string::String>,
8 /// <p>The group to which the member (user or group) is associated.</p>
9 /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
10 /// <ul>
11 /// <li>
12 /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
13 /// <li>
14 /// <p>Email address: group@domain.tld</p></li>
15 /// <li>
16 /// <p>Group name: group</p></li>
17 /// </ul>
18 pub group_id: ::std::option::Option<::std::string::String>,
19 /// <p>The member (user or group) to associate to the group.</p>
20 /// <p>The member ID can accept <i>UserID or GroupId</i>, <i>Username or Groupname</i>, or <i>email</i>.</p>
21 /// <ul>
22 /// <li>
23 /// <p>Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
24 /// <li>
25 /// <p>Email address: member@domain.tld</p></li>
26 /// <li>
27 /// <p>Member name: member</p></li>
28 /// </ul>
29 pub member_id: ::std::option::Option<::std::string::String>,
30}
31impl AssociateMemberToGroupInput {
32 /// <p>The organization under which the group exists.</p>
33 pub fn organization_id(&self) -> ::std::option::Option<&str> {
34 self.organization_id.as_deref()
35 }
36 /// <p>The group to which the member (user or group) is associated.</p>
37 /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
38 /// <ul>
39 /// <li>
40 /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
41 /// <li>
42 /// <p>Email address: group@domain.tld</p></li>
43 /// <li>
44 /// <p>Group name: group</p></li>
45 /// </ul>
46 pub fn group_id(&self) -> ::std::option::Option<&str> {
47 self.group_id.as_deref()
48 }
49 /// <p>The member (user or group) to associate to the group.</p>
50 /// <p>The member ID can accept <i>UserID or GroupId</i>, <i>Username or Groupname</i>, or <i>email</i>.</p>
51 /// <ul>
52 /// <li>
53 /// <p>Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
54 /// <li>
55 /// <p>Email address: member@domain.tld</p></li>
56 /// <li>
57 /// <p>Member name: member</p></li>
58 /// </ul>
59 pub fn member_id(&self) -> ::std::option::Option<&str> {
60 self.member_id.as_deref()
61 }
62}
63impl AssociateMemberToGroupInput {
64 /// Creates a new builder-style object to manufacture [`AssociateMemberToGroupInput`](crate::operation::associate_member_to_group::AssociateMemberToGroupInput).
65 pub fn builder() -> crate::operation::associate_member_to_group::builders::AssociateMemberToGroupInputBuilder {
66 crate::operation::associate_member_to_group::builders::AssociateMemberToGroupInputBuilder::default()
67 }
68}
69
70/// A builder for [`AssociateMemberToGroupInput`](crate::operation::associate_member_to_group::AssociateMemberToGroupInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct AssociateMemberToGroupInputBuilder {
74 pub(crate) organization_id: ::std::option::Option<::std::string::String>,
75 pub(crate) group_id: ::std::option::Option<::std::string::String>,
76 pub(crate) member_id: ::std::option::Option<::std::string::String>,
77}
78impl AssociateMemberToGroupInputBuilder {
79 /// <p>The organization under which the group exists.</p>
80 /// This field is required.
81 pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.organization_id = ::std::option::Option::Some(input.into());
83 self
84 }
85 /// <p>The organization under which the group exists.</p>
86 pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.organization_id = input;
88 self
89 }
90 /// <p>The organization under which the group exists.</p>
91 pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
92 &self.organization_id
93 }
94 /// <p>The group to which the member (user or group) is associated.</p>
95 /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
96 /// <ul>
97 /// <li>
98 /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
99 /// <li>
100 /// <p>Email address: group@domain.tld</p></li>
101 /// <li>
102 /// <p>Group name: group</p></li>
103 /// </ul>
104 /// This field is required.
105 pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.group_id = ::std::option::Option::Some(input.into());
107 self
108 }
109 /// <p>The group to which the member (user or group) is associated.</p>
110 /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
111 /// <ul>
112 /// <li>
113 /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
114 /// <li>
115 /// <p>Email address: group@domain.tld</p></li>
116 /// <li>
117 /// <p>Group name: group</p></li>
118 /// </ul>
119 pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.group_id = input;
121 self
122 }
123 /// <p>The group to which the member (user or group) is associated.</p>
124 /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
125 /// <ul>
126 /// <li>
127 /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
128 /// <li>
129 /// <p>Email address: group@domain.tld</p></li>
130 /// <li>
131 /// <p>Group name: group</p></li>
132 /// </ul>
133 pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
134 &self.group_id
135 }
136 /// <p>The member (user or group) to associate to the group.</p>
137 /// <p>The member ID can accept <i>UserID or GroupId</i>, <i>Username or Groupname</i>, or <i>email</i>.</p>
138 /// <ul>
139 /// <li>
140 /// <p>Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
141 /// <li>
142 /// <p>Email address: member@domain.tld</p></li>
143 /// <li>
144 /// <p>Member name: member</p></li>
145 /// </ul>
146 /// This field is required.
147 pub fn member_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.member_id = ::std::option::Option::Some(input.into());
149 self
150 }
151 /// <p>The member (user or group) to associate to the group.</p>
152 /// <p>The member ID can accept <i>UserID or GroupId</i>, <i>Username or Groupname</i>, or <i>email</i>.</p>
153 /// <ul>
154 /// <li>
155 /// <p>Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
156 /// <li>
157 /// <p>Email address: member@domain.tld</p></li>
158 /// <li>
159 /// <p>Member name: member</p></li>
160 /// </ul>
161 pub fn set_member_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.member_id = input;
163 self
164 }
165 /// <p>The member (user or group) to associate to the group.</p>
166 /// <p>The member ID can accept <i>UserID or GroupId</i>, <i>Username or Groupname</i>, or <i>email</i>.</p>
167 /// <ul>
168 /// <li>
169 /// <p>Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
170 /// <li>
171 /// <p>Email address: member@domain.tld</p></li>
172 /// <li>
173 /// <p>Member name: member</p></li>
174 /// </ul>
175 pub fn get_member_id(&self) -> &::std::option::Option<::std::string::String> {
176 &self.member_id
177 }
178 /// Consumes the builder and constructs a [`AssociateMemberToGroupInput`](crate::operation::associate_member_to_group::AssociateMemberToGroupInput).
179 pub fn build(
180 self,
181 ) -> ::std::result::Result<
182 crate::operation::associate_member_to_group::AssociateMemberToGroupInput,
183 ::aws_smithy_types::error::operation::BuildError,
184 > {
185 ::std::result::Result::Ok(crate::operation::associate_member_to_group::AssociateMemberToGroupInput {
186 organization_id: self.organization_id,
187 group_id: self.group_id,
188 member_id: self.member_id,
189 })
190 }
191}