
commonMain.aws.sdk.kotlin.services.kms.model.CreateGrantResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kms.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateGrantResponse private constructor(builder: Builder) {
/**
* The unique identifier for the grant.
*
* You can use the `GrantId` in a ListGrants, RetireGrant, or RevokeGrant operation.
*/
public val grantId: kotlin.String? = builder.grantId
/**
* The grant token.
*
* Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved *eventual consistency*. For more information, see [Grant token](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) and [Using a grant token](https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) in the *Key Management Service Developer Guide*.
*/
public val grantToken: kotlin.String? = builder.grantToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kms.model.CreateGrantResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGrantResponse(")
append("grantId=$grantId,")
append("grantToken=$grantToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = grantId?.hashCode() ?: 0
result = 31 * result + (grantToken?.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 CreateGrantResponse
if (grantId != other.grantId) return false
if (grantToken != other.grantToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kms.model.CreateGrantResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier for the grant.
*
* You can use the `GrantId` in a ListGrants, RetireGrant, or RevokeGrant operation.
*/
public var grantId: kotlin.String? = null
/**
* The grant token.
*
* Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved *eventual consistency*. For more information, see [Grant token](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) and [Using a grant token](https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) in the *Key Management Service Developer Guide*.
*/
public var grantToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kms.model.CreateGrantResponse) : this() {
this.grantId = x.grantId
this.grantToken = x.grantToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kms.model.CreateGrantResponse = CreateGrantResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy