commonMain.aws.sdk.kotlin.services.transfer.model.TestConnectionResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.model
import aws.smithy.kotlin.runtime.SdkDsl
public class TestConnectionResponse private constructor(builder: Builder) {
/**
* Returns the identifier of the connector object that you are testing.
*/
public val connectorId: kotlin.String? = builder.connectorId
/**
* Returns `OK` for successful test, or `ERROR` if the test fails.
*/
public val status: kotlin.String? = builder.status
/**
* Returns `Connection succeeded` 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.
* + Verify that your secret name aligns with the one in Transfer Role permissions.
* + Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.
* + Verify that the secret exists and is formatted correctly.
* + Verify that the trusted host key in the connector configuration matches the `ssh-keyscan` output.
*/
public val statusMessage: kotlin.String? = builder.statusMessage
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.TestConnectionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestConnectionResponse(")
append("connectorId=$connectorId,")
append("status=$status,")
append("statusMessage=$statusMessage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectorId?.hashCode() ?: 0
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (statusMessage?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as TestConnectionResponse
if (connectorId != other.connectorId) return false
if (status != other.status) return false
if (statusMessage != other.statusMessage) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.TestConnectionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Returns the identifier of the connector object that you are testing.
*/
public var connectorId: kotlin.String? = null
/**
* Returns `OK` for successful test, or `ERROR` if the test fails.
*/
public var status: kotlin.String? = null
/**
* Returns `Connection succeeded` 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.
* + Verify that your secret name aligns with the one in Transfer Role permissions.
* + Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.
* + Verify that the secret exists and is formatted correctly.
* + Verify that the trusted host key in the connector configuration matches the `ssh-keyscan` output.
*/
public var statusMessage: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.TestConnectionResponse) : this() {
this.connectorId = x.connectorId
this.status = x.status
this.statusMessage = x.statusMessage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.TestConnectionResponse = TestConnectionResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}