1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Information about a reviewer's response to a document review request.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct DocumentReviewerResponseSource {
|
7 + | /// <p>The date and time that a reviewer entered a response to a document review request.</p>
|
8 + | pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
9 + | /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
|
10 + | pub updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
11 + | /// <p>The current review status of a new custom SSM document created by a member of your organization, or of the latest version of an existing SSM document.</p>
|
12 + | /// <p>Only one version of a document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p>
|
13 + | /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
|
14 + | pub review_status: ::std::option::Option<crate::types::ReviewStatus>,
|
15 + | /// <p>The comment entered by a reviewer as part of their document review response.</p>
|
16 + | pub comment: ::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>>,
|
17 + | /// <p>The user in your organization assigned to review a document request.</p>
|
18 + | pub reviewer: ::std::option::Option<::std::string::String>,
|
19 + | }
|
20 + | impl DocumentReviewerResponseSource {
|
21 + | /// <p>The date and time that a reviewer entered a response to a document review request.</p>
|
22 + | pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
23 + | self.create_time.as_ref()
|
24 + | }
|
25 + | /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
|
26 + | pub fn updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
27 + | self.updated_time.as_ref()
|
28 + | }
|
29 + | /// <p>The current review status of a new custom SSM document created by a member of your organization, or of the latest version of an existing SSM document.</p>
|
30 + | /// <p>Only one version of a document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p>
|
31 + | /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
|
32 + | pub fn review_status(&self) -> ::std::option::Option<&crate::types::ReviewStatus> {
|
33 + | self.review_status.as_ref()
|
34 + | }
|
35 + | /// <p>The comment entered by a reviewer as part of their document review response.</p>
|
36 + | ///
|
37 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.comment.is_none()`.
|
38 + | pub fn comment(&self) -> &[crate::types::DocumentReviewCommentSource] {
|
39 + | self.comment.as_deref().unwrap_or_default()
|
40 + | }
|
41 + | /// <p>The user in your organization assigned to review a document request.</p>
|
42 + | pub fn reviewer(&self) -> ::std::option::Option<&str> {
|
43 + | self.reviewer.as_deref()
|
44 + | }
|
45 + | }
|
46 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_CREATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
47 + | ::aws_smithy_schema::ShapeId::from_parts(
|
48 + | "com.amazonaws.ssm#DocumentReviewerResponseSource$CreateTime",
|
49 + | "com.amazonaws.ssm",
|
50 + | "DocumentReviewerResponseSource",
|
51 + | ),
|
52 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
53 + | "CreateTime",
|
54 + | 0,
|
55 + | );
|
56 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_UPDATED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
57 + | ::aws_smithy_schema::ShapeId::from_parts(
|
58 + | "com.amazonaws.ssm#DocumentReviewerResponseSource$UpdatedTime",
|
59 + | "com.amazonaws.ssm",
|
60 + | "DocumentReviewerResponseSource",
|
61 + | ),
|
62 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
63 + | "UpdatedTime",
|
64 + | 1,
|
65 + | );
|
66 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEW_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
67 + | ::aws_smithy_schema::ShapeId::from_parts(
|
68 + | "com.amazonaws.ssm#DocumentReviewerResponseSource$ReviewStatus",
|
69 + | "com.amazonaws.ssm",
|
70 + | "DocumentReviewerResponseSource",
|
71 + | ),
|
72 + | ::aws_smithy_schema::ShapeType::String,
|
73 + | "ReviewStatus",
|
74 + | 2,
|
75 + | );
|
76 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_COMMENT_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
77 + | ::aws_smithy_schema::ShapeId::from_parts(
|
78 + | "com.amazonaws.ssm#DocumentReviewCommentList$member",
|
79 + | "com.amazonaws.ssm",
|
80 + | "DocumentReviewCommentList",
|
81 + | ),
|
82 + | ::aws_smithy_schema::ShapeType::Structure,
|
83 + | "member",
|
84 + | 0,
|
85 + | );
|
86 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_COMMENT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
87 + | ::aws_smithy_schema::ShapeId::from_parts(
|
88 + | "com.amazonaws.ssm#DocumentReviewerResponseSource$Comment",
|
89 + | "com.amazonaws.ssm",
|
90 + | "DocumentReviewerResponseSource",
|
91 + | ),
|
92 + | ::aws_smithy_schema::ShapeType::List,
|
93 + | "Comment",
|
94 + | 3,
|
95 + | )
|
96 + | .with_list_member(&DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_COMMENT_MEMBER);
|
97 + | static DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEWER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
98 + | ::aws_smithy_schema::ShapeId::from_parts(
|
99 + | "com.amazonaws.ssm#DocumentReviewerResponseSource$Reviewer",
|
100 + | "com.amazonaws.ssm",
|
101 + | "DocumentReviewerResponseSource",
|
102 + | ),
|
103 + | ::aws_smithy_schema::ShapeType::String,
|
104 + | "Reviewer",
|
105 + | 4,
|
106 + | );
|
107 + | static DOCUMENTREVIEWERRESPONSESOURCE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
108 + | ::aws_smithy_schema::ShapeId::from_parts(
|
109 + | "com.amazonaws.ssm#DocumentReviewerResponseSource",
|
110 + | "com.amazonaws.ssm",
|
111 + | "DocumentReviewerResponseSource",
|
112 + | ),
|
113 + | ::aws_smithy_schema::ShapeType::Structure,
|
114 + | &[
|
115 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_CREATE_TIME,
|
116 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_UPDATED_TIME,
|
117 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEW_STATUS,
|
118 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_COMMENT,
|
119 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEWER,
|
120 + | ],
|
121 + | );
|
122 + | impl DocumentReviewerResponseSource {
|
123 + | /// The schema for this shape.
|
124 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DOCUMENTREVIEWERRESPONSESOURCE_SCHEMA;
|
125 + | }
|
126 + | impl ::aws_smithy_schema::serde::SerializableStruct for DocumentReviewerResponseSource {
|
127 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
128 + | fn serialize_members(
|
129 + | &self,
|
130 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
131 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
132 + | if let Some(ref val) = self.create_time {
|
133 + | ser.write_timestamp(&DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_CREATE_TIME, val)?;
|
134 + | }
|
135 + | if let Some(ref val) = self.updated_time {
|
136 + | ser.write_timestamp(&DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_UPDATED_TIME, val)?;
|
137 + | }
|
138 + | if let Some(ref val) = self.review_status {
|
139 + | ser.write_string(&DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEW_STATUS, val.as_str())?;
|
140 + | }
|
141 + | if let Some(ref val) = self.comment {
|
142 + | ser.write_list(
|
143 + | &DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_COMMENT,
|
144 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
145 + | for item in val {
|
146 + | ser.write_struct(crate::types::DocumentReviewCommentSource::SCHEMA, item)?;
|
147 + | }
|
148 + | Ok(())
|
149 + | },
|
150 + | )?;
|
151 + | }
|
152 + | if let Some(ref val) = self.reviewer {
|
153 + | ser.write_string(&DOCUMENTREVIEWERRESPONSESOURCE_MEMBER_REVIEWER, val)?;
|
154 + | }
|
155 + | Ok(())
|
156 + | }
|
157 + | }
|
158 + | impl DocumentReviewerResponseSource {
|
159 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
160 + | pub fn deserialize(
|
161 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
162 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
163 + | #[allow(unused_variables, unused_mut)]
|
164 + | let mut builder = Self::builder();
|
165 + | #[allow(
|
166 + | unused_variables,
|
167 + | unreachable_code,
|
168 + | clippy::single_match,
|
169 + | clippy::match_single_binding,
|
170 + | clippy::diverging_sub_expression
|
171 + | )]
|
172 + | deserializer.read_struct(&DOCUMENTREVIEWERRESPONSESOURCE_SCHEMA, &mut |member, deser| {
|
173 + | match member.member_index() {
|
174 + | Some(0) => {
|
175 + | if deser.is_null() {
|
176 + | deser.read_null()?;
|
177 + | } else {
|
178 + | builder.create_time = Some(deser.read_timestamp(member)?);
|
179 + | }
|
180 + | }
|
181 + | Some(1) => {
|
182 + | if deser.is_null() {
|
183 + | deser.read_null()?;
|
184 + | } else {
|
185 + | builder.updated_time = Some(deser.read_timestamp(member)?);
|
186 + | }
|
187 + | }
|
188 + | Some(2) => {
|
189 + | if deser.is_null() {
|
190 + | deser.read_null()?;
|
191 + | } else {
|
192 + | builder.review_status = Some(crate::types::ReviewStatus::from(deser.read_string(member)?.as_str()));
|
193 + | }
|
194 + | }
|
195 + | Some(3) => {
|
196 + | if deser.is_null() {
|
197 + | deser.read_null()?;
|
198 + | } else {
|
199 + | builder.comment = Some({
|
200 + | let mut container = Vec::new();
|
201 + | deser.read_list(member, &mut |deser| {
|
202 + | container.push(crate::types::DocumentReviewCommentSource::deserialize(deser)?);
|
203 + | Ok(())
|
204 + | })?;
|
205 + | container
|
206 + | });
|
207 + | }
|
208 + | }
|
209 + | Some(4) => {
|
210 + | if deser.is_null() {
|
211 + | deser.read_null()?;
|
212 + | } else {
|
213 + | builder.reviewer = Some(deser.read_string(member)?);
|
214 + | }
|
215 + | }
|
216 + | _ => {}
|
217 + | }
|
218 + | Ok(())
|
219 + | })?;
|
220 + | Ok(builder.build())
|
221 + | }
|
222 + | }
|
223 + | impl DocumentReviewerResponseSource {
|
224 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
225 + | pub fn deserialize_with_response(
|
226 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
227 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
228 + | _status: u16,
|
229 + | _body: &[u8],
|
230 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
231 + | Self::deserialize(deserializer)
|
232 + | }
|
233 + | }
|
234 + | impl DocumentReviewerResponseSource {
|
235 + | /// Creates a new builder-style object to manufacture [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
|
236 + | pub fn builder() -> crate::types::builders::DocumentReviewerResponseSourceBuilder {
|
237 + | crate::types::builders::DocumentReviewerResponseSourceBuilder::default()
|
238 + | }
|
239 + | }
|
240 + |
|
241 + | /// A builder for [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
|
242 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
243 + | #[non_exhaustive]
|
244 + | pub struct DocumentReviewerResponseSourceBuilder {
|
245 + | pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
246 + | pub(crate) updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
247 + | pub(crate) review_status: ::std::option::Option<crate::types::ReviewStatus>,
|
248 + | pub(crate) comment: ::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>>,
|
249 + | pub(crate) reviewer: ::std::option::Option<::std::string::String>,
|
250 + | }
|
251 + | impl DocumentReviewerResponseSourceBuilder {
|
252 + | /// <p>The date and time that a reviewer entered a response to a document review request.</p>
|
253 + | pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
254 + | self.create_time = ::std::option::Option::Some(input);
|
255 + | self
|
256 + | }
|
257 + | /// <p>The date and time that a reviewer entered a response to a document review request.</p>
|
258 + | pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
259 + | self.create_time = input;
|
260 + | self
|
261 + | }
|
262 + | /// <p>The date and time that a reviewer entered a response to a document review request.</p>
|
263 + | pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
264 + | &self.create_time
|
265 + | }
|
266 + | /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
|
267 + | pub fn updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
268 + | self.updated_time = ::std::option::Option::Some(input);
|
269 + | self
|
270 + | }
|
271 + | /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
|
272 + | pub fn set_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
273 + | self.updated_time = input;
|
274 + | self
|
275 + | }
|
276 + | /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
|
277 + | pub fn get_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
278 + | &self.updated_time
|
279 + | }
|
280 + | /// <p>The current review status of a new custom SSM document created by a member of your organization, or of the latest version of an existing SSM document.</p>
|
281 + | /// <p>Only one version of a document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p>
|
282 + | /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
|
283 + | pub fn review_status(mut self, input: crate::types::ReviewStatus) -> Self {
|
284 + | self.review_status = ::std::option::Option::Some(input);
|
285 + | self
|
286 + | }
|
287 + | /// <p>The current review status of a new custom SSM document created by a member of your organization, or of the latest version of an existing SSM document.</p>
|
288 + | /// <p>Only one version of a document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p>
|
289 + | /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
|
290 + | pub fn set_review_status(mut self, input: ::std::option::Option<crate::types::ReviewStatus>) -> Self {
|
291 + | self.review_status = input;
|
292 + | self
|
293 + | }
|
294 + | /// <p>The current review status of a new custom SSM document created by a member of your organization, or of the latest version of an existing SSM document.</p>
|
295 + | /// <p>Only one version of a document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p>
|
296 + | /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
|
297 + | pub fn get_review_status(&self) -> &::std::option::Option<crate::types::ReviewStatus> {
|
298 + | &self.review_status
|
299 + | }
|
300 + | /// Appends an item to `comment`.
|
301 + | ///
|
302 + | /// To override the contents of this collection use [`set_comment`](Self::set_comment).
|
303 + | ///
|
304 + | /// <p>The comment entered by a reviewer as part of their document review response.</p>
|
305 + | pub fn comment(mut self, input: crate::types::DocumentReviewCommentSource) -> Self {
|
306 + | let mut v = self.comment.unwrap_or_default();
|
307 + | v.push(input);
|
308 + | self.comment = ::std::option::Option::Some(v);
|
309 + | self
|
310 + | }
|
311 + | /// <p>The comment entered by a reviewer as part of their document review response.</p>
|
312 + | pub fn set_comment(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>>) -> Self {
|
313 + | self.comment = input;
|
314 + | self
|
315 + | }
|
316 + | /// <p>The comment entered by a reviewer as part of their document review response.</p>
|
317 + | pub fn get_comment(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>> {
|
318 + | &self.comment
|
319 + | }
|
320 + | /// <p>The user in your organization assigned to review a document request.</p>
|
321 + | pub fn reviewer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
322 + | self.reviewer = ::std::option::Option::Some(input.into());
|
323 + | self
|
324 + | }
|
325 + | /// <p>The user in your organization assigned to review a document request.</p>
|
326 + | pub fn set_reviewer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
327 + | self.reviewer = input;
|
328 + | self
|
329 + | }
|
330 + | /// <p>The user in your organization assigned to review a document request.</p>
|
331 + | pub fn get_reviewer(&self) -> &::std::option::Option<::std::string::String> {
|
332 + | &self.reviewer
|
333 + | }
|
334 + | /// Consumes the builder and constructs a [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
|
335 + | pub fn build(self) -> crate::types::DocumentReviewerResponseSource {
|
336 + | crate::types::DocumentReviewerResponseSource {
|
337 + | create_time: self.create_time,
|
338 + | updated_time: self.updated_time,
|
339 + | review_status: self.review_status,
|
340 + | comment: self.comment,
|
341 + | reviewer: self.reviewer,
|
342 + | }
|
343 + | }
|
344 + | }
|