aws_sdk_sagemaker/operation/describe_image/
_describe_image_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 DescribeImageOutput {
6    /// <p>When the image was created.</p>
7    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
8    /// <p>The description of the image.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the image as displayed.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>When a create, update, or delete operation fails, the reason for the failure.</p>
13    pub failure_reason: ::std::option::Option<::std::string::String>,
14    /// <p>The ARN of the image.</p>
15    pub image_arn: ::std::option::Option<::std::string::String>,
16    /// <p>The name of the image.</p>
17    pub image_name: ::std::option::Option<::std::string::String>,
18    /// <p>The status of the image.</p>
19    pub image_status: ::std::option::Option<crate::types::ImageStatus>,
20    /// <p>When the image was last modified.</p>
21    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
23    pub role_arn: ::std::option::Option<::std::string::String>,
24    _request_id: Option<String>,
25}
26impl DescribeImageOutput {
27    /// <p>When the image was created.</p>
28    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
29        self.creation_time.as_ref()
30    }
31    /// <p>The description of the image.</p>
32    pub fn description(&self) -> ::std::option::Option<&str> {
33        self.description.as_deref()
34    }
35    /// <p>The name of the image as displayed.</p>
36    pub fn display_name(&self) -> ::std::option::Option<&str> {
37        self.display_name.as_deref()
38    }
39    /// <p>When a create, update, or delete operation fails, the reason for the failure.</p>
40    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
41        self.failure_reason.as_deref()
42    }
43    /// <p>The ARN of the image.</p>
44    pub fn image_arn(&self) -> ::std::option::Option<&str> {
45        self.image_arn.as_deref()
46    }
47    /// <p>The name of the image.</p>
48    pub fn image_name(&self) -> ::std::option::Option<&str> {
49        self.image_name.as_deref()
50    }
51    /// <p>The status of the image.</p>
52    pub fn image_status(&self) -> ::std::option::Option<&crate::types::ImageStatus> {
53        self.image_status.as_ref()
54    }
55    /// <p>When the image was last modified.</p>
56    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57        self.last_modified_time.as_ref()
58    }
59    /// <p>The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
60    pub fn role_arn(&self) -> ::std::option::Option<&str> {
61        self.role_arn.as_deref()
62    }
63}
64impl ::aws_types::request_id::RequestId for DescribeImageOutput {
65    fn request_id(&self) -> Option<&str> {
66        self._request_id.as_deref()
67    }
68}
69impl DescribeImageOutput {
70    /// Creates a new builder-style object to manufacture [`DescribeImageOutput`](crate::operation::describe_image::DescribeImageOutput).
71    pub fn builder() -> crate::operation::describe_image::builders::DescribeImageOutputBuilder {
72        crate::operation::describe_image::builders::DescribeImageOutputBuilder::default()
73    }
74}
75
76/// A builder for [`DescribeImageOutput`](crate::operation::describe_image::DescribeImageOutput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeImageOutputBuilder {
80    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
81    pub(crate) description: ::std::option::Option<::std::string::String>,
82    pub(crate) display_name: ::std::option::Option<::std::string::String>,
83    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
84    pub(crate) image_arn: ::std::option::Option<::std::string::String>,
85    pub(crate) image_name: ::std::option::Option<::std::string::String>,
86    pub(crate) image_status: ::std::option::Option<crate::types::ImageStatus>,
87    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
88    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
89    _request_id: Option<String>,
90}
91impl DescribeImageOutputBuilder {
92    /// <p>When the image was created.</p>
93    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
94        self.creation_time = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>When the image was created.</p>
98    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
99        self.creation_time = input;
100        self
101    }
102    /// <p>When the image was created.</p>
103    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
104        &self.creation_time
105    }
106    /// <p>The description of the image.</p>
107    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.description = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The description of the image.</p>
112    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.description = input;
114        self
115    }
116    /// <p>The description of the image.</p>
117    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
118        &self.description
119    }
120    /// <p>The name of the image as displayed.</p>
121    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.display_name = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The name of the image as displayed.</p>
126    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.display_name = input;
128        self
129    }
130    /// <p>The name of the image as displayed.</p>
131    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
132        &self.display_name
133    }
134    /// <p>When a create, update, or delete operation fails, the reason for the failure.</p>
135    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.failure_reason = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>When a create, update, or delete operation fails, the reason for the failure.</p>
140    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.failure_reason = input;
142        self
143    }
144    /// <p>When a create, update, or delete operation fails, the reason for the failure.</p>
145    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
146        &self.failure_reason
147    }
148    /// <p>The ARN of the image.</p>
149    pub fn image_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.image_arn = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The ARN of the image.</p>
154    pub fn set_image_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.image_arn = input;
156        self
157    }
158    /// <p>The ARN of the image.</p>
159    pub fn get_image_arn(&self) -> &::std::option::Option<::std::string::String> {
160        &self.image_arn
161    }
162    /// <p>The name of the image.</p>
163    pub fn image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.image_name = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The name of the image.</p>
168    pub fn set_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.image_name = input;
170        self
171    }
172    /// <p>The name of the image.</p>
173    pub fn get_image_name(&self) -> &::std::option::Option<::std::string::String> {
174        &self.image_name
175    }
176    /// <p>The status of the image.</p>
177    pub fn image_status(mut self, input: crate::types::ImageStatus) -> Self {
178        self.image_status = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>The status of the image.</p>
182    pub fn set_image_status(mut self, input: ::std::option::Option<crate::types::ImageStatus>) -> Self {
183        self.image_status = input;
184        self
185    }
186    /// <p>The status of the image.</p>
187    pub fn get_image_status(&self) -> &::std::option::Option<crate::types::ImageStatus> {
188        &self.image_status
189    }
190    /// <p>When the image was last modified.</p>
191    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
192        self.last_modified_time = ::std::option::Option::Some(input);
193        self
194    }
195    /// <p>When the image was last modified.</p>
196    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
197        self.last_modified_time = input;
198        self
199    }
200    /// <p>When the image was last modified.</p>
201    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
202        &self.last_modified_time
203    }
204    /// <p>The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
205    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.role_arn = ::std::option::Option::Some(input.into());
207        self
208    }
209    /// <p>The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
210    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.role_arn = input;
212        self
213    }
214    /// <p>The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
215    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
216        &self.role_arn
217    }
218    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
219        self._request_id = Some(request_id.into());
220        self
221    }
222
223    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
224        self._request_id = request_id;
225        self
226    }
227    /// Consumes the builder and constructs a [`DescribeImageOutput`](crate::operation::describe_image::DescribeImageOutput).
228    pub fn build(self) -> crate::operation::describe_image::DescribeImageOutput {
229        crate::operation::describe_image::DescribeImageOutput {
230            creation_time: self.creation_time,
231            description: self.description,
232            display_name: self.display_name,
233            failure_reason: self.failure_reason,
234            image_arn: self.image_arn,
235            image_name: self.image_name,
236            image_status: self.image_status,
237            last_modified_time: self.last_modified_time,
238            role_arn: self.role_arn,
239            _request_id: self._request_id,
240        }
241    }
242}