commonMain.aws.sdk.kotlin.services.glue.model.PutResourcePolicyResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutResourcePolicyResponse private constructor(builder: Builder) {
/**
* A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.
*/
public val policyHash: kotlin.String? = builder.policyHash
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.PutResourcePolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutResourcePolicyResponse(")
append("policyHash=$policyHash")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyHash?.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 PutResourcePolicyResponse
if (policyHash != other.policyHash) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.PutResourcePolicyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.
*/
public var policyHash: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.PutResourcePolicyResponse) : this() {
this.policyHash = x.policyHash
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.PutResourcePolicyResponse = PutResourcePolicyResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}