aws-sdk-transfer 1.113.0

AWS SDK for AWS Transfer Family
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 TestConnectionOutput {
    /// <p>Returns the identifier of the connector object that you are testing.</p>
    pub connector_id: ::std::option::Option<::std::string::String>,
    /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>Returns <code>Connection succeeded</code> if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.</p>
    /// <ul>
    /// <li>
    /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
    /// <li>
    /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
    /// <li>
    /// <p>Verify that the secret exists and is formatted correctly.</p></li>
    /// <li>
    /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
    /// </ul>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>Structure that contains the SFTP connector host key.</p>
    pub sftp_connection_details: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>,
    _request_id: Option<String>,
}
impl TestConnectionOutput {
    /// <p>Returns the identifier of the connector object that you are testing.</p>
    pub fn connector_id(&self) -> ::std::option::Option<&str> {
        self.connector_id.as_deref()
    }
    /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>Returns <code>Connection succeeded</code> if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.</p>
    /// <ul>
    /// <li>
    /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
    /// <li>
    /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
    /// <li>
    /// <p>Verify that the secret exists and is formatted correctly.</p></li>
    /// <li>
    /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
    /// </ul>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>Structure that contains the SFTP connector host key.</p>
    pub fn sftp_connection_details(&self) -> ::std::option::Option<&crate::types::SftpConnectorConnectionDetails> {
        self.sftp_connection_details.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for TestConnectionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl TestConnectionOutput {
    /// Creates a new builder-style object to manufacture [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
    pub fn builder() -> crate::operation::test_connection::builders::TestConnectionOutputBuilder {
        crate::operation::test_connection::builders::TestConnectionOutputBuilder::default()
    }
}

/// A builder for [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestConnectionOutputBuilder {
    pub(crate) connector_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) sftp_connection_details: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>,
    _request_id: Option<String>,
}
impl TestConnectionOutputBuilder {
    /// <p>Returns the identifier of the connector object that you are testing.</p>
    pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connector_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns the identifier of the connector object that you are testing.</p>
    pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connector_id = input;
        self
    }
    /// <p>Returns the identifier of the connector object that you are testing.</p>
    pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connector_id
    }
    /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>Returns <code>Connection succeeded</code> if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.</p>
    /// <ul>
    /// <li>
    /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
    /// <li>
    /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
    /// <li>
    /// <p>Verify that the secret exists and is formatted correctly.</p></li>
    /// <li>
    /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
    /// </ul>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns <code>Connection succeeded</code> if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.</p>
    /// <ul>
    /// <li>
    /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
    /// <li>
    /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
    /// <li>
    /// <p>Verify that the secret exists and is formatted correctly.</p></li>
    /// <li>
    /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
    /// </ul>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>Returns <code>Connection succeeded</code> if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.</p>
    /// <ul>
    /// <li>
    /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
    /// <li>
    /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
    /// <li>
    /// <p>Verify that the secret exists and is formatted correctly.</p></li>
    /// <li>
    /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
    /// </ul>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>Structure that contains the SFTP connector host key.</p>
    pub fn sftp_connection_details(mut self, input: crate::types::SftpConnectorConnectionDetails) -> Self {
        self.sftp_connection_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Structure that contains the SFTP connector host key.</p>
    pub fn set_sftp_connection_details(mut self, input: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>) -> Self {
        self.sftp_connection_details = input;
        self
    }
    /// <p>Structure that contains the SFTP connector host key.</p>
    pub fn get_sftp_connection_details(&self) -> &::std::option::Option<crate::types::SftpConnectorConnectionDetails> {
        &self.sftp_connection_details
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
    pub fn build(self) -> crate::operation::test_connection::TestConnectionOutput {
        crate::operation::test_connection::TestConnectionOutput {
            connector_id: self.connector_id,
            status: self.status,
            status_message: self.status_message,
            sftp_connection_details: self.sftp_connection_details,
            _request_id: self._request_id,
        }
    }
}