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

commonMain.aws.sdk.kotlin.services.firehose.model.StartDeliveryStreamEncryptionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.firehose.model

import aws.smithy.kotlin.runtime.SdkDsl

public class StartDeliveryStreamEncryptionRequest private constructor(builder: Builder) {
    /**
     * Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
     */
    public val deliveryStreamEncryptionConfigurationInput: aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput? = builder.deliveryStreamEncryptionConfigurationInput
    /**
     * The name of the delivery stream for which you want to enable server-side encryption (SSE).
     */
    public val deliveryStreamName: kotlin.String? = builder.deliveryStreamName

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

    override fun toString(): kotlin.String = buildString {
        append("StartDeliveryStreamEncryptionRequest(")
        append("deliveryStreamEncryptionConfigurationInput=$deliveryStreamEncryptionConfigurationInput,")
        append("deliveryStreamName=$deliveryStreamName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deliveryStreamEncryptionConfigurationInput?.hashCode() ?: 0
        result = 31 * result + (deliveryStreamName?.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 StartDeliveryStreamEncryptionRequest

        if (deliveryStreamEncryptionConfigurationInput != other.deliveryStreamEncryptionConfigurationInput) return false
        if (deliveryStreamName != other.deliveryStreamName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
         */
        public var deliveryStreamEncryptionConfigurationInput: aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput? = null
        /**
         * The name of the delivery stream for which you want to enable server-side encryption (SSE).
         */
        public var deliveryStreamName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.StartDeliveryStreamEncryptionRequest) : this() {
            this.deliveryStreamEncryptionConfigurationInput = x.deliveryStreamEncryptionConfigurationInput
            this.deliveryStreamName = x.deliveryStreamName
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy