aws_sdk_amplifyuibuilder/operation/create_theme/
_create_theme_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateThemeInput {
6 pub app_id: ::std::option::Option<::std::string::String>,
8 pub environment_name: ::std::option::Option<::std::string::String>,
10 pub client_token: ::std::option::Option<::std::string::String>,
12 pub theme_to_create: ::std::option::Option<crate::types::CreateThemeData>,
14}
15impl CreateThemeInput {
16 pub fn app_id(&self) -> ::std::option::Option<&str> {
18 self.app_id.as_deref()
19 }
20 pub fn environment_name(&self) -> ::std::option::Option<&str> {
22 self.environment_name.as_deref()
23 }
24 pub fn client_token(&self) -> ::std::option::Option<&str> {
26 self.client_token.as_deref()
27 }
28 pub fn theme_to_create(&self) -> ::std::option::Option<&crate::types::CreateThemeData> {
30 self.theme_to_create.as_ref()
31 }
32}
33impl CreateThemeInput {
34 pub fn builder() -> crate::operation::create_theme::builders::CreateThemeInputBuilder {
36 crate::operation::create_theme::builders::CreateThemeInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateThemeInputBuilder {
44 pub(crate) app_id: ::std::option::Option<::std::string::String>,
45 pub(crate) environment_name: ::std::option::Option<::std::string::String>,
46 pub(crate) client_token: ::std::option::Option<::std::string::String>,
47 pub(crate) theme_to_create: ::std::option::Option<crate::types::CreateThemeData>,
48}
49impl CreateThemeInputBuilder {
50 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.app_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.app_id = input;
59 self
60 }
61 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.app_id
64 }
65 pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.environment_name = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.environment_name = input;
74 self
75 }
76 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
78 &self.environment_name
79 }
80 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.client_token = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.client_token = input;
88 self
89 }
90 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
92 &self.client_token
93 }
94 pub fn theme_to_create(mut self, input: crate::types::CreateThemeData) -> Self {
97 self.theme_to_create = ::std::option::Option::Some(input);
98 self
99 }
100 pub fn set_theme_to_create(mut self, input: ::std::option::Option<crate::types::CreateThemeData>) -> Self {
102 self.theme_to_create = input;
103 self
104 }
105 pub fn get_theme_to_create(&self) -> &::std::option::Option<crate::types::CreateThemeData> {
107 &self.theme_to_create
108 }
109 pub fn build(self) -> ::std::result::Result<crate::operation::create_theme::CreateThemeInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::create_theme::CreateThemeInput {
112 app_id: self.app_id,
113 environment_name: self.environment_name,
114 client_token: self.client_token,
115 theme_to_create: self.theme_to_create,
116 })
117 }
118}