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

commonMain.aws.sdk.kotlin.services.qapps.model.UpdateQAppPermissionsRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qapps.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateQAppPermissionsRequest private constructor(builder: Builder) {
    /**
     * The unique identifier of the Amazon Q App for which permissions are being updated.
     */
    public val appId: kotlin.String? = builder.appId
    /**
     * The list of permissions to grant for the Amazon Q App.
     */
    public val grantPermissions: List? = builder.grantPermissions
    /**
     * The unique identifier of the Amazon Q Business application environment instance.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * The list of permissions to revoke for the Amazon Q App.
     */
    public val revokePermissions: List? = builder.revokePermissions

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateQAppPermissionsRequest(")
        append("appId=$appId,")
        append("grantPermissions=$grantPermissions,")
        append("instanceId=$instanceId,")
        append("revokePermissions=$revokePermissions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appId?.hashCode() ?: 0
        result = 31 * result + (grantPermissions?.hashCode() ?: 0)
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (revokePermissions?.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 UpdateQAppPermissionsRequest

        if (appId != other.appId) return false
        if (grantPermissions != other.grantPermissions) return false
        if (instanceId != other.instanceId) return false
        if (revokePermissions != other.revokePermissions) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier of the Amazon Q App for which permissions are being updated.
         */
        public var appId: kotlin.String? = null
        /**
         * The list of permissions to grant for the Amazon Q App.
         */
        public var grantPermissions: List? = null
        /**
         * The unique identifier of the Amazon Q Business application environment instance.
         */
        public var instanceId: kotlin.String? = null
        /**
         * The list of permissions to revoke for the Amazon Q App.
         */
        public var revokePermissions: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qapps.model.UpdateQAppPermissionsRequest) : this() {
            this.appId = x.appId
            this.grantPermissions = x.grantPermissions
            this.instanceId = x.instanceId
            this.revokePermissions = x.revokePermissions
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy