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

commonMain.aws.sdk.kotlin.services.kinesisanalytics.model.Output.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kinesisanalytics.model



/**
 * Describes application output configuration in which you identify an in-application stream and a destination where you want the in-application stream data to be written. The destination can be an Amazon Kinesis stream or an Amazon Kinesis Firehose delivery stream.
 *
 * For limits on how many destinations an application can write and other limitations, see [Limits](https://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html).
 */
public class Output private constructor(builder: Builder) {
    /**
     * Describes the data format when records are written to the destination. For more information, see [Configuring Application Output](https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html).
     */
    public val destinationSchema: aws.sdk.kotlin.services.kinesisanalytics.model.DestinationSchema? = builder.destinationSchema
    /**
     * Identifies an Amazon Kinesis Firehose delivery stream as the destination.
     */
    public val kinesisFirehoseOutput: aws.sdk.kotlin.services.kinesisanalytics.model.KinesisFirehoseOutput? = builder.kinesisFirehoseOutput
    /**
     * Identifies an Amazon Kinesis stream as the destination.
     */
    public val kinesisStreamsOutput: aws.sdk.kotlin.services.kinesisanalytics.model.KinesisStreamsOutput? = builder.kinesisStreamsOutput
    /**
     * Identifies an AWS Lambda function as the destination.
     */
    public val lambdaOutput: aws.sdk.kotlin.services.kinesisanalytics.model.LambdaOutput? = builder.lambdaOutput
    /**
     * Name of the in-application stream.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }

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

    override fun toString(): kotlin.String = buildString {
        append("Output(")
        append("destinationSchema=$destinationSchema,")
        append("kinesisFirehoseOutput=$kinesisFirehoseOutput,")
        append("kinesisStreamsOutput=$kinesisStreamsOutput,")
        append("lambdaOutput=$lambdaOutput,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = destinationSchema?.hashCode() ?: 0
        result = 31 * result + (kinesisFirehoseOutput?.hashCode() ?: 0)
        result = 31 * result + (kinesisStreamsOutput?.hashCode() ?: 0)
        result = 31 * result + (lambdaOutput?.hashCode() ?: 0)
        result = 31 * result + (name.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 Output

        if (destinationSchema != other.destinationSchema) return false
        if (kinesisFirehoseOutput != other.kinesisFirehoseOutput) return false
        if (kinesisStreamsOutput != other.kinesisStreamsOutput) return false
        if (lambdaOutput != other.lambdaOutput) return false
        if (name != other.name) return false

        return true
    }

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

    public class Builder {
        /**
         * Describes the data format when records are written to the destination. For more information, see [Configuring Application Output](https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html).
         */
        public var destinationSchema: aws.sdk.kotlin.services.kinesisanalytics.model.DestinationSchema? = null
        /**
         * Identifies an Amazon Kinesis Firehose delivery stream as the destination.
         */
        public var kinesisFirehoseOutput: aws.sdk.kotlin.services.kinesisanalytics.model.KinesisFirehoseOutput? = null
        /**
         * Identifies an Amazon Kinesis stream as the destination.
         */
        public var kinesisStreamsOutput: aws.sdk.kotlin.services.kinesisanalytics.model.KinesisStreamsOutput? = null
        /**
         * Identifies an AWS Lambda function as the destination.
         */
        public var lambdaOutput: aws.sdk.kotlin.services.kinesisanalytics.model.LambdaOutput? = null
        /**
         * Name of the in-application stream.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisanalytics.model.Output) : this() {
            this.destinationSchema = x.destinationSchema
            this.kinesisFirehoseOutput = x.kinesisFirehoseOutput
            this.kinesisStreamsOutput = x.kinesisStreamsOutput
            this.lambdaOutput = x.lambdaOutput
            this.name = x.name
        }

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy