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

commonMain.aws.sdk.kotlin.services.fsx.model.LustreLogConfiguration.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.fsx.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The configuration for Lustre logging used to write the enabled logging events for your Amazon FSx for Lustre file system or Amazon File Cache resource to Amazon CloudWatch Logs.
 */
public class LustreLogConfiguration private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) that specifies the destination of the logs. The destination can be any Amazon CloudWatch Logs log group ARN. The destination ARN must be in the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon FSx file system.
     */
    public val destination: kotlin.String? = builder.destination
    /**
     * The data repository events that are logged by Amazon FSx.
     * + `WARN_ONLY` - only warning events are logged.
     * + `ERROR_ONLY` - only error events are logged.
     * + `WARN_ERROR` - both warning events and error events are logged.
     * + `DISABLED` - logging of data repository events is turned off.
     *
     * Note that Amazon File Cache uses a default setting of `WARN_ERROR`, which can't be changed.
     */
    public val level: aws.sdk.kotlin.services.fsx.model.LustreAccessAuditLogLevel? = builder.level

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

    override fun toString(): kotlin.String = buildString {
        append("LustreLogConfiguration(")
        append("destination=$destination,")
        append("level=$level")
        append(")")
    }

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

        if (destination != other.destination) return false
        if (level != other.level) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) that specifies the destination of the logs. The destination can be any Amazon CloudWatch Logs log group ARN. The destination ARN must be in the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon FSx file system.
         */
        public var destination: kotlin.String? = null
        /**
         * The data repository events that are logged by Amazon FSx.
         * + `WARN_ONLY` - only warning events are logged.
         * + `ERROR_ONLY` - only error events are logged.
         * + `WARN_ERROR` - both warning events and error events are logged.
         * + `DISABLED` - logging of data repository events is turned off.
         *
         * Note that Amazon File Cache uses a default setting of `WARN_ERROR`, which can't be changed.
         */
        public var level: aws.sdk.kotlin.services.fsx.model.LustreAccessAuditLogLevel? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fsx.model.LustreLogConfiguration) : this() {
            this.destination = x.destination
            this.level = x.level
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy