aws_sdk_sagemaker/operation/describe_context/
_describe_context_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeContextOutput {
6 pub context_name: ::std::option::Option<::std::string::String>,
8 pub context_arn: ::std::option::Option<::std::string::String>,
10 pub source: ::std::option::Option<crate::types::ContextSource>,
12 pub context_type: ::std::option::Option<::std::string::String>,
14 pub description: ::std::option::Option<::std::string::String>,
16 pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub created_by: ::std::option::Option<crate::types::UserContext>,
22 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub last_modified_by: ::std::option::Option<crate::types::UserContext>,
26 pub lineage_group_arn: ::std::option::Option<::std::string::String>,
28 _request_id: Option<String>,
29}
30impl DescribeContextOutput {
31 pub fn context_name(&self) -> ::std::option::Option<&str> {
33 self.context_name.as_deref()
34 }
35 pub fn context_arn(&self) -> ::std::option::Option<&str> {
37 self.context_arn.as_deref()
38 }
39 pub fn source(&self) -> ::std::option::Option<&crate::types::ContextSource> {
41 self.source.as_ref()
42 }
43 pub fn context_type(&self) -> ::std::option::Option<&str> {
45 self.context_type.as_deref()
46 }
47 pub fn description(&self) -> ::std::option::Option<&str> {
49 self.description.as_deref()
50 }
51 pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
53 self.properties.as_ref()
54 }
55 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.creation_time.as_ref()
58 }
59 pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
61 self.created_by.as_ref()
62 }
63 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.last_modified_time.as_ref()
66 }
67 pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
69 self.last_modified_by.as_ref()
70 }
71 pub fn lineage_group_arn(&self) -> ::std::option::Option<&str> {
73 self.lineage_group_arn.as_deref()
74 }
75}
76impl ::aws_types::request_id::RequestId for DescribeContextOutput {
77 fn request_id(&self) -> Option<&str> {
78 self._request_id.as_deref()
79 }
80}
81impl DescribeContextOutput {
82 pub fn builder() -> crate::operation::describe_context::builders::DescribeContextOutputBuilder {
84 crate::operation::describe_context::builders::DescribeContextOutputBuilder::default()
85 }
86}
87
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct DescribeContextOutputBuilder {
92 pub(crate) context_name: ::std::option::Option<::std::string::String>,
93 pub(crate) context_arn: ::std::option::Option<::std::string::String>,
94 pub(crate) source: ::std::option::Option<crate::types::ContextSource>,
95 pub(crate) context_type: ::std::option::Option<::std::string::String>,
96 pub(crate) description: ::std::option::Option<::std::string::String>,
97 pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
98 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
99 pub(crate) created_by: ::std::option::Option<crate::types::UserContext>,
100 pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
101 pub(crate) last_modified_by: ::std::option::Option<crate::types::UserContext>,
102 pub(crate) lineage_group_arn: ::std::option::Option<::std::string::String>,
103 _request_id: Option<String>,
104}
105impl DescribeContextOutputBuilder {
106 pub fn context_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.context_name = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_context_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.context_name = input;
114 self
115 }
116 pub fn get_context_name(&self) -> &::std::option::Option<::std::string::String> {
118 &self.context_name
119 }
120 pub fn context_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.context_arn = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_context_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.context_arn = input;
128 self
129 }
130 pub fn get_context_arn(&self) -> &::std::option::Option<::std::string::String> {
132 &self.context_arn
133 }
134 pub fn source(mut self, input: crate::types::ContextSource) -> Self {
136 self.source = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_source(mut self, input: ::std::option::Option<crate::types::ContextSource>) -> Self {
141 self.source = input;
142 self
143 }
144 pub fn get_source(&self) -> &::std::option::Option<crate::types::ContextSource> {
146 &self.source
147 }
148 pub fn context_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.context_type = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_context_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.context_type = input;
156 self
157 }
158 pub fn get_context_type(&self) -> &::std::option::Option<::std::string::String> {
160 &self.context_type
161 }
162 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164 self.description = ::std::option::Option::Some(input.into());
165 self
166 }
167 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.description = input;
170 self
171 }
172 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
174 &self.description
175 }
176 pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
182 let mut hash_map = self.properties.unwrap_or_default();
183 hash_map.insert(k.into(), v.into());
184 self.properties = ::std::option::Option::Some(hash_map);
185 self
186 }
187 pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
189 self.properties = input;
190 self
191 }
192 pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
194 &self.properties
195 }
196 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
198 self.creation_time = ::std::option::Option::Some(input);
199 self
200 }
201 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
203 self.creation_time = input;
204 self
205 }
206 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
208 &self.creation_time
209 }
210 pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
212 self.created_by = ::std::option::Option::Some(input);
213 self
214 }
215 pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
217 self.created_by = input;
218 self
219 }
220 pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
222 &self.created_by
223 }
224 pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
226 self.last_modified_time = ::std::option::Option::Some(input);
227 self
228 }
229 pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
231 self.last_modified_time = input;
232 self
233 }
234 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
236 &self.last_modified_time
237 }
238 pub fn last_modified_by(mut self, input: crate::types::UserContext) -> Self {
240 self.last_modified_by = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_last_modified_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
245 self.last_modified_by = input;
246 self
247 }
248 pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
250 &self.last_modified_by
251 }
252 pub fn lineage_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.lineage_group_arn = ::std::option::Option::Some(input.into());
255 self
256 }
257 pub fn set_lineage_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.lineage_group_arn = input;
260 self
261 }
262 pub fn get_lineage_group_arn(&self) -> &::std::option::Option<::std::string::String> {
264 &self.lineage_group_arn
265 }
266 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
267 self._request_id = Some(request_id.into());
268 self
269 }
270
271 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
272 self._request_id = request_id;
273 self
274 }
275 pub fn build(self) -> crate::operation::describe_context::DescribeContextOutput {
277 crate::operation::describe_context::DescribeContextOutput {
278 context_name: self.context_name,
279 context_arn: self.context_arn,
280 source: self.source,
281 context_type: self.context_type,
282 description: self.description,
283 properties: self.properties,
284 creation_time: self.creation_time,
285 created_by: self.created_by,
286 last_modified_time: self.last_modified_time,
287 last_modified_by: self.last_modified_by,
288 lineage_group_arn: self.lineage_group_arn,
289 _request_id: self._request_id,
290 }
291 }
292}