aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
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 UpdateAppInput {
    /// <p>The name of the app.</p>
    pub app_name: ::std::option::Option<::std::string::String>,
    /// <p>The source configuration for the app.</p>
    pub source_config: ::std::option::Option<crate::types::AppUpdateSourceConfigRequest>,
    /// <p>The web hosting settings for the app.</p>
    pub web: ::std::option::Option<crate::types::AppUpdateWebConfigRequest>,
    /// <p>The backend settings for the app. Specify this to add a backend to an app that doesn't have one. For an app that already has a backend, you can change only the migrations directory. Omit this to leave the backend unchanged.</p>
    pub backend: ::std::option::Option<crate::types::AppBackendRequest>,
}
impl UpdateAppInput {
    /// <p>The name of the app.</p>
    pub fn app_name(&self) -> ::std::option::Option<&str> {
        self.app_name.as_deref()
    }
    /// <p>The source configuration for the app.</p>
    pub fn source_config(&self) -> ::std::option::Option<&crate::types::AppUpdateSourceConfigRequest> {
        self.source_config.as_ref()
    }
    /// <p>The web hosting settings for the app.</p>
    pub fn web(&self) -> ::std::option::Option<&crate::types::AppUpdateWebConfigRequest> {
        self.web.as_ref()
    }
    /// <p>The backend settings for the app. Specify this to add a backend to an app that doesn't have one. For an app that already has a backend, you can change only the migrations directory. Omit this to leave the backend unchanged.</p>
    pub fn backend(&self) -> ::std::option::Option<&crate::types::AppBackendRequest> {
        self.backend.as_ref()
    }
}
impl UpdateAppInput {
    /// Creates a new builder-style object to manufacture [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
    pub fn builder() -> crate::operation::update_app::builders::UpdateAppInputBuilder {
        crate::operation::update_app::builders::UpdateAppInputBuilder::default()
    }
}

/// A builder for [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAppInputBuilder {
    pub(crate) app_name: ::std::option::Option<::std::string::String>,
    pub(crate) source_config: ::std::option::Option<crate::types::AppUpdateSourceConfigRequest>,
    pub(crate) web: ::std::option::Option<crate::types::AppUpdateWebConfigRequest>,
    pub(crate) backend: ::std::option::Option<crate::types::AppBackendRequest>,
}
impl UpdateAppInputBuilder {
    /// <p>The name of the app.</p>
    /// This field is required.
    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the app.</p>
    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_name = input;
        self
    }
    /// <p>The name of the app.</p>
    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_name
    }
    /// <p>The source configuration for the app.</p>
    pub fn source_config(mut self, input: crate::types::AppUpdateSourceConfigRequest) -> Self {
        self.source_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source configuration for the app.</p>
    pub fn set_source_config(mut self, input: ::std::option::Option<crate::types::AppUpdateSourceConfigRequest>) -> Self {
        self.source_config = input;
        self
    }
    /// <p>The source configuration for the app.</p>
    pub fn get_source_config(&self) -> &::std::option::Option<crate::types::AppUpdateSourceConfigRequest> {
        &self.source_config
    }
    /// <p>The web hosting settings for the app.</p>
    pub fn web(mut self, input: crate::types::AppUpdateWebConfigRequest) -> Self {
        self.web = ::std::option::Option::Some(input);
        self
    }
    /// <p>The web hosting settings for the app.</p>
    pub fn set_web(mut self, input: ::std::option::Option<crate::types::AppUpdateWebConfigRequest>) -> Self {
        self.web = input;
        self
    }
    /// <p>The web hosting settings for the app.</p>
    pub fn get_web(&self) -> &::std::option::Option<crate::types::AppUpdateWebConfigRequest> {
        &self.web
    }
    /// <p>The backend settings for the app. Specify this to add a backend to an app that doesn't have one. For an app that already has a backend, you can change only the migrations directory. Omit this to leave the backend unchanged.</p>
    pub fn backend(mut self, input: crate::types::AppBackendRequest) -> Self {
        self.backend = ::std::option::Option::Some(input);
        self
    }
    /// <p>The backend settings for the app. Specify this to add a backend to an app that doesn't have one. For an app that already has a backend, you can change only the migrations directory. Omit this to leave the backend unchanged.</p>
    pub fn set_backend(mut self, input: ::std::option::Option<crate::types::AppBackendRequest>) -> Self {
        self.backend = input;
        self
    }
    /// <p>The backend settings for the app. Specify this to add a backend to an app that doesn't have one. For an app that already has a backend, you can change only the migrations directory. Omit this to leave the backend unchanged.</p>
    pub fn get_backend(&self) -> &::std::option::Option<crate::types::AppBackendRequest> {
        &self.backend
    }
    /// Consumes the builder and constructs a [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_app::UpdateAppInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_app::UpdateAppInput {
            app_name: self.app_name,
            source_config: self.source_config,
            web: self.web,
            backend: self.backend,
        })
    }
}