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

commonMain.aws.sdk.kotlin.services.iam.model.PermissionsBoundaryDecisionDetail.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iam.model



/**
 * Contains information about the effect that a permissions boundary has on a policy simulation when the boundary is applied to an IAM entity.
 */
public class PermissionsBoundaryDecisionDetail private constructor(builder: Builder) {
    /**
     * Specifies whether an action is allowed by a permissions boundary that is applied to an IAM entity (user or role). A value of `true` means that the permissions boundary does not deny the action. This means that the policy includes an `Allow` statement that matches the request. In this case, if an identity-based policy also allows the action, the request is allowed. A value of `false` means that either the requested action is not allowed (implicitly denied) or that the action is explicitly denied by the permissions boundary. In both of these cases, the action is not allowed, regardless of the identity-based policy.
     */
    public val allowedByPermissionsBoundary: kotlin.Boolean = builder.allowedByPermissionsBoundary

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

    override fun toString(): kotlin.String = buildString {
        append("PermissionsBoundaryDecisionDetail(")
        append("allowedByPermissionsBoundary=$allowedByPermissionsBoundary")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allowedByPermissionsBoundary.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 PermissionsBoundaryDecisionDetail

        if (allowedByPermissionsBoundary != other.allowedByPermissionsBoundary) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies whether an action is allowed by a permissions boundary that is applied to an IAM entity (user or role). A value of `true` means that the permissions boundary does not deny the action. This means that the policy includes an `Allow` statement that matches the request. In this case, if an identity-based policy also allows the action, the request is allowed. A value of `false` means that either the requested action is not allowed (implicitly denied) or that the action is explicitly denied by the permissions boundary. In both of these cases, the action is not allowed, regardless of the identity-based policy.
         */
        public var allowedByPermissionsBoundary: kotlin.Boolean = false

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.PermissionsBoundaryDecisionDetail) : this() {
            this.allowedByPermissionsBoundary = x.allowedByPermissionsBoundary
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy