Skip to main content

aws_sdk_amplifybackend/operation/update_backend_config/
_update_backend_config_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request body for UpdateBackendConfig.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateBackendConfigInput {
7    /// <p>The app ID.</p>
8    pub app_id: ::std::option::Option<::std::string::String>,
9    /// <p>Describes the Amazon Cognito configuration for Admin UI access.</p>
10    pub login_auth_config: ::std::option::Option<crate::types::LoginAuthConfigReqObj>,
11}
12impl UpdateBackendConfigInput {
13    /// <p>The app ID.</p>
14    pub fn app_id(&self) -> ::std::option::Option<&str> {
15        self.app_id.as_deref()
16    }
17    /// <p>Describes the Amazon Cognito configuration for Admin UI access.</p>
18    pub fn login_auth_config(&self) -> ::std::option::Option<&crate::types::LoginAuthConfigReqObj> {
19        self.login_auth_config.as_ref()
20    }
21}
22impl UpdateBackendConfigInput {
23    /// Creates a new builder-style object to manufacture [`UpdateBackendConfigInput`](crate::operation::update_backend_config::UpdateBackendConfigInput).
24    pub fn builder() -> crate::operation::update_backend_config::builders::UpdateBackendConfigInputBuilder {
25        crate::operation::update_backend_config::builders::UpdateBackendConfigInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateBackendConfigInput`](crate::operation::update_backend_config::UpdateBackendConfigInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateBackendConfigInputBuilder {
33    pub(crate) app_id: ::std::option::Option<::std::string::String>,
34    pub(crate) login_auth_config: ::std::option::Option<crate::types::LoginAuthConfigReqObj>,
35}
36impl UpdateBackendConfigInputBuilder {
37    /// <p>The app ID.</p>
38    /// This field is required.
39    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.app_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The app ID.</p>
44    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.app_id = input;
46        self
47    }
48    /// <p>The app ID.</p>
49    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.app_id
51    }
52    /// <p>Describes the Amazon Cognito configuration for Admin UI access.</p>
53    pub fn login_auth_config(mut self, input: crate::types::LoginAuthConfigReqObj) -> Self {
54        self.login_auth_config = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Describes the Amazon Cognito configuration for Admin UI access.</p>
58    pub fn set_login_auth_config(mut self, input: ::std::option::Option<crate::types::LoginAuthConfigReqObj>) -> Self {
59        self.login_auth_config = input;
60        self
61    }
62    /// <p>Describes the Amazon Cognito configuration for Admin UI access.</p>
63    pub fn get_login_auth_config(&self) -> &::std::option::Option<crate::types::LoginAuthConfigReqObj> {
64        &self.login_auth_config
65    }
66    /// Consumes the builder and constructs a [`UpdateBackendConfigInput`](crate::operation::update_backend_config::UpdateBackendConfigInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::update_backend_config::UpdateBackendConfigInput, ::aws_smithy_types::error::operation::BuildError>
70    {
71        ::std::result::Result::Ok(crate::operation::update_backend_config::UpdateBackendConfigInput {
72            app_id: self.app_id,
73            login_auth_config: self.login_auth_config,
74        })
75    }
76}