1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Summary information about an OpsItem event or that associated an OpsItem with a related item.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct OpsItemEventSummary {
|
7 + | /// <p>The ID of the OpsItem.</p>
|
8 + | pub ops_item_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The ID of the OpsItem event.</p>
|
10 + | pub event_id: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The source of the OpsItem event.</p>
|
12 + | pub source: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The type of information provided as a detail.</p>
|
14 + | pub detail_type: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>Specific information about the OpsItem event.</p>
|
16 + | pub detail: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>Information about the user or resource that created the OpsItem event.</p>
|
18 + | pub created_by: ::std::option::Option<crate::types::OpsItemIdentity>,
|
19 + | /// <p>The date and time the OpsItem event was created.</p>
|
20 + | pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
21 + | }
|
22 + | impl OpsItemEventSummary {
|
23 + | /// <p>The ID of the OpsItem.</p>
|
24 + | pub fn ops_item_id(&self) -> ::std::option::Option<&str> {
|
25 + | self.ops_item_id.as_deref()
|
26 + | }
|
27 + | /// <p>The ID of the OpsItem event.</p>
|
28 + | pub fn event_id(&self) -> ::std::option::Option<&str> {
|
29 + | self.event_id.as_deref()
|
30 + | }
|
31 + | /// <p>The source of the OpsItem event.</p>
|
32 + | pub fn source(&self) -> ::std::option::Option<&str> {
|
33 + | self.source.as_deref()
|
34 + | }
|
35 + | /// <p>The type of information provided as a detail.</p>
|
36 + | pub fn detail_type(&self) -> ::std::option::Option<&str> {
|
37 + | self.detail_type.as_deref()
|
38 + | }
|
39 + | /// <p>Specific information about the OpsItem event.</p>
|
40 + | pub fn detail(&self) -> ::std::option::Option<&str> {
|
41 + | self.detail.as_deref()
|
42 + | }
|
43 + | /// <p>Information about the user or resource that created the OpsItem event.</p>
|
44 + | pub fn created_by(&self) -> ::std::option::Option<&crate::types::OpsItemIdentity> {
|
45 + | self.created_by.as_ref()
|
46 + | }
|
47 + | /// <p>The date and time the OpsItem event was created.</p>
|
48 + | pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
49 + | self.created_time.as_ref()
|
50 + | }
|
51 + | }
|
52 + | static OPSITEMEVENTSUMMARY_MEMBER_OPS_ITEM_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
53 + | ::aws_smithy_schema::ShapeId::from_parts(
|
54 + | "com.amazonaws.ssm#OpsItemEventSummary$OpsItemId",
|
55 + | "com.amazonaws.ssm",
|
56 + | "OpsItemEventSummary",
|
57 + | ),
|
58 + | ::aws_smithy_schema::ShapeType::String,
|
59 + | "OpsItemId",
|
60 + | 0,
|
61 + | );
|
62 + | static OPSITEMEVENTSUMMARY_MEMBER_EVENT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
63 + | ::aws_smithy_schema::ShapeId::from_parts(
|
64 + | "com.amazonaws.ssm#OpsItemEventSummary$EventId",
|
65 + | "com.amazonaws.ssm",
|
66 + | "OpsItemEventSummary",
|
67 + | ),
|
68 + | ::aws_smithy_schema::ShapeType::String,
|
69 + | "EventId",
|
70 + | 1,
|
71 + | );
|
72 + | static OPSITEMEVENTSUMMARY_MEMBER_SOURCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
73 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#OpsItemEventSummary$Source", "com.amazonaws.ssm", "OpsItemEventSummary"),
|
74 + | ::aws_smithy_schema::ShapeType::String,
|
75 + | "Source",
|
76 + | 2,
|
77 + | );
|
78 + | static OPSITEMEVENTSUMMARY_MEMBER_DETAIL_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
79 + | ::aws_smithy_schema::ShapeId::from_parts(
|
80 + | "com.amazonaws.ssm#OpsItemEventSummary$DetailType",
|
81 + | "com.amazonaws.ssm",
|
82 + | "OpsItemEventSummary",
|
83 + | ),
|
84 + | ::aws_smithy_schema::ShapeType::String,
|
85 + | "DetailType",
|
86 + | 3,
|
87 + | );
|
88 + | static OPSITEMEVENTSUMMARY_MEMBER_DETAIL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
89 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#OpsItemEventSummary$Detail", "com.amazonaws.ssm", "OpsItemEventSummary"),
|
90 + | ::aws_smithy_schema::ShapeType::String,
|
91 + | "Detail",
|
92 + | 4,
|
93 + | );
|
94 + | static OPSITEMEVENTSUMMARY_MEMBER_CREATED_BY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
95 + | ::aws_smithy_schema::ShapeId::from_parts(
|
96 + | "com.amazonaws.ssm#OpsItemEventSummary$CreatedBy",
|
97 + | "com.amazonaws.ssm",
|
98 + | "OpsItemEventSummary",
|
99 + | ),
|
100 + | ::aws_smithy_schema::ShapeType::Structure,
|
101 + | "CreatedBy",
|
102 + | 5,
|
103 + | );
|
104 + | static OPSITEMEVENTSUMMARY_MEMBER_CREATED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
105 + | ::aws_smithy_schema::ShapeId::from_parts(
|
106 + | "com.amazonaws.ssm#OpsItemEventSummary$CreatedTime",
|
107 + | "com.amazonaws.ssm",
|
108 + | "OpsItemEventSummary",
|
109 + | ),
|
110 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
111 + | "CreatedTime",
|
112 + | 6,
|
113 + | );
|
114 + | static OPSITEMEVENTSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
115 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#OpsItemEventSummary", "com.amazonaws.ssm", "OpsItemEventSummary"),
|
116 + | ::aws_smithy_schema::ShapeType::Structure,
|
117 + | &[
|
118 + | &OPSITEMEVENTSUMMARY_MEMBER_OPS_ITEM_ID,
|
119 + | &OPSITEMEVENTSUMMARY_MEMBER_EVENT_ID,
|
120 + | &OPSITEMEVENTSUMMARY_MEMBER_SOURCE,
|
121 + | &OPSITEMEVENTSUMMARY_MEMBER_DETAIL_TYPE,
|
122 + | &OPSITEMEVENTSUMMARY_MEMBER_DETAIL,
|
123 + | &OPSITEMEVENTSUMMARY_MEMBER_CREATED_BY,
|
124 + | &OPSITEMEVENTSUMMARY_MEMBER_CREATED_TIME,
|
125 + | ],
|
126 + | );
|
127 + | impl OpsItemEventSummary {
|
128 + | /// The schema for this shape.
|
129 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPSITEMEVENTSUMMARY_SCHEMA;
|
130 + | }
|
131 + | impl ::aws_smithy_schema::serde::SerializableStruct for OpsItemEventSummary {
|
132 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
133 + | fn serialize_members(
|
134 + | &self,
|
135 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
136 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
137 + | if let Some(ref val) = self.ops_item_id {
|
138 + | ser.write_string(&OPSITEMEVENTSUMMARY_MEMBER_OPS_ITEM_ID, val)?;
|
139 + | }
|
140 + | if let Some(ref val) = self.event_id {
|
141 + | ser.write_string(&OPSITEMEVENTSUMMARY_MEMBER_EVENT_ID, val)?;
|
142 + | }
|
143 + | if let Some(ref val) = self.source {
|
144 + | ser.write_string(&OPSITEMEVENTSUMMARY_MEMBER_SOURCE, val)?;
|
145 + | }
|
146 + | if let Some(ref val) = self.detail_type {
|
147 + | ser.write_string(&OPSITEMEVENTSUMMARY_MEMBER_DETAIL_TYPE, val)?;
|
148 + | }
|
149 + | if let Some(ref val) = self.detail {
|
150 + | ser.write_string(&OPSITEMEVENTSUMMARY_MEMBER_DETAIL, val)?;
|
151 + | }
|
152 + | if let Some(ref val) = self.created_by {
|
153 + | ser.write_struct(&OPSITEMEVENTSUMMARY_MEMBER_CREATED_BY, val)?;
|
154 + | }
|
155 + | if let Some(ref val) = self.created_time {
|
156 + | ser.write_timestamp(&OPSITEMEVENTSUMMARY_MEMBER_CREATED_TIME, val)?;
|
157 + | }
|
158 + | Ok(())
|
159 + | }
|
160 + | }
|
161 + | impl OpsItemEventSummary {
|
162 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
163 + | pub fn deserialize(
|
164 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
165 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
166 + | #[allow(unused_variables, unused_mut)]
|
167 + | let mut builder = Self::builder();
|
168 + | #[allow(
|
169 + | unused_variables,
|
170 + | unreachable_code,
|
171 + | clippy::single_match,
|
172 + | clippy::match_single_binding,
|
173 + | clippy::diverging_sub_expression
|
174 + | )]
|
175 + | deserializer.read_struct(&OPSITEMEVENTSUMMARY_SCHEMA, &mut |member, deser| {
|
176 + | match member.member_index() {
|
177 + | Some(0) => {
|
178 + | if deser.is_null() {
|
179 + | deser.read_null()?;
|
180 + | } else {
|
181 + | builder.ops_item_id = Some(deser.read_string(member)?);
|
182 + | }
|
183 + | }
|
184 + | Some(1) => {
|
185 + | if deser.is_null() {
|
186 + | deser.read_null()?;
|
187 + | } else {
|
188 + | builder.event_id = Some(deser.read_string(member)?);
|
189 + | }
|
190 + | }
|
191 + | Some(2) => {
|
192 + | if deser.is_null() {
|
193 + | deser.read_null()?;
|
194 + | } else {
|
195 + | builder.source = Some(deser.read_string(member)?);
|
196 + | }
|
197 + | }
|
198 + | Some(3) => {
|
199 + | if deser.is_null() {
|
200 + | deser.read_null()?;
|
201 + | } else {
|
202 + | builder.detail_type = Some(deser.read_string(member)?);
|
203 + | }
|
204 + | }
|
205 + | Some(4) => {
|
206 + | if deser.is_null() {
|
207 + | deser.read_null()?;
|
208 + | } else {
|
209 + | builder.detail = Some(deser.read_string(member)?);
|
210 + | }
|
211 + | }
|
212 + | Some(5) => {
|
213 + | if deser.is_null() {
|
214 + | deser.read_null()?;
|
215 + | } else {
|
216 + | builder.created_by = Some(crate::types::OpsItemIdentity::deserialize(deser)?);
|
217 + | }
|
218 + | }
|
219 + | Some(6) => {
|
220 + | if deser.is_null() {
|
221 + | deser.read_null()?;
|
222 + | } else {
|
223 + | builder.created_time = Some(deser.read_timestamp(member)?);
|
224 + | }
|
225 + | }
|
226 + | _ => {}
|
227 + | }
|
228 + | Ok(())
|
229 + | })?;
|
230 + | Ok(builder.build())
|
231 + | }
|
232 + | }
|
233 + | impl OpsItemEventSummary {
|
234 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
235 + | pub fn deserialize_with_response(
|
236 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
237 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
238 + | _status: u16,
|
239 + | _body: &[u8],
|
240 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
241 + | Self::deserialize(deserializer)
|
242 + | }
|
243 + | }
|
244 + | impl OpsItemEventSummary {
|
245 + | /// Creates a new builder-style object to manufacture [`OpsItemEventSummary`](crate::types::OpsItemEventSummary).
|
246 + | pub fn builder() -> crate::types::builders::OpsItemEventSummaryBuilder {
|
247 + | crate::types::builders::OpsItemEventSummaryBuilder::default()
|
248 + | }
|
249 + | }
|
250 + |
|
251 + | /// A builder for [`OpsItemEventSummary`](crate::types::OpsItemEventSummary).
|
252 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
253 + | #[non_exhaustive]
|
254 + | pub struct OpsItemEventSummaryBuilder {
|
255 + | pub(crate) ops_item_id: ::std::option::Option<::std::string::String>,
|
256 + | pub(crate) event_id: ::std::option::Option<::std::string::String>,
|
257 + | pub(crate) source: ::std::option::Option<::std::string::String>,
|
258 + | pub(crate) detail_type: ::std::option::Option<::std::string::String>,
|
259 + | pub(crate) detail: ::std::option::Option<::std::string::String>,
|
260 + | pub(crate) created_by: ::std::option::Option<crate::types::OpsItemIdentity>,
|
261 + | pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
262 + | }
|
263 + | impl OpsItemEventSummaryBuilder {
|
264 + | /// <p>The ID of the OpsItem.</p>
|
265 + | pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
266 + | self.ops_item_id = ::std::option::Option::Some(input.into());
|
267 + | self
|
268 + | }
|
269 + | /// <p>The ID of the OpsItem.</p>
|
270 + | pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
271 + | self.ops_item_id = input;
|
272 + | self
|
273 + | }
|
274 + | /// <p>The ID of the OpsItem.</p>
|
275 + | pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
|
276 + | &self.ops_item_id
|
277 + | }
|
278 + | /// <p>The ID of the OpsItem event.</p>
|
279 + | pub fn event_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
280 + | self.event_id = ::std::option::Option::Some(input.into());
|
281 + | self
|
282 + | }
|
283 + | /// <p>The ID of the OpsItem event.</p>
|
284 + | pub fn set_event_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
285 + | self.event_id = input;
|
286 + | self
|
287 + | }
|
288 + | /// <p>The ID of the OpsItem event.</p>
|
289 + | pub fn get_event_id(&self) -> &::std::option::Option<::std::string::String> {
|
290 + | &self.event_id
|
291 + | }
|
292 + | /// <p>The source of the OpsItem event.</p>
|
293 + | pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
294 + | self.source = ::std::option::Option::Some(input.into());
|
295 + | self
|
296 + | }
|
297 + | /// <p>The source of the OpsItem event.</p>
|
298 + | pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
299 + | self.source = input;
|
300 + | self
|
301 + | }
|
302 + | /// <p>The source of the OpsItem event.</p>
|
303 + | pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
|
304 + | &self.source
|
305 + | }
|
306 + | /// <p>The type of information provided as a detail.</p>
|
307 + | pub fn detail_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
308 + | self.detail_type = ::std::option::Option::Some(input.into());
|
309 + | self
|
310 + | }
|
311 + | /// <p>The type of information provided as a detail.</p>
|
312 + | pub fn set_detail_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
313 + | self.detail_type = input;
|
314 + | self
|
315 + | }
|
316 + | /// <p>The type of information provided as a detail.</p>
|
317 + | pub fn get_detail_type(&self) -> &::std::option::Option<::std::string::String> {
|
318 + | &self.detail_type
|
319 + | }
|
320 + | /// <p>Specific information about the OpsItem event.</p>
|
321 + | pub fn detail(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
322 + | self.detail = ::std::option::Option::Some(input.into());
|
323 + | self
|
324 + | }
|
325 + | /// <p>Specific information about the OpsItem event.</p>
|
326 + | pub fn set_detail(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
327 + | self.detail = input;
|
328 + | self
|
329 + | }
|
330 + | /// <p>Specific information about the OpsItem event.</p>
|
331 + | pub fn get_detail(&self) -> &::std::option::Option<::std::string::String> {
|
332 + | &self.detail
|
333 + | }
|
334 + | /// <p>Information about the user or resource that created the OpsItem event.</p>
|
335 + | pub fn created_by(mut self, input: crate::types::OpsItemIdentity) -> Self {
|
336 + | self.created_by = ::std::option::Option::Some(input);
|
337 + | self
|
338 + | }
|
339 + | /// <p>Information about the user or resource that created the OpsItem event.</p>
|
340 + | pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::OpsItemIdentity>) -> Self {
|
341 + | self.created_by = input;
|
342 + | self
|
343 + | }
|
344 + | /// <p>Information about the user or resource that created the OpsItem event.</p>
|
345 + | pub fn get_created_by(&self) -> &::std::option::Option<crate::types::OpsItemIdentity> {
|
346 + | &self.created_by
|
347 + | }
|
348 + | /// <p>The date and time the OpsItem event was created.</p>
|
349 + | pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
350 + | self.created_time = ::std::option::Option::Some(input);
|
351 + | self
|
352 + | }
|
353 + | /// <p>The date and time the OpsItem event was created.</p>
|
354 + | pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
355 + | self.created_time = input;
|
356 + | self
|
357 + | }
|
358 + | /// <p>The date and time the OpsItem event was created.</p>
|
359 + | pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
360 + | &self.created_time
|
361 + | }
|
362 + | /// Consumes the builder and constructs a [`OpsItemEventSummary`](crate::types::OpsItemEventSummary).
|
363 + | pub fn build(self) -> crate::types::OpsItemEventSummary {
|
364 + | crate::types::OpsItemEventSummary {
|
365 + | ops_item_id: self.ops_item_id,
|
366 + | event_id: self.event_id,
|
367 + | source: self.source,
|
368 + | detail_type: self.detail_type,
|
369 + | detail: self.detail,
|
370 + | created_by: self.created_by,
|
371 + | created_time: self.created_time,
|
372 + | }
|
373 + | }
|
374 + | }
|