aws-sdk-directconnect 1.106.0

AWS SDK for AWS Direct Connect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::allocate_connection_on_interconnect::_allocate_connection_on_interconnect_input::AllocateConnectionOnInterconnectInputBuilder;

pub use crate::operation::allocate_connection_on_interconnect::_allocate_connection_on_interconnect_output::AllocateConnectionOnInterconnectOutputBuilder;

impl crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.allocate_connection_on_interconnect();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `AllocateConnectionOnInterconnect`.
///
/// <note>
/// <p>Deprecated. Use <code>AllocateHostedConnection</code> instead.</p>
/// </note>
/// <p>Creates a hosted connection on an interconnect.</p>
/// <p>Allocates a VLAN number and a specified amount of bandwidth for use by a hosted connection on the specified interconnect.</p><note>
/// <p>Intended for use by Direct Connect Partners only.</p>
/// </note>
#[deprecated]
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct AllocateConnectionOnInterconnectFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
        crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
    > for AllocateConnectionOnInterconnectFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
            crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl AllocateConnectionOnInterconnectFluentBuilder {
    /// Creates a new `AllocateConnectionOnInterconnectFluentBuilder`.
    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 AllocateConnectionOnInterconnect as a reference.
    pub fn as_input(&self) -> &crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder {
        &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::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
            ::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::allocate_connection_on_interconnect::AllocateConnectionOnInterconnect::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnect::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::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
        crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
        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 bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection.</p>
    pub fn bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.bandwidth(input.into());
        self
    }
    /// <p>The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection.</p>
    pub fn set_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_bandwidth(input);
        self
    }
    /// <p>The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection.</p>
    pub fn get_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_bandwidth()
    }
    /// <p>The name of the provisioned connection.</p>
    pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.connection_name(input.into());
        self
    }
    /// <p>The name of the provisioned connection.</p>
    pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_connection_name(input);
        self
    }
    /// <p>The name of the provisioned connection.</p>
    pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_connection_name()
    }
    /// <p>The ID of the Amazon Web Services account of the customer for whom the connection will be provisioned.</p>
    pub fn owner_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.owner_account(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account of the customer for whom the connection will be provisioned.</p>
    pub fn set_owner_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_owner_account(input);
        self
    }
    /// <p>The ID of the Amazon Web Services account of the customer for whom the connection will be provisioned.</p>
    pub fn get_owner_account(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_owner_account()
    }
    /// <p>The ID of the interconnect on which the connection will be provisioned.</p>
    pub fn interconnect_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.interconnect_id(input.into());
        self
    }
    /// <p>The ID of the interconnect on which the connection will be provisioned.</p>
    pub fn set_interconnect_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_interconnect_id(input);
        self
    }
    /// <p>The ID of the interconnect on which the connection will be provisioned.</p>
    pub fn get_interconnect_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_interconnect_id()
    }
    /// <p>The dedicated VLAN provisioned to the connection.</p>
    pub fn vlan(mut self, input: i32) -> Self {
        self.inner = self.inner.vlan(input);
        self
    }
    /// <p>The dedicated VLAN provisioned to the connection.</p>
    pub fn set_vlan(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_vlan(input);
        self
    }
    /// <p>The dedicated VLAN provisioned to the connection.</p>
    pub fn get_vlan(&self) -> &::std::option::Option<i32> {
        self.inner.get_vlan()
    }
}