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

commonMain.aws.sdk.kotlin.services.dataexchange.model.NotificationDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Extra details specific to this notification.
 */
public class NotificationDetails private constructor(builder: Builder) {
    /**
     * Extra details specific to a data update type notification.
     */
    public val dataUpdate: aws.sdk.kotlin.services.dataexchange.model.DataUpdateRequestDetails? = builder.dataUpdate
    /**
     * Extra details specific to a deprecation type notification.
     */
    public val deprecation: aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails? = builder.deprecation
    /**
     * Extra details specific to a schema change type notification.
     */
    public val schemaChange: aws.sdk.kotlin.services.dataexchange.model.SchemaChangeRequestDetails? = builder.schemaChange

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

    override fun toString(): kotlin.String = buildString {
        append("NotificationDetails(")
        append("dataUpdate=$dataUpdate,")
        append("deprecation=$deprecation,")
        append("schemaChange=$schemaChange")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataUpdate?.hashCode() ?: 0
        result = 31 * result + (deprecation?.hashCode() ?: 0)
        result = 31 * result + (schemaChange?.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 NotificationDetails

        if (dataUpdate != other.dataUpdate) return false
        if (deprecation != other.deprecation) return false
        if (schemaChange != other.schemaChange) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Extra details specific to a data update type notification.
         */
        public var dataUpdate: aws.sdk.kotlin.services.dataexchange.model.DataUpdateRequestDetails? = null
        /**
         * Extra details specific to a deprecation type notification.
         */
        public var deprecation: aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails? = null
        /**
         * Extra details specific to a schema change type notification.
         */
        public var schemaChange: aws.sdk.kotlin.services.dataexchange.model.SchemaChangeRequestDetails? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.NotificationDetails) : this() {
            this.dataUpdate = x.dataUpdate
            this.deprecation = x.deprecation
            this.schemaChange = x.schemaChange
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy