aws-sdk-amplify 1.107.0

AWS SDK for AWS Amplify
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The request structure for the delete backend environment request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteBackendEnvironmentInput {
    /// <p>The unique ID of an Amplify app.</p>
    pub app_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of a backend environment of an Amplify app.</p>
    pub environment_name: ::std::option::Option<::std::string::String>,
}
impl DeleteBackendEnvironmentInput {
    /// <p>The unique ID of an Amplify app.</p>
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
    /// <p>The name of a backend environment of an Amplify app.</p>
    pub fn environment_name(&self) -> ::std::option::Option<&str> {
        self.environment_name.as_deref()
    }
}
impl DeleteBackendEnvironmentInput {
    /// Creates a new builder-style object to manufacture [`DeleteBackendEnvironmentInput`](crate::operation::delete_backend_environment::DeleteBackendEnvironmentInput).
    pub fn builder() -> crate::operation::delete_backend_environment::builders::DeleteBackendEnvironmentInputBuilder {
        crate::operation::delete_backend_environment::builders::DeleteBackendEnvironmentInputBuilder::default()
    }
}

/// A builder for [`DeleteBackendEnvironmentInput`](crate::operation::delete_backend_environment::DeleteBackendEnvironmentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteBackendEnvironmentInputBuilder {
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
    pub(crate) environment_name: ::std::option::Option<::std::string::String>,
}
impl DeleteBackendEnvironmentInputBuilder {
    /// <p>The unique ID of an Amplify app.</p>
    /// This field is required.
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID of an Amplify app.</p>
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// <p>The unique ID of an Amplify app.</p>
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// <p>The name of a backend environment of an Amplify app.</p>
    /// This field is required.
    pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a backend environment of an Amplify app.</p>
    pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_name = input;
        self
    }
    /// <p>The name of a backend environment of an Amplify app.</p>
    pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_name
    }
    /// Consumes the builder and constructs a [`DeleteBackendEnvironmentInput`](crate::operation::delete_backend_environment::DeleteBackendEnvironmentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::delete_backend_environment::DeleteBackendEnvironmentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::delete_backend_environment::DeleteBackendEnvironmentInput {
            app_id: self.app_id,
            environment_name: self.environment_name,
        })
    }
}