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

aws.sdk.kotlin.services.sagemaker.model.AsyncInferenceNotificationConfig.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sagemaker.model



/**
 * Specifies the configuration for notifications of inference results for asynchronous inference.
 */
class AsyncInferenceNotificationConfig private constructor(builder: Builder) {
    /**
     * Amazon SNS topic to post a notification to when inference fails.
     * If no topic is provided, no notification is sent on failure.
     */
    val errorTopic: kotlin.String? = builder.errorTopic
    /**
     * Amazon SNS topic to post a notification to when inference completes successfully.
     * If no topic is provided, no notification is sent on success.
     */
    val successTopic: kotlin.String? = builder.successTopic

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

    override fun toString(): kotlin.String = buildString {
        append("AsyncInferenceNotificationConfig(")
        append("errorTopic=$errorTopic,")
        append("successTopic=$successTopic)")
    }

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

        if (errorTopic != other.errorTopic) return false
        if (successTopic != other.successTopic) return false

        return true
    }

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

    class Builder {
        /**
         * Amazon SNS topic to post a notification to when inference fails.
         * If no topic is provided, no notification is sent on failure.
         */
        var errorTopic: kotlin.String? = null
        /**
         * Amazon SNS topic to post a notification to when inference completes successfully.
         * If no topic is provided, no notification is sent on success.
         */
        var successTopic: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sagemaker.model.AsyncInferenceNotificationConfig) : this() {
            this.errorTopic = x.errorTopic
            this.successTopic = x.successTopic
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.sagemaker.model.AsyncInferenceNotificationConfig = AsyncInferenceNotificationConfig(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy