
commonMain.aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsResponseItem.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A list of items that represent RelatedItems.
*/
public class SearchRelatedItemsResponseItem private constructor(builder: Builder) {
/**
* Time at which a related item was associated with a case.
*/
public val associationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.associationTime) { "A non-null value must be provided for associationTime" }
/**
* Represents the content of a particular type of related item.
*/
public val content: aws.sdk.kotlin.services.connectcases.model.RelatedItemContent? = builder.content
/**
* Represents the creator of the related item.
*/
public val performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = builder.performedBy
/**
* Unique identifier of a related item.
*/
public val relatedItemId: kotlin.String = requireNotNull(builder.relatedItemId) { "A non-null value must be provided for relatedItemId" }
/**
* A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
*/
public val tags: Map? = builder.tags
/**
* Type of a related item.
*/
public val type: aws.sdk.kotlin.services.connectcases.model.RelatedItemType = 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.connectcases.model.SearchRelatedItemsResponseItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SearchRelatedItemsResponseItem(")
append("associationTime=$associationTime,")
append("content=$content,")
append("performedBy=$performedBy,")
append("relatedItemId=$relatedItemId,")
append("tags=$tags,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = associationTime.hashCode()
result = 31 * result + (content?.hashCode() ?: 0)
result = 31 * result + (performedBy?.hashCode() ?: 0)
result = 31 * result + (relatedItemId.hashCode())
result = 31 * result + (tags?.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 SearchRelatedItemsResponseItem
if (associationTime != other.associationTime) return false
if (content != other.content) return false
if (performedBy != other.performedBy) return false
if (relatedItemId != other.relatedItemId) return false
if (tags != other.tags) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsResponseItem = Builder(this).apply(block).build()
public class Builder {
/**
* Time at which a related item was associated with a case.
*/
public var associationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Represents the content of a particular type of related item.
*/
public var content: aws.sdk.kotlin.services.connectcases.model.RelatedItemContent? = null
/**
* Represents the creator of the related item.
*/
public var performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = null
/**
* Unique identifier of a related item.
*/
public var relatedItemId: kotlin.String? = null
/**
* A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
*/
public var tags: Map? = null
/**
* Type of a related item.
*/
public var type: aws.sdk.kotlin.services.connectcases.model.RelatedItemType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsResponseItem) : this() {
this.associationTime = x.associationTime
this.content = x.content
this.performedBy = x.performedBy
this.relatedItemId = x.relatedItemId
this.tags = x.tags
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsResponseItem = SearchRelatedItemsResponseItem(this)
internal fun correctErrors(): Builder {
if (associationTime == null) associationTime = Instant.fromEpochSeconds(0)
if (relatedItemId == null) relatedItemId = ""
if (type == null) type = RelatedItemType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy