commonMain.aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.shield.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DescribeProtectionResponse private constructor(builder: Builder) {
/**
* The Protection that you requested.
*/
public val protection: aws.sdk.kotlin.services.shield.model.Protection? = builder.protection
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeProtectionResponse(")
append("protection=$protection")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = protection?.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 DescribeProtectionResponse
if (protection != other.protection) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Protection that you requested.
*/
public var protection: aws.sdk.kotlin.services.shield.model.Protection? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse) : this() {
this.protection = x.protection
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse = DescribeProtectionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.shield.model.Protection] inside the given [block]
*/
public fun protection(block: aws.sdk.kotlin.services.shield.model.Protection.Builder.() -> kotlin.Unit) {
this.protection = aws.sdk.kotlin.services.shield.model.Protection.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy