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

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

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

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



public class PutUserPermissionsBoundaryRequest private constructor(builder: Builder) {
    /**
     * The ARN of the managed policy that is used to set the permissions boundary for the user.
     *
     * A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
     *
     * For more information about policy types, see [Policy types ](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) in the *IAM User Guide*.
     */
    public val permissionsBoundary: kotlin.String? = builder.permissionsBoundary
    /**
     * The name (friendly name, not ARN) of the IAM user for which you want to set the permissions boundary.
     */
    public val userName: kotlin.String? = builder.userName

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

    override fun toString(): kotlin.String = buildString {
        append("PutUserPermissionsBoundaryRequest(")
        append("permissionsBoundary=$permissionsBoundary,")
        append("userName=$userName")
        append(")")
    }

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

        if (permissionsBoundary != other.permissionsBoundary) return false
        if (userName != other.userName) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the managed policy that is used to set the permissions boundary for the user.
         *
         * A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
         *
         * For more information about policy types, see [Policy types ](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) in the *IAM User Guide*.
         */
        public var permissionsBoundary: kotlin.String? = null
        /**
         * The name (friendly name, not ARN) of the IAM user for which you want to set the permissions boundary.
         */
        public var userName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.PutUserPermissionsBoundaryRequest) : this() {
            this.permissionsBoundary = x.permissionsBoundary
            this.userName = x.userName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy