
commonMain.aws.sdk.kotlin.services.comprehend.model.DescribeResourcePolicyResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.time.Instant
public class DescribeResourcePolicyResponse private constructor(builder: Builder) {
/**
* The time at which the policy was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* The time at which the policy was last modified.
*/
public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedTime
/**
* The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
*/
public val policyRevisionId: kotlin.String? = builder.policyRevisionId
/**
* The JSON body of the resource-based policy.
*/
public val resourcePolicy: kotlin.String? = builder.resourcePolicy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.DescribeResourcePolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeResourcePolicyResponse(")
append("creationTime=$creationTime,")
append("lastModifiedTime=$lastModifiedTime,")
append("policyRevisionId=$policyRevisionId,")
append("resourcePolicy=$resourcePolicy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTime?.hashCode() ?: 0
result = 31 * result + (lastModifiedTime?.hashCode() ?: 0)
result = 31 * result + (policyRevisionId?.hashCode() ?: 0)
result = 31 * result + (resourcePolicy?.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 DescribeResourcePolicyResponse
if (creationTime != other.creationTime) return false
if (lastModifiedTime != other.lastModifiedTime) return false
if (policyRevisionId != other.policyRevisionId) return false
if (resourcePolicy != other.resourcePolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.DescribeResourcePolicyResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The time at which the policy was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time at which the policy was last modified.
*/
public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
*/
public var policyRevisionId: kotlin.String? = null
/**
* The JSON body of the resource-based policy.
*/
public var resourcePolicy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.DescribeResourcePolicyResponse) : this() {
this.creationTime = x.creationTime
this.lastModifiedTime = x.lastModifiedTime
this.policyRevisionId = x.policyRevisionId
this.resourcePolicy = x.resourcePolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.DescribeResourcePolicyResponse = DescribeResourcePolicyResponse(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy