aws_sdk_sagemaker/operation/describe_app/
_describe_app_output.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 DescribeAppOutput {
6    /// <p>The Amazon Resource Name (ARN) of the app.</p>
7    pub app_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The type of app.</p>
9    pub app_type: ::std::option::Option<crate::types::AppType>,
10    /// <p>The name of the app.</p>
11    pub app_name: ::std::option::Option<::std::string::String>,
12    /// <p>The domain ID.</p>
13    pub domain_id: ::std::option::Option<::std::string::String>,
14    /// <p>The user profile name.</p>
15    pub user_profile_name: ::std::option::Option<::std::string::String>,
16    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
17    pub space_name: ::std::option::Option<::std::string::String>,
18    /// <p>The status.</p>
19    pub status: ::std::option::Option<crate::types::AppStatus>,
20    /// <p>The timestamp of the last health check.</p>
21    pub last_health_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
23    pub last_user_activity_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The creation time of the application.</p><note>
25    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
26    /// </note>
27    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
28    /// <p>The failure reason.</p>
29    pub failure_reason: ::std::option::Option<::std::string::String>,
30    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
31    pub resource_spec: ::std::option::Option<crate::types::ResourceSpec>,
32    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
33    pub built_in_lifecycle_config_arn: ::std::option::Option<::std::string::String>,
34    _request_id: Option<String>,
35}
36impl DescribeAppOutput {
37    /// <p>The Amazon Resource Name (ARN) of the app.</p>
38    pub fn app_arn(&self) -> ::std::option::Option<&str> {
39        self.app_arn.as_deref()
40    }
41    /// <p>The type of app.</p>
42    pub fn app_type(&self) -> ::std::option::Option<&crate::types::AppType> {
43        self.app_type.as_ref()
44    }
45    /// <p>The name of the app.</p>
46    pub fn app_name(&self) -> ::std::option::Option<&str> {
47        self.app_name.as_deref()
48    }
49    /// <p>The domain ID.</p>
50    pub fn domain_id(&self) -> ::std::option::Option<&str> {
51        self.domain_id.as_deref()
52    }
53    /// <p>The user profile name.</p>
54    pub fn user_profile_name(&self) -> ::std::option::Option<&str> {
55        self.user_profile_name.as_deref()
56    }
57    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
58    pub fn space_name(&self) -> ::std::option::Option<&str> {
59        self.space_name.as_deref()
60    }
61    /// <p>The status.</p>
62    pub fn status(&self) -> ::std::option::Option<&crate::types::AppStatus> {
63        self.status.as_ref()
64    }
65    /// <p>The timestamp of the last health check.</p>
66    pub fn last_health_check_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67        self.last_health_check_timestamp.as_ref()
68    }
69    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
70    pub fn last_user_activity_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
71        self.last_user_activity_timestamp.as_ref()
72    }
73    /// <p>The creation time of the application.</p><note>
74    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
75    /// </note>
76    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
77        self.creation_time.as_ref()
78    }
79    /// <p>The failure reason.</p>
80    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
81        self.failure_reason.as_deref()
82    }
83    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
84    pub fn resource_spec(&self) -> ::std::option::Option<&crate::types::ResourceSpec> {
85        self.resource_spec.as_ref()
86    }
87    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
88    pub fn built_in_lifecycle_config_arn(&self) -> ::std::option::Option<&str> {
89        self.built_in_lifecycle_config_arn.as_deref()
90    }
91}
92impl ::aws_types::request_id::RequestId for DescribeAppOutput {
93    fn request_id(&self) -> Option<&str> {
94        self._request_id.as_deref()
95    }
96}
97impl DescribeAppOutput {
98    /// Creates a new builder-style object to manufacture [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
99    pub fn builder() -> crate::operation::describe_app::builders::DescribeAppOutputBuilder {
100        crate::operation::describe_app::builders::DescribeAppOutputBuilder::default()
101    }
102}
103
104/// A builder for [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
105#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct DescribeAppOutputBuilder {
108    pub(crate) app_arn: ::std::option::Option<::std::string::String>,
109    pub(crate) app_type: ::std::option::Option<crate::types::AppType>,
110    pub(crate) app_name: ::std::option::Option<::std::string::String>,
111    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
112    pub(crate) user_profile_name: ::std::option::Option<::std::string::String>,
113    pub(crate) space_name: ::std::option::Option<::std::string::String>,
114    pub(crate) status: ::std::option::Option<crate::types::AppStatus>,
115    pub(crate) last_health_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
116    pub(crate) last_user_activity_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
117    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
119    pub(crate) resource_spec: ::std::option::Option<crate::types::ResourceSpec>,
120    pub(crate) built_in_lifecycle_config_arn: ::std::option::Option<::std::string::String>,
121    _request_id: Option<String>,
122}
123impl DescribeAppOutputBuilder {
124    /// <p>The Amazon Resource Name (ARN) of the app.</p>
125    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.app_arn = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The Amazon Resource Name (ARN) of the app.</p>
130    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.app_arn = input;
132        self
133    }
134    /// <p>The Amazon Resource Name (ARN) of the app.</p>
135    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
136        &self.app_arn
137    }
138    /// <p>The type of app.</p>
139    pub fn app_type(mut self, input: crate::types::AppType) -> Self {
140        self.app_type = ::std::option::Option::Some(input);
141        self
142    }
143    /// <p>The type of app.</p>
144    pub fn set_app_type(mut self, input: ::std::option::Option<crate::types::AppType>) -> Self {
145        self.app_type = input;
146        self
147    }
148    /// <p>The type of app.</p>
149    pub fn get_app_type(&self) -> &::std::option::Option<crate::types::AppType> {
150        &self.app_type
151    }
152    /// <p>The name of the app.</p>
153    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.app_name = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The name of the app.</p>
158    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.app_name = input;
160        self
161    }
162    /// <p>The name of the app.</p>
163    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
164        &self.app_name
165    }
166    /// <p>The domain ID.</p>
167    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.domain_id = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <p>The domain ID.</p>
172    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.domain_id = input;
174        self
175    }
176    /// <p>The domain ID.</p>
177    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
178        &self.domain_id
179    }
180    /// <p>The user profile name.</p>
181    pub fn user_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.user_profile_name = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>The user profile name.</p>
186    pub fn set_user_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.user_profile_name = input;
188        self
189    }
190    /// <p>The user profile name.</p>
191    pub fn get_user_profile_name(&self) -> &::std::option::Option<::std::string::String> {
192        &self.user_profile_name
193    }
194    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
195    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.space_name = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
200    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.space_name = input;
202        self
203    }
204    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
205    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
206        &self.space_name
207    }
208    /// <p>The status.</p>
209    pub fn status(mut self, input: crate::types::AppStatus) -> Self {
210        self.status = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>The status.</p>
214    pub fn set_status(mut self, input: ::std::option::Option<crate::types::AppStatus>) -> Self {
215        self.status = input;
216        self
217    }
218    /// <p>The status.</p>
219    pub fn get_status(&self) -> &::std::option::Option<crate::types::AppStatus> {
220        &self.status
221    }
222    /// <p>The timestamp of the last health check.</p>
223    pub fn last_health_check_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
224        self.last_health_check_timestamp = ::std::option::Option::Some(input);
225        self
226    }
227    /// <p>The timestamp of the last health check.</p>
228    pub fn set_last_health_check_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
229        self.last_health_check_timestamp = input;
230        self
231    }
232    /// <p>The timestamp of the last health check.</p>
233    pub fn get_last_health_check_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
234        &self.last_health_check_timestamp
235    }
236    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
237    pub fn last_user_activity_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
238        self.last_user_activity_timestamp = ::std::option::Option::Some(input);
239        self
240    }
241    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
242    pub fn set_last_user_activity_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
243        self.last_user_activity_timestamp = input;
244        self
245    }
246    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
247    pub fn get_last_user_activity_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
248        &self.last_user_activity_timestamp
249    }
250    /// <p>The creation time of the application.</p><note>
251    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
252    /// </note>
253    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
254        self.creation_time = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>The creation time of the application.</p><note>
258    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
259    /// </note>
260    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
261        self.creation_time = input;
262        self
263    }
264    /// <p>The creation time of the application.</p><note>
265    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
266    /// </note>
267    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
268        &self.creation_time
269    }
270    /// <p>The failure reason.</p>
271    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272        self.failure_reason = ::std::option::Option::Some(input.into());
273        self
274    }
275    /// <p>The failure reason.</p>
276    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.failure_reason = input;
278        self
279    }
280    /// <p>The failure reason.</p>
281    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
282        &self.failure_reason
283    }
284    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
285    pub fn resource_spec(mut self, input: crate::types::ResourceSpec) -> Self {
286        self.resource_spec = ::std::option::Option::Some(input);
287        self
288    }
289    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
290    pub fn set_resource_spec(mut self, input: ::std::option::Option<crate::types::ResourceSpec>) -> Self {
291        self.resource_spec = input;
292        self
293    }
294    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
295    pub fn get_resource_spec(&self) -> &::std::option::Option<crate::types::ResourceSpec> {
296        &self.resource_spec
297    }
298    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
299    pub fn built_in_lifecycle_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300        self.built_in_lifecycle_config_arn = ::std::option::Option::Some(input.into());
301        self
302    }
303    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
304    pub fn set_built_in_lifecycle_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
305        self.built_in_lifecycle_config_arn = input;
306        self
307    }
308    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
309    pub fn get_built_in_lifecycle_config_arn(&self) -> &::std::option::Option<::std::string::String> {
310        &self.built_in_lifecycle_config_arn
311    }
312    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
313        self._request_id = Some(request_id.into());
314        self
315    }
316
317    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
318        self._request_id = request_id;
319        self
320    }
321    /// Consumes the builder and constructs a [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
322    pub fn build(self) -> crate::operation::describe_app::DescribeAppOutput {
323        crate::operation::describe_app::DescribeAppOutput {
324            app_arn: self.app_arn,
325            app_type: self.app_type,
326            app_name: self.app_name,
327            domain_id: self.domain_id,
328            user_profile_name: self.user_profile_name,
329            space_name: self.space_name,
330            status: self.status,
331            last_health_check_timestamp: self.last_health_check_timestamp,
332            last_user_activity_timestamp: self.last_user_activity_timestamp,
333            creation_time: self.creation_time,
334            failure_reason: self.failure_reason,
335            resource_spec: self.resource_spec,
336            built_in_lifecycle_config_arn: self.built_in_lifecycle_config_arn,
337            _request_id: self._request_id,
338        }
339    }
340}