// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutAlternateContactInput {
/// <p>Specifies a name for the alternate contact.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>Specifies a title for the alternate contact.</p>
pub title: ::std::option::Option<::std::string::String>,
/// <p>Specifies an email address for the alternate contact.</p>
pub email_address: ::std::option::Option<::std::string::String>,
/// <p>Specifies a phone number for the alternate contact.</p>
pub phone_number: ::std::option::Option<::std::string::String>,
/// <p>Specifies which alternate contact you want to create or update.</p>
pub alternate_contact_type: ::std::option::Option<crate::types::AlternateContactType>,
/// <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>
/// <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>
/// <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/services-that-can-integrate-account.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#delegated-admin">delegated administrator</a> account assigned.</p><note>
/// <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>
/// </note>
/// <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>
pub account_id: ::std::option::Option<::std::string::String>,
}
impl PutAlternateContactInput {
/// <p>Specifies a name for the alternate contact.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Specifies a title for the alternate contact.</p>
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
/// <p>Specifies an email address for the alternate contact.</p>
pub fn email_address(&self) -> ::std::option::Option<&str> {
self.email_address.as_deref()
}
/// <p>Specifies a phone number for the alternate contact.</p>
pub fn phone_number(&self) -> ::std::option::Option<&str> {
self.phone_number.as_deref()
}
/// <p>Specifies which alternate contact you want to create or update.</p>
pub fn alternate_contact_type(&self) -> ::std::option::Option<&crate::types::AlternateContactType> {
self.alternate_contact_type.as_ref()
}
/// <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>
/// <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>
/// <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/services-that-can-integrate-account.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#delegated-admin">delegated administrator</a> account assigned.</p><note>
/// <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>
/// </note>
/// <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>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
}
impl ::std::fmt::Debug for PutAlternateContactInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutAlternateContactInput");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.field("phone_number", &"*** Sensitive Data Redacted ***");
formatter.field("alternate_contact_type", &self.alternate_contact_type);
formatter.field("account_id", &self.account_id);
formatter.finish()
}
}
impl PutAlternateContactInput {
/// Creates a new builder-style object to manufacture [`PutAlternateContactInput`](crate::operation::put_alternate_contact::PutAlternateContactInput).
pub fn builder() -> crate::operation::put_alternate_contact::builders::PutAlternateContactInputBuilder {
crate::operation::put_alternate_contact::builders::PutAlternateContactInputBuilder::default()
}
}
/// A builder for [`PutAlternateContactInput`](crate::operation::put_alternate_contact::PutAlternateContactInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PutAlternateContactInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) email_address: ::std::option::Option<::std::string::String>,
pub(crate) phone_number: ::std::option::Option<::std::string::String>,
pub(crate) alternate_contact_type: ::std::option::Option<crate::types::AlternateContactType>,
pub(crate) account_id: ::std::option::Option<::std::string::String>,
}
impl PutAlternateContactInputBuilder {
/// <p>Specifies a name for the alternate contact.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies a name for the alternate contact.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>Specifies a name for the alternate contact.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>Specifies a title for the alternate contact.</p>
/// This field is required.
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies a title for the alternate contact.</p>
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
/// <p>Specifies a title for the alternate contact.</p>
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
/// <p>Specifies an email address for the alternate contact.</p>
/// This field is required.
pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.email_address = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies an email address for the alternate contact.</p>
pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.email_address = input;
self
}
/// <p>Specifies an email address for the alternate contact.</p>
pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
&self.email_address
}
/// <p>Specifies a phone number for the alternate contact.</p>
/// This field is required.
pub fn phone_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.phone_number = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies a phone number for the alternate contact.</p>
pub fn set_phone_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.phone_number = input;
self
}
/// <p>Specifies a phone number for the alternate contact.</p>
pub fn get_phone_number(&self) -> &::std::option::Option<::std::string::String> {
&self.phone_number
}
/// <p>Specifies which alternate contact you want to create or update.</p>
/// This field is required.
pub fn alternate_contact_type(mut self, input: crate::types::AlternateContactType) -> Self {
self.alternate_contact_type = ::std::option::Option::Some(input);
self
}
/// <p>Specifies which alternate contact you want to create or update.</p>
pub fn set_alternate_contact_type(mut self, input: ::std::option::Option<crate::types::AlternateContactType>) -> Self {
self.alternate_contact_type = input;
self
}
/// <p>Specifies which alternate contact you want to create or update.</p>
pub fn get_alternate_contact_type(&self) -> &::std::option::Option<crate::types::AlternateContactType> {
&self.alternate_contact_type
}
/// <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>
/// <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>
/// <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/services-that-can-integrate-account.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#delegated-admin">delegated administrator</a> account assigned.</p><note>
/// <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>
/// </note>
/// <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>
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <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>
/// <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>
/// <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/services-that-can-integrate-account.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#delegated-admin">delegated administrator</a> account assigned.</p><note>
/// <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>
/// </note>
/// <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>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <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>
/// <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>
/// <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/services-that-can-integrate-account.html">trusted access</a> enabled for the Account Management service, and optionally a <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#delegated-admin">delegated administrator</a> account assigned.</p><note>
/// <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>
/// </note>
/// <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>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// Consumes the builder and constructs a [`PutAlternateContactInput`](crate::operation::put_alternate_contact::PutAlternateContactInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_alternate_contact::PutAlternateContactInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_alternate_contact::PutAlternateContactInput {
name: self.name,
title: self.title,
email_address: self.email_address,
phone_number: self.phone_number,
alternate_contact_type: self.alternate_contact_type,
account_id: self.account_id,
})
}
}
impl ::std::fmt::Debug for PutAlternateContactInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutAlternateContactInputBuilder");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.field("phone_number", &"*** Sensitive Data Redacted ***");
formatter.field("alternate_contact_type", &self.alternate_contact_type);
formatter.field("account_id", &self.account_id);
formatter.finish()
}
}