aws_sdk_odb/operation/create_odb_network/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_odb_network::_create_odb_network_output::CreateOdbNetworkOutputBuilder;
3
4pub use crate::operation::create_odb_network::_create_odb_network_input::CreateOdbNetworkInputBuilder;
5
6impl crate::operation::create_odb_network::builders::CreateOdbNetworkInputBuilder {
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::create_odb_network::CreateOdbNetworkOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_odb_network::CreateOdbNetworkError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_odb_network();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateOdbNetwork`.
24///
25/// <p>Creates an ODB network.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateOdbNetworkFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_odb_network::builders::CreateOdbNetworkInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_odb_network::CreateOdbNetworkOutput,
35        crate::operation::create_odb_network::CreateOdbNetworkError,
36    > for CreateOdbNetworkFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_odb_network::CreateOdbNetworkOutput,
44            crate::operation::create_odb_network::CreateOdbNetworkError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateOdbNetworkFluentBuilder {
51    /// Creates a new `CreateOdbNetworkFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateOdbNetwork as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_odb_network::builders::CreateOdbNetworkInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_odb_network::CreateOdbNetworkOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_odb_network::CreateOdbNetworkError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_odb_network::CreateOdbNetwork::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_odb_network::CreateOdbNetwork::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_odb_network::CreateOdbNetworkOutput,
97        crate::operation::create_odb_network::CreateOdbNetworkError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>A user-friendly name for the ODB network.</p>
112    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.display_name(input.into());
114        self
115    }
116    /// <p>A user-friendly name for the ODB network.</p>
117    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_display_name(input);
119        self
120    }
121    /// <p>A user-friendly name for the ODB network.</p>
122    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_display_name()
124    }
125    /// <p>The Amazon Web Services Availability Zone (AZ) where the ODB network is located.</p>
126    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
127    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.availability_zone(input.into());
129        self
130    }
131    /// <p>The Amazon Web Services Availability Zone (AZ) where the ODB network is located.</p>
132    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
133    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_availability_zone(input);
135        self
136    }
137    /// <p>The Amazon Web Services Availability Zone (AZ) where the ODB network is located.</p>
138    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
139    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_availability_zone()
141    }
142    /// <p>The AZ ID of the AZ where the ODB network is located.</p>
143    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
144    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.availability_zone_id(input.into());
146        self
147    }
148    /// <p>The AZ ID of the AZ where the ODB network is located.</p>
149    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
150    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_availability_zone_id(input);
152        self
153    }
154    /// <p>The AZ ID of the AZ where the ODB network is located.</p>
155    /// <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
156    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_availability_zone_id()
158    }
159    /// <p>The CIDR range of the client subnet for the ODB network.</p>
160    /// <p>Constraints:</p>
161    /// <ul>
162    /// <li>
163    /// <p>Must not overlap with the CIDR range of the backup subnet.</p></li>
164    /// <li>
165    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
166    /// <li>
167    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
168    /// <ul>
169    /// <li>
170    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
171    /// <li>
172    /// <p><code>169.254.0.0/16</code></p></li>
173    /// <li>
174    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
175    /// <li>
176    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
177    /// </ul></li>
178    /// </ul>
179    pub fn client_subnet_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.inner = self.inner.client_subnet_cidr(input.into());
181        self
182    }
183    /// <p>The CIDR range of the client subnet for the ODB network.</p>
184    /// <p>Constraints:</p>
185    /// <ul>
186    /// <li>
187    /// <p>Must not overlap with the CIDR range of the backup subnet.</p></li>
188    /// <li>
189    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
190    /// <li>
191    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
192    /// <ul>
193    /// <li>
194    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
195    /// <li>
196    /// <p><code>169.254.0.0/16</code></p></li>
197    /// <li>
198    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
199    /// <li>
200    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
201    /// </ul></li>
202    /// </ul>
203    pub fn set_client_subnet_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.inner = self.inner.set_client_subnet_cidr(input);
205        self
206    }
207    /// <p>The CIDR range of the client subnet for the ODB network.</p>
208    /// <p>Constraints:</p>
209    /// <ul>
210    /// <li>
211    /// <p>Must not overlap with the CIDR range of the backup subnet.</p></li>
212    /// <li>
213    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
214    /// <li>
215    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
216    /// <ul>
217    /// <li>
218    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
219    /// <li>
220    /// <p><code>169.254.0.0/16</code></p></li>
221    /// <li>
222    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
223    /// <li>
224    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
225    /// </ul></li>
226    /// </ul>
227    pub fn get_client_subnet_cidr(&self) -> &::std::option::Option<::std::string::String> {
228        self.inner.get_client_subnet_cidr()
229    }
230    /// <p>The CIDR range of the backup subnet for the ODB network.</p>
231    /// <p>Constraints:</p>
232    /// <ul>
233    /// <li>
234    /// <p>Must not overlap with the CIDR range of the client subnet.</p></li>
235    /// <li>
236    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
237    /// <li>
238    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
239    /// <ul>
240    /// <li>
241    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
242    /// <li>
243    /// <p><code>169.254.0.0/16</code></p></li>
244    /// <li>
245    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
246    /// <li>
247    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
248    /// </ul></li>
249    /// </ul>
250    pub fn backup_subnet_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251        self.inner = self.inner.backup_subnet_cidr(input.into());
252        self
253    }
254    /// <p>The CIDR range of the backup subnet for the ODB network.</p>
255    /// <p>Constraints:</p>
256    /// <ul>
257    /// <li>
258    /// <p>Must not overlap with the CIDR range of the client subnet.</p></li>
259    /// <li>
260    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
261    /// <li>
262    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
263    /// <ul>
264    /// <li>
265    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
266    /// <li>
267    /// <p><code>169.254.0.0/16</code></p></li>
268    /// <li>
269    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
270    /// <li>
271    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
272    /// </ul></li>
273    /// </ul>
274    pub fn set_backup_subnet_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.inner = self.inner.set_backup_subnet_cidr(input);
276        self
277    }
278    /// <p>The CIDR range of the backup subnet for the ODB network.</p>
279    /// <p>Constraints:</p>
280    /// <ul>
281    /// <li>
282    /// <p>Must not overlap with the CIDR range of the client subnet.</p></li>
283    /// <li>
284    /// <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p></li>
285    /// <li>
286    /// <p>Must not use the following CIDR ranges that are reserved by OCI:</p>
287    /// <ul>
288    /// <li>
289    /// <p><code>100.106.0.0/16</code> and <code>100.107.0.0/16</code></p></li>
290    /// <li>
291    /// <p><code>169.254.0.0/16</code></p></li>
292    /// <li>
293    /// <p><code>224.0.0.0 - 239.255.255.255</code></p></li>
294    /// <li>
295    /// <p><code>240.0.0.0 - 255.255.255.255</code></p></li>
296    /// </ul></li>
297    /// </ul>
298    pub fn get_backup_subnet_cidr(&self) -> &::std::option::Option<::std::string::String> {
299        self.inner.get_backup_subnet_cidr()
300    }
301    /// <p>The domain name to use for the resources in the ODB network.</p>
302    pub fn custom_domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303        self.inner = self.inner.custom_domain_name(input.into());
304        self
305    }
306    /// <p>The domain name to use for the resources in the ODB network.</p>
307    pub fn set_custom_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308        self.inner = self.inner.set_custom_domain_name(input);
309        self
310    }
311    /// <p>The domain name to use for the resources in the ODB network.</p>
312    pub fn get_custom_domain_name(&self) -> &::std::option::Option<::std::string::String> {
313        self.inner.get_custom_domain_name()
314    }
315    /// <p>The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.</p>
316    pub fn default_dns_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.inner = self.inner.default_dns_prefix(input.into());
318        self
319    }
320    /// <p>The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.</p>
321    pub fn set_default_dns_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.inner = self.inner.set_default_dns_prefix(input);
323        self
324    }
325    /// <p>The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.</p>
326    pub fn get_default_dns_prefix(&self) -> &::std::option::Option<::std::string::String> {
327        self.inner.get_default_dns_prefix()
328    }
329    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency. The client token is valid for up to 24 hours after it's first used.</p>
330    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331        self.inner = self.inner.client_token(input.into());
332        self
333    }
334    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency. The client token is valid for up to 24 hours after it's first used.</p>
335    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336        self.inner = self.inner.set_client_token(input);
337        self
338    }
339    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency. The client token is valid for up to 24 hours after it's first used.</p>
340    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
341        self.inner.get_client_token()
342    }
343    /// <p>Specifies the configuration for Amazon S3 access from the ODB network.</p>
344    pub fn s3_access(mut self, input: crate::types::Access) -> Self {
345        self.inner = self.inner.s3_access(input);
346        self
347    }
348    /// <p>Specifies the configuration for Amazon S3 access from the ODB network.</p>
349    pub fn set_s3_access(mut self, input: ::std::option::Option<crate::types::Access>) -> Self {
350        self.inner = self.inner.set_s3_access(input);
351        self
352    }
353    /// <p>Specifies the configuration for Amazon S3 access from the ODB network.</p>
354    pub fn get_s3_access(&self) -> &::std::option::Option<crate::types::Access> {
355        self.inner.get_s3_access()
356    }
357    /// <p>Specifies the configuration for Zero-ETL access from the ODB network.</p>
358    pub fn zero_etl_access(mut self, input: crate::types::Access) -> Self {
359        self.inner = self.inner.zero_etl_access(input);
360        self
361    }
362    /// <p>Specifies the configuration for Zero-ETL access from the ODB network.</p>
363    pub fn set_zero_etl_access(mut self, input: ::std::option::Option<crate::types::Access>) -> Self {
364        self.inner = self.inner.set_zero_etl_access(input);
365        self
366    }
367    /// <p>Specifies the configuration for Zero-ETL access from the ODB network.</p>
368    pub fn get_zero_etl_access(&self) -> &::std::option::Option<crate::types::Access> {
369        self.inner.get_zero_etl_access()
370    }
371    /// <p>Specifies the endpoint policy for Amazon S3 access from the ODB network.</p>
372    pub fn s3_policy_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
373        self.inner = self.inner.s3_policy_document(input.into());
374        self
375    }
376    /// <p>Specifies the endpoint policy for Amazon S3 access from the ODB network.</p>
377    pub fn set_s3_policy_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
378        self.inner = self.inner.set_s3_policy_document(input);
379        self
380    }
381    /// <p>Specifies the endpoint policy for Amazon S3 access from the ODB network.</p>
382    pub fn get_s3_policy_document(&self) -> &::std::option::Option<::std::string::String> {
383        self.inner.get_s3_policy_document()
384    }
385    ///
386    /// Adds a key-value pair to `tags`.
387    ///
388    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
389    ///
390    /// <p>The list of resource tags to apply to the ODB network.</p>
391    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
392        self.inner = self.inner.tags(k.into(), v.into());
393        self
394    }
395    /// <p>The list of resource tags to apply to the ODB network.</p>
396    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
397        self.inner = self.inner.set_tags(input);
398        self
399    }
400    /// <p>The list of resource tags to apply to the ODB network.</p>
401    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
402        self.inner.get_tags()
403    }
404}