aws-sdk-glue 1.149.0

AWS SDK for AWS Glue
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 TestConnectionInput {
    /// <p>Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.</p>
    pub connection_name: ::std::option::Option<::std::string::String>,
    /// <p>The catalog ID where the connection resides.</p>
    pub catalog_id: ::std::option::Option<::std::string::String>,
    /// <p>A structure that is used to specify testing a connection to a service.</p>
    pub test_connection_input: ::std::option::Option<crate::types::TestConnectionInput>,
}
impl TestConnectionInput {
    /// <p>Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.</p>
    pub fn connection_name(&self) -> ::std::option::Option<&str> {
        self.connection_name.as_deref()
    }
    /// <p>The catalog ID where the connection resides.</p>
    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
        self.catalog_id.as_deref()
    }
    /// <p>A structure that is used to specify testing a connection to a service.</p>
    pub fn test_connection_input(&self) -> ::std::option::Option<&crate::types::TestConnectionInput> {
        self.test_connection_input.as_ref()
    }
}
impl TestConnectionInput {
    /// Creates a new builder-style object to manufacture [`TestConnectionInput`](crate::operation::test_connection::TestConnectionInput).
    pub fn builder() -> crate::operation::test_connection::builders::TestConnectionInputBuilder {
        crate::operation::test_connection::builders::TestConnectionInputBuilder::default()
    }
}

/// A builder for [`TestConnectionInput`](crate::operation::test_connection::TestConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestConnectionInputBuilder {
    pub(crate) connection_name: ::std::option::Option<::std::string::String>,
    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
    pub(crate) test_connection_input: ::std::option::Option<crate::types::TestConnectionInput>,
}
impl TestConnectionInputBuilder {
    /// <p>Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.</p>
    pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.</p>
    pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_name = input;
        self
    }
    /// <p>Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.</p>
    pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_name
    }
    /// <p>The catalog ID where the connection resides.</p>
    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.catalog_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The catalog ID where the connection resides.</p>
    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.catalog_id = input;
        self
    }
    /// <p>The catalog ID where the connection resides.</p>
    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.catalog_id
    }
    /// <p>A structure that is used to specify testing a connection to a service.</p>
    pub fn test_connection_input(mut self, input: crate::types::TestConnectionInput) -> Self {
        self.test_connection_input = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that is used to specify testing a connection to a service.</p>
    pub fn set_test_connection_input(mut self, input: ::std::option::Option<crate::types::TestConnectionInput>) -> Self {
        self.test_connection_input = input;
        self
    }
    /// <p>A structure that is used to specify testing a connection to a service.</p>
    pub fn get_test_connection_input(&self) -> &::std::option::Option<crate::types::TestConnectionInput> {
        &self.test_connection_input
    }
    /// Consumes the builder and constructs a [`TestConnectionInput`](crate::operation::test_connection::TestConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::test_connection::TestConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::test_connection::TestConnectionInput {
            connection_name: self.connection_name,
            catalog_id: self.catalog_id,
            test_connection_input: self.test_connection_input,
        })
    }
}