aws_sdk_sagemaker/operation/describe_action/
_describe_action_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeActionOutput {
6 pub action_name: ::std::option::Option<::std::string::String>,
8 pub action_arn: ::std::option::Option<::std::string::String>,
10 pub source: ::std::option::Option<crate::types::ActionSource>,
12 pub action_type: ::std::option::Option<::std::string::String>,
14 pub description: ::std::option::Option<::std::string::String>,
16 pub status: ::std::option::Option<crate::types::ActionStatus>,
18 pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub created_by: ::std::option::Option<crate::types::UserContext>,
24 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
26 pub last_modified_by: ::std::option::Option<crate::types::UserContext>,
28 pub metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
30 pub lineage_group_arn: ::std::option::Option<::std::string::String>,
32 _request_id: Option<String>,
33}
34impl DescribeActionOutput {
35 pub fn action_name(&self) -> ::std::option::Option<&str> {
37 self.action_name.as_deref()
38 }
39 pub fn action_arn(&self) -> ::std::option::Option<&str> {
41 self.action_arn.as_deref()
42 }
43 pub fn source(&self) -> ::std::option::Option<&crate::types::ActionSource> {
45 self.source.as_ref()
46 }
47 pub fn action_type(&self) -> ::std::option::Option<&str> {
49 self.action_type.as_deref()
50 }
51 pub fn description(&self) -> ::std::option::Option<&str> {
53 self.description.as_deref()
54 }
55 pub fn status(&self) -> ::std::option::Option<&crate::types::ActionStatus> {
57 self.status.as_ref()
58 }
59 pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
61 self.properties.as_ref()
62 }
63 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.creation_time.as_ref()
66 }
67 pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
69 self.created_by.as_ref()
70 }
71 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73 self.last_modified_time.as_ref()
74 }
75 pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
77 self.last_modified_by.as_ref()
78 }
79 pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
81 self.metadata_properties.as_ref()
82 }
83 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 pub fn builder() -> crate::operation::describe_action::builders::DescribeActionOutputBuilder {
96 crate::operation::describe_action::builders::DescribeActionOutputBuilder::default()
97 }
98}
99
100#[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 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 pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.action_name = input;
128 self
129 }
130 pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
132 &self.action_name
133 }
134 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 pub fn set_action_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.action_arn = input;
142 self
143 }
144 pub fn get_action_arn(&self) -> &::std::option::Option<::std::string::String> {
146 &self.action_arn
147 }
148 pub fn source(mut self, input: crate::types::ActionSource) -> Self {
150 self.source = ::std::option::Option::Some(input);
151 self
152 }
153 pub fn set_source(mut self, input: ::std::option::Option<crate::types::ActionSource>) -> Self {
155 self.source = input;
156 self
157 }
158 pub fn get_source(&self) -> &::std::option::Option<crate::types::ActionSource> {
160 &self.source
161 }
162 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 pub fn set_action_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.action_type = input;
170 self
171 }
172 pub fn get_action_type(&self) -> &::std::option::Option<::std::string::String> {
174 &self.action_type
175 }
176 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.description = input;
184 self
185 }
186 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
188 &self.description
189 }
190 pub fn status(mut self, input: crate::types::ActionStatus) -> Self {
192 self.status = ::std::option::Option::Some(input);
193 self
194 }
195 pub fn set_status(mut self, input: ::std::option::Option<crate::types::ActionStatus>) -> Self {
197 self.status = input;
198 self
199 }
200 pub fn get_status(&self) -> &::std::option::Option<crate::types::ActionStatus> {
202 &self.status
203 }
204 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 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 pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
222 &self.properties
223 }
224 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 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 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
236 &self.creation_time
237 }
238 pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
240 self.created_by = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
245 self.created_by = input;
246 self
247 }
248 pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
250 &self.created_by
251 }
252 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 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 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
264 &self.last_modified_time
265 }
266 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 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 pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
278 &self.last_modified_by
279 }
280 pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
282 self.metadata_properties = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
287 self.metadata_properties = input;
288 self
289 }
290 pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
292 &self.metadata_properties
293 }
294 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 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 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 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}