aws_sdk_amplifyuibuilder/operation/update_component/
_update_component_input.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 UpdateComponentInput {
6    /// <p>The unique ID for the Amplify app.</p>
7    pub app_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the backend environment that is part of the Amplify app.</p>
9    pub environment_name: ::std::option::Option<::std::string::String>,
10    /// <p>The unique ID for the component.</p>
11    pub id: ::std::option::Option<::std::string::String>,
12    /// <p>The unique client token.</p>
13    pub client_token: ::std::option::Option<::std::string::String>,
14    /// <p>The configuration of the updated component.</p>
15    pub updated_component: ::std::option::Option<crate::types::UpdateComponentData>,
16}
17impl UpdateComponentInput {
18    /// <p>The unique ID for the Amplify app.</p>
19    pub fn app_id(&self) -> ::std::option::Option<&str> {
20        self.app_id.as_deref()
21    }
22    /// <p>The name of the backend environment that is part of the Amplify app.</p>
23    pub fn environment_name(&self) -> ::std::option::Option<&str> {
24        self.environment_name.as_deref()
25    }
26    /// <p>The unique ID for the component.</p>
27    pub fn id(&self) -> ::std::option::Option<&str> {
28        self.id.as_deref()
29    }
30    /// <p>The unique client token.</p>
31    pub fn client_token(&self) -> ::std::option::Option<&str> {
32        self.client_token.as_deref()
33    }
34    /// <p>The configuration of the updated component.</p>
35    pub fn updated_component(&self) -> ::std::option::Option<&crate::types::UpdateComponentData> {
36        self.updated_component.as_ref()
37    }
38}
39impl UpdateComponentInput {
40    /// Creates a new builder-style object to manufacture [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
41    pub fn builder() -> crate::operation::update_component::builders::UpdateComponentInputBuilder {
42        crate::operation::update_component::builders::UpdateComponentInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateComponentInputBuilder {
50    pub(crate) app_id: ::std::option::Option<::std::string::String>,
51    pub(crate) environment_name: ::std::option::Option<::std::string::String>,
52    pub(crate) id: ::std::option::Option<::std::string::String>,
53    pub(crate) client_token: ::std::option::Option<::std::string::String>,
54    pub(crate) updated_component: ::std::option::Option<crate::types::UpdateComponentData>,
55}
56impl UpdateComponentInputBuilder {
57    /// <p>The unique ID for the Amplify app.</p>
58    /// This field is required.
59    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.app_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The unique ID for the Amplify app.</p>
64    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.app_id = input;
66        self
67    }
68    /// <p>The unique ID for the Amplify app.</p>
69    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.app_id
71    }
72    /// <p>The name of the backend environment that is part of the Amplify app.</p>
73    /// This field is required.
74    pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.environment_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the backend environment that is part of the Amplify app.</p>
79    pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.environment_name = input;
81        self
82    }
83    /// <p>The name of the backend environment that is part of the Amplify app.</p>
84    pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.environment_name
86    }
87    /// <p>The unique ID for the component.</p>
88    /// This field is required.
89    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The unique ID for the component.</p>
94    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.id = input;
96        self
97    }
98    /// <p>The unique ID for the component.</p>
99    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.id
101    }
102    /// <p>The unique client token.</p>
103    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.client_token = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The unique client token.</p>
108    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.client_token = input;
110        self
111    }
112    /// <p>The unique client token.</p>
113    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
114        &self.client_token
115    }
116    /// <p>The configuration of the updated component.</p>
117    /// This field is required.
118    pub fn updated_component(mut self, input: crate::types::UpdateComponentData) -> Self {
119        self.updated_component = ::std::option::Option::Some(input);
120        self
121    }
122    /// <p>The configuration of the updated component.</p>
123    pub fn set_updated_component(mut self, input: ::std::option::Option<crate::types::UpdateComponentData>) -> Self {
124        self.updated_component = input;
125        self
126    }
127    /// <p>The configuration of the updated component.</p>
128    pub fn get_updated_component(&self) -> &::std::option::Option<crate::types::UpdateComponentData> {
129        &self.updated_component
130    }
131    /// Consumes the builder and constructs a [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
132    pub fn build(
133        self,
134    ) -> ::std::result::Result<crate::operation::update_component::UpdateComponentInput, ::aws_smithy_types::error::operation::BuildError> {
135        ::std::result::Result::Ok(crate::operation::update_component::UpdateComponentInput {
136            app_id: self.app_id,
137            environment_name: self.environment_name,
138            id: self.id,
139            client_token: self.client_token,
140            updated_component: self.updated_component,
141        })
142    }
143}