commonMain.aws.sdk.kotlin.services.deadline.model.FleetMember.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 fleet member.
*/
public class FleetMember 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 fleet ID.
*/
public val fleetId: kotlin.String = requireNotNull(builder.fleetId) { "A non-null value must be provided for fleetId" }
/**
* The identity store ID.
*/
public val identityStoreId: kotlin.String = requireNotNull(builder.identityStoreId) { "A non-null value must be provided for identityStoreId" }
/**
* The fleet 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 fleet member.
*/
public val principalId: kotlin.String = requireNotNull(builder.principalId) { "A non-null value must be provided for principalId" }
/**
* The principal type of the fleet 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.FleetMember = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FleetMember(")
append("farmId=$farmId,")
append("fleetId=$fleetId,")
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 + (fleetId.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 FleetMember
if (farmId != other.farmId) return false
if (fleetId != other.fleetId) 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.FleetMember = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The farm ID.
*/
public var farmId: kotlin.String? = null
/**
* The fleet ID.
*/
public var fleetId: kotlin.String? = null
/**
* The identity store ID.
*/
public var identityStoreId: kotlin.String? = null
/**
* The fleet member's membership level.
*/
public var membershipLevel: aws.sdk.kotlin.services.deadline.model.MembershipLevel? = null
/**
* The principal ID of the fleet member.
*/
public var principalId: kotlin.String? = null
/**
* The principal type of the fleet 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.FleetMember) : this() {
this.farmId = x.farmId
this.fleetId = x.fleetId
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.FleetMember = FleetMember(this)
internal fun correctErrors(): Builder {
if (farmId == null) farmId = ""
if (fleetId == null) fleetId = ""
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
}
}
}