Skip to main content

aws_sdk_ssm/types/
_document_reviewer_response_source.rs

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)]
6pub 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}
20impl 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}
46impl DocumentReviewerResponseSource {
47    /// Creates a new builder-style object to manufacture [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
48    pub fn builder() -> crate::types::builders::DocumentReviewerResponseSourceBuilder {
49        crate::types::builders::DocumentReviewerResponseSourceBuilder::default()
50    }
51}
52
53/// A builder for [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct DocumentReviewerResponseSourceBuilder {
57    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
58    pub(crate) updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
59    pub(crate) review_status: ::std::option::Option<crate::types::ReviewStatus>,
60    pub(crate) comment: ::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>>,
61    pub(crate) reviewer: ::std::option::Option<::std::string::String>,
62}
63impl DocumentReviewerResponseSourceBuilder {
64    /// <p>The date and time that a reviewer entered a response to a document review request.</p>
65    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
66        self.create_time = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>The date and time that a reviewer entered a response to a document review request.</p>
70    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
71        self.create_time = input;
72        self
73    }
74    /// <p>The date and time that a reviewer entered a response to a document review request.</p>
75    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
76        &self.create_time
77    }
78    /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
79    pub fn updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
80        self.updated_time = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
84    pub fn set_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
85        self.updated_time = input;
86        self
87    }
88    /// <p>The date and time that a reviewer last updated a response to a document review request.</p>
89    pub fn get_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
90        &self.updated_time
91    }
92    /// <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>
93    /// <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>
94    /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
95    pub fn review_status(mut self, input: crate::types::ReviewStatus) -> Self {
96        self.review_status = ::std::option::Option::Some(input);
97        self
98    }
99    /// <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>
100    /// <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>
101    /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
102    pub fn set_review_status(mut self, input: ::std::option::Option<crate::types::ReviewStatus>) -> Self {
103        self.review_status = input;
104        self
105    }
106    /// <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>
107    /// <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>
108    /// <p>Only one version of a document can be in review, or PENDING, at a time.</p>
109    pub fn get_review_status(&self) -> &::std::option::Option<crate::types::ReviewStatus> {
110        &self.review_status
111    }
112    /// Appends an item to `comment`.
113    ///
114    /// To override the contents of this collection use [`set_comment`](Self::set_comment).
115    ///
116    /// <p>The comment entered by a reviewer as part of their document review response.</p>
117    pub fn comment(mut self, input: crate::types::DocumentReviewCommentSource) -> Self {
118        let mut v = self.comment.unwrap_or_default();
119        v.push(input);
120        self.comment = ::std::option::Option::Some(v);
121        self
122    }
123    /// <p>The comment entered by a reviewer as part of their document review response.</p>
124    pub fn set_comment(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>>) -> Self {
125        self.comment = input;
126        self
127    }
128    /// <p>The comment entered by a reviewer as part of their document review response.</p>
129    pub fn get_comment(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentReviewCommentSource>> {
130        &self.comment
131    }
132    /// <p>The user in your organization assigned to review a document request.</p>
133    pub fn reviewer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.reviewer = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>The user in your organization assigned to review a document request.</p>
138    pub fn set_reviewer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.reviewer = input;
140        self
141    }
142    /// <p>The user in your organization assigned to review a document request.</p>
143    pub fn get_reviewer(&self) -> &::std::option::Option<::std::string::String> {
144        &self.reviewer
145    }
146    /// Consumes the builder and constructs a [`DocumentReviewerResponseSource`](crate::types::DocumentReviewerResponseSource).
147    pub fn build(self) -> crate::types::DocumentReviewerResponseSource {
148        crate::types::DocumentReviewerResponseSource {
149            create_time: self.create_time,
150            updated_time: self.updated_time,
151            review_status: self.review_status,
152            comment: self.comment,
153            reviewer: self.reviewer,
154        }
155    }
156}