commonMain.aws.sdk.kotlin.services.entityresolution.model.PutPolicyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of entityresolution-jvm Show documentation
Show all versions of entityresolution-jvm Show documentation
The AWS SDK for Kotlin client for EntityResolution
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.entityresolution.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutPolicyRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the resource for which the policy needs to be updated.
*/
public val arn: kotlin.String? = builder.arn
/**
* The resource-based policy.
*
* If you set the value of the `effect` parameter in the `policy` to `Deny` for the `PutPolicy` operation, you must also set the value of the `effect` parameter to `Deny` for the `AddPolicyStatement` operation.
*/
public val policy: kotlin.String? = builder.policy
/**
* A unique identifier for the current revision of the policy.
*/
public val token: kotlin.String? = builder.token
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.entityresolution.model.PutPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutPolicyRequest(")
append("arn=$arn,")
append("policy=$policy,")
append("token=$token")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (policy?.hashCode() ?: 0)
result = 31 * result + (token?.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 PutPolicyRequest
if (arn != other.arn) return false
if (policy != other.policy) return false
if (token != other.token) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.entityresolution.model.PutPolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the resource for which the policy needs to be updated.
*/
public var arn: kotlin.String? = null
/**
* The resource-based policy.
*
* If you set the value of the `effect` parameter in the `policy` to `Deny` for the `PutPolicy` operation, you must also set the value of the `effect` parameter to `Deny` for the `AddPolicyStatement` operation.
*/
public var policy: kotlin.String? = null
/**
* A unique identifier for the current revision of the policy.
*/
public var token: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.entityresolution.model.PutPolicyRequest) : this() {
this.arn = x.arn
this.policy = x.policy
this.token = x.token
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.entityresolution.model.PutPolicyRequest = PutPolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy