All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.chimesdkmeetings.model.CreateAttendeeRequestItem.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.chimesdkmeetings.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The Amazon Chime SDK attendee fields to create, used with the BatchCreateAttendee action.
 */
public class CreateAttendeeRequestItem private constructor(builder: Builder) {
    /**
     * A list of one or more capabilities.
     */
    public val capabilities: aws.sdk.kotlin.services.chimesdkmeetings.model.AttendeeCapabilities? = builder.capabilities
    /**
     * The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.
     *
     * Pattern: `[-_&@+=,(){}\[\]\/«».:|'"#a-zA-Z0-9À-ÿ\s]*`
     *
     * Values that begin with `aws:` are reserved. You can't configure a value that uses this prefix. Case insensitive.
     */
    public val externalUserId: kotlin.String = requireNotNull(builder.externalUserId) { "A non-null value must be provided for externalUserId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmeetings.model.CreateAttendeeRequestItem = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateAttendeeRequestItem(")
        append("capabilities=$capabilities,")
        append("externalUserId=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = capabilities?.hashCode() ?: 0
        result = 31 * result + (externalUserId.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 CreateAttendeeRequestItem

        if (capabilities != other.capabilities) return false
        if (externalUserId != other.externalUserId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmeetings.model.CreateAttendeeRequestItem = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A list of one or more capabilities.
         */
        public var capabilities: aws.sdk.kotlin.services.chimesdkmeetings.model.AttendeeCapabilities? = null
        /**
         * The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.
         *
         * Pattern: `[-_&@+=,(){}\[\]\/«».:|'"#a-zA-Z0-9À-ÿ\s]*`
         *
         * Values that begin with `aws:` are reserved. You can't configure a value that uses this prefix. Case insensitive.
         */
        public var externalUserId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmeetings.model.CreateAttendeeRequestItem) : this() {
            this.capabilities = x.capabilities
            this.externalUserId = x.externalUserId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.chimesdkmeetings.model.CreateAttendeeRequestItem = CreateAttendeeRequestItem(this)

        /**
         * construct an [aws.sdk.kotlin.services.chimesdkmeetings.model.AttendeeCapabilities] inside the given [block]
         */
        public fun capabilities(block: aws.sdk.kotlin.services.chimesdkmeetings.model.AttendeeCapabilities.Builder.() -> kotlin.Unit) {
            this.capabilities = aws.sdk.kotlin.services.chimesdkmeetings.model.AttendeeCapabilities.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (externalUserId == null) externalUserId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy