aws_sdk_transfer/operation/test_connection/_test_connection_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct TestConnectionOutput {
6 /// <p>Returns the identifier of the connector object that you are testing.</p>
7 pub connector_id: ::std::option::Option<::std::string::String>,
8 /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
9 pub status: ::std::option::Option<::std::string::String>,
10 /// <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>
11 /// <ul>
12 /// <li>
13 /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
14 /// <li>
15 /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
16 /// <li>
17 /// <p>Verify that the secret exists and is formatted correctly.</p></li>
18 /// <li>
19 /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
20 /// </ul>
21 pub status_message: ::std::option::Option<::std::string::String>,
22 /// <p>Structure that contains the SFTP connector host key.</p>
23 pub sftp_connection_details: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>,
24 _request_id: Option<String>,
25}
26impl TestConnectionOutput {
27 /// <p>Returns the identifier of the connector object that you are testing.</p>
28 pub fn connector_id(&self) -> ::std::option::Option<&str> {
29 self.connector_id.as_deref()
30 }
31 /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
32 pub fn status(&self) -> ::std::option::Option<&str> {
33 self.status.as_deref()
34 }
35 /// <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>
36 /// <ul>
37 /// <li>
38 /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
39 /// <li>
40 /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
41 /// <li>
42 /// <p>Verify that the secret exists and is formatted correctly.</p></li>
43 /// <li>
44 /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
45 /// </ul>
46 pub fn status_message(&self) -> ::std::option::Option<&str> {
47 self.status_message.as_deref()
48 }
49 /// <p>Structure that contains the SFTP connector host key.</p>
50 pub fn sftp_connection_details(&self) -> ::std::option::Option<&crate::types::SftpConnectorConnectionDetails> {
51 self.sftp_connection_details.as_ref()
52 }
53}
54impl ::aws_types::request_id::RequestId for TestConnectionOutput {
55 fn request_id(&self) -> Option<&str> {
56 self._request_id.as_deref()
57 }
58}
59impl TestConnectionOutput {
60 /// Creates a new builder-style object to manufacture [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
61 pub fn builder() -> crate::operation::test_connection::builders::TestConnectionOutputBuilder {
62 crate::operation::test_connection::builders::TestConnectionOutputBuilder::default()
63 }
64}
65
66/// A builder for [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct TestConnectionOutputBuilder {
70 pub(crate) connector_id: ::std::option::Option<::std::string::String>,
71 pub(crate) status: ::std::option::Option<::std::string::String>,
72 pub(crate) status_message: ::std::option::Option<::std::string::String>,
73 pub(crate) sftp_connection_details: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>,
74 _request_id: Option<String>,
75}
76impl TestConnectionOutputBuilder {
77 /// <p>Returns the identifier of the connector object that you are testing.</p>
78 pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.connector_id = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>Returns the identifier of the connector object that you are testing.</p>
83 pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.connector_id = input;
85 self
86 }
87 /// <p>Returns the identifier of the connector object that you are testing.</p>
88 pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
89 &self.connector_id
90 }
91 /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
92 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.status = ::std::option::Option::Some(input.into());
94 self
95 }
96 /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
97 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.status = input;
99 self
100 }
101 /// <p>Returns <code>OK</code> for successful test, or <code>ERROR</code> if the test fails.</p>
102 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
103 &self.status
104 }
105 /// <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>
106 /// <ul>
107 /// <li>
108 /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
109 /// <li>
110 /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
111 /// <li>
112 /// <p>Verify that the secret exists and is formatted correctly.</p></li>
113 /// <li>
114 /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
115 /// </ul>
116 pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.status_message = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <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>
121 /// <ul>
122 /// <li>
123 /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
124 /// <li>
125 /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
126 /// <li>
127 /// <p>Verify that the secret exists and is formatted correctly.</p></li>
128 /// <li>
129 /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
130 /// </ul>
131 pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.status_message = input;
133 self
134 }
135 /// <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>
136 /// <ul>
137 /// <li>
138 /// <p>Verify that your secret name aligns with the one in Transfer Role permissions.</p></li>
139 /// <li>
140 /// <p>Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.</p></li>
141 /// <li>
142 /// <p>Verify that the secret exists and is formatted correctly.</p></li>
143 /// <li>
144 /// <p>Verify that the trusted host key in the connector configuration matches the <code>ssh-keyscan</code> output.</p></li>
145 /// </ul>
146 pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
147 &self.status_message
148 }
149 /// <p>Structure that contains the SFTP connector host key.</p>
150 pub fn sftp_connection_details(mut self, input: crate::types::SftpConnectorConnectionDetails) -> Self {
151 self.sftp_connection_details = ::std::option::Option::Some(input);
152 self
153 }
154 /// <p>Structure that contains the SFTP connector host key.</p>
155 pub fn set_sftp_connection_details(mut self, input: ::std::option::Option<crate::types::SftpConnectorConnectionDetails>) -> Self {
156 self.sftp_connection_details = input;
157 self
158 }
159 /// <p>Structure that contains the SFTP connector host key.</p>
160 pub fn get_sftp_connection_details(&self) -> &::std::option::Option<crate::types::SftpConnectorConnectionDetails> {
161 &self.sftp_connection_details
162 }
163 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
164 self._request_id = Some(request_id.into());
165 self
166 }
167
168 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
169 self._request_id = request_id;
170 self
171 }
172 /// Consumes the builder and constructs a [`TestConnectionOutput`](crate::operation::test_connection::TestConnectionOutput).
173 pub fn build(self) -> crate::operation::test_connection::TestConnectionOutput {
174 crate::operation::test_connection::TestConnectionOutput {
175 connector_id: self.connector_id,
176 status: self.status,
177 status_message: self.status_message,
178 sftp_connection_details: self.sftp_connection_details,
179 _request_id: self._request_id,
180 }
181 }
182}