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

commonMain.aws.sdk.kotlin.services.deadline.model.FarmMember.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.deadline.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The member of a farm.
 */
public class FarmMember private constructor(builder: Builder) {
    /**
     * The farm ID of the farm member.
     */
    public val farmId: kotlin.String = requireNotNull(builder.farmId) { "A non-null value must be provided for farmId" }
    /**
     * The identity store ID of the farm member.
     */
    public val identityStoreId: kotlin.String = requireNotNull(builder.identityStoreId) { "A non-null value must be provided for identityStoreId" }
    /**
     * The farm member's membership level.
     */
    public val membershipLevel: aws.sdk.kotlin.services.deadline.model.MembershipLevel = requireNotNull(builder.membershipLevel) { "A non-null value must be provided for membershipLevel" }
    /**
     * The principal ID of the farm member.
     */
    public val principalId: kotlin.String = requireNotNull(builder.principalId) { "A non-null value must be provided for principalId" }
    /**
     * The principal type of the farm member.
     */
    public val principalType: aws.sdk.kotlin.services.deadline.model.DeadlinePrincipalType = requireNotNull(builder.principalType) { "A non-null value must be provided for principalType" }

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

    override fun toString(): kotlin.String = buildString {
        append("FarmMember(")
        append("farmId=$farmId,")
        append("identityStoreId=$identityStoreId,")
        append("membershipLevel=$membershipLevel,")
        append("principalId=$principalId,")
        append("principalType=$principalType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = farmId.hashCode()
        result = 31 * result + (identityStoreId.hashCode())
        result = 31 * result + (membershipLevel.hashCode())
        result = 31 * result + (principalId.hashCode())
        result = 31 * result + (principalType.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 FarmMember

        if (farmId != other.farmId) return false
        if (identityStoreId != other.identityStoreId) return false
        if (membershipLevel != other.membershipLevel) return false
        if (principalId != other.principalId) return false
        if (principalType != other.principalType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The farm ID of the farm member.
         */
        public var farmId: kotlin.String? = null
        /**
         * The identity store ID of the farm member.
         */
        public var identityStoreId: kotlin.String? = null
        /**
         * The farm member's membership level.
         */
        public var membershipLevel: aws.sdk.kotlin.services.deadline.model.MembershipLevel? = null
        /**
         * The principal ID of the farm member.
         */
        public var principalId: kotlin.String? = null
        /**
         * The principal type of the farm member.
         */
        public var principalType: aws.sdk.kotlin.services.deadline.model.DeadlinePrincipalType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.FarmMember) : this() {
            this.farmId = x.farmId
            this.identityStoreId = x.identityStoreId
            this.membershipLevel = x.membershipLevel
            this.principalId = x.principalId
            this.principalType = x.principalType
        }

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

        internal fun correctErrors(): Builder {
            if (farmId == null) farmId = ""
            if (identityStoreId == null) identityStoreId = ""
            if (membershipLevel == null) membershipLevel = MembershipLevel.SdkUnknown("no value provided")
            if (principalId == null) principalId = ""
            if (principalType == null) principalType = DeadlinePrincipalType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy