commonMain.aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementResponse.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.entityresolution.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AddPolicyStatementResponse private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The resource-based policy.
*/
public val policy: kotlin.String? = builder.policy
/**
* A unique identifier for the current revision of the policy.
*/
public val token: kotlin.String = requireNotNull(builder.token) { "A non-null value must be provided for token" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AddPolicyStatementResponse(")
append("arn=$arn,")
append("policy=$policy,")
append("token=$token")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (policy?.hashCode() ?: 0)
result = 31 * result + (token.hashCode())
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 AddPolicyStatementResponse
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.AddPolicyStatementResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
*/
public var arn: kotlin.String? = null
/**
* The resource-based policy.
*/
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.AddPolicyStatementResponse) : this() {
this.arn = x.arn
this.policy = x.policy
this.token = x.token
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementResponse = AddPolicyStatementResponse(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (token == null) token = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy