aws_sdk_sagemaker/operation/update_space/
_update_space_input.rs

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 UpdateSpaceInput {
6    /// <p>The ID of the associated domain.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the space.</p>
9    pub space_name: ::std::option::Option<::std::string::String>,
10    /// <p>A collection of space settings.</p>
11    pub space_settings: ::std::option::Option<crate::types::SpaceSettings>,
12    /// <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>
13    pub space_display_name: ::std::option::Option<::std::string::String>,
14}
15impl UpdateSpaceInput {
16    /// <p>The ID of the associated domain.</p>
17    pub fn domain_id(&self) -> ::std::option::Option<&str> {
18        self.domain_id.as_deref()
19    }
20    /// <p>The name of the space.</p>
21    pub fn space_name(&self) -> ::std::option::Option<&str> {
22        self.space_name.as_deref()
23    }
24    /// <p>A collection of space settings.</p>
25    pub fn space_settings(&self) -> ::std::option::Option<&crate::types::SpaceSettings> {
26        self.space_settings.as_ref()
27    }
28    /// <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>
29    pub fn space_display_name(&self) -> ::std::option::Option<&str> {
30        self.space_display_name.as_deref()
31    }
32}
33impl UpdateSpaceInput {
34    /// Creates a new builder-style object to manufacture [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
35    pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
36        crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateSpaceInputBuilder {
44    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
45    pub(crate) space_name: ::std::option::Option<::std::string::String>,
46    pub(crate) space_settings: ::std::option::Option<crate::types::SpaceSettings>,
47    pub(crate) space_display_name: ::std::option::Option<::std::string::String>,
48}
49impl UpdateSpaceInputBuilder {
50    /// <p>The ID of the associated domain.</p>
51    /// This field is required.
52    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.domain_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID of the associated domain.</p>
57    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.domain_id = input;
59        self
60    }
61    /// <p>The ID of the associated domain.</p>
62    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.domain_id
64    }
65    /// <p>The name of the space.</p>
66    /// This field is required.
67    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.space_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the space.</p>
72    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.space_name = input;
74        self
75    }
76    /// <p>The name of the space.</p>
77    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.space_name
79    }
80    /// <p>A collection of space settings.</p>
81    pub fn space_settings(mut self, input: crate::types::SpaceSettings) -> Self {
82        self.space_settings = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>A collection of space settings.</p>
86    pub fn set_space_settings(mut self, input: ::std::option::Option<crate::types::SpaceSettings>) -> Self {
87        self.space_settings = input;
88        self
89    }
90    /// <p>A collection of space settings.</p>
91    pub fn get_space_settings(&self) -> &::std::option::Option<crate::types::SpaceSettings> {
92        &self.space_settings
93    }
94    /// <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>
95    pub fn space_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.space_display_name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>
100    pub fn set_space_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.space_display_name = input;
102        self
103    }
104    /// <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>
105    pub fn get_space_display_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.space_display_name
107    }
108    /// Consumes the builder and constructs a [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
109    pub fn build(self) -> ::std::result::Result<crate::operation::update_space::UpdateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
110        ::std::result::Result::Ok(crate::operation::update_space::UpdateSpaceInput {
111            domain_id: self.domain_id,
112            space_name: self.space_name,
113            space_settings: self.space_settings,
114            space_display_name: self.space_display_name,
115        })
116    }
117}