aws_sdk_securityir/operation/update_membership/
_update_membership_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)]
5pub struct UpdateMembershipInput {
6    /// <p>Required element for UpdateMembership to identify the membership to update.</p>
7    pub membership_id: ::std::option::Option<::std::string::String>,
8    /// <p>Optional element for UpdateMembership to update the membership name.</p>
9    pub membership_name: ::std::option::Option<::std::string::String>,
10    /// <p>Optional element for UpdateMembership to update the membership name.</p>
11    pub incident_response_team: ::std::option::Option<::std::vec::Vec<crate::types::IncidentResponder>>,
12    /// <p>Optional element for UpdateMembership to enable or disable opt-in features for the service.</p>
13    pub opt_in_features: ::std::option::Option<::std::vec::Vec<crate::types::OptInFeature>>,
14    /// <p>The <code>membershipAccountsConfigurationsUpdate</code> field in the <code>UpdateMembershipRequest</code> structure allows you to update the configuration settings for accounts within a membership.</p>
15    /// <p>This field is optional and contains a structure of type <code>MembershipAccountsConfigurationsUpdate </code> that specifies the updated account configurations for the membership.</p>
16    pub membership_accounts_configurations_update: ::std::option::Option<crate::types::MembershipAccountsConfigurationsUpdate>,
17    /// <p>The <code>undoMembershipCancellation</code> parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.</p>
18    /// <p>This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.</p>
19    /// <ul>
20    /// <li>
21    /// <p>If set to <code>true</code>, the cancellation request will be revoked</p></li>
22    /// <li>
23    /// <p>If set to <code>false</code> the service will throw a ValidationException.</p></li>
24    /// </ul>
25    pub undo_membership_cancellation: ::std::option::Option<bool>,
26}
27impl UpdateMembershipInput {
28    /// <p>Required element for UpdateMembership to identify the membership to update.</p>
29    pub fn membership_id(&self) -> ::std::option::Option<&str> {
30        self.membership_id.as_deref()
31    }
32    /// <p>Optional element for UpdateMembership to update the membership name.</p>
33    pub fn membership_name(&self) -> ::std::option::Option<&str> {
34        self.membership_name.as_deref()
35    }
36    /// <p>Optional element for UpdateMembership to update the membership name.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.incident_response_team.is_none()`.
39    pub fn incident_response_team(&self) -> &[crate::types::IncidentResponder] {
40        self.incident_response_team.as_deref().unwrap_or_default()
41    }
42    /// <p>Optional element for UpdateMembership to enable or disable opt-in features for the service.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.opt_in_features.is_none()`.
45    pub fn opt_in_features(&self) -> &[crate::types::OptInFeature] {
46        self.opt_in_features.as_deref().unwrap_or_default()
47    }
48    /// <p>The <code>membershipAccountsConfigurationsUpdate</code> field in the <code>UpdateMembershipRequest</code> structure allows you to update the configuration settings for accounts within a membership.</p>
49    /// <p>This field is optional and contains a structure of type <code>MembershipAccountsConfigurationsUpdate </code> that specifies the updated account configurations for the membership.</p>
50    pub fn membership_accounts_configurations_update(&self) -> ::std::option::Option<&crate::types::MembershipAccountsConfigurationsUpdate> {
51        self.membership_accounts_configurations_update.as_ref()
52    }
53    /// <p>The <code>undoMembershipCancellation</code> parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.</p>
54    /// <p>This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.</p>
55    /// <ul>
56    /// <li>
57    /// <p>If set to <code>true</code>, the cancellation request will be revoked</p></li>
58    /// <li>
59    /// <p>If set to <code>false</code> the service will throw a ValidationException.</p></li>
60    /// </ul>
61    pub fn undo_membership_cancellation(&self) -> ::std::option::Option<bool> {
62        self.undo_membership_cancellation
63    }
64}
65impl ::std::fmt::Debug for UpdateMembershipInput {
66    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
67        let mut formatter = f.debug_struct("UpdateMembershipInput");
68        formatter.field("membership_id", &self.membership_id);
69        formatter.field("membership_name", &"*** Sensitive Data Redacted ***");
70        formatter.field("incident_response_team", &self.incident_response_team);
71        formatter.field("opt_in_features", &self.opt_in_features);
72        formatter.field(
73            "membership_accounts_configurations_update",
74            &self.membership_accounts_configurations_update,
75        );
76        formatter.field("undo_membership_cancellation", &self.undo_membership_cancellation);
77        formatter.finish()
78    }
79}
80impl UpdateMembershipInput {
81    /// Creates a new builder-style object to manufacture [`UpdateMembershipInput`](crate::operation::update_membership::UpdateMembershipInput).
82    pub fn builder() -> crate::operation::update_membership::builders::UpdateMembershipInputBuilder {
83        crate::operation::update_membership::builders::UpdateMembershipInputBuilder::default()
84    }
85}
86
87/// A builder for [`UpdateMembershipInput`](crate::operation::update_membership::UpdateMembershipInput).
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
89#[non_exhaustive]
90pub struct UpdateMembershipInputBuilder {
91    pub(crate) membership_id: ::std::option::Option<::std::string::String>,
92    pub(crate) membership_name: ::std::option::Option<::std::string::String>,
93    pub(crate) incident_response_team: ::std::option::Option<::std::vec::Vec<crate::types::IncidentResponder>>,
94    pub(crate) opt_in_features: ::std::option::Option<::std::vec::Vec<crate::types::OptInFeature>>,
95    pub(crate) membership_accounts_configurations_update: ::std::option::Option<crate::types::MembershipAccountsConfigurationsUpdate>,
96    pub(crate) undo_membership_cancellation: ::std::option::Option<bool>,
97}
98impl UpdateMembershipInputBuilder {
99    /// <p>Required element for UpdateMembership to identify the membership to update.</p>
100    /// This field is required.
101    pub fn membership_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.membership_id = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>Required element for UpdateMembership to identify the membership to update.</p>
106    pub fn set_membership_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.membership_id = input;
108        self
109    }
110    /// <p>Required element for UpdateMembership to identify the membership to update.</p>
111    pub fn get_membership_id(&self) -> &::std::option::Option<::std::string::String> {
112        &self.membership_id
113    }
114    /// <p>Optional element for UpdateMembership to update the membership name.</p>
115    pub fn membership_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.membership_name = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>Optional element for UpdateMembership to update the membership name.</p>
120    pub fn set_membership_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.membership_name = input;
122        self
123    }
124    /// <p>Optional element for UpdateMembership to update the membership name.</p>
125    pub fn get_membership_name(&self) -> &::std::option::Option<::std::string::String> {
126        &self.membership_name
127    }
128    /// Appends an item to `incident_response_team`.
129    ///
130    /// To override the contents of this collection use [`set_incident_response_team`](Self::set_incident_response_team).
131    ///
132    /// <p>Optional element for UpdateMembership to update the membership name.</p>
133    pub fn incident_response_team(mut self, input: crate::types::IncidentResponder) -> Self {
134        let mut v = self.incident_response_team.unwrap_or_default();
135        v.push(input);
136        self.incident_response_team = ::std::option::Option::Some(v);
137        self
138    }
139    /// <p>Optional element for UpdateMembership to update the membership name.</p>
140    pub fn set_incident_response_team(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IncidentResponder>>) -> Self {
141        self.incident_response_team = input;
142        self
143    }
144    /// <p>Optional element for UpdateMembership to update the membership name.</p>
145    pub fn get_incident_response_team(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IncidentResponder>> {
146        &self.incident_response_team
147    }
148    /// Appends an item to `opt_in_features`.
149    ///
150    /// To override the contents of this collection use [`set_opt_in_features`](Self::set_opt_in_features).
151    ///
152    /// <p>Optional element for UpdateMembership to enable or disable opt-in features for the service.</p>
153    pub fn opt_in_features(mut self, input: crate::types::OptInFeature) -> Self {
154        let mut v = self.opt_in_features.unwrap_or_default();
155        v.push(input);
156        self.opt_in_features = ::std::option::Option::Some(v);
157        self
158    }
159    /// <p>Optional element for UpdateMembership to enable or disable opt-in features for the service.</p>
160    pub fn set_opt_in_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptInFeature>>) -> Self {
161        self.opt_in_features = input;
162        self
163    }
164    /// <p>Optional element for UpdateMembership to enable or disable opt-in features for the service.</p>
165    pub fn get_opt_in_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptInFeature>> {
166        &self.opt_in_features
167    }
168    /// <p>The <code>membershipAccountsConfigurationsUpdate</code> field in the <code>UpdateMembershipRequest</code> structure allows you to update the configuration settings for accounts within a membership.</p>
169    /// <p>This field is optional and contains a structure of type <code>MembershipAccountsConfigurationsUpdate </code> that specifies the updated account configurations for the membership.</p>
170    pub fn membership_accounts_configurations_update(mut self, input: crate::types::MembershipAccountsConfigurationsUpdate) -> Self {
171        self.membership_accounts_configurations_update = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The <code>membershipAccountsConfigurationsUpdate</code> field in the <code>UpdateMembershipRequest</code> structure allows you to update the configuration settings for accounts within a membership.</p>
175    /// <p>This field is optional and contains a structure of type <code>MembershipAccountsConfigurationsUpdate </code> that specifies the updated account configurations for the membership.</p>
176    pub fn set_membership_accounts_configurations_update(
177        mut self,
178        input: ::std::option::Option<crate::types::MembershipAccountsConfigurationsUpdate>,
179    ) -> Self {
180        self.membership_accounts_configurations_update = input;
181        self
182    }
183    /// <p>The <code>membershipAccountsConfigurationsUpdate</code> field in the <code>UpdateMembershipRequest</code> structure allows you to update the configuration settings for accounts within a membership.</p>
184    /// <p>This field is optional and contains a structure of type <code>MembershipAccountsConfigurationsUpdate </code> that specifies the updated account configurations for the membership.</p>
185    pub fn get_membership_accounts_configurations_update(&self) -> &::std::option::Option<crate::types::MembershipAccountsConfigurationsUpdate> {
186        &self.membership_accounts_configurations_update
187    }
188    /// <p>The <code>undoMembershipCancellation</code> parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.</p>
189    /// <p>This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.</p>
190    /// <ul>
191    /// <li>
192    /// <p>If set to <code>true</code>, the cancellation request will be revoked</p></li>
193    /// <li>
194    /// <p>If set to <code>false</code> the service will throw a ValidationException.</p></li>
195    /// </ul>
196    pub fn undo_membership_cancellation(mut self, input: bool) -> Self {
197        self.undo_membership_cancellation = ::std::option::Option::Some(input);
198        self
199    }
200    /// <p>The <code>undoMembershipCancellation</code> parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.</p>
201    /// <p>This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.</p>
202    /// <ul>
203    /// <li>
204    /// <p>If set to <code>true</code>, the cancellation request will be revoked</p></li>
205    /// <li>
206    /// <p>If set to <code>false</code> the service will throw a ValidationException.</p></li>
207    /// </ul>
208    pub fn set_undo_membership_cancellation(mut self, input: ::std::option::Option<bool>) -> Self {
209        self.undo_membership_cancellation = input;
210        self
211    }
212    /// <p>The <code>undoMembershipCancellation</code> parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.</p>
213    /// <p>This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.</p>
214    /// <ul>
215    /// <li>
216    /// <p>If set to <code>true</code>, the cancellation request will be revoked</p></li>
217    /// <li>
218    /// <p>If set to <code>false</code> the service will throw a ValidationException.</p></li>
219    /// </ul>
220    pub fn get_undo_membership_cancellation(&self) -> &::std::option::Option<bool> {
221        &self.undo_membership_cancellation
222    }
223    /// Consumes the builder and constructs a [`UpdateMembershipInput`](crate::operation::update_membership::UpdateMembershipInput).
224    pub fn build(
225        self,
226    ) -> ::std::result::Result<crate::operation::update_membership::UpdateMembershipInput, ::aws_smithy_types::error::operation::BuildError> {
227        ::std::result::Result::Ok(crate::operation::update_membership::UpdateMembershipInput {
228            membership_id: self.membership_id,
229            membership_name: self.membership_name,
230            incident_response_team: self.incident_response_team,
231            opt_in_features: self.opt_in_features,
232            membership_accounts_configurations_update: self.membership_accounts_configurations_update,
233            undo_membership_cancellation: self.undo_membership_cancellation,
234        })
235    }
236}
237impl ::std::fmt::Debug for UpdateMembershipInputBuilder {
238    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
239        let mut formatter = f.debug_struct("UpdateMembershipInputBuilder");
240        formatter.field("membership_id", &self.membership_id);
241        formatter.field("membership_name", &"*** Sensitive Data Redacted ***");
242        formatter.field("incident_response_team", &self.incident_response_team);
243        formatter.field("opt_in_features", &self.opt_in_features);
244        formatter.field(
245            "membership_accounts_configurations_update",
246            &self.membership_accounts_configurations_update,
247        );
248        formatter.field("undo_membership_cancellation", &self.undo_membership_cancellation);
249        formatter.finish()
250    }
251}