aws_sdk_transfer/operation/test_connection/
_test_connection_output.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// 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>,
    _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()
    }
}
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>,
    _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
    }
    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,
            _request_id: self._request_id,
        }
    }
}