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

commonMain.aws.sdk.kotlin.services.deadline.model.JobMember.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 details for a job member.
 */
public class JobMember private constructor(builder: Builder) {
    /**
     * The farm ID.
     */
    public val farmId: kotlin.String = requireNotNull(builder.farmId) { "A non-null value must be provided for farmId" }
    /**
     * The identity store ID.
     */
    public val identityStoreId: kotlin.String = requireNotNull(builder.identityStoreId) { "A non-null value must be provided for identityStoreId" }
    /**
     * The job ID.
     */
    public val jobId: kotlin.String = requireNotNull(builder.jobId) { "A non-null value must be provided for jobId" }
    /**
     * The job 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 job member.
     */
    public val principalId: kotlin.String = requireNotNull(builder.principalId) { "A non-null value must be provided for principalId" }
    /**
     * The principal type of the job member.
     */
    public val principalType: aws.sdk.kotlin.services.deadline.model.DeadlinePrincipalType = requireNotNull(builder.principalType) { "A non-null value must be provided for principalType" }
    /**
     * The queue ID.
     */
    public val queueId: kotlin.String = requireNotNull(builder.queueId) { "A non-null value must be provided for queueId" }

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

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

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

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

        return true
    }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy