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

commonMain.aws.sdk.kotlin.services.appfabric.model.AuditLogProcessingConfiguration.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.appfabric.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about an audit log processing configuration.
 */
public class AuditLogProcessingConfiguration private constructor(builder: Builder) {
    /**
     * The format in which the audit logs need to be formatted.
     */
    public val format: aws.sdk.kotlin.services.appfabric.model.Format = requireNotNull(builder.format) { "A non-null value must be provided for format" }
    /**
     * The event schema in which the audit logs need to be formatted.
     */
    public val schema: aws.sdk.kotlin.services.appfabric.model.Schema = requireNotNull(builder.schema) { "A non-null value must be provided for schema" }

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

    override fun toString(): kotlin.String = buildString {
        append("AuditLogProcessingConfiguration(")
        append("format=$format,")
        append("schema=$schema")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = format.hashCode()
        result = 31 * result + (schema.hashCode())
        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 AuditLogProcessingConfiguration

        if (format != other.format) return false
        if (schema != other.schema) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The format in which the audit logs need to be formatted.
         */
        public var format: aws.sdk.kotlin.services.appfabric.model.Format? = null
        /**
         * The event schema in which the audit logs need to be formatted.
         */
        public var schema: aws.sdk.kotlin.services.appfabric.model.Schema? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appfabric.model.AuditLogProcessingConfiguration) : this() {
            this.format = x.format
            this.schema = x.schema
        }

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

        internal fun correctErrors(): Builder {
            if (format == null) format = Format.SdkUnknown("no value provided")
            if (schema == null) schema = Schema.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy