aws_sdk_rekognition/operation/create_project/
_create_project_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProjectInput {
6 pub project_name: ::std::option::Option<::std::string::String>,
8 pub feature: ::std::option::Option<crate::types::CustomizationFeature>,
10 pub auto_update: ::std::option::Option<crate::types::ProjectAutoUpdate>,
12 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14}
15impl CreateProjectInput {
16 pub fn project_name(&self) -> ::std::option::Option<&str> {
18 self.project_name.as_deref()
19 }
20 pub fn feature(&self) -> ::std::option::Option<&crate::types::CustomizationFeature> {
22 self.feature.as_ref()
23 }
24 pub fn auto_update(&self) -> ::std::option::Option<&crate::types::ProjectAutoUpdate> {
26 self.auto_update.as_ref()
27 }
28 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
30 self.tags.as_ref()
31 }
32}
33impl CreateProjectInput {
34 pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
36 crate::operation::create_project::builders::CreateProjectInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateProjectInputBuilder {
44 pub(crate) project_name: ::std::option::Option<::std::string::String>,
45 pub(crate) feature: ::std::option::Option<crate::types::CustomizationFeature>,
46 pub(crate) auto_update: ::std::option::Option<crate::types::ProjectAutoUpdate>,
47 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
48}
49impl CreateProjectInputBuilder {
50 pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.project_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.project_name = input;
59 self
60 }
61 pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.project_name
64 }
65 pub fn feature(mut self, input: crate::types::CustomizationFeature) -> Self {
67 self.feature = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_feature(mut self, input: ::std::option::Option<crate::types::CustomizationFeature>) -> Self {
72 self.feature = input;
73 self
74 }
75 pub fn get_feature(&self) -> &::std::option::Option<crate::types::CustomizationFeature> {
77 &self.feature
78 }
79 pub fn auto_update(mut self, input: crate::types::ProjectAutoUpdate) -> Self {
81 self.auto_update = ::std::option::Option::Some(input);
82 self
83 }
84 pub fn set_auto_update(mut self, input: ::std::option::Option<crate::types::ProjectAutoUpdate>) -> Self {
86 self.auto_update = input;
87 self
88 }
89 pub fn get_auto_update(&self) -> &::std::option::Option<crate::types::ProjectAutoUpdate> {
91 &self.auto_update
92 }
93 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
99 let mut hash_map = self.tags.unwrap_or_default();
100 hash_map.insert(k.into(), v.into());
101 self.tags = ::std::option::Option::Some(hash_map);
102 self
103 }
104 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
106 self.tags = input;
107 self
108 }
109 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
111 &self.tags
112 }
113 pub fn build(
115 self,
116 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
117 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
118 project_name: self.project_name,
119 feature: self.feature,
120 auto_update: self.auto_update,
121 tags: self.tags,
122 })
123 }
124}