aws-sdk-pinpointsmsvoicev2 1.124.0

AWS SDK for Amazon Pinpoint SMS Voice V2
Documentation
// 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 DisassociateProtectConfigurationOutput {
    /// <p>The Amazon Resource Name (ARN) of the configuration set.</p>
    pub configuration_set_arn: ::std::string::String,
    /// <p>The name of the ConfigurationSet.</p>
    pub configuration_set_name: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the protect configuration.</p>
    pub protect_configuration_arn: ::std::string::String,
    /// <p>The unique identifier for the protect configuration.</p>
    pub protect_configuration_id: ::std::string::String,
    _request_id: Option<String>,
}
impl DisassociateProtectConfigurationOutput {
    /// <p>The Amazon Resource Name (ARN) of the configuration set.</p>
    pub fn configuration_set_arn(&self) -> &str {
        use std::ops::Deref;
        self.configuration_set_arn.deref()
    }
    /// <p>The name of the ConfigurationSet.</p>
    pub fn configuration_set_name(&self) -> &str {
        use std::ops::Deref;
        self.configuration_set_name.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the protect configuration.</p>
    pub fn protect_configuration_arn(&self) -> &str {
        use std::ops::Deref;
        self.protect_configuration_arn.deref()
    }
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn protect_configuration_id(&self) -> &str {
        use std::ops::Deref;
        self.protect_configuration_id.deref()
    }
}
impl ::aws_types::request_id::RequestId for DisassociateProtectConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DisassociateProtectConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`DisassociateProtectConfigurationOutput`](crate::operation::disassociate_protect_configuration::DisassociateProtectConfigurationOutput).
    pub fn builder() -> crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder {
        crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder::default()
    }
}

/// A builder for [`DisassociateProtectConfigurationOutput`](crate::operation::disassociate_protect_configuration::DisassociateProtectConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateProtectConfigurationOutputBuilder {
    pub(crate) configuration_set_arn: ::std::option::Option<::std::string::String>,
    pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
    pub(crate) protect_configuration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) protect_configuration_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DisassociateProtectConfigurationOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the configuration set.</p>
    /// This field is required.
    pub fn configuration_set_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.configuration_set_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the configuration set.</p>
    pub fn set_configuration_set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_set_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the configuration set.</p>
    pub fn get_configuration_set_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_set_arn
    }
    /// <p>The name of the ConfigurationSet.</p>
    /// This field is required.
    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.configuration_set_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the ConfigurationSet.</p>
    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_set_name = input;
        self
    }
    /// <p>The name of the ConfigurationSet.</p>
    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_set_name
    }
    /// <p>The Amazon Resource Name (ARN) of the protect configuration.</p>
    /// This field is required.
    pub fn protect_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.protect_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the protect configuration.</p>
    pub fn set_protect_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.protect_configuration_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the protect configuration.</p>
    pub fn get_protect_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.protect_configuration_arn
    }
    /// <p>The unique identifier for the protect configuration.</p>
    /// This field is required.
    pub fn protect_configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.protect_configuration_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn set_protect_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.protect_configuration_id = input;
        self
    }
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn get_protect_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.protect_configuration_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DisassociateProtectConfigurationOutput`](crate::operation::disassociate_protect_configuration::DisassociateProtectConfigurationOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`configuration_set_arn`](crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder::configuration_set_arn)
    /// - [`configuration_set_name`](crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder::configuration_set_name)
    /// - [`protect_configuration_arn`](crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder::protect_configuration_arn)
    /// - [`protect_configuration_id`](crate::operation::disassociate_protect_configuration::builders::DisassociateProtectConfigurationOutputBuilder::protect_configuration_id)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::disassociate_protect_configuration::DisassociateProtectConfigurationOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::disassociate_protect_configuration::DisassociateProtectConfigurationOutput {
                configuration_set_arn: self.configuration_set_arn.ok_or_else(|| {
                    ::aws_smithy_types::error::operation::BuildError::missing_field(
                        "configuration_set_arn",
                        "configuration_set_arn was not specified but it is required when building DisassociateProtectConfigurationOutput",
                    )
                })?,
                configuration_set_name: self.configuration_set_name.ok_or_else(|| {
                    ::aws_smithy_types::error::operation::BuildError::missing_field(
                        "configuration_set_name",
                        "configuration_set_name was not specified but it is required when building DisassociateProtectConfigurationOutput",
                    )
                })?,
                protect_configuration_arn: self.protect_configuration_arn.ok_or_else(|| {
                    ::aws_smithy_types::error::operation::BuildError::missing_field(
                        "protect_configuration_arn",
                        "protect_configuration_arn was not specified but it is required when building DisassociateProtectConfigurationOutput",
                    )
                })?,
                protect_configuration_id: self.protect_configuration_id.ok_or_else(|| {
                    ::aws_smithy_types::error::operation::BuildError::missing_field(
                        "protect_configuration_id",
                        "protect_configuration_id was not specified but it is required when building DisassociateProtectConfigurationOutput",
                    )
                })?,
                _request_id: self._request_id,
            },
        )
    }
}