aws_sdk_amplifyuibuilder/operation/update_component/
_update_component_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateComponentInput {
6 pub app_id: ::std::option::Option<::std::string::String>,
8 pub environment_name: ::std::option::Option<::std::string::String>,
10 pub id: ::std::option::Option<::std::string::String>,
12 pub client_token: ::std::option::Option<::std::string::String>,
14 pub updated_component: ::std::option::Option<crate::types::UpdateComponentData>,
16}
17impl UpdateComponentInput {
18 pub fn app_id(&self) -> ::std::option::Option<&str> {
20 self.app_id.as_deref()
21 }
22 pub fn environment_name(&self) -> ::std::option::Option<&str> {
24 self.environment_name.as_deref()
25 }
26 pub fn id(&self) -> ::std::option::Option<&str> {
28 self.id.as_deref()
29 }
30 pub fn client_token(&self) -> ::std::option::Option<&str> {
32 self.client_token.as_deref()
33 }
34 pub fn updated_component(&self) -> ::std::option::Option<&crate::types::UpdateComponentData> {
36 self.updated_component.as_ref()
37 }
38}
39impl UpdateComponentInput {
40 pub fn builder() -> crate::operation::update_component::builders::UpdateComponentInputBuilder {
42 crate::operation::update_component::builders::UpdateComponentInputBuilder::default()
43 }
44}
45
46#[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 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 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.app_id = input;
66 self
67 }
68 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.app_id
71 }
72 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 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.environment_name = input;
81 self
82 }
83 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.environment_name
86 }
87 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.id = input;
96 self
97 }
98 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
100 &self.id
101 }
102 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 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.client_token = input;
110 self
111 }
112 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
114 &self.client_token
115 }
116 pub fn updated_component(mut self, input: crate::types::UpdateComponentData) -> Self {
119 self.updated_component = ::std::option::Option::Some(input);
120 self
121 }
122 pub fn set_updated_component(mut self, input: ::std::option::Option<crate::types::UpdateComponentData>) -> Self {
124 self.updated_component = input;
125 self
126 }
127 pub fn get_updated_component(&self) -> &::std::option::Option<crate::types::UpdateComponentData> {
129 &self.updated_component
130 }
131 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}