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

commonMain.aws.sdk.kotlin.services.iotanalytics.model.ChannelStorage.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.iotanalytics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Where channel data is stored. You may choose one of `serviceManagedS3`, `customerManagedS3` storage. If not specified, the default is `serviceManagedS3`. This can't be changed after creation of the channel.
 */
public class ChannelStorage private constructor(builder: Builder) {
    /**
     * Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the `retentionPeriod` parameter is ignored. You can't change the choice of S3 storage after the data store is created.
     */
    public val customerManagedS3: aws.sdk.kotlin.services.iotanalytics.model.CustomerManagedChannelS3Storage? = builder.customerManagedS3
    /**
     * Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.
     */
    public val serviceManagedS3: aws.sdk.kotlin.services.iotanalytics.model.ServiceManagedChannelS3Storage? = builder.serviceManagedS3

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

    override fun toString(): kotlin.String = buildString {
        append("ChannelStorage(")
        append("customerManagedS3=$customerManagedS3,")
        append("serviceManagedS3=$serviceManagedS3")
        append(")")
    }

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

        if (customerManagedS3 != other.customerManagedS3) return false
        if (serviceManagedS3 != other.serviceManagedS3) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the `retentionPeriod` parameter is ignored. You can't change the choice of S3 storage after the data store is created.
         */
        public var customerManagedS3: aws.sdk.kotlin.services.iotanalytics.model.CustomerManagedChannelS3Storage? = null
        /**
         * Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.
         */
        public var serviceManagedS3: aws.sdk.kotlin.services.iotanalytics.model.ServiceManagedChannelS3Storage? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotanalytics.model.ChannelStorage) : this() {
            this.customerManagedS3 = x.customerManagedS3
            this.serviceManagedS3 = x.serviceManagedS3
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy