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

commonMain.aws.sdk.kotlin.services.iot.model.SetV2LoggingLevelRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



public class SetV2LoggingLevelRequest private constructor(builder: Builder) {
    /**
     * The log level.
     */
    public val logLevel: aws.sdk.kotlin.services.iot.model.LogLevel? = builder.logLevel
    /**
     * The log target.
     */
    public val logTarget: aws.sdk.kotlin.services.iot.model.LogTarget? = builder.logTarget

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

    override fun toString(): kotlin.String = buildString {
        append("SetV2LoggingLevelRequest(")
        append("logLevel=$logLevel,")
        append("logTarget=$logTarget")
        append(")")
    }

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

        if (logLevel != other.logLevel) return false
        if (logTarget != other.logTarget) return false

        return true
    }

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

    public class Builder {
        /**
         * The log level.
         */
        public var logLevel: aws.sdk.kotlin.services.iot.model.LogLevel? = null
        /**
         * The log target.
         */
        public var logTarget: aws.sdk.kotlin.services.iot.model.LogTarget? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.SetV2LoggingLevelRequest) : this() {
            this.logLevel = x.logLevel
            this.logTarget = x.logTarget
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy