aws_sdk_macie2/operation/accept_invitation/
_accept_invitation_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 AcceptInvitationInput {
6    /// <p>The Amazon Web Services account ID for the account that sent the invitation.</p>
7    pub administrator_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier for the invitation to accept.</p>
9    pub invitation_id: ::std::option::Option<::std::string::String>,
10    /// <p>(Deprecated) The Amazon Web Services account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
11    pub master_account: ::std::option::Option<::std::string::String>,
12}
13impl AcceptInvitationInput {
14    /// <p>The Amazon Web Services account ID for the account that sent the invitation.</p>
15    pub fn administrator_account_id(&self) -> ::std::option::Option<&str> {
16        self.administrator_account_id.as_deref()
17    }
18    /// <p>The unique identifier for the invitation to accept.</p>
19    pub fn invitation_id(&self) -> ::std::option::Option<&str> {
20        self.invitation_id.as_deref()
21    }
22    /// <p>(Deprecated) The Amazon Web Services account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
23    pub fn master_account(&self) -> ::std::option::Option<&str> {
24        self.master_account.as_deref()
25    }
26}
27impl AcceptInvitationInput {
28    /// Creates a new builder-style object to manufacture [`AcceptInvitationInput`](crate::operation::accept_invitation::AcceptInvitationInput).
29    pub fn builder() -> crate::operation::accept_invitation::builders::AcceptInvitationInputBuilder {
30        crate::operation::accept_invitation::builders::AcceptInvitationInputBuilder::default()
31    }
32}
33
34/// A builder for [`AcceptInvitationInput`](crate::operation::accept_invitation::AcceptInvitationInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct AcceptInvitationInputBuilder {
38    pub(crate) administrator_account_id: ::std::option::Option<::std::string::String>,
39    pub(crate) invitation_id: ::std::option::Option<::std::string::String>,
40    pub(crate) master_account: ::std::option::Option<::std::string::String>,
41}
42impl AcceptInvitationInputBuilder {
43    /// <p>The Amazon Web Services account ID for the account that sent the invitation.</p>
44    pub fn administrator_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.administrator_account_id = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The Amazon Web Services account ID for the account that sent the invitation.</p>
49    pub fn set_administrator_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.administrator_account_id = input;
51        self
52    }
53    /// <p>The Amazon Web Services account ID for the account that sent the invitation.</p>
54    pub fn get_administrator_account_id(&self) -> &::std::option::Option<::std::string::String> {
55        &self.administrator_account_id
56    }
57    /// <p>The unique identifier for the invitation to accept.</p>
58    /// This field is required.
59    pub fn invitation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.invitation_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The unique identifier for the invitation to accept.</p>
64    pub fn set_invitation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.invitation_id = input;
66        self
67    }
68    /// <p>The unique identifier for the invitation to accept.</p>
69    pub fn get_invitation_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.invitation_id
71    }
72    /// <p>(Deprecated) The Amazon Web Services account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
73    pub fn master_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.master_account = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>(Deprecated) The Amazon Web Services account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
78    pub fn set_master_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.master_account = input;
80        self
81    }
82    /// <p>(Deprecated) The Amazon Web Services account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
83    pub fn get_master_account(&self) -> &::std::option::Option<::std::string::String> {
84        &self.master_account
85    }
86    /// Consumes the builder and constructs a [`AcceptInvitationInput`](crate::operation::accept_invitation::AcceptInvitationInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::accept_invitation::AcceptInvitationInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::accept_invitation::AcceptInvitationInput {
91            administrator_account_id: self.administrator_account_id,
92            invitation_id: self.invitation_id,
93            master_account: self.master_account,
94        })
95    }
96}