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

commonMain.aws.sdk.kotlin.services.iot.model.Denied.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



/**
 * Contains information that denied the authorization.
 */
public class Denied private constructor(builder: Builder) {
    /**
     * Information that explicitly denies the authorization.
     */
    public val explicitDeny: aws.sdk.kotlin.services.iot.model.ExplicitDeny? = builder.explicitDeny
    /**
     * Information that implicitly denies the authorization. When a policy doesn't explicitly deny or allow an action on a resource it is considered an implicit deny.
     */
    public val implicitDeny: aws.sdk.kotlin.services.iot.model.ImplicitDeny? = builder.implicitDeny

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

    override fun toString(): kotlin.String = buildString {
        append("Denied(")
        append("explicitDeny=$explicitDeny,")
        append("implicitDeny=$implicitDeny")
        append(")")
    }

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

        if (explicitDeny != other.explicitDeny) return false
        if (implicitDeny != other.implicitDeny) return false

        return true
    }

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

    public class Builder {
        /**
         * Information that explicitly denies the authorization.
         */
        public var explicitDeny: aws.sdk.kotlin.services.iot.model.ExplicitDeny? = null
        /**
         * Information that implicitly denies the authorization. When a policy doesn't explicitly deny or allow an action on a resource it is considered an implicit deny.
         */
        public var implicitDeny: aws.sdk.kotlin.services.iot.model.ImplicitDeny? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.Denied) : this() {
            this.explicitDeny = x.explicitDeny
            this.implicitDeny = x.implicitDeny
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy