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

commonMain.aws.sdk.kotlin.services.appstream.model.ImagePermissions.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appstream.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the permissions for an image.
 */
public class ImagePermissions private constructor(builder: Builder) {
    /**
     * Indicates whether the image can be used for a fleet.
     */
    public val allowFleet: kotlin.Boolean? = builder.allowFleet
    /**
     * Indicates whether the image can be used for an image builder.
     */
    public val allowImageBuilder: kotlin.Boolean? = builder.allowImageBuilder

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

    override fun toString(): kotlin.String = buildString {
        append("ImagePermissions(")
        append("allowFleet=$allowFleet,")
        append("allowImageBuilder=$allowImageBuilder")
        append(")")
    }

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

        if (allowFleet != other.allowFleet) return false
        if (allowImageBuilder != other.allowImageBuilder) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates whether the image can be used for a fleet.
         */
        public var allowFleet: kotlin.Boolean? = null
        /**
         * Indicates whether the image can be used for an image builder.
         */
        public var allowImageBuilder: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appstream.model.ImagePermissions) : this() {
            this.allowFleet = x.allowFleet
            this.allowImageBuilder = x.allowImageBuilder
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy