
commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelModerator.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmessaging.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* The details of a channel moderator.
*/
public class ChannelModerator private constructor(builder: Builder) {
/**
* The ARN of the moderator's channel.
*/
public val channelArn: kotlin.String? = builder.channelArn
/**
* The `AppInstanceUser` who created the moderator.
*/
public val createdBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = builder.createdBy
/**
* The time at which the moderator was created.
*/
public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.createdTimestamp
/**
* The moderator's data.
*/
public val moderator: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = builder.moderator
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelModerator = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ChannelModerator(")
append("channelArn=$channelArn,")
append("createdBy=$createdBy,")
append("createdTimestamp=$createdTimestamp,")
append("moderator=$moderator")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = channelArn?.hashCode() ?: 0
result = 31 * result + (createdBy?.hashCode() ?: 0)
result = 31 * result + (createdTimestamp?.hashCode() ?: 0)
result = 31 * result + (moderator?.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 ChannelModerator
if (channelArn != other.channelArn) return false
if (createdBy != other.createdBy) return false
if (createdTimestamp != other.createdTimestamp) return false
if (moderator != other.moderator) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelModerator = Builder(this).apply(block).build()
public class Builder {
/**
* The ARN of the moderator's channel.
*/
public var channelArn: kotlin.String? = null
/**
* The `AppInstanceUser` who created the moderator.
*/
public var createdBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = null
/**
* The time at which the moderator was created.
*/
public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The moderator's data.
*/
public var moderator: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelModerator) : this() {
this.channelArn = x.channelArn
this.createdBy = x.createdBy
this.createdTimestamp = x.createdTimestamp
this.moderator = x.moderator
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelModerator = ChannelModerator(this)
/**
* construct an [aws.sdk.kotlin.services.chimesdkmessaging.model.Identity] inside the given [block]
*/
public fun createdBy(block: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.Builder.() -> kotlin.Unit) {
this.createdBy = aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.chimesdkmessaging.model.Identity] inside the given [block]
*/
public fun moderator(block: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.Builder.() -> kotlin.Unit) {
this.moderator = aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy