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

commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.MetricSource.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lookoutmetrics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about source data used to generate metrics.
 */
public class MetricSource private constructor(builder: Builder) {
    /**
     * Details about an AppFlow datasource.
     */
    public val appFlowConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AppFlowConfig? = builder.appFlowConfig
    /**
     * Details about an Amazon Athena datasource.
     */
    public val athenaSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AthenaSourceConfig? = builder.athenaSourceConfig
    /**
     * Details about an Amazon CloudWatch monitoring datasource.
     */
    public val cloudWatchConfig: aws.sdk.kotlin.services.lookoutmetrics.model.CloudWatchConfig? = builder.cloudWatchConfig
    /**
     * Details about an Amazon Relational Database Service (RDS) datasource.
     */
    public val rdsSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.RdsSourceConfig? = builder.rdsSourceConfig
    /**
     * Details about an Amazon Redshift database datasource.
     */
    public val redshiftSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.RedshiftSourceConfig? = builder.redshiftSourceConfig
    /**
     * Contains information about the configuration of the S3 bucket that contains source files.
     */
    public val s3SourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.S3SourceConfig? = builder.s3SourceConfig

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

    override fun toString(): kotlin.String = buildString {
        append("MetricSource(")
        append("appFlowConfig=$appFlowConfig,")
        append("athenaSourceConfig=$athenaSourceConfig,")
        append("cloudWatchConfig=$cloudWatchConfig,")
        append("rdsSourceConfig=$rdsSourceConfig,")
        append("redshiftSourceConfig=$redshiftSourceConfig,")
        append("s3SourceConfig=$s3SourceConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appFlowConfig?.hashCode() ?: 0
        result = 31 * result + (athenaSourceConfig?.hashCode() ?: 0)
        result = 31 * result + (cloudWatchConfig?.hashCode() ?: 0)
        result = 31 * result + (rdsSourceConfig?.hashCode() ?: 0)
        result = 31 * result + (redshiftSourceConfig?.hashCode() ?: 0)
        result = 31 * result + (s3SourceConfig?.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 MetricSource

        if (appFlowConfig != other.appFlowConfig) return false
        if (athenaSourceConfig != other.athenaSourceConfig) return false
        if (cloudWatchConfig != other.cloudWatchConfig) return false
        if (rdsSourceConfig != other.rdsSourceConfig) return false
        if (redshiftSourceConfig != other.redshiftSourceConfig) return false
        if (s3SourceConfig != other.s3SourceConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Details about an AppFlow datasource.
         */
        public var appFlowConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AppFlowConfig? = null
        /**
         * Details about an Amazon Athena datasource.
         */
        public var athenaSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AthenaSourceConfig? = null
        /**
         * Details about an Amazon CloudWatch monitoring datasource.
         */
        public var cloudWatchConfig: aws.sdk.kotlin.services.lookoutmetrics.model.CloudWatchConfig? = null
        /**
         * Details about an Amazon Relational Database Service (RDS) datasource.
         */
        public var rdsSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.RdsSourceConfig? = null
        /**
         * Details about an Amazon Redshift database datasource.
         */
        public var redshiftSourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.RedshiftSourceConfig? = null
        /**
         * Contains information about the configuration of the S3 bucket that contains source files.
         */
        public var s3SourceConfig: aws.sdk.kotlin.services.lookoutmetrics.model.S3SourceConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.MetricSource) : this() {
            this.appFlowConfig = x.appFlowConfig
            this.athenaSourceConfig = x.athenaSourceConfig
            this.cloudWatchConfig = x.cloudWatchConfig
            this.rdsSourceConfig = x.rdsSourceConfig
            this.redshiftSourceConfig = x.redshiftSourceConfig
            this.s3SourceConfig = x.s3SourceConfig
        }

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

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

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy