aws_sdk_datasync/operation/update_location_hdfs/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_location_hdfs::_update_location_hdfs_output::UpdateLocationHdfsOutputBuilder;
3
4pub use crate::operation::update_location_hdfs::_update_location_hdfs_input::UpdateLocationHdfsInputBuilder;
5
6impl crate::operation::update_location_hdfs::builders::UpdateLocationHdfsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_location_hdfs::UpdateLocationHdfsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_location_hdfs::UpdateLocationHdfsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_location_hdfs();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateLocationHdfs`.
24///
25/// <p>Modifies the following configuration parameters of the Hadoop Distributed File System (HDFS) transfer location that you're using with DataSync.</p>
26/// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-hdfs-location.html">Configuring DataSync transfers with an HDFS cluster</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateLocationHdfsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_location_hdfs::builders::UpdateLocationHdfsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_location_hdfs::UpdateLocationHdfsOutput,
36        crate::operation::update_location_hdfs::UpdateLocationHdfsError,
37    > for UpdateLocationHdfsFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_location_hdfs::UpdateLocationHdfsOutput,
45            crate::operation::update_location_hdfs::UpdateLocationHdfsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdateLocationHdfsFluentBuilder {
52    /// Creates a new `UpdateLocationHdfsFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdateLocationHdfs as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_location_hdfs::builders::UpdateLocationHdfsInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_location_hdfs::UpdateLocationHdfsOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_location_hdfs::UpdateLocationHdfsError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_location_hdfs::UpdateLocationHdfs::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_location_hdfs::UpdateLocationHdfs::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_location_hdfs::UpdateLocationHdfsOutput,
98        crate::operation::update_location_hdfs::UpdateLocationHdfsError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The Amazon Resource Name (ARN) of the source HDFS cluster location.</p>
113    pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.location_arn(input.into());
115        self
116    }
117    /// <p>The Amazon Resource Name (ARN) of the source HDFS cluster location.</p>
118    pub fn set_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_location_arn(input);
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the source HDFS cluster location.</p>
123    pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_location_arn()
125    }
126    /// <p>A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.</p>
127    pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.subdirectory(input.into());
129        self
130    }
131    /// <p>A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.</p>
132    pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_subdirectory(input);
134        self
135    }
136    /// <p>A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.</p>
137    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_subdirectory()
139    }
140    ///
141    /// Appends an item to `NameNodes`.
142    ///
143    /// To override the contents of this collection use [`set_name_nodes`](Self::set_name_nodes).
144    ///
145    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
146    pub fn name_nodes(mut self, input: crate::types::HdfsNameNode) -> Self {
147        self.inner = self.inner.name_nodes(input);
148        self
149    }
150    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
151    pub fn set_name_nodes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HdfsNameNode>>) -> Self {
152        self.inner = self.inner.set_name_nodes(input);
153        self
154    }
155    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
156    pub fn get_name_nodes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HdfsNameNode>> {
157        self.inner.get_name_nodes()
158    }
159    /// <p>The size of the data blocks to write into the HDFS cluster.</p>
160    pub fn block_size(mut self, input: i32) -> Self {
161        self.inner = self.inner.block_size(input);
162        self
163    }
164    /// <p>The size of the data blocks to write into the HDFS cluster.</p>
165    pub fn set_block_size(mut self, input: ::std::option::Option<i32>) -> Self {
166        self.inner = self.inner.set_block_size(input);
167        self
168    }
169    /// <p>The size of the data blocks to write into the HDFS cluster.</p>
170    pub fn get_block_size(&self) -> &::std::option::Option<i32> {
171        self.inner.get_block_size()
172    }
173    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster.</p>
174    pub fn replication_factor(mut self, input: i32) -> Self {
175        self.inner = self.inner.replication_factor(input);
176        self
177    }
178    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster.</p>
179    pub fn set_replication_factor(mut self, input: ::std::option::Option<i32>) -> Self {
180        self.inner = self.inner.set_replication_factor(input);
181        self
182    }
183    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster.</p>
184    pub fn get_replication_factor(&self) -> &::std::option::Option<i32> {
185        self.inner.get_replication_factor()
186    }
187    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
188    pub fn kms_key_provider_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.kms_key_provider_uri(input.into());
190        self
191    }
192    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
193    pub fn set_kms_key_provider_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.inner = self.inner.set_kms_key_provider_uri(input);
195        self
196    }
197    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
198    pub fn get_kms_key_provider_uri(&self) -> &::std::option::Option<::std::string::String> {
199        self.inner.get_kms_key_provider_uri()
200    }
201    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.</p>
202    pub fn qop_configuration(mut self, input: crate::types::QopConfiguration) -> Self {
203        self.inner = self.inner.qop_configuration(input);
204        self
205    }
206    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.</p>
207    pub fn set_qop_configuration(mut self, input: ::std::option::Option<crate::types::QopConfiguration>) -> Self {
208        self.inner = self.inner.set_qop_configuration(input);
209        self
210    }
211    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.</p>
212    pub fn get_qop_configuration(&self) -> &::std::option::Option<crate::types::QopConfiguration> {
213        self.inner.get_qop_configuration()
214    }
215    /// <p>The type of authentication used to determine the identity of the user.</p>
216    pub fn authentication_type(mut self, input: crate::types::HdfsAuthenticationType) -> Self {
217        self.inner = self.inner.authentication_type(input);
218        self
219    }
220    /// <p>The type of authentication used to determine the identity of the user.</p>
221    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::HdfsAuthenticationType>) -> Self {
222        self.inner = self.inner.set_authentication_type(input);
223        self
224    }
225    /// <p>The type of authentication used to determine the identity of the user.</p>
226    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::HdfsAuthenticationType> {
227        self.inner.get_authentication_type()
228    }
229    /// <p>The user name used to identify the client on the host operating system.</p>
230    pub fn simple_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.inner = self.inner.simple_user(input.into());
232        self
233    }
234    /// <p>The user name used to identify the client on the host operating system.</p>
235    pub fn set_simple_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.inner = self.inner.set_simple_user(input);
237        self
238    }
239    /// <p>The user name used to identify the client on the host operating system.</p>
240    pub fn get_simple_user(&self) -> &::std::option::Option<::std::string::String> {
241        self.inner.get_simple_user()
242    }
243    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p>
244    pub fn kerberos_principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245        self.inner = self.inner.kerberos_principal(input.into());
246        self
247    }
248    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p>
249    pub fn set_kerberos_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250        self.inner = self.inner.set_kerberos_principal(input);
251        self
252    }
253    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p>
254    pub fn get_kerberos_principal(&self) -> &::std::option::Option<::std::string::String> {
255        self.inner.get_kerberos_principal()
256    }
257    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p>
258    pub fn kerberos_keytab(mut self, input: ::aws_smithy_types::Blob) -> Self {
259        self.inner = self.inner.kerberos_keytab(input);
260        self
261    }
262    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p>
263    pub fn set_kerberos_keytab(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
264        self.inner = self.inner.set_kerberos_keytab(input);
265        self
266    }
267    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p>
268    pub fn get_kerberos_keytab(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
269        self.inner.get_kerberos_keytab()
270    }
271    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p>
272    pub fn kerberos_krb5_conf(mut self, input: ::aws_smithy_types::Blob) -> Self {
273        self.inner = self.inner.kerberos_krb5_conf(input);
274        self
275    }
276    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p>
277    pub fn set_kerberos_krb5_conf(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
278        self.inner = self.inner.set_kerberos_krb5_conf(input);
279        self
280    }
281    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p>
282    pub fn get_kerberos_krb5_conf(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
283        self.inner.get_kerberos_krb5_conf()
284    }
285    ///
286    /// Appends an item to `AgentArns`.
287    ///
288    /// To override the contents of this collection use [`set_agent_arns`](Self::set_agent_arns).
289    ///
290    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
291    pub fn agent_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292        self.inner = self.inner.agent_arns(input.into());
293        self
294    }
295    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
296    pub fn set_agent_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
297        self.inner = self.inner.set_agent_arns(input);
298        self
299    }
300    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
301    pub fn get_agent_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
302        self.inner.get_agent_arns()
303    }
304}