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

commonMain.aws.sdk.kotlin.services.cloudfront.model.EndPoint.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudfront.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about the Amazon Kinesis data stream where you are sending real-time log data in a real-time log configuration.
 */
public class EndPoint private constructor(builder: Builder) {
    /**
     * Contains information about the Amazon Kinesis data stream where you are sending real-time log data.
     */
    public val kinesisStreamConfig: aws.sdk.kotlin.services.cloudfront.model.KinesisStreamConfig? = builder.kinesisStreamConfig
    /**
     * The type of data stream where you are sending real-time log data. The only valid value is `Kinesis`.
     */
    public val streamType: kotlin.String = requireNotNull(builder.streamType) { "A non-null value must be provided for streamType" }

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

    override fun toString(): kotlin.String = buildString {
        append("EndPoint(")
        append("kinesisStreamConfig=$kinesisStreamConfig,")
        append("streamType=$streamType")
        append(")")
    }

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

        if (kinesisStreamConfig != other.kinesisStreamConfig) return false
        if (streamType != other.streamType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Contains information about the Amazon Kinesis data stream where you are sending real-time log data.
         */
        public var kinesisStreamConfig: aws.sdk.kotlin.services.cloudfront.model.KinesisStreamConfig? = null
        /**
         * The type of data stream where you are sending real-time log data. The only valid value is `Kinesis`.
         */
        public var streamType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudfront.model.EndPoint) : this() {
            this.kinesisStreamConfig = x.kinesisStreamConfig
            this.streamType = x.streamType
        }

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

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

        internal fun correctErrors(): Builder {
            if (streamType == null) streamType = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy