commonMain.aws.sdk.kotlin.services.backupgateway.model.GetGatewayResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backupgateway-jvm Show documentation
Show all versions of backupgateway-jvm Show documentation
The AWS SDK for Kotlin client for Backup Gateway
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backupgateway.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetGatewayResponse private constructor(builder: Builder) {
/**
* By providing the ARN (Amazon Resource Name), this API returns the gateway.
*/
public val gateway: aws.sdk.kotlin.services.backupgateway.model.GatewayDetails? = builder.gateway
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backupgateway.model.GetGatewayResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetGatewayResponse(")
append("gateway=$gateway")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = gateway?.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 GetGatewayResponse
if (gateway != other.gateway) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backupgateway.model.GetGatewayResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* By providing the ARN (Amazon Resource Name), this API returns the gateway.
*/
public var gateway: aws.sdk.kotlin.services.backupgateway.model.GatewayDetails? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backupgateway.model.GetGatewayResponse) : this() {
this.gateway = x.gateway
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backupgateway.model.GetGatewayResponse = GetGatewayResponse(this)
/**
* construct an [aws.sdk.kotlin.services.backupgateway.model.GatewayDetails] inside the given [block]
*/
public fun gateway(block: aws.sdk.kotlin.services.backupgateway.model.GatewayDetails.Builder.() -> kotlin.Unit) {
this.gateway = aws.sdk.kotlin.services.backupgateway.model.GatewayDetails.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}