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

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

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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



/**
 * An inferred dataset configuration.
 */
public class DetectedMetricSetConfig private constructor(builder: Builder) {
    /**
     * The dataset's interval.
     */
    public val metricSetFrequency: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedField? = builder.metricSetFrequency
    /**
     * The dataset's data source.
     */
    public val metricSource: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedMetricSource? = builder.metricSource
    /**
     * The dataset's offset.
     */
    public val offset: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedField? = builder.offset

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

    override fun toString(): kotlin.String = buildString {
        append("DetectedMetricSetConfig(")
        append("metricSetFrequency=$metricSetFrequency,")
        append("metricSource=$metricSource,")
        append("offset=$offset")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = metricSetFrequency?.hashCode() ?: 0
        result = 31 * result + (metricSource?.hashCode() ?: 0)
        result = 31 * result + (offset?.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 DetectedMetricSetConfig

        if (metricSetFrequency != other.metricSetFrequency) return false
        if (metricSource != other.metricSource) return false
        if (offset != other.offset) return false

        return true
    }

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

    public class Builder {
        /**
         * The dataset's interval.
         */
        public var metricSetFrequency: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedField? = null
        /**
         * The dataset's data source.
         */
        public var metricSource: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedMetricSource? = null
        /**
         * The dataset's offset.
         */
        public var offset: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedField? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.DetectedMetricSetConfig) : this() {
            this.metricSetFrequency = x.metricSetFrequency
            this.metricSource = x.metricSource
            this.offset = x.offset
        }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy