aws_sdk_amplifyuibuilder/operation/get_component/
_get_component_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetComponentInput {
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}
13impl GetComponentInput {
14 pub fn app_id(&self) -> ::std::option::Option<&str> {
16 self.app_id.as_deref()
17 }
18 pub fn environment_name(&self) -> ::std::option::Option<&str> {
20 self.environment_name.as_deref()
21 }
22 pub fn id(&self) -> ::std::option::Option<&str> {
24 self.id.as_deref()
25 }
26}
27impl GetComponentInput {
28 pub fn builder() -> crate::operation::get_component::builders::GetComponentInputBuilder {
30 crate::operation::get_component::builders::GetComponentInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetComponentInputBuilder {
38 pub(crate) app_id: ::std::option::Option<::std::string::String>,
39 pub(crate) environment_name: ::std::option::Option<::std::string::String>,
40 pub(crate) id: ::std::option::Option<::std::string::String>,
41}
42impl GetComponentInputBuilder {
43 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.app_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.app_id = input;
52 self
53 }
54 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.app_id
57 }
58 pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.environment_name = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.environment_name = input;
67 self
68 }
69 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.environment_name
72 }
73 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.id = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.id = input;
82 self
83 }
84 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
86 &self.id
87 }
88 pub fn build(
90 self,
91 ) -> ::std::result::Result<crate::operation::get_component::GetComponentInput, ::aws_smithy_types::error::operation::BuildError> {
92 ::std::result::Result::Ok(crate::operation::get_component::GetComponentInput {
93 app_id: self.app_id,
94 environment_name: self.environment_name,
95 id: self.id,
96 })
97 }
98}