aws_sdk_workdocs/operation/describe_document_versions/
_describe_document_versions_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 DescribeDocumentVersionsInput {
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 marker for the next set of results. (You received this marker from a previous call.)</p>
11    pub marker: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of versions to return with this call.</p>
13    pub limit: ::std::option::Option<i32>,
14    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
15    pub include: ::std::option::Option<::std::string::String>,
16    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
17    pub fields: ::std::option::Option<::std::string::String>,
18}
19impl DescribeDocumentVersionsInput {
20    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
21    pub fn authentication_token(&self) -> ::std::option::Option<&str> {
22        self.authentication_token.as_deref()
23    }
24    /// <p>The ID of the document.</p>
25    pub fn document_id(&self) -> ::std::option::Option<&str> {
26        self.document_id.as_deref()
27    }
28    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
29    pub fn marker(&self) -> ::std::option::Option<&str> {
30        self.marker.as_deref()
31    }
32    /// <p>The maximum number of versions to return with this call.</p>
33    pub fn limit(&self) -> ::std::option::Option<i32> {
34        self.limit
35    }
36    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
37    pub fn include(&self) -> ::std::option::Option<&str> {
38        self.include.as_deref()
39    }
40    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
41    pub fn fields(&self) -> ::std::option::Option<&str> {
42        self.fields.as_deref()
43    }
44}
45impl ::std::fmt::Debug for DescribeDocumentVersionsInput {
46    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47        let mut formatter = f.debug_struct("DescribeDocumentVersionsInput");
48        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
49        formatter.field("document_id", &self.document_id);
50        formatter.field("marker", &self.marker);
51        formatter.field("limit", &self.limit);
52        formatter.field("include", &self.include);
53        formatter.field("fields", &self.fields);
54        formatter.finish()
55    }
56}
57impl DescribeDocumentVersionsInput {
58    /// Creates a new builder-style object to manufacture [`DescribeDocumentVersionsInput`](crate::operation::describe_document_versions::DescribeDocumentVersionsInput).
59    pub fn builder() -> crate::operation::describe_document_versions::builders::DescribeDocumentVersionsInputBuilder {
60        crate::operation::describe_document_versions::builders::DescribeDocumentVersionsInputBuilder::default()
61    }
62}
63
64/// A builder for [`DescribeDocumentVersionsInput`](crate::operation::describe_document_versions::DescribeDocumentVersionsInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct DescribeDocumentVersionsInputBuilder {
68    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
69    pub(crate) document_id: ::std::option::Option<::std::string::String>,
70    pub(crate) marker: ::std::option::Option<::std::string::String>,
71    pub(crate) limit: ::std::option::Option<i32>,
72    pub(crate) include: ::std::option::Option<::std::string::String>,
73    pub(crate) fields: ::std::option::Option<::std::string::String>,
74}
75impl DescribeDocumentVersionsInputBuilder {
76    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
77    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.authentication_token = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
82    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.authentication_token = input;
84        self
85    }
86    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
87    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
88        &self.authentication_token
89    }
90    /// <p>The ID of the document.</p>
91    /// This field is required.
92    pub fn document_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.document_id = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The ID of the document.</p>
97    pub fn set_document_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.document_id = input;
99        self
100    }
101    /// <p>The ID of the document.</p>
102    pub fn get_document_id(&self) -> &::std::option::Option<::std::string::String> {
103        &self.document_id
104    }
105    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
106    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.marker = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
111    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.marker = input;
113        self
114    }
115    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
116    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
117        &self.marker
118    }
119    /// <p>The maximum number of versions to return with this call.</p>
120    pub fn limit(mut self, input: i32) -> Self {
121        self.limit = ::std::option::Option::Some(input);
122        self
123    }
124    /// <p>The maximum number of versions to return with this call.</p>
125    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
126        self.limit = input;
127        self
128    }
129    /// <p>The maximum number of versions to return with this call.</p>
130    pub fn get_limit(&self) -> &::std::option::Option<i32> {
131        &self.limit
132    }
133    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
134    pub fn include(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.include = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
139    pub fn set_include(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.include = input;
141        self
142    }
143    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
144    pub fn get_include(&self) -> &::std::option::Option<::std::string::String> {
145        &self.include
146    }
147    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
148    pub fn fields(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.fields = ::std::option::Option::Some(input.into());
150        self
151    }
152    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
153    pub fn set_fields(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.fields = input;
155        self
156    }
157    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
158    pub fn get_fields(&self) -> &::std::option::Option<::std::string::String> {
159        &self.fields
160    }
161    /// Consumes the builder and constructs a [`DescribeDocumentVersionsInput`](crate::operation::describe_document_versions::DescribeDocumentVersionsInput).
162    pub fn build(
163        self,
164    ) -> ::std::result::Result<
165        crate::operation::describe_document_versions::DescribeDocumentVersionsInput,
166        ::aws_smithy_types::error::operation::BuildError,
167    > {
168        ::std::result::Result::Ok(crate::operation::describe_document_versions::DescribeDocumentVersionsInput {
169            authentication_token: self.authentication_token,
170            document_id: self.document_id,
171            marker: self.marker,
172            limit: self.limit,
173            include: self.include,
174            fields: self.fields,
175        })
176    }
177}
178impl ::std::fmt::Debug for DescribeDocumentVersionsInputBuilder {
179    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
180        let mut formatter = f.debug_struct("DescribeDocumentVersionsInputBuilder");
181        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
182        formatter.field("document_id", &self.document_id);
183        formatter.field("marker", &self.marker);
184        formatter.field("limit", &self.limit);
185        formatter.field("include", &self.include);
186        formatter.field("fields", &self.fields);
187        formatter.finish()
188    }
189}