aws-sdk-odb 1.28.0

AWS SDK for odb
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_odb_peering_connection::_update_odb_peering_connection_input::UpdateOdbPeeringConnectionInputBuilder;

pub use crate::operation::update_odb_peering_connection::_update_odb_peering_connection_output::UpdateOdbPeeringConnectionOutputBuilder;

impl crate::operation::update_odb_peering_connection::builders::UpdateOdbPeeringConnectionInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_odb_peering_connection();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateOdbPeeringConnection`.
///
/// <p>Modifies the settings of an Oracle Database@Amazon Web Services peering connection. You can update the display name and add or remove CIDR blocks from the peering connection.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateOdbPeeringConnectionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_odb_peering_connection::builders::UpdateOdbPeeringConnectionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionOutput,
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionError,
    > for UpdateOdbPeeringConnectionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionOutput,
            crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateOdbPeeringConnectionFluentBuilder {
    /// Creates a new `UpdateOdbPeeringConnectionFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateOdbPeeringConnection as a reference.
    pub fn as_input(&self) -> &crate::operation::update_odb_peering_connection::builders::UpdateOdbPeeringConnectionInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnection::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnection::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionOutput,
        crate::operation::update_odb_peering_connection::UpdateOdbPeeringConnectionError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The identifier of the Oracle Database@Amazon Web Services peering connection to update.</p>
    pub fn odb_peering_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.odb_peering_connection_id(input.into());
        self
    }
    /// <p>The identifier of the Oracle Database@Amazon Web Services peering connection to update.</p>
    pub fn set_odb_peering_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_odb_peering_connection_id(input);
        self
    }
    /// <p>The identifier of the Oracle Database@Amazon Web Services peering connection to update.</p>
    pub fn get_odb_peering_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_odb_peering_connection_id()
    }
    /// <p>A new display name for the peering connection.</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.display_name(input.into());
        self
    }
    /// <p>A new display name for the peering connection.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_display_name(input);
        self
    }
    /// <p>A new display name for the peering connection.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_display_name()
    }
    ///
    /// Appends an item to `peerNetworkCidrsToBeAdded`.
    ///
    /// To override the contents of this collection use [`set_peer_network_cidrs_to_be_added`](Self::set_peer_network_cidrs_to_be_added).
    ///
    /// <p>A list of CIDR blocks to add to the peering connection. These CIDR blocks define the IP address ranges that can communicate through the peering connection. The CIDR blocks must not overlap with existing CIDR blocks in the Oracle Database@Amazon Web Services network.</p>
    pub fn peer_network_cidrs_to_be_added(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.peer_network_cidrs_to_be_added(input.into());
        self
    }
    /// <p>A list of CIDR blocks to add to the peering connection. These CIDR blocks define the IP address ranges that can communicate through the peering connection. The CIDR blocks must not overlap with existing CIDR blocks in the Oracle Database@Amazon Web Services network.</p>
    pub fn set_peer_network_cidrs_to_be_added(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_peer_network_cidrs_to_be_added(input);
        self
    }
    /// <p>A list of CIDR blocks to add to the peering connection. These CIDR blocks define the IP address ranges that can communicate through the peering connection. The CIDR blocks must not overlap with existing CIDR blocks in the Oracle Database@Amazon Web Services network.</p>
    pub fn get_peer_network_cidrs_to_be_added(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_peer_network_cidrs_to_be_added()
    }
    ///
    /// Appends an item to `peerNetworkCidrsToBeRemoved`.
    ///
    /// To override the contents of this collection use [`set_peer_network_cidrs_to_be_removed`](Self::set_peer_network_cidrs_to_be_removed).
    ///
    /// <p>A list of CIDR blocks to remove from the peering connection. The CIDR blocks must currently exist in the peering connection.</p>
    pub fn peer_network_cidrs_to_be_removed(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.peer_network_cidrs_to_be_removed(input.into());
        self
    }
    /// <p>A list of CIDR blocks to remove from the peering connection. The CIDR blocks must currently exist in the peering connection.</p>
    pub fn set_peer_network_cidrs_to_be_removed(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_peer_network_cidrs_to_be_removed(input);
        self
    }
    /// <p>A list of CIDR blocks to remove from the peering connection. The CIDR blocks must currently exist in the peering connection.</p>
    pub fn get_peer_network_cidrs_to_be_removed(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_peer_network_cidrs_to_be_removed()
    }
}