// 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, ::std::fmt::Debug)]
pub struct DeleteAccountSettingInput {
/// <p>The resource name to disable the account setting for. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p>
pub name: ::std::option::Option<crate::types::SettingName>,
/// <p>The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p>
/// <p>In order to use this parameter, you must be the root user, or the principal.</p>
pub principal_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteAccountSettingInput {
/// <p>The resource name to disable the account setting for. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p>
pub fn name(&self) -> ::std::option::Option<&crate::types::SettingName> {
self.name.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p>
/// <p>In order to use this parameter, you must be the root user, or the principal.</p>
pub fn principal_arn(&self) -> ::std::option::Option<&str> {
self.principal_arn.as_deref()
}
}
impl DeleteAccountSettingInput {
/// Creates a new builder-style object to manufacture [`DeleteAccountSettingInput`](crate::operation::delete_account_setting::DeleteAccountSettingInput).
pub fn builder() -> crate::operation::delete_account_setting::builders::DeleteAccountSettingInputBuilder {
crate::operation::delete_account_setting::builders::DeleteAccountSettingInputBuilder::default()
}
}
/// A builder for [`DeleteAccountSettingInput`](crate::operation::delete_account_setting::DeleteAccountSettingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteAccountSettingInputBuilder {
pub(crate) name: ::std::option::Option<crate::types::SettingName>,
pub(crate) principal_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteAccountSettingInputBuilder {
/// <p>The resource name to disable the account setting for. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p>
/// This field is required.
pub fn name(mut self, input: crate::types::SettingName) -> Self {
self.name = ::std::option::Option::Some(input);
self
}
/// <p>The resource name to disable the account setting for. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p>
pub fn set_name(mut self, input: ::std::option::Option<crate::types::SettingName>) -> Self {
self.name = input;
self
}
/// <p>The resource name to disable the account setting for. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p>
pub fn get_name(&self) -> &::std::option::Option<crate::types::SettingName> {
&self.name
}
/// <p>The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p>
/// <p>In order to use this parameter, you must be the root user, or the principal.</p>
pub fn principal_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.principal_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p>
/// <p>In order to use this parameter, you must be the root user, or the principal.</p>
pub fn set_principal_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.principal_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p>
/// <p>In order to use this parameter, you must be the root user, or the principal.</p>
pub fn get_principal_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.principal_arn
}
/// Consumes the builder and constructs a [`DeleteAccountSettingInput`](crate::operation::delete_account_setting::DeleteAccountSettingInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_account_setting::DeleteAccountSettingInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::delete_account_setting::DeleteAccountSettingInput {
name: self.name,
principal_arn: self.principal_arn,
})
}
}