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

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

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

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



/**
 * Contains information about a group that a managed policy is attached to.
 *
 * This data type is used as a response element in the ListEntitiesForPolicy operation.
 *
 * For more information about managed policies, refer to [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.
 */
public class PolicyGroup private constructor(builder: Builder) {
    /**
     * The stable and unique string identifying the group. For more information about IDs, see [IAM identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) in the *IAM User Guide*.
     */
    public val groupId: kotlin.String? = builder.groupId
    /**
     * The name (friendly name, not ARN) identifying the group.
     */
    public val groupName: kotlin.String? = builder.groupName

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

    override fun toString(): kotlin.String = buildString {
        append("PolicyGroup(")
        append("groupId=$groupId,")
        append("groupName=$groupName")
        append(")")
    }

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

        if (groupId != other.groupId) return false
        if (groupName != other.groupName) return false

        return true
    }

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

    public class Builder {
        /**
         * The stable and unique string identifying the group. For more information about IDs, see [IAM identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) in the *IAM User Guide*.
         */
        public var groupId: kotlin.String? = null
        /**
         * The name (friendly name, not ARN) identifying the group.
         */
        public var groupName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.PolicyGroup) : this() {
            this.groupId = x.groupId
            this.groupName = x.groupName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy