
commonMain.aws.sdk.kotlin.services.ssm.model.DeleteResourcePolicyRequest.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 DeleteResourcePolicyRequest private constructor(builder: Builder) {
/**
* ID of the current policy version. The hash helps to prevent multiple calls from attempting to overwrite a policy.
*/
public val policyHash: kotlin.String? = builder.policyHash
/**
* The policy ID.
*/
public val policyId: kotlin.String? = builder.policyId
/**
* Amazon Resource Name (ARN) of the resource to which the policies are attached.
*/
public val resourceArn: kotlin.String? = builder.resourceArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.DeleteResourcePolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteResourcePolicyRequest(")
append("policyHash=$policyHash,")
append("policyId=$policyId,")
append("resourceArn=$resourceArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyHash?.hashCode() ?: 0
result = 31 * result + (policyId?.hashCode() ?: 0)
result = 31 * result + (resourceArn?.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 DeleteResourcePolicyRequest
if (policyHash != other.policyHash) return false
if (policyId != other.policyId) return false
if (resourceArn != other.resourceArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.DeleteResourcePolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* ID of the current policy version. The hash helps to prevent multiple calls from attempting to overwrite a policy.
*/
public var policyHash: kotlin.String? = null
/**
* The policy ID.
*/
public var policyId: kotlin.String? = null
/**
* Amazon Resource Name (ARN) of the resource to which the policies are attached.
*/
public var resourceArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.DeleteResourcePolicyRequest) : this() {
this.policyHash = x.policyHash
this.policyId = x.policyId
this.resourceArn = x.resourceArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.DeleteResourcePolicyRequest = DeleteResourcePolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy