commonMain.aws.sdk.kotlin.services.datazone.model.Topic.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datazone-jvm Show documentation
Show all versions of datazone-jvm Show documentation
The AWS SDK for Kotlin client for DataZone
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datazone.model
/**
* The topic of the notification.
*/
public class Topic private constructor(builder: Builder) {
/**
* The details of the resource mentioned in a notification.
*/
public val resource: aws.sdk.kotlin.services.datazone.model.NotificationResource? = builder.resource
/**
* The role of the resource mentioned in a notification.
*/
public val role: aws.sdk.kotlin.services.datazone.model.NotificationRole = requireNotNull(builder.role) { "A non-null value must be provided for role" }
/**
* The subject of the resource mentioned in a notification.
*/
public val subject: kotlin.String = requireNotNull(builder.subject) { "A non-null value must be provided for subject" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datazone.model.Topic = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Topic(")
append("resource=$resource,")
append("role=$role,")
append("subject=$subject")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = resource?.hashCode() ?: 0
result = 31 * result + (role.hashCode())
result = 31 * result + (subject.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 Topic
if (resource != other.resource) return false
if (role != other.role) return false
if (subject != other.subject) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.Topic = Builder(this).apply(block).build()
public class Builder {
/**
* The details of the resource mentioned in a notification.
*/
public var resource: aws.sdk.kotlin.services.datazone.model.NotificationResource? = null
/**
* The role of the resource mentioned in a notification.
*/
public var role: aws.sdk.kotlin.services.datazone.model.NotificationRole? = null
/**
* The subject of the resource mentioned in a notification.
*/
public var subject: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datazone.model.Topic) : this() {
this.resource = x.resource
this.role = x.role
this.subject = x.subject
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datazone.model.Topic = Topic(this)
/**
* construct an [aws.sdk.kotlin.services.datazone.model.NotificationResource] inside the given [block]
*/
public fun resource(block: aws.sdk.kotlin.services.datazone.model.NotificationResource.Builder.() -> kotlin.Unit) {
this.resource = aws.sdk.kotlin.services.datazone.model.NotificationResource.invoke(block)
}
internal fun correctErrors(): Builder {
if (role == null) role = NotificationRole.SdkUnknown("no value provided")
if (subject == null) subject = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy