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

commonMain.aws.sdk.kotlin.services.kinesis.model.StopStreamEncryptionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kinesis.model

import aws.smithy.kotlin.runtime.SdkDsl

public class StopStreamEncryptionRequest private constructor(builder: Builder) {
    /**
     * The encryption type. The only valid value is `KMS`.
     */
    public val encryptionType: aws.sdk.kotlin.services.kinesis.model.EncryptionType? = builder.encryptionType
    /**
     * The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias `aws/kinesis`.
     * + Key ARN example: `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
     * + Alias ARN example: `arn:aws:kms:us-east-1:123456789012:alias/MyAliasName`
     * + Globally unique key ID example: `12345678-1234-1234-1234-123456789012`
     * + Alias name example: `alias/MyAliasName`
     * + Master key owned by Kinesis Data Streams: `alias/aws/kinesis`
     */
    public val keyId: kotlin.String? = builder.keyId
    /**
     * The ARN of the stream.
     */
    public val streamArn: kotlin.String? = builder.streamArn
    /**
     * The name of the stream on which to stop encrypting records.
     */
    public val streamName: kotlin.String? = builder.streamName

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

    override fun toString(): kotlin.String = buildString {
        append("StopStreamEncryptionRequest(")
        append("encryptionType=$encryptionType,")
        append("keyId=$keyId,")
        append("streamArn=$streamArn,")
        append("streamName=$streamName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = encryptionType?.hashCode() ?: 0
        result = 31 * result + (keyId?.hashCode() ?: 0)
        result = 31 * result + (streamArn?.hashCode() ?: 0)
        result = 31 * result + (streamName?.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 StopStreamEncryptionRequest

        if (encryptionType != other.encryptionType) return false
        if (keyId != other.keyId) return false
        if (streamArn != other.streamArn) return false
        if (streamName != other.streamName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The encryption type. The only valid value is `KMS`.
         */
        public var encryptionType: aws.sdk.kotlin.services.kinesis.model.EncryptionType? = null
        /**
         * The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias `aws/kinesis`.
         * + Key ARN example: `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
         * + Alias ARN example: `arn:aws:kms:us-east-1:123456789012:alias/MyAliasName`
         * + Globally unique key ID example: `12345678-1234-1234-1234-123456789012`
         * + Alias name example: `alias/MyAliasName`
         * + Master key owned by Kinesis Data Streams: `alias/aws/kinesis`
         */
        public var keyId: kotlin.String? = null
        /**
         * The ARN of the stream.
         */
        public var streamArn: kotlin.String? = null
        /**
         * The name of the stream on which to stop encrypting records.
         */
        public var streamName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesis.model.StopStreamEncryptionRequest) : this() {
            this.encryptionType = x.encryptionType
            this.keyId = x.keyId
            this.streamArn = x.streamArn
            this.streamName = x.streamName
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy