commonMain.aws.sdk.kotlin.services.kinesisvideo.model.NotificationConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesisvideo-jvm Show documentation
Show all versions of kinesisvideo-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis Video
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisvideo.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The structure that contains the notification information for the KVS images delivery. If this parameter is null, the configuration will be deleted from the stream.
*/
public class NotificationConfiguration private constructor(builder: Builder) {
/**
* The destination information required to deliver a notification to a customer.
*/
public val destinationConfig: aws.sdk.kotlin.services.kinesisvideo.model.NotificationDestinationConfig? = builder.destinationConfig
/**
* Indicates if a notification configuration is enabled or disabled.
*/
public val status: aws.sdk.kotlin.services.kinesisvideo.model.ConfigurationStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.NotificationConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NotificationConfiguration(")
append("destinationConfig=$destinationConfig,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = destinationConfig?.hashCode() ?: 0
result = 31 * result + (status.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 NotificationConfiguration
if (destinationConfig != other.destinationConfig) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.NotificationConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The destination information required to deliver a notification to a customer.
*/
public var destinationConfig: aws.sdk.kotlin.services.kinesisvideo.model.NotificationDestinationConfig? = null
/**
* Indicates if a notification configuration is enabled or disabled.
*/
public var status: aws.sdk.kotlin.services.kinesisvideo.model.ConfigurationStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.NotificationConfiguration) : this() {
this.destinationConfig = x.destinationConfig
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.NotificationConfiguration = NotificationConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.kinesisvideo.model.NotificationDestinationConfig] inside the given [block]
*/
public fun destinationConfig(block: aws.sdk.kotlin.services.kinesisvideo.model.NotificationDestinationConfig.Builder.() -> kotlin.Unit) {
this.destinationConfig = aws.sdk.kotlin.services.kinesisvideo.model.NotificationDestinationConfig.invoke(block)
}
internal fun correctErrors(): Builder {
if (status == null) status = ConfigurationStatus.SdkUnknown("no value provided")
return this
}
}
}