aws-sdk-interconnect 1.1.0

AWS SDK for Interconnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::accept_connection_proposal::_accept_connection_proposal_input::AcceptConnectionProposalInputBuilder;

pub use crate::operation::accept_connection_proposal::_accept_connection_proposal_output::AcceptConnectionProposalOutputBuilder;

impl crate::operation::accept_connection_proposal::builders::AcceptConnectionProposalInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::accept_connection_proposal::AcceptConnectionProposalOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::accept_connection_proposal::AcceptConnectionProposalError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.accept_connection_proposal();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `AcceptConnectionProposal`.
///
/// <p>Accepts a connection proposal which was generated at a supported partner's portal.</p>
/// <p>The proposal contains the Environment and bandwidth that were chosen on the partner's portal and cannot be modified.</p>
/// <p>Upon accepting the proposal a connection will be made between the AWS network as accessed via the selected Attach Point and the network previously selected network on the partner's portal.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct AcceptConnectionProposalFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::accept_connection_proposal::builders::AcceptConnectionProposalInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::accept_connection_proposal::AcceptConnectionProposalOutput,
        crate::operation::accept_connection_proposal::AcceptConnectionProposalError,
    > for AcceptConnectionProposalFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::accept_connection_proposal::AcceptConnectionProposalOutput,
            crate::operation::accept_connection_proposal::AcceptConnectionProposalError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl AcceptConnectionProposalFluentBuilder {
    /// Creates a new `AcceptConnectionProposalFluentBuilder`.
    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 AcceptConnectionProposal as a reference.
    pub fn as_input(&self) -> &crate::operation::accept_connection_proposal::builders::AcceptConnectionProposalInputBuilder {
        &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::accept_connection_proposal::AcceptConnectionProposalOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::accept_connection_proposal::AcceptConnectionProposalError,
            ::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::accept_connection_proposal::AcceptConnectionProposal::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::accept_connection_proposal::AcceptConnectionProposal::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::accept_connection_proposal::AcceptConnectionProposalOutput,
        crate::operation::accept_connection_proposal::AcceptConnectionProposalError,
        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 Attach Point to which the connection should be associated.</p>
    pub fn attach_point(mut self, input: crate::types::AttachPoint) -> Self {
        self.inner = self.inner.attach_point(input);
        self
    }
    /// <p>The Attach Point to which the connection should be associated.</p>
    pub fn set_attach_point(mut self, input: ::std::option::Option<crate::types::AttachPoint>) -> Self {
        self.inner = self.inner.set_attach_point(input);
        self
    }
    /// <p>The Attach Point to which the connection should be associated.</p>
    pub fn get_attach_point(&self) -> &::std::option::Option<crate::types::AttachPoint> {
        self.inner.get_attach_point()
    }
    /// <p>An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.</p>
    /// <p>The details of this request can be described using with <code>DescribeConnectionProposal</code>.</p>
    pub fn activation_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.activation_key(input.into());
        self
    }
    /// <p>An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.</p>
    /// <p>The details of this request can be described using with <code>DescribeConnectionProposal</code>.</p>
    pub fn set_activation_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_activation_key(input);
        self
    }
    /// <p>An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.</p>
    /// <p>The details of this request can be described using with <code>DescribeConnectionProposal</code>.</p>
    pub fn get_activation_key(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_activation_key()
    }
    /// <p>A description to distinguish this <code>Connection</code>.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>A description to distinguish this <code>Connection</code>.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>A description to distinguish this <code>Connection</code>.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to associate with the resulting <code>Connection</code>.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// <p>The tags to associate with the resulting <code>Connection</code>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>The tags to associate with the resulting <code>Connection</code>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// <p>Idempotency token used for the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>Idempotency token used for the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>Idempotency token used for the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}