commonMain.aws.sdk.kotlin.services.deadline.model.QueueMember.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The details of a queue member.
*/
public class QueueMember 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 queue 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 queue member.
*/
public val principalId: kotlin.String = requireNotNull(builder.principalId) { "A non-null value must be provided for principalId" }
/**
* The principal type of the queue 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.QueueMember = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("QueueMember(")
append("farmId=$farmId,")
append("identityStoreId=$identityStoreId,")
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 + (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 QueueMember
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
if (queueId != other.queueId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.QueueMember = 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 queue member's membership level.
*/
public var membershipLevel: aws.sdk.kotlin.services.deadline.model.MembershipLevel? = null
/**
* The principal ID of the queue member.
*/
public var principalId: kotlin.String? = null
/**
* The principal type of the queue 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.QueueMember) : this() {
this.farmId = x.farmId
this.identityStoreId = x.identityStoreId
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.QueueMember = QueueMember(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")
if (queueId == null) queueId = ""
return this
}
}
}