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

commonMain.aws.sdk.kotlin.services.transfer.model.LoggingConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.transfer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Consists of the logging role and the log group name.
 */
public class LoggingConfiguration private constructor(builder: Builder) {
    /**
     * The name of the CloudWatch logging group for the Transfer Family server to which this workflow belongs.
     */
    public val logGroupName: kotlin.String? = builder.logGroupName
    /**
     * The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFSevents. When set, you can view user activity in your CloudWatch logs.
     */
    public val loggingRole: kotlin.String? = builder.loggingRole

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

    override fun toString(): kotlin.String = buildString {
        append("LoggingConfiguration(")
        append("logGroupName=$logGroupName,")
        append("loggingRole=$loggingRole")
        append(")")
    }

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

        if (logGroupName != other.logGroupName) return false
        if (loggingRole != other.loggingRole) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the CloudWatch logging group for the Transfer Family server to which this workflow belongs.
         */
        public var logGroupName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFSevents. When set, you can view user activity in your CloudWatch logs.
         */
        public var loggingRole: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.LoggingConfiguration) : this() {
            this.logGroupName = x.logGroupName
            this.loggingRole = x.loggingRole
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy