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

commonMain.aws.sdk.kotlin.services.pipes.model.PipeLogConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pipes.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The logging configuration settings for the pipe.
 */
public class PipeLogConfiguration private constructor(builder: Builder) {
    /**
     * The Amazon CloudWatch Logs logging configuration settings for the pipe.
     */
    public val cloudwatchLogsLogDestination: aws.sdk.kotlin.services.pipes.model.CloudwatchLogsLogDestination? = builder.cloudwatchLogsLogDestination
    /**
     * The Amazon Kinesis Data Firehose logging configuration settings for the pipe.
     */
    public val firehoseLogDestination: aws.sdk.kotlin.services.pipes.model.FirehoseLogDestination? = builder.firehoseLogDestination
    /**
     * Whether the execution data (specifically, the `payload`, `awsRequest`, and `awsResponse` fields) is included in the log messages for this pipe.
     *
     * This applies to all log destinations for the pipe.
     *
     * For more information, see [Including execution data in logs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-execution-data) in the *Amazon EventBridge User Guide*.
     */
    public val includeExecutionData: List? = builder.includeExecutionData
    /**
     * The level of logging detail to include. This applies to all log destinations for the pipe.
     */
    public val level: aws.sdk.kotlin.services.pipes.model.LogLevel? = builder.level
    /**
     * The Amazon S3 logging configuration settings for the pipe.
     */
    public val s3LogDestination: aws.sdk.kotlin.services.pipes.model.S3LogDestination? = builder.s3LogDestination

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

    override fun toString(): kotlin.String = buildString {
        append("PipeLogConfiguration(")
        append("cloudwatchLogsLogDestination=$cloudwatchLogsLogDestination,")
        append("firehoseLogDestination=$firehoseLogDestination,")
        append("includeExecutionData=$includeExecutionData,")
        append("level=$level,")
        append("s3LogDestination=$s3LogDestination")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cloudwatchLogsLogDestination?.hashCode() ?: 0
        result = 31 * result + (firehoseLogDestination?.hashCode() ?: 0)
        result = 31 * result + (includeExecutionData?.hashCode() ?: 0)
        result = 31 * result + (level?.hashCode() ?: 0)
        result = 31 * result + (s3LogDestination?.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 PipeLogConfiguration

        if (cloudwatchLogsLogDestination != other.cloudwatchLogsLogDestination) return false
        if (firehoseLogDestination != other.firehoseLogDestination) return false
        if (includeExecutionData != other.includeExecutionData) return false
        if (level != other.level) return false
        if (s3LogDestination != other.s3LogDestination) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon CloudWatch Logs logging configuration settings for the pipe.
         */
        public var cloudwatchLogsLogDestination: aws.sdk.kotlin.services.pipes.model.CloudwatchLogsLogDestination? = null
        /**
         * The Amazon Kinesis Data Firehose logging configuration settings for the pipe.
         */
        public var firehoseLogDestination: aws.sdk.kotlin.services.pipes.model.FirehoseLogDestination? = null
        /**
         * Whether the execution data (specifically, the `payload`, `awsRequest`, and `awsResponse` fields) is included in the log messages for this pipe.
         *
         * This applies to all log destinations for the pipe.
         *
         * For more information, see [Including execution data in logs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-execution-data) in the *Amazon EventBridge User Guide*.
         */
        public var includeExecutionData: List? = null
        /**
         * The level of logging detail to include. This applies to all log destinations for the pipe.
         */
        public var level: aws.sdk.kotlin.services.pipes.model.LogLevel? = null
        /**
         * The Amazon S3 logging configuration settings for the pipe.
         */
        public var s3LogDestination: aws.sdk.kotlin.services.pipes.model.S3LogDestination? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.PipeLogConfiguration) : this() {
            this.cloudwatchLogsLogDestination = x.cloudwatchLogsLogDestination
            this.firehoseLogDestination = x.firehoseLogDestination
            this.includeExecutionData = x.includeExecutionData
            this.level = x.level
            this.s3LogDestination = x.s3LogDestination
        }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy