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

commonMain.aws.sdk.kotlin.services.datazone.model.PolicyGrantMember.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.datazone.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * A member of the policy grant list.
 */
public class PolicyGrantMember private constructor(builder: Builder) {
    /**
     * Specifies the timestamp at which policy grant member was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * Specifies the user who created the policy grant member.
     */
    public val createdBy: kotlin.String? = builder.createdBy
    /**
     * The details of the policy grant member.
     */
    public val detail: aws.sdk.kotlin.services.datazone.model.PolicyGrantDetail? = builder.detail
    /**
     * The principal of the policy grant member.
     */
    public val principal: aws.sdk.kotlin.services.datazone.model.PolicyGrantPrincipal? = builder.principal

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

    override fun toString(): kotlin.String = buildString {
        append("PolicyGrantMember(")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("detail=$detail,")
        append("principal=$principal")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (detail?.hashCode() ?: 0)
        result = 31 * result + (principal?.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 PolicyGrantMember

        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (detail != other.detail) return false
        if (principal != other.principal) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the timestamp at which policy grant member was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Specifies the user who created the policy grant member.
         */
        public var createdBy: kotlin.String? = null
        /**
         * The details of the policy grant member.
         */
        public var detail: aws.sdk.kotlin.services.datazone.model.PolicyGrantDetail? = null
        /**
         * The principal of the policy grant member.
         */
        public var principal: aws.sdk.kotlin.services.datazone.model.PolicyGrantPrincipal? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.PolicyGrantMember) : this() {
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.detail = x.detail
            this.principal = x.principal
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy