aws-sdk-amplifybackend 1.99.0

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

/// <p>The request body for DeleteBackendAPI.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteBackendApiInput {
    /// <p>The app ID.</p>
    pub app_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the backend environment.</p>
    pub backend_environment_name: ::std::option::Option<::std::string::String>,
    /// <p>Defines the resource configuration for the data model in your Amplify project.</p>
    pub resource_config: ::std::option::Option<crate::types::BackendApiResourceConfig>,
    /// <p>The name of this resource.</p>
    pub resource_name: ::std::option::Option<::std::string::String>,
}
impl DeleteBackendApiInput {
    /// <p>The app ID.</p>
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
    /// <p>The name of the backend environment.</p>
    pub fn backend_environment_name(&self) -> ::std::option::Option<&str> {
        self.backend_environment_name.as_deref()
    }
    /// <p>Defines the resource configuration for the data model in your Amplify project.</p>
    pub fn resource_config(&self) -> ::std::option::Option<&crate::types::BackendApiResourceConfig> {
        self.resource_config.as_ref()
    }
    /// <p>The name of this resource.</p>
    pub fn resource_name(&self) -> ::std::option::Option<&str> {
        self.resource_name.as_deref()
    }
}
impl DeleteBackendApiInput {
    /// Creates a new builder-style object to manufacture [`DeleteBackendApiInput`](crate::operation::delete_backend_api::DeleteBackendApiInput).
    pub fn builder() -> crate::operation::delete_backend_api::builders::DeleteBackendApiInputBuilder {
        crate::operation::delete_backend_api::builders::DeleteBackendApiInputBuilder::default()
    }
}

/// A builder for [`DeleteBackendApiInput`](crate::operation::delete_backend_api::DeleteBackendApiInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteBackendApiInputBuilder {
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
    pub(crate) backend_environment_name: ::std::option::Option<::std::string::String>,
    pub(crate) resource_config: ::std::option::Option<crate::types::BackendApiResourceConfig>,
    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
}
impl DeleteBackendApiInputBuilder {
    /// <p>The app ID.</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 app ID.</p>
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// <p>The app ID.</p>
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// <p>The name of the backend environment.</p>
    /// This field is required.
    pub fn backend_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.backend_environment_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the backend environment.</p>
    pub fn set_backend_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.backend_environment_name = input;
        self
    }
    /// <p>The name of the backend environment.</p>
    pub fn get_backend_environment_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.backend_environment_name
    }
    /// <p>Defines the resource configuration for the data model in your Amplify project.</p>
    pub fn resource_config(mut self, input: crate::types::BackendApiResourceConfig) -> Self {
        self.resource_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Defines the resource configuration for the data model in your Amplify project.</p>
    pub fn set_resource_config(mut self, input: ::std::option::Option<crate::types::BackendApiResourceConfig>) -> Self {
        self.resource_config = input;
        self
    }
    /// <p>Defines the resource configuration for the data model in your Amplify project.</p>
    pub fn get_resource_config(&self) -> &::std::option::Option<crate::types::BackendApiResourceConfig> {
        &self.resource_config
    }
    /// <p>The name of this resource.</p>
    /// This field is required.
    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of this resource.</p>
    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_name = input;
        self
    }
    /// <p>The name of this resource.</p>
    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_name
    }
    /// Consumes the builder and constructs a [`DeleteBackendApiInput`](crate::operation::delete_backend_api::DeleteBackendApiInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_backend_api::DeleteBackendApiInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_backend_api::DeleteBackendApiInput {
            app_id: self.app_id,
            backend_environment_name: self.backend_environment_name,
            resource_config: self.resource_config,
            resource_name: self.resource_name,
        })
    }
}