aws_sdk_sagemaker/operation/delete_app/
_delete_app_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 DeleteAppInput {
6    /// <p>The domain ID.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The user profile name. If this value is not set, then <code>SpaceName</code> must be set.</p>
9    pub user_profile_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
11    pub space_name: ::std::option::Option<::std::string::String>,
12    /// <p>The type of app.</p>
13    pub app_type: ::std::option::Option<crate::types::AppType>,
14    /// <p>The name of the app.</p>
15    pub app_name: ::std::option::Option<::std::string::String>,
16}
17impl DeleteAppInput {
18    /// <p>The domain ID.</p>
19    pub fn domain_id(&self) -> ::std::option::Option<&str> {
20        self.domain_id.as_deref()
21    }
22    /// <p>The user profile name. If this value is not set, then <code>SpaceName</code> must be set.</p>
23    pub fn user_profile_name(&self) -> ::std::option::Option<&str> {
24        self.user_profile_name.as_deref()
25    }
26    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
27    pub fn space_name(&self) -> ::std::option::Option<&str> {
28        self.space_name.as_deref()
29    }
30    /// <p>The type of app.</p>
31    pub fn app_type(&self) -> ::std::option::Option<&crate::types::AppType> {
32        self.app_type.as_ref()
33    }
34    /// <p>The name of the app.</p>
35    pub fn app_name(&self) -> ::std::option::Option<&str> {
36        self.app_name.as_deref()
37    }
38}
39impl DeleteAppInput {
40    /// Creates a new builder-style object to manufacture [`DeleteAppInput`](crate::operation::delete_app::DeleteAppInput).
41    pub fn builder() -> crate::operation::delete_app::builders::DeleteAppInputBuilder {
42        crate::operation::delete_app::builders::DeleteAppInputBuilder::default()
43    }
44}
45
46/// A builder for [`DeleteAppInput`](crate::operation::delete_app::DeleteAppInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DeleteAppInputBuilder {
50    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
51    pub(crate) user_profile_name: ::std::option::Option<::std::string::String>,
52    pub(crate) space_name: ::std::option::Option<::std::string::String>,
53    pub(crate) app_type: ::std::option::Option<crate::types::AppType>,
54    pub(crate) app_name: ::std::option::Option<::std::string::String>,
55}
56impl DeleteAppInputBuilder {
57    /// <p>The domain ID.</p>
58    /// This field is required.
59    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.domain_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The domain ID.</p>
64    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.domain_id = input;
66        self
67    }
68    /// <p>The domain ID.</p>
69    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.domain_id
71    }
72    /// <p>The user profile name. If this value is not set, then <code>SpaceName</code> must be set.</p>
73    pub fn user_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.user_profile_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The user profile name. If this value is not set, then <code>SpaceName</code> must be set.</p>
78    pub fn set_user_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.user_profile_name = input;
80        self
81    }
82    /// <p>The user profile name. If this value is not set, then <code>SpaceName</code> must be set.</p>
83    pub fn get_user_profile_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.user_profile_name
85    }
86    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
87    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.space_name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
92    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.space_name = input;
94        self
95    }
96    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
97    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.space_name
99    }
100    /// <p>The type of app.</p>
101    /// This field is required.
102    pub fn app_type(mut self, input: crate::types::AppType) -> Self {
103        self.app_type = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>The type of app.</p>
107    pub fn set_app_type(mut self, input: ::std::option::Option<crate::types::AppType>) -> Self {
108        self.app_type = input;
109        self
110    }
111    /// <p>The type of app.</p>
112    pub fn get_app_type(&self) -> &::std::option::Option<crate::types::AppType> {
113        &self.app_type
114    }
115    /// <p>The name of the app.</p>
116    /// This field is required.
117    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.app_name = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The name of the app.</p>
122    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.app_name = input;
124        self
125    }
126    /// <p>The name of the app.</p>
127    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
128        &self.app_name
129    }
130    /// Consumes the builder and constructs a [`DeleteAppInput`](crate::operation::delete_app::DeleteAppInput).
131    pub fn build(self) -> ::std::result::Result<crate::operation::delete_app::DeleteAppInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::delete_app::DeleteAppInput {
133            domain_id: self.domain_id,
134            user_profile_name: self.user_profile_name,
135            space_name: self.space_name,
136            app_type: self.app_type,
137            app_name: self.app_name,
138        })
139    }
140}