1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateSpaceInput {
6/// <p>The ID of the associated domain.</p>
7pub domain_id: ::std::option::Option<::std::string::String>,
8/// <p>The name of the space.</p>
9pub space_name: ::std::option::Option<::std::string::String>,
10/// <p>Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for each resource. Tags are searchable using the <code>Search</code> API.</p>
11pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12/// <p>A collection of space settings.</p>
13pub space_settings: ::std::option::Option<crate::types::SpaceSettings>,
14/// <p>A collection of ownership settings.</p>
15pub ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
16/// <p>A collection of space sharing settings.</p>
17pub space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
18/// <p>The name of the space that appears in the SageMaker Studio UI.</p>
19pub space_display_name: ::std::option::Option<::std::string::String>,
20}
21impl CreateSpaceInput {
22/// <p>The ID of the associated domain.</p>
23pub fn domain_id(&self) -> ::std::option::Option<&str> {
24self.domain_id.as_deref()
25 }
26/// <p>The name of the space.</p>
27pub fn space_name(&self) -> ::std::option::Option<&str> {
28self.space_name.as_deref()
29 }
30/// <p>Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for each resource. Tags are searchable using the <code>Search</code> API.</p>
31 ///
32 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
33pub fn tags(&self) -> &[crate::types::Tag] {
34self.tags.as_deref().unwrap_or_default()
35 }
36/// <p>A collection of space settings.</p>
37pub fn space_settings(&self) -> ::std::option::Option<&crate::types::SpaceSettings> {
38self.space_settings.as_ref()
39 }
40/// <p>A collection of ownership settings.</p>
41pub fn ownership_settings(&self) -> ::std::option::Option<&crate::types::OwnershipSettings> {
42self.ownership_settings.as_ref()
43 }
44/// <p>A collection of space sharing settings.</p>
45pub fn space_sharing_settings(&self) -> ::std::option::Option<&crate::types::SpaceSharingSettings> {
46self.space_sharing_settings.as_ref()
47 }
48/// <p>The name of the space that appears in the SageMaker Studio UI.</p>
49pub fn space_display_name(&self) -> ::std::option::Option<&str> {
50self.space_display_name.as_deref()
51 }
52}
53impl CreateSpaceInput {
54/// Creates a new builder-style object to manufacture [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
55pub fn builder() -> crate::operation::create_space::builders::CreateSpaceInputBuilder {
56crate::operation::create_space::builders::CreateSpaceInputBuilder::default()
57 }
58}
5960/// A builder for [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct CreateSpaceInputBuilder {
64pub(crate) domain_id: ::std::option::Option<::std::string::String>,
65pub(crate) space_name: ::std::option::Option<::std::string::String>,
66pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
67pub(crate) space_settings: ::std::option::Option<crate::types::SpaceSettings>,
68pub(crate) ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
69pub(crate) space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
70pub(crate) space_display_name: ::std::option::Option<::std::string::String>,
71}
72impl CreateSpaceInputBuilder {
73/// <p>The ID of the associated domain.</p>
74 /// This field is required.
75pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76self.domain_id = ::std::option::Option::Some(input.into());
77self
78}
79/// <p>The ID of the associated domain.</p>
80pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81self.domain_id = input;
82self
83}
84/// <p>The ID of the associated domain.</p>
85pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
86&self.domain_id
87 }
88/// <p>The name of the space.</p>
89 /// This field is required.
90pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91self.space_name = ::std::option::Option::Some(input.into());
92self
93}
94/// <p>The name of the space.</p>
95pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96self.space_name = input;
97self
98}
99/// <p>The name of the space.</p>
100pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
101&self.space_name
102 }
103/// Appends an item to `tags`.
104 ///
105 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
106 ///
107 /// <p>Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for each resource. Tags are searchable using the <code>Search</code> API.</p>
108pub fn tags(mut self, input: crate::types::Tag) -> Self {
109let mut v = self.tags.unwrap_or_default();
110 v.push(input);
111self.tags = ::std::option::Option::Some(v);
112self
113}
114/// <p>Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for each resource. Tags are searchable using the <code>Search</code> API.</p>
115pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
116self.tags = input;
117self
118}
119/// <p>Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for each resource. Tags are searchable using the <code>Search</code> API.</p>
120pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
121&self.tags
122 }
123/// <p>A collection of space settings.</p>
124pub fn space_settings(mut self, input: crate::types::SpaceSettings) -> Self {
125self.space_settings = ::std::option::Option::Some(input);
126self
127}
128/// <p>A collection of space settings.</p>
129pub fn set_space_settings(mut self, input: ::std::option::Option<crate::types::SpaceSettings>) -> Self {
130self.space_settings = input;
131self
132}
133/// <p>A collection of space settings.</p>
134pub fn get_space_settings(&self) -> &::std::option::Option<crate::types::SpaceSettings> {
135&self.space_settings
136 }
137/// <p>A collection of ownership settings.</p>
138pub fn ownership_settings(mut self, input: crate::types::OwnershipSettings) -> Self {
139self.ownership_settings = ::std::option::Option::Some(input);
140self
141}
142/// <p>A collection of ownership settings.</p>
143pub fn set_ownership_settings(mut self, input: ::std::option::Option<crate::types::OwnershipSettings>) -> Self {
144self.ownership_settings = input;
145self
146}
147/// <p>A collection of ownership settings.</p>
148pub fn get_ownership_settings(&self) -> &::std::option::Option<crate::types::OwnershipSettings> {
149&self.ownership_settings
150 }
151/// <p>A collection of space sharing settings.</p>
152pub fn space_sharing_settings(mut self, input: crate::types::SpaceSharingSettings) -> Self {
153self.space_sharing_settings = ::std::option::Option::Some(input);
154self
155}
156/// <p>A collection of space sharing settings.</p>
157pub fn set_space_sharing_settings(mut self, input: ::std::option::Option<crate::types::SpaceSharingSettings>) -> Self {
158self.space_sharing_settings = input;
159self
160}
161/// <p>A collection of space sharing settings.</p>
162pub fn get_space_sharing_settings(&self) -> &::std::option::Option<crate::types::SpaceSharingSettings> {
163&self.space_sharing_settings
164 }
165/// <p>The name of the space that appears in the SageMaker Studio UI.</p>
166pub fn space_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167self.space_display_name = ::std::option::Option::Some(input.into());
168self
169}
170/// <p>The name of the space that appears in the SageMaker Studio UI.</p>
171pub fn set_space_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172self.space_display_name = input;
173self
174}
175/// <p>The name of the space that appears in the SageMaker Studio UI.</p>
176pub fn get_space_display_name(&self) -> &::std::option::Option<::std::string::String> {
177&self.space_display_name
178 }
179/// Consumes the builder and constructs a [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
180pub 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}