All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glacier.model.InitiateVaultLockRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glacier.model



/**
 * The input values for `InitiateVaultLock`.
 */
public class InitiateVaultLockRequest private constructor(builder: Builder) {
    /**
     * The `AccountId` value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '`-`' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.
     */
    public val accountId: kotlin.String? = requireNotNull(builder.accountId) { "A non-null value must be provided for accountId" }
    /**
     * The vault lock policy as a JSON string, which uses "\" as an escape character.
     */
    public val policy: aws.sdk.kotlin.services.glacier.model.VaultLockPolicy? = builder.policy
    /**
     * The name of the vault.
     */
    public val vaultName: kotlin.String? = requireNotNull(builder.vaultName) { "A non-null value must be provided for vaultName" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glacier.model.InitiateVaultLockRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("InitiateVaultLockRequest(")
        append("accountId=$accountId,")
        append("policy=$policy,")
        append("vaultName=$vaultName)")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (policy?.hashCode() ?: 0)
        result = 31 * result + (vaultName?.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 InitiateVaultLockRequest

        if (accountId != other.accountId) return false
        if (policy != other.policy) return false
        if (vaultName != other.vaultName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glacier.model.InitiateVaultLockRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The `AccountId` value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '`-`' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.
         */
        public var accountId: kotlin.String? = null
        /**
         * The vault lock policy as a JSON string, which uses "\" as an escape character.
         */
        public var policy: aws.sdk.kotlin.services.glacier.model.VaultLockPolicy? = null
        /**
         * The name of the vault.
         */
        public var vaultName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glacier.model.InitiateVaultLockRequest) : this() {
            this.accountId = x.accountId
            this.policy = x.policy
            this.vaultName = x.vaultName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glacier.model.InitiateVaultLockRequest = InitiateVaultLockRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.glacier.model.VaultLockPolicy] inside the given [block]
         */
        public fun policy(block: aws.sdk.kotlin.services.glacier.model.VaultLockPolicy.Builder.() -> kotlin.Unit) {
            this.policy = aws.sdk.kotlin.services.glacier.model.VaultLockPolicy.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy