commonMain.aws.sdk.kotlin.services.datazone.model.NotificationResource.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 details of the resource mentioned in a notification.
*/
public class NotificationResource private constructor(builder: Builder) {
/**
* The ID of the resource mentioned in a notification.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The name of the resource mentioned in a notification.
*/
public val name: kotlin.String? = builder.name
/**
* The type of the resource mentioned in a notification.
*/
public val type: aws.sdk.kotlin.services.datazone.model.NotificationResourceType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datazone.model.NotificationResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NotificationResource(")
append("id=$id,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = id.hashCode()
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (type.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 NotificationResource
if (id != other.id) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.NotificationResource = Builder(this).apply(block).build()
public class Builder {
/**
* The ID of the resource mentioned in a notification.
*/
public var id: kotlin.String? = null
/**
* The name of the resource mentioned in a notification.
*/
public var name: kotlin.String? = null
/**
* The type of the resource mentioned in a notification.
*/
public var type: aws.sdk.kotlin.services.datazone.model.NotificationResourceType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datazone.model.NotificationResource) : this() {
this.id = x.id
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datazone.model.NotificationResource = NotificationResource(this)
internal fun correctErrors(): Builder {
if (id == null) id = ""
if (type == null) type = NotificationResourceType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy