aws_sdk_textract/operation/update_adapter/
_update_adapter_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, ::std::fmt::Debug)]
5pub struct UpdateAdapterInput {
6    /// <p>A string containing a unique ID for the adapter that will be updated.</p>
7    pub adapter_id: ::std::option::Option<::std::string::String>,
8    /// <p>The new description to be applied to the adapter.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The new name to be applied to the adapter.</p>
11    pub adapter_name: ::std::option::Option<::std::string::String>,
12    /// <p>The new auto-update status to be applied to the adapter.</p>
13    pub auto_update: ::std::option::Option<crate::types::AutoUpdate>,
14}
15impl UpdateAdapterInput {
16    /// <p>A string containing a unique ID for the adapter that will be updated.</p>
17    pub fn adapter_id(&self) -> ::std::option::Option<&str> {
18        self.adapter_id.as_deref()
19    }
20    /// <p>The new description to be applied to the adapter.</p>
21    pub fn description(&self) -> ::std::option::Option<&str> {
22        self.description.as_deref()
23    }
24    /// <p>The new name to be applied to the adapter.</p>
25    pub fn adapter_name(&self) -> ::std::option::Option<&str> {
26        self.adapter_name.as_deref()
27    }
28    /// <p>The new auto-update status to be applied to the adapter.</p>
29    pub fn auto_update(&self) -> ::std::option::Option<&crate::types::AutoUpdate> {
30        self.auto_update.as_ref()
31    }
32}
33impl UpdateAdapterInput {
34    /// Creates a new builder-style object to manufacture [`UpdateAdapterInput`](crate::operation::update_adapter::UpdateAdapterInput).
35    pub fn builder() -> crate::operation::update_adapter::builders::UpdateAdapterInputBuilder {
36        crate::operation::update_adapter::builders::UpdateAdapterInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateAdapterInput`](crate::operation::update_adapter::UpdateAdapterInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateAdapterInputBuilder {
44    pub(crate) adapter_id: ::std::option::Option<::std::string::String>,
45    pub(crate) description: ::std::option::Option<::std::string::String>,
46    pub(crate) adapter_name: ::std::option::Option<::std::string::String>,
47    pub(crate) auto_update: ::std::option::Option<crate::types::AutoUpdate>,
48}
49impl UpdateAdapterInputBuilder {
50    /// <p>A string containing a unique ID for the adapter that will be updated.</p>
51    /// This field is required.
52    pub fn adapter_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.adapter_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>A string containing a unique ID for the adapter that will be updated.</p>
57    pub fn set_adapter_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.adapter_id = input;
59        self
60    }
61    /// <p>A string containing a unique ID for the adapter that will be updated.</p>
62    pub fn get_adapter_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.adapter_id
64    }
65    /// <p>The new description to be applied to the adapter.</p>
66    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.description = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The new description to be applied to the adapter.</p>
71    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.description = input;
73        self
74    }
75    /// <p>The new description to be applied to the adapter.</p>
76    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
77        &self.description
78    }
79    /// <p>The new name to be applied to the adapter.</p>
80    pub fn adapter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.adapter_name = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The new name to be applied to the adapter.</p>
85    pub fn set_adapter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.adapter_name = input;
87        self
88    }
89    /// <p>The new name to be applied to the adapter.</p>
90    pub fn get_adapter_name(&self) -> &::std::option::Option<::std::string::String> {
91        &self.adapter_name
92    }
93    /// <p>The new auto-update status to be applied to the adapter.</p>
94    pub fn auto_update(mut self, input: crate::types::AutoUpdate) -> Self {
95        self.auto_update = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The new auto-update status to be applied to the adapter.</p>
99    pub fn set_auto_update(mut self, input: ::std::option::Option<crate::types::AutoUpdate>) -> Self {
100        self.auto_update = input;
101        self
102    }
103    /// <p>The new auto-update status to be applied to the adapter.</p>
104    pub fn get_auto_update(&self) -> &::std::option::Option<crate::types::AutoUpdate> {
105        &self.auto_update
106    }
107    /// Consumes the builder and constructs a [`UpdateAdapterInput`](crate::operation::update_adapter::UpdateAdapterInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_adapter::UpdateAdapterInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_adapter::UpdateAdapterInput {
112            adapter_id: self.adapter_id,
113            description: self.description,
114            adapter_name: self.adapter_name,
115            auto_update: self.auto_update,
116        })
117    }
118}