aws-sdk-interconnect 1.0.0

AWS SDK for Interconnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct AcceptConnectionProposalInput {
    /// <p>The Attach Point to which the connection should be associated.</p>
    pub attach_point: ::std::option::Option<crate::types::AttachPoint>,
    /// <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 activation_key: ::std::option::Option<::std::string::String>,
    /// <p>A description to distinguish this <code>Connection</code>.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The tags to associate with the resulting <code>Connection</code>.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Idempotency token used for the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl AcceptConnectionProposalInput {
    /// <p>The Attach Point to which the connection should be associated.</p>
    pub fn attach_point(&self) -> ::std::option::Option<&crate::types::AttachPoint> {
        self.attach_point.as_ref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.activation_key.as_deref()
    }
    /// <p>A description to distinguish this <code>Connection</code>.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags to associate with the resulting <code>Connection</code>.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Idempotency token used for the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::std::fmt::Debug for AcceptConnectionProposalInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("AcceptConnectionProposalInput");
        formatter.field("attach_point", &self.attach_point);
        formatter.field("activation_key", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &self.description);
        formatter.field("tags", &self.tags);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}
impl AcceptConnectionProposalInput {
    /// Creates a new builder-style object to manufacture [`AcceptConnectionProposalInput`](crate::operation::accept_connection_proposal::AcceptConnectionProposalInput).
    pub fn builder() -> crate::operation::accept_connection_proposal::builders::AcceptConnectionProposalInputBuilder {
        crate::operation::accept_connection_proposal::builders::AcceptConnectionProposalInputBuilder::default()
    }
}

/// A builder for [`AcceptConnectionProposalInput`](crate::operation::accept_connection_proposal::AcceptConnectionProposalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct AcceptConnectionProposalInputBuilder {
    pub(crate) attach_point: ::std::option::Option<crate::types::AttachPoint>,
    pub(crate) activation_key: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl AcceptConnectionProposalInputBuilder {
    /// <p>The Attach Point to which the connection should be associated.</p>
    /// This field is required.
    pub fn attach_point(mut self, input: crate::types::AttachPoint) -> Self {
        self.attach_point = ::std::option::Option::Some(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.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.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>
    /// This field is required.
    pub fn activation_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.activation_key = ::std::option::Option::Some(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.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.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.description = ::std::option::Option::Some(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.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.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 {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        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.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.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.client_token = ::std::option::Option::Some(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.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.client_token
    }
    /// Consumes the builder and constructs a [`AcceptConnectionProposalInput`](crate::operation::accept_connection_proposal::AcceptConnectionProposalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::accept_connection_proposal::AcceptConnectionProposalInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::accept_connection_proposal::AcceptConnectionProposalInput {
            attach_point: self.attach_point,
            activation_key: self.activation_key,
            description: self.description,
            tags: self.tags,
            client_token: self.client_token,
        })
    }
}
impl ::std::fmt::Debug for AcceptConnectionProposalInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("AcceptConnectionProposalInputBuilder");
        formatter.field("attach_point", &self.attach_point);
        formatter.field("activation_key", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &self.description);
        formatter.field("tags", &self.tags);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}