![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.aws.sdk.kotlin.services.gamelift.model.InstanceCredentials.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A set of credentials that allow remote access to an instance in an EC2 managed fleet. These credentials are returned in response to a call to GetInstanceAccess, which requests access for instances that are running game servers with the Amazon GameLift server SDK version 4.x or earlier.
*/
public class InstanceCredentials private constructor(builder: Builder) {
/**
* Secret string. For Windows instances, the secret is a password for use with Windows Remote Desktop. For Linux instances, it's a private key for use with SSH.
*/
public val secret: kotlin.String? = builder.secret
/**
* A user name for logging in.
*/
public val userName: kotlin.String? = builder.userName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.gamelift.model.InstanceCredentials = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InstanceCredentials(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = secret?.hashCode() ?: 0
result = 31 * result + (userName?.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 InstanceCredentials
if (secret != other.secret) return false
if (userName != other.userName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.gamelift.model.InstanceCredentials = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Secret string. For Windows instances, the secret is a password for use with Windows Remote Desktop. For Linux instances, it's a private key for use with SSH.
*/
public var secret: kotlin.String? = null
/**
* A user name for logging in.
*/
public var userName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.gamelift.model.InstanceCredentials) : this() {
this.secret = x.secret
this.userName = x.userName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.gamelift.model.InstanceCredentials = InstanceCredentials(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy