aws_sdk_workdocs/operation/delete_comment/
_delete_comment_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DeleteCommentInput {
6    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
7    pub authentication_token: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the document.</p>
9    pub document_id: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the document version.</p>
11    pub version_id: ::std::option::Option<::std::string::String>,
12    /// <p>The ID of the comment.</p>
13    pub comment_id: ::std::option::Option<::std::string::String>,
14}
15impl DeleteCommentInput {
16    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
17    pub fn authentication_token(&self) -> ::std::option::Option<&str> {
18        self.authentication_token.as_deref()
19    }
20    /// <p>The ID of the document.</p>
21    pub fn document_id(&self) -> ::std::option::Option<&str> {
22        self.document_id.as_deref()
23    }
24    /// <p>The ID of the document version.</p>
25    pub fn version_id(&self) -> ::std::option::Option<&str> {
26        self.version_id.as_deref()
27    }
28    /// <p>The ID of the comment.</p>
29    pub fn comment_id(&self) -> ::std::option::Option<&str> {
30        self.comment_id.as_deref()
31    }
32}
33impl ::std::fmt::Debug for DeleteCommentInput {
34    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35        let mut formatter = f.debug_struct("DeleteCommentInput");
36        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
37        formatter.field("document_id", &self.document_id);
38        formatter.field("version_id", &self.version_id);
39        formatter.field("comment_id", &self.comment_id);
40        formatter.finish()
41    }
42}
43impl DeleteCommentInput {
44    /// Creates a new builder-style object to manufacture [`DeleteCommentInput`](crate::operation::delete_comment::DeleteCommentInput).
45    pub fn builder() -> crate::operation::delete_comment::builders::DeleteCommentInputBuilder {
46        crate::operation::delete_comment::builders::DeleteCommentInputBuilder::default()
47    }
48}
49
50/// A builder for [`DeleteCommentInput`](crate::operation::delete_comment::DeleteCommentInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct DeleteCommentInputBuilder {
54    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
55    pub(crate) document_id: ::std::option::Option<::std::string::String>,
56    pub(crate) version_id: ::std::option::Option<::std::string::String>,
57    pub(crate) comment_id: ::std::option::Option<::std::string::String>,
58}
59impl DeleteCommentInputBuilder {
60    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
61    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.authentication_token = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
66    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.authentication_token = input;
68        self
69    }
70    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
71    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
72        &self.authentication_token
73    }
74    /// <p>The ID of the document.</p>
75    /// This field is required.
76    pub fn document_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77        self.document_id = ::std::option::Option::Some(input.into());
78        self
79    }
80    /// <p>The ID of the document.</p>
81    pub fn set_document_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.document_id = input;
83        self
84    }
85    /// <p>The ID of the document.</p>
86    pub fn get_document_id(&self) -> &::std::option::Option<::std::string::String> {
87        &self.document_id
88    }
89    /// <p>The ID of the document version.</p>
90    /// This field is required.
91    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.version_id = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>The ID of the document version.</p>
96    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.version_id = input;
98        self
99    }
100    /// <p>The ID of the document version.</p>
101    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
102        &self.version_id
103    }
104    /// <p>The ID of the comment.</p>
105    /// This field is required.
106    pub fn comment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.comment_id = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>The ID of the comment.</p>
111    pub fn set_comment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.comment_id = input;
113        self
114    }
115    /// <p>The ID of the comment.</p>
116    pub fn get_comment_id(&self) -> &::std::option::Option<::std::string::String> {
117        &self.comment_id
118    }
119    /// Consumes the builder and constructs a [`DeleteCommentInput`](crate::operation::delete_comment::DeleteCommentInput).
120    pub fn build(
121        self,
122    ) -> ::std::result::Result<crate::operation::delete_comment::DeleteCommentInput, ::aws_smithy_types::error::operation::BuildError> {
123        ::std::result::Result::Ok(crate::operation::delete_comment::DeleteCommentInput {
124            authentication_token: self.authentication_token,
125            document_id: self.document_id,
126            version_id: self.version_id,
127            comment_id: self.comment_id,
128        })
129    }
130}
131impl ::std::fmt::Debug for DeleteCommentInputBuilder {
132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133        let mut formatter = f.debug_struct("DeleteCommentInputBuilder");
134        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
135        formatter.field("document_id", &self.document_id);
136        formatter.field("version_id", &self.version_id);
137        formatter.field("comment_id", &self.comment_id);
138        formatter.finish()
139    }
140}