aws_sdk_sagemaker/operation/describe_action/
_describe_action_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 DescribeActionOutput {
6    /// <p>The name of the action.</p>
7    pub action_name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the action.</p>
9    pub action_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The source of the action.</p>
11    pub source: ::std::option::Option<crate::types::ActionSource>,
12    /// <p>The type of the action.</p>
13    pub action_type: ::std::option::Option<::std::string::String>,
14    /// <p>The description of the action.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The status of the action.</p>
17    pub status: ::std::option::Option<crate::types::ActionStatus>,
18    /// <p>A list of the action's properties.</p>
19    pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    /// <p>When the action was created.</p>
21    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>Information about the user who created or modified a SageMaker resource.</p>
23    pub created_by: ::std::option::Option<crate::types::UserContext>,
24    /// <p>When the action was last modified.</p>
25    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
26    /// <p>Information about the user who created or modified a SageMaker resource.</p>
27    pub last_modified_by: ::std::option::Option<crate::types::UserContext>,
28    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
29    pub metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
30    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
31    pub lineage_group_arn: ::std::option::Option<::std::string::String>,
32    _request_id: Option<String>,
33}
34impl DescribeActionOutput {
35    /// <p>The name of the action.</p>
36    pub fn action_name(&self) -> ::std::option::Option<&str> {
37        self.action_name.as_deref()
38    }
39    /// <p>The Amazon Resource Name (ARN) of the action.</p>
40    pub fn action_arn(&self) -> ::std::option::Option<&str> {
41        self.action_arn.as_deref()
42    }
43    /// <p>The source of the action.</p>
44    pub fn source(&self) -> ::std::option::Option<&crate::types::ActionSource> {
45        self.source.as_ref()
46    }
47    /// <p>The type of the action.</p>
48    pub fn action_type(&self) -> ::std::option::Option<&str> {
49        self.action_type.as_deref()
50    }
51    /// <p>The description of the action.</p>
52    pub fn description(&self) -> ::std::option::Option<&str> {
53        self.description.as_deref()
54    }
55    /// <p>The status of the action.</p>
56    pub fn status(&self) -> ::std::option::Option<&crate::types::ActionStatus> {
57        self.status.as_ref()
58    }
59    /// <p>A list of the action's properties.</p>
60    pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
61        self.properties.as_ref()
62    }
63    /// <p>When the action was created.</p>
64    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.creation_time.as_ref()
66    }
67    /// <p>Information about the user who created or modified a SageMaker resource.</p>
68    pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
69        self.created_by.as_ref()
70    }
71    /// <p>When the action was last modified.</p>
72    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73        self.last_modified_time.as_ref()
74    }
75    /// <p>Information about the user who created or modified a SageMaker resource.</p>
76    pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
77        self.last_modified_by.as_ref()
78    }
79    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
80    pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
81        self.metadata_properties.as_ref()
82    }
83    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
84    pub fn lineage_group_arn(&self) -> ::std::option::Option<&str> {
85        self.lineage_group_arn.as_deref()
86    }
87}
88impl ::aws_types::request_id::RequestId for DescribeActionOutput {
89    fn request_id(&self) -> Option<&str> {
90        self._request_id.as_deref()
91    }
92}
93impl DescribeActionOutput {
94    /// Creates a new builder-style object to manufacture [`DescribeActionOutput`](crate::operation::describe_action::DescribeActionOutput).
95    pub fn builder() -> crate::operation::describe_action::builders::DescribeActionOutputBuilder {
96        crate::operation::describe_action::builders::DescribeActionOutputBuilder::default()
97    }
98}
99
100/// A builder for [`DescribeActionOutput`](crate::operation::describe_action::DescribeActionOutput).
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
102#[non_exhaustive]
103pub struct DescribeActionOutputBuilder {
104    pub(crate) action_name: ::std::option::Option<::std::string::String>,
105    pub(crate) action_arn: ::std::option::Option<::std::string::String>,
106    pub(crate) source: ::std::option::Option<crate::types::ActionSource>,
107    pub(crate) action_type: ::std::option::Option<::std::string::String>,
108    pub(crate) description: ::std::option::Option<::std::string::String>,
109    pub(crate) status: ::std::option::Option<crate::types::ActionStatus>,
110    pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
111    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
112    pub(crate) created_by: ::std::option::Option<crate::types::UserContext>,
113    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
114    pub(crate) last_modified_by: ::std::option::Option<crate::types::UserContext>,
115    pub(crate) metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
116    pub(crate) lineage_group_arn: ::std::option::Option<::std::string::String>,
117    _request_id: Option<String>,
118}
119impl DescribeActionOutputBuilder {
120    /// <p>The name of the action.</p>
121    pub fn action_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.action_name = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The name of the action.</p>
126    pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.action_name = input;
128        self
129    }
130    /// <p>The name of the action.</p>
131    pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
132        &self.action_name
133    }
134    /// <p>The Amazon Resource Name (ARN) of the action.</p>
135    pub fn action_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.action_arn = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The Amazon Resource Name (ARN) of the action.</p>
140    pub fn set_action_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.action_arn = input;
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the action.</p>
145    pub fn get_action_arn(&self) -> &::std::option::Option<::std::string::String> {
146        &self.action_arn
147    }
148    /// <p>The source of the action.</p>
149    pub fn source(mut self, input: crate::types::ActionSource) -> Self {
150        self.source = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>The source of the action.</p>
154    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ActionSource>) -> Self {
155        self.source = input;
156        self
157    }
158    /// <p>The source of the action.</p>
159    pub fn get_source(&self) -> &::std::option::Option<crate::types::ActionSource> {
160        &self.source
161    }
162    /// <p>The type of the action.</p>
163    pub fn action_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.action_type = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The type of the action.</p>
168    pub fn set_action_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.action_type = input;
170        self
171    }
172    /// <p>The type of the action.</p>
173    pub fn get_action_type(&self) -> &::std::option::Option<::std::string::String> {
174        &self.action_type
175    }
176    /// <p>The description of the action.</p>
177    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.description = ::std::option::Option::Some(input.into());
179        self
180    }
181    /// <p>The description of the action.</p>
182    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.description = input;
184        self
185    }
186    /// <p>The description of the action.</p>
187    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
188        &self.description
189    }
190    /// <p>The status of the action.</p>
191    pub fn status(mut self, input: crate::types::ActionStatus) -> Self {
192        self.status = ::std::option::Option::Some(input);
193        self
194    }
195    /// <p>The status of the action.</p>
196    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ActionStatus>) -> Self {
197        self.status = input;
198        self
199    }
200    /// <p>The status of the action.</p>
201    pub fn get_status(&self) -> &::std::option::Option<crate::types::ActionStatus> {
202        &self.status
203    }
204    /// Adds a key-value pair to `properties`.
205    ///
206    /// To override the contents of this collection use [`set_properties`](Self::set_properties).
207    ///
208    /// <p>A list of the action's properties.</p>
209    pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
210        let mut hash_map = self.properties.unwrap_or_default();
211        hash_map.insert(k.into(), v.into());
212        self.properties = ::std::option::Option::Some(hash_map);
213        self
214    }
215    /// <p>A list of the action's properties.</p>
216    pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
217        self.properties = input;
218        self
219    }
220    /// <p>A list of the action's properties.</p>
221    pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
222        &self.properties
223    }
224    /// <p>When the action was created.</p>
225    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
226        self.creation_time = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>When the action was created.</p>
230    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
231        self.creation_time = input;
232        self
233    }
234    /// <p>When the action was created.</p>
235    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
236        &self.creation_time
237    }
238    /// <p>Information about the user who created or modified a SageMaker resource.</p>
239    pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
240        self.created_by = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>Information about the user who created or modified a SageMaker resource.</p>
244    pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
245        self.created_by = input;
246        self
247    }
248    /// <p>Information about the user who created or modified a SageMaker resource.</p>
249    pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
250        &self.created_by
251    }
252    /// <p>When the action was last modified.</p>
253    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
254        self.last_modified_time = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>When the action was last modified.</p>
258    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
259        self.last_modified_time = input;
260        self
261    }
262    /// <p>When the action was last modified.</p>
263    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
264        &self.last_modified_time
265    }
266    /// <p>Information about the user who created or modified a SageMaker resource.</p>
267    pub fn last_modified_by(mut self, input: crate::types::UserContext) -> Self {
268        self.last_modified_by = ::std::option::Option::Some(input);
269        self
270    }
271    /// <p>Information about the user who created or modified a SageMaker resource.</p>
272    pub fn set_last_modified_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
273        self.last_modified_by = input;
274        self
275    }
276    /// <p>Information about the user who created or modified a SageMaker resource.</p>
277    pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
278        &self.last_modified_by
279    }
280    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
281    pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
282        self.metadata_properties = ::std::option::Option::Some(input);
283        self
284    }
285    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
286    pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
287        self.metadata_properties = input;
288        self
289    }
290    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
291    pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
292        &self.metadata_properties
293    }
294    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
295    pub fn lineage_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
296        self.lineage_group_arn = ::std::option::Option::Some(input.into());
297        self
298    }
299    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
300    pub fn set_lineage_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
301        self.lineage_group_arn = input;
302        self
303    }
304    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
305    pub fn get_lineage_group_arn(&self) -> &::std::option::Option<::std::string::String> {
306        &self.lineage_group_arn
307    }
308    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
309        self._request_id = Some(request_id.into());
310        self
311    }
312
313    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
314        self._request_id = request_id;
315        self
316    }
317    /// Consumes the builder and constructs a [`DescribeActionOutput`](crate::operation::describe_action::DescribeActionOutput).
318    pub fn build(self) -> crate::operation::describe_action::DescribeActionOutput {
319        crate::operation::describe_action::DescribeActionOutput {
320            action_name: self.action_name,
321            action_arn: self.action_arn,
322            source: self.source,
323            action_type: self.action_type,
324            description: self.description,
325            status: self.status,
326            properties: self.properties,
327            creation_time: self.creation_time,
328            created_by: self.created_by,
329            last_modified_time: self.last_modified_time,
330            last_modified_by: self.last_modified_by,
331            metadata_properties: self.metadata_properties,
332            lineage_group_arn: self.lineage_group_arn,
333            _request_id: self._request_id,
334        }
335    }
336}