aws_sdk_sagemaker/operation/create_space/
_create_space_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateSpaceInput {
6 pub domain_id: ::std::option::Option<::std::string::String>,
8 pub space_name: ::std::option::Option<::std::string::String>,
10 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12 pub space_settings: ::std::option::Option<crate::types::SpaceSettings>,
14 pub ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
16 pub space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
18 pub space_display_name: ::std::option::Option<::std::string::String>,
20}
21impl CreateSpaceInput {
22 pub fn domain_id(&self) -> ::std::option::Option<&str> {
24 self.domain_id.as_deref()
25 }
26 pub fn space_name(&self) -> ::std::option::Option<&str> {
28 self.space_name.as_deref()
29 }
30 pub fn tags(&self) -> &[crate::types::Tag] {
34 self.tags.as_deref().unwrap_or_default()
35 }
36 pub fn space_settings(&self) -> ::std::option::Option<&crate::types::SpaceSettings> {
38 self.space_settings.as_ref()
39 }
40 pub fn ownership_settings(&self) -> ::std::option::Option<&crate::types::OwnershipSettings> {
42 self.ownership_settings.as_ref()
43 }
44 pub fn space_sharing_settings(&self) -> ::std::option::Option<&crate::types::SpaceSharingSettings> {
46 self.space_sharing_settings.as_ref()
47 }
48 pub fn space_display_name(&self) -> ::std::option::Option<&str> {
50 self.space_display_name.as_deref()
51 }
52}
53impl CreateSpaceInput {
54 pub fn builder() -> crate::operation::create_space::builders::CreateSpaceInputBuilder {
56 crate::operation::create_space::builders::CreateSpaceInputBuilder::default()
57 }
58}
59
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct CreateSpaceInputBuilder {
64 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
65 pub(crate) space_name: ::std::option::Option<::std::string::String>,
66 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
67 pub(crate) space_settings: ::std::option::Option<crate::types::SpaceSettings>,
68 pub(crate) ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
69 pub(crate) space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
70 pub(crate) space_display_name: ::std::option::Option<::std::string::String>,
71}
72impl CreateSpaceInputBuilder {
73 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.domain_id = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.domain_id = input;
82 self
83 }
84 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
86 &self.domain_id
87 }
88 pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.space_name = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.space_name = input;
97 self
98 }
99 pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
101 &self.space_name
102 }
103 pub fn tags(mut self, input: crate::types::Tag) -> Self {
109 let mut v = self.tags.unwrap_or_default();
110 v.push(input);
111 self.tags = ::std::option::Option::Some(v);
112 self
113 }
114 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
116 self.tags = input;
117 self
118 }
119 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
121 &self.tags
122 }
123 pub fn space_settings(mut self, input: crate::types::SpaceSettings) -> Self {
125 self.space_settings = ::std::option::Option::Some(input);
126 self
127 }
128 pub fn set_space_settings(mut self, input: ::std::option::Option<crate::types::SpaceSettings>) -> Self {
130 self.space_settings = input;
131 self
132 }
133 pub fn get_space_settings(&self) -> &::std::option::Option<crate::types::SpaceSettings> {
135 &self.space_settings
136 }
137 pub fn ownership_settings(mut self, input: crate::types::OwnershipSettings) -> Self {
139 self.ownership_settings = ::std::option::Option::Some(input);
140 self
141 }
142 pub fn set_ownership_settings(mut self, input: ::std::option::Option<crate::types::OwnershipSettings>) -> Self {
144 self.ownership_settings = input;
145 self
146 }
147 pub fn get_ownership_settings(&self) -> &::std::option::Option<crate::types::OwnershipSettings> {
149 &self.ownership_settings
150 }
151 pub fn space_sharing_settings(mut self, input: crate::types::SpaceSharingSettings) -> Self {
153 self.space_sharing_settings = ::std::option::Option::Some(input);
154 self
155 }
156 pub fn set_space_sharing_settings(mut self, input: ::std::option::Option<crate::types::SpaceSharingSettings>) -> Self {
158 self.space_sharing_settings = input;
159 self
160 }
161 pub fn get_space_sharing_settings(&self) -> &::std::option::Option<crate::types::SpaceSharingSettings> {
163 &self.space_sharing_settings
164 }
165 pub fn space_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.space_display_name = ::std::option::Option::Some(input.into());
168 self
169 }
170 pub fn set_space_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172 self.space_display_name = input;
173 self
174 }
175 pub fn get_space_display_name(&self) -> &::std::option::Option<::std::string::String> {
177 &self.space_display_name
178 }
179 pub fn build(self) -> ::std::result::Result<crate::operation::create_space::CreateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
181 ::std::result::Result::Ok(crate::operation::create_space::CreateSpaceInput {
182 domain_id: self.domain_id,
183 space_name: self.space_name,
184 tags: self.tags,
185 space_settings: self.space_settings,
186 ownership_settings: self.ownership_settings,
187 space_sharing_settings: self.space_sharing_settings,
188 space_display_name: self.space_display_name,
189 })
190 }
191}