
commonMain.aws.sdk.kotlin.services.ssm.model.PutResourcePolicyResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutResourcePolicyResponse private constructor(builder: Builder) {
/**
* ID of the current policy version.
*/
public val policyHash: kotlin.String? = builder.policyHash
/**
* The policy ID. To update a policy, you must specify `PolicyId` and `PolicyHash`.
*/
public val policyId: kotlin.String? = builder.policyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.PutResourcePolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutResourcePolicyResponse(")
append("policyHash=$policyHash,")
append("policyId=$policyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyHash?.hashCode() ?: 0
result = 31 * result + (policyId?.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
if (policyId != other.policyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.PutResourcePolicyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* ID of the current policy version.
*/
public var policyHash: kotlin.String? = null
/**
* The policy ID. To update a policy, you must specify `PolicyId` and `PolicyHash`.
*/
public var policyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.PutResourcePolicyResponse) : this() {
this.policyHash = x.policyHash
this.policyId = x.policyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.PutResourcePolicyResponse = PutResourcePolicyResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy