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