aws-sdk-interconnect 1.1.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, ::std::fmt::Debug)]
pub struct DeleteConnectionInput {
    /// <p>The identifier of the <code>Connection</code> to be deleted.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>Idempotency token used for the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteConnectionInput {
    /// <p>The identifier of the <code>Connection</code> to be deleted.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>Idempotency token used for the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl DeleteConnectionInput {
    /// Creates a new builder-style object to manufacture [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionInputBuilder {
        crate::operation::delete_connection::builders::DeleteConnectionInputBuilder::default()
    }
}

/// A builder for [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteConnectionInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteConnectionInputBuilder {
    /// <p>The identifier of the <code>Connection</code> to be deleted.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the <code>Connection</code> to be deleted.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The identifier of the <code>Connection</code> to be deleted.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <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 [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_connection::DeleteConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_connection::DeleteConnectionInput {
            identifier: self.identifier,
            client_token: self.client_token,
        })
    }
}