aws_sdk_amplifybackend/operation/get_backend/
_get_backend_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request body for GetBackend.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetBackendInput {
7    /// <p>The app ID.</p>
8    pub app_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the backend environment.</p>
10    pub backend_environment_name: ::std::option::Option<::std::string::String>,
11}
12impl GetBackendInput {
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>The name of the backend environment.</p>
18    pub fn backend_environment_name(&self) -> ::std::option::Option<&str> {
19        self.backend_environment_name.as_deref()
20    }
21}
22impl GetBackendInput {
23    /// Creates a new builder-style object to manufacture [`GetBackendInput`](crate::operation::get_backend::GetBackendInput).
24    pub fn builder() -> crate::operation::get_backend::builders::GetBackendInputBuilder {
25        crate::operation::get_backend::builders::GetBackendInputBuilder::default()
26    }
27}
28
29/// A builder for [`GetBackendInput`](crate::operation::get_backend::GetBackendInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetBackendInputBuilder {
33    pub(crate) app_id: ::std::option::Option<::std::string::String>,
34    pub(crate) backend_environment_name: ::std::option::Option<::std::string::String>,
35}
36impl GetBackendInputBuilder {
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>The name of the backend environment.</p>
53    pub fn backend_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.backend_environment_name = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The name of the backend environment.</p>
58    pub fn set_backend_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.backend_environment_name = input;
60        self
61    }
62    /// <p>The name of the backend environment.</p>
63    pub fn get_backend_environment_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.backend_environment_name
65    }
66    /// Consumes the builder and constructs a [`GetBackendInput`](crate::operation::get_backend::GetBackendInput).
67    pub fn build(self) -> ::std::result::Result<crate::operation::get_backend::GetBackendInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::get_backend::GetBackendInput {
69            app_id: self.app_id,
70            backend_environment_name: self.backend_environment_name,
71        })
72    }
73}