aws_sdk_databasemigration/operation/test_connection/
_test_connection_input.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TestConnectionInput {
pub replication_instance_arn: ::std::option::Option<::std::string::String>,
pub endpoint_arn: ::std::option::Option<::std::string::String>,
}
impl TestConnectionInput {
pub fn replication_instance_arn(&self) -> ::std::option::Option<&str> {
self.replication_instance_arn.as_deref()
}
pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
}
impl TestConnectionInput {
pub fn builder() -> crate::operation::test_connection::builders::TestConnectionInputBuilder {
crate::operation::test_connection::builders::TestConnectionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestConnectionInputBuilder {
pub(crate) replication_instance_arn: ::std::option::Option<::std::string::String>,
pub(crate) endpoint_arn: ::std::option::Option<::std::string::String>,
}
impl TestConnectionInputBuilder {
pub fn replication_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.replication_instance_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_replication_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.replication_instance_arn = input;
self
}
pub fn get_replication_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.replication_instance_arn
}
pub fn endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_arn
}
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 {
replication_instance_arn: self.replication_instance_arn,
endpoint_arn: self.endpoint_arn,
})
}
}