commonMain.aws.sdk.kotlin.services.deadline.model.FleetSummary.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* The details of a fleet.
*/
public class FleetSummary private constructor(builder: Builder) {
/**
* The Auto Scaling status of a fleet.
*/
public val autoScalingStatus: aws.sdk.kotlin.services.deadline.model.AutoScalingStatus? = builder.autoScalingStatus
/**
* The configuration details for the fleet.
*/
public val configuration: aws.sdk.kotlin.services.deadline.model.FleetConfiguration? = builder.configuration
/**
* The date and time the resource was created.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* The user or system that created this resource.
*/
public val createdBy: kotlin.String = requireNotNull(builder.createdBy) { "A non-null value must be provided for createdBy" }
/**
* The display name of the fleet summary to update.
*
* This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
*/
public val displayName: kotlin.String = requireNotNull(builder.displayName) { "A non-null value must be provided for displayName" }
/**
* 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 maximum number of workers specified in the fleet.
*/
public val maxWorkerCount: kotlin.Int = requireNotNull(builder.maxWorkerCount) { "A non-null value must be provided for maxWorkerCount" }
/**
* The minimum number of workers in the fleet.
*/
public val minWorkerCount: kotlin.Int = requireNotNull(builder.minWorkerCount) { "A non-null value must be provided for minWorkerCount" }
/**
* The status of the fleet.
*/
public val status: aws.sdk.kotlin.services.deadline.model.FleetStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The target number of workers in a fleet.
*/
public val targetWorkerCount: kotlin.Int? = builder.targetWorkerCount
/**
* The date and time the resource was updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
/**
* The user or system that updated this resource.
*/
public val updatedBy: kotlin.String? = builder.updatedBy
/**
* The number of workers in the fleet summary.
*/
public val workerCount: kotlin.Int = requireNotNull(builder.workerCount) { "A non-null value must be provided for workerCount" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.FleetSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FleetSummary(")
append("autoScalingStatus=$autoScalingStatus,")
append("configuration=$configuration,")
append("createdAt=$createdAt,")
append("createdBy=$createdBy,")
append("displayName=$displayName,")
append("farmId=$farmId,")
append("fleetId=$fleetId,")
append("maxWorkerCount=$maxWorkerCount,")
append("minWorkerCount=$minWorkerCount,")
append("status=$status,")
append("targetWorkerCount=$targetWorkerCount,")
append("updatedAt=$updatedAt,")
append("updatedBy=$updatedBy,")
append("workerCount=$workerCount")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = autoScalingStatus?.hashCode() ?: 0
result = 31 * result + (configuration?.hashCode() ?: 0)
result = 31 * result + (createdAt.hashCode())
result = 31 * result + (createdBy.hashCode())
result = 31 * result + (displayName.hashCode())
result = 31 * result + (farmId.hashCode())
result = 31 * result + (fleetId.hashCode())
result = 31 * result + (maxWorkerCount)
result = 31 * result + (minWorkerCount)
result = 31 * result + (status.hashCode())
result = 31 * result + (targetWorkerCount ?: 0)
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.hashCode() ?: 0)
result = 31 * result + (workerCount)
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 FleetSummary
if (autoScalingStatus != other.autoScalingStatus) return false
if (configuration != other.configuration) return false
if (createdAt != other.createdAt) return false
if (createdBy != other.createdBy) return false
if (displayName != other.displayName) return false
if (farmId != other.farmId) return false
if (fleetId != other.fleetId) return false
if (maxWorkerCount != other.maxWorkerCount) return false
if (minWorkerCount != other.minWorkerCount) return false
if (status != other.status) return false
if (targetWorkerCount != other.targetWorkerCount) return false
if (updatedAt != other.updatedAt) return false
if (updatedBy != other.updatedBy) return false
if (workerCount != other.workerCount) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.FleetSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Auto Scaling status of a fleet.
*/
public var autoScalingStatus: aws.sdk.kotlin.services.deadline.model.AutoScalingStatus? = null
/**
* The configuration details for the fleet.
*/
public var configuration: aws.sdk.kotlin.services.deadline.model.FleetConfiguration? = null
/**
* The date and time the resource was created.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that created this resource.
*/
public var createdBy: kotlin.String? = null
/**
* The display name of the fleet summary to update.
*
* This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
*/
public var displayName: kotlin.String? = null
/**
* The farm ID.
*/
public var farmId: kotlin.String? = null
/**
* The fleet ID.
*/
public var fleetId: kotlin.String? = null
/**
* The maximum number of workers specified in the fleet.
*/
public var maxWorkerCount: kotlin.Int? = null
/**
* The minimum number of workers in the fleet.
*/
public var minWorkerCount: kotlin.Int? = null
/**
* The status of the fleet.
*/
public var status: aws.sdk.kotlin.services.deadline.model.FleetStatus? = null
/**
* The target number of workers in a fleet.
*/
public var targetWorkerCount: kotlin.Int? = null
/**
* The date and time the resource was updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that updated this resource.
*/
public var updatedBy: kotlin.String? = null
/**
* The number of workers in the fleet summary.
*/
public var workerCount: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.FleetSummary) : this() {
this.autoScalingStatus = x.autoScalingStatus
this.configuration = x.configuration
this.createdAt = x.createdAt
this.createdBy = x.createdBy
this.displayName = x.displayName
this.farmId = x.farmId
this.fleetId = x.fleetId
this.maxWorkerCount = x.maxWorkerCount
this.minWorkerCount = x.minWorkerCount
this.status = x.status
this.targetWorkerCount = x.targetWorkerCount
this.updatedAt = x.updatedAt
this.updatedBy = x.updatedBy
this.workerCount = x.workerCount
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.FleetSummary = FleetSummary(this)
internal fun correctErrors(): Builder {
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (createdBy == null) createdBy = ""
if (displayName == null) displayName = ""
if (farmId == null) farmId = ""
if (fleetId == null) fleetId = ""
if (maxWorkerCount == null) maxWorkerCount = 0
if (minWorkerCount == null) minWorkerCount = 0
if (status == null) status = FleetStatus.SdkUnknown("no value provided")
if (workerCount == null) workerCount = 0
return this
}
}
}