aws_sdk_account/operation/get_alternate_contact/_get_alternate_contact_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 GetAlternateContactInput {
6 /// <p>Specifies which alternate contact you want to retrieve.</p>
7 pub alternate_contact_type: ::std::option::Option<crate::types::AlternateContactType>,
8 /// <p>Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.</p>
9 /// <p>If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.</p>
10 /// <p>To use this parameter, the caller must be an identity in the <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account">organization's management account</a> or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">all features enabled</a>, and the organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html">delegated admin</a> account assigned.</p><note>
11 /// <p>The management account can't specify its own <code>AccountId</code>; it must call the operation in standalone context by not including the <code>AccountId</code> parameter.</p>
12 /// </note>
13 /// <p>To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.</p>
14 pub account_id: ::std::option::Option<::std::string::String>,
15}
16impl GetAlternateContactInput {
17 /// <p>Specifies which alternate contact you want to retrieve.</p>
18 pub fn alternate_contact_type(&self) -> ::std::option::Option<&crate::types::AlternateContactType> {
19 self.alternate_contact_type.as_ref()
20 }
21 /// <p>Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.</p>
22 /// <p>If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.</p>
23 /// <p>To use this parameter, the caller must be an identity in the <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account">organization's management account</a> or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">all features enabled</a>, and the organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html">delegated admin</a> account assigned.</p><note>
24 /// <p>The management account can't specify its own <code>AccountId</code>; it must call the operation in standalone context by not including the <code>AccountId</code> parameter.</p>
25 /// </note>
26 /// <p>To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.</p>
27 pub fn account_id(&self) -> ::std::option::Option<&str> {
28 self.account_id.as_deref()
29 }
30}
31impl GetAlternateContactInput {
32 /// Creates a new builder-style object to manufacture [`GetAlternateContactInput`](crate::operation::get_alternate_contact::GetAlternateContactInput).
33 pub fn builder() -> crate::operation::get_alternate_contact::builders::GetAlternateContactInputBuilder {
34 crate::operation::get_alternate_contact::builders::GetAlternateContactInputBuilder::default()
35 }
36}
37
38/// A builder for [`GetAlternateContactInput`](crate::operation::get_alternate_contact::GetAlternateContactInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct GetAlternateContactInputBuilder {
42 pub(crate) alternate_contact_type: ::std::option::Option<crate::types::AlternateContactType>,
43 pub(crate) account_id: ::std::option::Option<::std::string::String>,
44}
45impl GetAlternateContactInputBuilder {
46 /// <p>Specifies which alternate contact you want to retrieve.</p>
47 /// This field is required.
48 pub fn alternate_contact_type(mut self, input: crate::types::AlternateContactType) -> Self {
49 self.alternate_contact_type = ::std::option::Option::Some(input);
50 self
51 }
52 /// <p>Specifies which alternate contact you want to retrieve.</p>
53 pub fn set_alternate_contact_type(mut self, input: ::std::option::Option<crate::types::AlternateContactType>) -> Self {
54 self.alternate_contact_type = input;
55 self
56 }
57 /// <p>Specifies which alternate contact you want to retrieve.</p>
58 pub fn get_alternate_contact_type(&self) -> &::std::option::Option<crate::types::AlternateContactType> {
59 &self.alternate_contact_type
60 }
61 /// <p>Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.</p>
62 /// <p>If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.</p>
63 /// <p>To use this parameter, the caller must be an identity in the <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account">organization's management account</a> or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">all features enabled</a>, and the organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html">delegated admin</a> account assigned.</p><note>
64 /// <p>The management account can't specify its own <code>AccountId</code>; it must call the operation in standalone context by not including the <code>AccountId</code> parameter.</p>
65 /// </note>
66 /// <p>To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.</p>
67 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.account_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 /// <p>Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.</p>
72 /// <p>If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.</p>
73 /// <p>To use this parameter, the caller must be an identity in the <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account">organization's management account</a> or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">all features enabled</a>, and the organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html">delegated admin</a> account assigned.</p><note>
74 /// <p>The management account can't specify its own <code>AccountId</code>; it must call the operation in standalone context by not including the <code>AccountId</code> parameter.</p>
75 /// </note>
76 /// <p>To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.</p>
77 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.account_id = input;
79 self
80 }
81 /// <p>Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.</p>
82 /// <p>If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.</p>
83 /// <p>To use this parameter, the caller must be an identity in the <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account">organization's management account</a> or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">all features enabled</a>, and the organization must have <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html">delegated admin</a> account assigned.</p><note>
84 /// <p>The management account can't specify its own <code>AccountId</code>; it must call the operation in standalone context by not including the <code>AccountId</code> parameter.</p>
85 /// </note>
86 /// <p>To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.</p>
87 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
88 &self.account_id
89 }
90 /// Consumes the builder and constructs a [`GetAlternateContactInput`](crate::operation::get_alternate_contact::GetAlternateContactInput).
91 pub fn build(
92 self,
93 ) -> ::std::result::Result<crate::operation::get_alternate_contact::GetAlternateContactInput, ::aws_smithy_types::error::operation::BuildError>
94 {
95 ::std::result::Result::Ok(crate::operation::get_alternate_contact::GetAlternateContactInput {
96 alternate_contact_type: self.alternate_contact_type,
97 account_id: self.account_id,
98 })
99 }
100}