aws_sdk_textract/operation/update_adapter/
_update_adapter_output.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, ::std::fmt::Debug)]
5pub struct UpdateAdapterOutput {
6    /// <p>A string containing a unique ID for the adapter that has been updated.</p>
7    pub adapter_id: ::std::option::Option<::std::string::String>,
8    /// <p>A string containing the name of the adapter that has been updated.</p>
9    pub adapter_name: ::std::option::Option<::std::string::String>,
10    /// <p>An object specifying the creation time of the the adapter that has been updated.</p>
11    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>A string containing the description of the adapter that has been updated.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>List of the targeted feature types for the updated adapter.</p>
15    pub feature_types: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>,
16    /// <p>The auto-update status of the adapter that has been updated.</p>
17    pub auto_update: ::std::option::Option<crate::types::AutoUpdate>,
18    _request_id: Option<String>,
19}
20impl UpdateAdapterOutput {
21    /// <p>A string containing a unique ID for the adapter that has been updated.</p>
22    pub fn adapter_id(&self) -> ::std::option::Option<&str> {
23        self.adapter_id.as_deref()
24    }
25    /// <p>A string containing the name of the adapter that has been updated.</p>
26    pub fn adapter_name(&self) -> ::std::option::Option<&str> {
27        self.adapter_name.as_deref()
28    }
29    /// <p>An object specifying the creation time of the the adapter that has been updated.</p>
30    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.creation_time.as_ref()
32    }
33    /// <p>A string containing the description of the adapter that has been updated.</p>
34    pub fn description(&self) -> ::std::option::Option<&str> {
35        self.description.as_deref()
36    }
37    /// <p>List of the targeted feature types for the updated adapter.</p>
38    ///
39    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.feature_types.is_none()`.
40    pub fn feature_types(&self) -> &[crate::types::FeatureType] {
41        self.feature_types.as_deref().unwrap_or_default()
42    }
43    /// <p>The auto-update status of the adapter that has been updated.</p>
44    pub fn auto_update(&self) -> ::std::option::Option<&crate::types::AutoUpdate> {
45        self.auto_update.as_ref()
46    }
47}
48impl ::aws_types::request_id::RequestId for UpdateAdapterOutput {
49    fn request_id(&self) -> Option<&str> {
50        self._request_id.as_deref()
51    }
52}
53impl UpdateAdapterOutput {
54    /// Creates a new builder-style object to manufacture [`UpdateAdapterOutput`](crate::operation::update_adapter::UpdateAdapterOutput).
55    pub fn builder() -> crate::operation::update_adapter::builders::UpdateAdapterOutputBuilder {
56        crate::operation::update_adapter::builders::UpdateAdapterOutputBuilder::default()
57    }
58}
59
60/// A builder for [`UpdateAdapterOutput`](crate::operation::update_adapter::UpdateAdapterOutput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateAdapterOutputBuilder {
64    pub(crate) adapter_id: ::std::option::Option<::std::string::String>,
65    pub(crate) adapter_name: ::std::option::Option<::std::string::String>,
66    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67    pub(crate) description: ::std::option::Option<::std::string::String>,
68    pub(crate) feature_types: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>,
69    pub(crate) auto_update: ::std::option::Option<crate::types::AutoUpdate>,
70    _request_id: Option<String>,
71}
72impl UpdateAdapterOutputBuilder {
73    /// <p>A string containing a unique ID for the adapter that has been updated.</p>
74    pub fn adapter_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.adapter_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>A string containing a unique ID for the adapter that has been updated.</p>
79    pub fn set_adapter_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.adapter_id = input;
81        self
82    }
83    /// <p>A string containing a unique ID for the adapter that has been updated.</p>
84    pub fn get_adapter_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.adapter_id
86    }
87    /// <p>A string containing the name of the adapter that has been updated.</p>
88    pub fn adapter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.adapter_name = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>A string containing the name of the adapter that has been updated.</p>
93    pub fn set_adapter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.adapter_name = input;
95        self
96    }
97    /// <p>A string containing the name of the adapter that has been updated.</p>
98    pub fn get_adapter_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.adapter_name
100    }
101    /// <p>An object specifying the creation time of the the adapter that has been updated.</p>
102    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
103        self.creation_time = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>An object specifying the creation time of the the adapter that has been updated.</p>
107    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
108        self.creation_time = input;
109        self
110    }
111    /// <p>An object specifying the creation time of the the adapter that has been updated.</p>
112    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
113        &self.creation_time
114    }
115    /// <p>A string containing the description of the adapter that has been updated.</p>
116    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.description = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>A string containing the description of the adapter that has been updated.</p>
121    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.description = input;
123        self
124    }
125    /// <p>A string containing the description of the adapter that has been updated.</p>
126    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
127        &self.description
128    }
129    /// Appends an item to `feature_types`.
130    ///
131    /// To override the contents of this collection use [`set_feature_types`](Self::set_feature_types).
132    ///
133    /// <p>List of the targeted feature types for the updated adapter.</p>
134    pub fn feature_types(mut self, input: crate::types::FeatureType) -> Self {
135        let mut v = self.feature_types.unwrap_or_default();
136        v.push(input);
137        self.feature_types = ::std::option::Option::Some(v);
138        self
139    }
140    /// <p>List of the targeted feature types for the updated adapter.</p>
141    pub fn set_feature_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>) -> Self {
142        self.feature_types = input;
143        self
144    }
145    /// <p>List of the targeted feature types for the updated adapter.</p>
146    pub fn get_feature_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FeatureType>> {
147        &self.feature_types
148    }
149    /// <p>The auto-update status of the adapter that has been updated.</p>
150    pub fn auto_update(mut self, input: crate::types::AutoUpdate) -> Self {
151        self.auto_update = ::std::option::Option::Some(input);
152        self
153    }
154    /// <p>The auto-update status of the adapter that has been updated.</p>
155    pub fn set_auto_update(mut self, input: ::std::option::Option<crate::types::AutoUpdate>) -> Self {
156        self.auto_update = input;
157        self
158    }
159    /// <p>The auto-update status of the adapter that has been updated.</p>
160    pub fn get_auto_update(&self) -> &::std::option::Option<crate::types::AutoUpdate> {
161        &self.auto_update
162    }
163    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
164        self._request_id = Some(request_id.into());
165        self
166    }
167
168    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
169        self._request_id = request_id;
170        self
171    }
172    /// Consumes the builder and constructs a [`UpdateAdapterOutput`](crate::operation::update_adapter::UpdateAdapterOutput).
173    pub fn build(self) -> crate::operation::update_adapter::UpdateAdapterOutput {
174        crate::operation::update_adapter::UpdateAdapterOutput {
175            adapter_id: self.adapter_id,
176            adapter_name: self.adapter_name,
177            creation_time: self.creation_time,
178            description: self.description,
179            feature_types: self.feature_types,
180            auto_update: self.auto_update,
181            _request_id: self._request_id,
182        }
183    }
184}