aws_sdk_amplifybackend/operation/get_backend/
_get_backend_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetBackendOutput {
6    /// <p>A stringified version of the cli.json file for your Amplify project.</p>
7    pub amplify_feature_flags: ::std::option::Option<::std::string::String>,
8    /// <p>A stringified version of the current configs for your Amplify project.</p>
9    pub amplify_meta_config: ::std::option::Option<::std::string::String>,
10    /// <p>The app ID.</p>
11    pub app_id: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the app.</p>
13    pub app_name: ::std::option::Option<::std::string::String>,
14    /// <p>A list of backend environments in an array.</p>
15    pub backend_environment_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The name of the backend environment.</p>
17    pub backend_environment_name: ::std::option::Option<::std::string::String>,
18    /// <p>If the request failed, this is the returned error.</p>
19    pub error: ::std::option::Option<::std::string::String>,
20    _request_id: Option<String>,
21}
22impl GetBackendOutput {
23    /// <p>A stringified version of the cli.json file for your Amplify project.</p>
24    pub fn amplify_feature_flags(&self) -> ::std::option::Option<&str> {
25        self.amplify_feature_flags.as_deref()
26    }
27    /// <p>A stringified version of the current configs for your Amplify project.</p>
28    pub fn amplify_meta_config(&self) -> ::std::option::Option<&str> {
29        self.amplify_meta_config.as_deref()
30    }
31    /// <p>The app ID.</p>
32    pub fn app_id(&self) -> ::std::option::Option<&str> {
33        self.app_id.as_deref()
34    }
35    /// <p>The name of the app.</p>
36    pub fn app_name(&self) -> ::std::option::Option<&str> {
37        self.app_name.as_deref()
38    }
39    /// <p>A list of backend environments in an array.</p>
40    ///
41    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.backend_environment_list.is_none()`.
42    pub fn backend_environment_list(&self) -> &[::std::string::String] {
43        self.backend_environment_list.as_deref().unwrap_or_default()
44    }
45    /// <p>The name of the backend environment.</p>
46    pub fn backend_environment_name(&self) -> ::std::option::Option<&str> {
47        self.backend_environment_name.as_deref()
48    }
49    /// <p>If the request failed, this is the returned error.</p>
50    pub fn error(&self) -> ::std::option::Option<&str> {
51        self.error.as_deref()
52    }
53}
54impl ::aws_types::request_id::RequestId for GetBackendOutput {
55    fn request_id(&self) -> Option<&str> {
56        self._request_id.as_deref()
57    }
58}
59impl GetBackendOutput {
60    /// Creates a new builder-style object to manufacture [`GetBackendOutput`](crate::operation::get_backend::GetBackendOutput).
61    pub fn builder() -> crate::operation::get_backend::builders::GetBackendOutputBuilder {
62        crate::operation::get_backend::builders::GetBackendOutputBuilder::default()
63    }
64}
65
66/// A builder for [`GetBackendOutput`](crate::operation::get_backend::GetBackendOutput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct GetBackendOutputBuilder {
70    pub(crate) amplify_feature_flags: ::std::option::Option<::std::string::String>,
71    pub(crate) amplify_meta_config: ::std::option::Option<::std::string::String>,
72    pub(crate) app_id: ::std::option::Option<::std::string::String>,
73    pub(crate) app_name: ::std::option::Option<::std::string::String>,
74    pub(crate) backend_environment_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
75    pub(crate) backend_environment_name: ::std::option::Option<::std::string::String>,
76    pub(crate) error: ::std::option::Option<::std::string::String>,
77    _request_id: Option<String>,
78}
79impl GetBackendOutputBuilder {
80    /// <p>A stringified version of the cli.json file for your Amplify project.</p>
81    pub fn amplify_feature_flags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.amplify_feature_flags = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>A stringified version of the cli.json file for your Amplify project.</p>
86    pub fn set_amplify_feature_flags(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.amplify_feature_flags = input;
88        self
89    }
90    /// <p>A stringified version of the cli.json file for your Amplify project.</p>
91    pub fn get_amplify_feature_flags(&self) -> &::std::option::Option<::std::string::String> {
92        &self.amplify_feature_flags
93    }
94    /// <p>A stringified version of the current configs for your Amplify project.</p>
95    pub fn amplify_meta_config(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.amplify_meta_config = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>A stringified version of the current configs for your Amplify project.</p>
100    pub fn set_amplify_meta_config(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.amplify_meta_config = input;
102        self
103    }
104    /// <p>A stringified version of the current configs for your Amplify project.</p>
105    pub fn get_amplify_meta_config(&self) -> &::std::option::Option<::std::string::String> {
106        &self.amplify_meta_config
107    }
108    /// <p>The app ID.</p>
109    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.app_id = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The app ID.</p>
114    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.app_id = input;
116        self
117    }
118    /// <p>The app ID.</p>
119    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
120        &self.app_id
121    }
122    /// <p>The name of the app.</p>
123    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.app_name = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The name of the app.</p>
128    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.app_name = input;
130        self
131    }
132    /// <p>The name of the app.</p>
133    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
134        &self.app_name
135    }
136    /// Appends an item to `backend_environment_list`.
137    ///
138    /// To override the contents of this collection use [`set_backend_environment_list`](Self::set_backend_environment_list).
139    ///
140    /// <p>A list of backend environments in an array.</p>
141    pub fn backend_environment_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        let mut v = self.backend_environment_list.unwrap_or_default();
143        v.push(input.into());
144        self.backend_environment_list = ::std::option::Option::Some(v);
145        self
146    }
147    /// <p>A list of backend environments in an array.</p>
148    pub fn set_backend_environment_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
149        self.backend_environment_list = input;
150        self
151    }
152    /// <p>A list of backend environments in an array.</p>
153    pub fn get_backend_environment_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
154        &self.backend_environment_list
155    }
156    /// <p>The name of the backend environment.</p>
157    pub fn backend_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.backend_environment_name = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The name of the backend environment.</p>
162    pub fn set_backend_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.backend_environment_name = input;
164        self
165    }
166    /// <p>The name of the backend environment.</p>
167    pub fn get_backend_environment_name(&self) -> &::std::option::Option<::std::string::String> {
168        &self.backend_environment_name
169    }
170    /// <p>If the request failed, this is the returned error.</p>
171    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.error = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>If the request failed, this is the returned error.</p>
176    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.error = input;
178        self
179    }
180    /// <p>If the request failed, this is the returned error.</p>
181    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
182        &self.error
183    }
184    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
185        self._request_id = Some(request_id.into());
186        self
187    }
188
189    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
190        self._request_id = request_id;
191        self
192    }
193    /// Consumes the builder and constructs a [`GetBackendOutput`](crate::operation::get_backend::GetBackendOutput).
194    pub fn build(self) -> crate::operation::get_backend::GetBackendOutput {
195        crate::operation::get_backend::GetBackendOutput {
196            amplify_feature_flags: self.amplify_feature_flags,
197            amplify_meta_config: self.amplify_meta_config,
198            app_id: self.app_id,
199            app_name: self.app_name,
200            backend_environment_list: self.backend_environment_list,
201            backend_environment_name: self.backend_environment_name,
202            error: self.error,
203            _request_id: self._request_id,
204        }
205    }
206}