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

commonMain.aws.sdk.kotlin.services.kafka.model.Prometheus.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kafka.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Prometheus settings.
 */
public class Prometheus private constructor(builder: Builder) {
    /**
     * Indicates whether you want to turn on or turn off the JMX Exporter.
     */
    public val jmxExporter: aws.sdk.kotlin.services.kafka.model.JmxExporter? = builder.jmxExporter
    /**
     * Indicates whether you want to turn on or turn off the Node Exporter.
     */
    public val nodeExporter: aws.sdk.kotlin.services.kafka.model.NodeExporter? = builder.nodeExporter

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

    override fun toString(): kotlin.String = buildString {
        append("Prometheus(")
        append("jmxExporter=$jmxExporter,")
        append("nodeExporter=$nodeExporter")
        append(")")
    }

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

        if (jmxExporter != other.jmxExporter) return false
        if (nodeExporter != other.nodeExporter) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates whether you want to turn on or turn off the JMX Exporter.
         */
        public var jmxExporter: aws.sdk.kotlin.services.kafka.model.JmxExporter? = null
        /**
         * Indicates whether you want to turn on or turn off the Node Exporter.
         */
        public var nodeExporter: aws.sdk.kotlin.services.kafka.model.NodeExporter? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.Prometheus) : this() {
            this.jmxExporter = x.jmxExporter
            this.nodeExporter = x.nodeExporter
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy