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

commonMain.aws.sdk.kotlin.services.qbusiness.model.GroupMembers.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qbusiness.model



/**
 * A list of users or sub groups that belong to a group. This is for generating Amazon Q Business chat results only from document a user has access to.
 */
public class GroupMembers private constructor(builder: Builder) {
    /**
     * A list of sub groups that belong to a group. For example, the sub groups "Research", "Engineering", and "Sales and Marketing" all belong to the group "Company".
     */
    public val memberGroups: List? = builder.memberGroups
    /**
     * A list of users that belong to a group. For example, a list of interns all belong to the "Interns" group.
     */
    public val memberUsers: List? = builder.memberUsers

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

    override fun toString(): kotlin.String = buildString {
        append("GroupMembers(")
        append("memberGroups=$memberGroups,")
        append("memberUsers=$memberUsers")
        append(")")
    }

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

        if (memberGroups != other.memberGroups) return false
        if (memberUsers != other.memberUsers) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of sub groups that belong to a group. For example, the sub groups "Research", "Engineering", and "Sales and Marketing" all belong to the group "Company".
         */
        public var memberGroups: List? = null
        /**
         * A list of users that belong to a group. For example, a list of interns all belong to the "Interns" group.
         */
        public var memberUsers: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.GroupMembers) : this() {
            this.memberGroups = x.memberGroups
            this.memberUsers = x.memberUsers
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy