aws_sdk_textract/operation/get_adapter/
_get_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 GetAdapterOutput {
6    /// <p>A string identifying the adapter that information has been retrieved for.</p>
7    pub adapter_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the requested adapter.</p>
9    pub adapter_name: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time the requested adapter was created at.</p>
11    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>The description for the requested adapter.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>List of the targeted feature types for the requested adapter.</p>
15    pub feature_types: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>,
16    /// <p>Binary value indicating if the adapter is being automatically updated or not.</p>
17    pub auto_update: ::std::option::Option<crate::types::AutoUpdate>,
18    /// <p>A set of tags (key-value pairs) associated with the adapter that has been retrieved.</p>
19    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    _request_id: Option<String>,
21}
22impl GetAdapterOutput {
23    /// <p>A string identifying the adapter that information has been retrieved for.</p>
24    pub fn adapter_id(&self) -> ::std::option::Option<&str> {
25        self.adapter_id.as_deref()
26    }
27    /// <p>The name of the requested adapter.</p>
28    pub fn adapter_name(&self) -> ::std::option::Option<&str> {
29        self.adapter_name.as_deref()
30    }
31    /// <p>The date and time the requested adapter was created at.</p>
32    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
33        self.creation_time.as_ref()
34    }
35    /// <p>The description for the requested adapter.</p>
36    pub fn description(&self) -> ::std::option::Option<&str> {
37        self.description.as_deref()
38    }
39    /// <p>List of the targeted feature types for the requested adapter.</p>
40    ///
41    /// 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()`.
42    pub fn feature_types(&self) -> &[crate::types::FeatureType] {
43        self.feature_types.as_deref().unwrap_or_default()
44    }
45    /// <p>Binary value indicating if the adapter is being automatically updated or not.</p>
46    pub fn auto_update(&self) -> ::std::option::Option<&crate::types::AutoUpdate> {
47        self.auto_update.as_ref()
48    }
49    /// <p>A set of tags (key-value pairs) associated with the adapter that has been retrieved.</p>
50    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
51        self.tags.as_ref()
52    }
53}
54impl ::aws_types::request_id::RequestId for GetAdapterOutput {
55    fn request_id(&self) -> Option<&str> {
56        self._request_id.as_deref()
57    }
58}
59impl GetAdapterOutput {
60    /// Creates a new builder-style object to manufacture [`GetAdapterOutput`](crate::operation::get_adapter::GetAdapterOutput).
61    pub fn builder() -> crate::operation::get_adapter::builders::GetAdapterOutputBuilder {
62        crate::operation::get_adapter::builders::GetAdapterOutputBuilder::default()
63    }
64}
65
66/// A builder for [`GetAdapterOutput`](crate::operation::get_adapter::GetAdapterOutput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct GetAdapterOutputBuilder {
70    pub(crate) adapter_id: ::std::option::Option<::std::string::String>,
71    pub(crate) adapter_name: ::std::option::Option<::std::string::String>,
72    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
73    pub(crate) description: ::std::option::Option<::std::string::String>,
74    pub(crate) feature_types: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>,
75    pub(crate) auto_update: ::std::option::Option<crate::types::AutoUpdate>,
76    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
77    _request_id: Option<String>,
78}
79impl GetAdapterOutputBuilder {
80    /// <p>A string identifying the adapter that information has been retrieved for.</p>
81    pub fn adapter_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.adapter_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>A string identifying the adapter that information has been retrieved for.</p>
86    pub fn set_adapter_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.adapter_id = input;
88        self
89    }
90    /// <p>A string identifying the adapter that information has been retrieved for.</p>
91    pub fn get_adapter_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.adapter_id
93    }
94    /// <p>The name of the requested adapter.</p>
95    pub fn adapter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.adapter_name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the requested adapter.</p>
100    pub fn set_adapter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.adapter_name = input;
102        self
103    }
104    /// <p>The name of the requested adapter.</p>
105    pub fn get_adapter_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.adapter_name
107    }
108    /// <p>The date and time the requested adapter was created at.</p>
109    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
110        self.creation_time = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The date and time the requested adapter was created at.</p>
114    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
115        self.creation_time = input;
116        self
117    }
118    /// <p>The date and time the requested adapter was created at.</p>
119    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
120        &self.creation_time
121    }
122    /// <p>The description for the requested adapter.</p>
123    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.description = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The description for the requested adapter.</p>
128    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.description = input;
130        self
131    }
132    /// <p>The description for the requested adapter.</p>
133    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
134        &self.description
135    }
136    /// Appends an item to `feature_types`.
137    ///
138    /// To override the contents of this collection use [`set_feature_types`](Self::set_feature_types).
139    ///
140    /// <p>List of the targeted feature types for the requested adapter.</p>
141    pub fn feature_types(mut self, input: crate::types::FeatureType) -> Self {
142        let mut v = self.feature_types.unwrap_or_default();
143        v.push(input);
144        self.feature_types = ::std::option::Option::Some(v);
145        self
146    }
147    /// <p>List of the targeted feature types for the requested adapter.</p>
148    pub fn set_feature_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FeatureType>>) -> Self {
149        self.feature_types = input;
150        self
151    }
152    /// <p>List of the targeted feature types for the requested adapter.</p>
153    pub fn get_feature_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FeatureType>> {
154        &self.feature_types
155    }
156    /// <p>Binary value indicating if the adapter is being automatically updated or not.</p>
157    pub fn auto_update(mut self, input: crate::types::AutoUpdate) -> Self {
158        self.auto_update = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>Binary value indicating if the adapter is being automatically updated or not.</p>
162    pub fn set_auto_update(mut self, input: ::std::option::Option<crate::types::AutoUpdate>) -> Self {
163        self.auto_update = input;
164        self
165    }
166    /// <p>Binary value indicating if the adapter is being automatically updated or not.</p>
167    pub fn get_auto_update(&self) -> &::std::option::Option<crate::types::AutoUpdate> {
168        &self.auto_update
169    }
170    /// Adds a key-value pair to `tags`.
171    ///
172    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
173    ///
174    /// <p>A set of tags (key-value pairs) associated with the adapter that has been retrieved.</p>
175    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
176        let mut hash_map = self.tags.unwrap_or_default();
177        hash_map.insert(k.into(), v.into());
178        self.tags = ::std::option::Option::Some(hash_map);
179        self
180    }
181    /// <p>A set of tags (key-value pairs) associated with the adapter that has been retrieved.</p>
182    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
183        self.tags = input;
184        self
185    }
186    /// <p>A set of tags (key-value pairs) associated with the adapter that has been retrieved.</p>
187    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
188        &self.tags
189    }
190    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
191        self._request_id = Some(request_id.into());
192        self
193    }
194
195    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
196        self._request_id = request_id;
197        self
198    }
199    /// Consumes the builder and constructs a [`GetAdapterOutput`](crate::operation::get_adapter::GetAdapterOutput).
200    pub fn build(self) -> crate::operation::get_adapter::GetAdapterOutput {
201        crate::operation::get_adapter::GetAdapterOutput {
202            adapter_id: self.adapter_id,
203            adapter_name: self.adapter_name,
204            creation_time: self.creation_time,
205            description: self.description,
206            feature_types: self.feature_types,
207            auto_update: self.auto_update,
208            tags: self.tags,
209            _request_id: self._request_id,
210        }
211    }
212}