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

commonMain.aws.sdk.kotlin.services.greengrass.model.Logger.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.greengrass.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a logger
 */
public class Logger private constructor(builder: Builder) {
    /**
     * The component that will be subject to logging.
     */
    public val component: aws.sdk.kotlin.services.greengrass.model.LoggerComponent? = builder.component
    /**
     * A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The level of the logs.
     */
    public val level: aws.sdk.kotlin.services.greengrass.model.LoggerLevel? = builder.level
    /**
     * The amount of file space, in KB, to use if the local file system is used for logging purposes.
     */
    public val space: kotlin.Int? = builder.space
    /**
     * The type of log output which will be used.
     */
    public val type: aws.sdk.kotlin.services.greengrass.model.LoggerType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("Logger(")
        append("component=$component,")
        append("id=$id,")
        append("level=$level,")
        append("space=$space,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = component?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (level?.hashCode() ?: 0)
        result = 31 * result + (space ?: 0)
        result = 31 * result + (type?.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 Logger

        if (component != other.component) return false
        if (id != other.id) return false
        if (level != other.level) return false
        if (space != other.space) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The component that will be subject to logging.
         */
        public var component: aws.sdk.kotlin.services.greengrass.model.LoggerComponent? = null
        /**
         * A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
         */
        public var id: kotlin.String? = null
        /**
         * The level of the logs.
         */
        public var level: aws.sdk.kotlin.services.greengrass.model.LoggerLevel? = null
        /**
         * The amount of file space, in KB, to use if the local file system is used for logging purposes.
         */
        public var space: kotlin.Int? = null
        /**
         * The type of log output which will be used.
         */
        public var type: aws.sdk.kotlin.services.greengrass.model.LoggerType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.greengrass.model.Logger) : this() {
            this.component = x.component
            this.id = x.id
            this.level = x.level
            this.space = x.space
            this.type = x.type
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy