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

commonMain.aws.sdk.kotlin.services.deadline.model.GetFleetResponse.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
import aws.smithy.kotlin.runtime.time.Instant

public class GetFleetResponse private constructor(builder: Builder) {
    /**
     * The Auto Scaling status of the fleet. Either `GROWING`, `STEADY`, or `SHRINKING`.
     */
    public val autoScalingStatus: aws.sdk.kotlin.services.deadline.model.AutoScalingStatus? = builder.autoScalingStatus
    /**
     * Outlines what the fleet is capable of for minimums, maximums, and naming, in addition to attribute names and values.
     */
    public val capabilities: aws.sdk.kotlin.services.deadline.model.FleetCapabilities? = builder.capabilities
    /**
     * The configuration setting 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 description of the fleet.
     *
     * 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 description: kotlin.String? = builder.description
    /**
     * The display name of the fleet.
     *
     * 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 of the farm in the fleet.
     */
    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 specified in the fleet.
     */
    public val minWorkerCount: kotlin.Int = requireNotNull(builder.minWorkerCount) { "A non-null value must be provided for minWorkerCount" }
    /**
     * The IAM role ARN.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
    /**
     * The Auto Scaling 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 number of target workers in the 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.
     */
    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.GetFleetResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetFleetResponse(")
        append("autoScalingStatus=$autoScalingStatus,")
        append("capabilities=$capabilities,")
        append("configuration=$configuration,")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("description=*** Sensitive Data Redacted ***,")
        append("displayName=$displayName,")
        append("farmId=$farmId,")
        append("fleetId=$fleetId,")
        append("maxWorkerCount=$maxWorkerCount,")
        append("minWorkerCount=$minWorkerCount,")
        append("roleArn=$roleArn,")
        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 + (capabilities?.hashCode() ?: 0)
        result = 31 * result + (configuration?.hashCode() ?: 0)
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (createdBy.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        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 + (roleArn.hashCode())
        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 GetFleetResponse

        if (autoScalingStatus != other.autoScalingStatus) return false
        if (capabilities != other.capabilities) return false
        if (configuration != other.configuration) return false
        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (description != other.description) 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 (roleArn != other.roleArn) 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.GetFleetResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Auto Scaling status of the fleet. Either `GROWING`, `STEADY`, or `SHRINKING`.
         */
        public var autoScalingStatus: aws.sdk.kotlin.services.deadline.model.AutoScalingStatus? = null
        /**
         * Outlines what the fleet is capable of for minimums, maximums, and naming, in addition to attribute names and values.
         */
        public var capabilities: aws.sdk.kotlin.services.deadline.model.FleetCapabilities? = null
        /**
         * The configuration setting 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 description of the fleet.
         *
         * 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 description: kotlin.String? = null
        /**
         * The display name of the fleet.
         *
         * 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 of the farm in the fleet.
         */
        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 specified in the fleet.
         */
        public var minWorkerCount: kotlin.Int? = null
        /**
         * The IAM role ARN.
         */
        public var roleArn: kotlin.String? = null
        /**
         * The Auto Scaling status of the fleet.
         */
        public var status: aws.sdk.kotlin.services.deadline.model.FleetStatus? = null
        /**
         * The number of target workers in the 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.
         */
        public var workerCount: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.GetFleetResponse) : this() {
            this.autoScalingStatus = x.autoScalingStatus
            this.capabilities = x.capabilities
            this.configuration = x.configuration
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.description = x.description
            this.displayName = x.displayName
            this.farmId = x.farmId
            this.fleetId = x.fleetId
            this.maxWorkerCount = x.maxWorkerCount
            this.minWorkerCount = x.minWorkerCount
            this.roleArn = x.roleArn
            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.GetFleetResponse = GetFleetResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.deadline.model.FleetCapabilities] inside the given [block]
         */
        public fun capabilities(block: aws.sdk.kotlin.services.deadline.model.FleetCapabilities.Builder.() -> kotlin.Unit) {
            this.capabilities = aws.sdk.kotlin.services.deadline.model.FleetCapabilities.invoke(block)
        }

        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 (roleArn == null) roleArn = ""
            if (status == null) status = FleetStatus.SdkUnknown("no value provided")
            if (workerCount == null) workerCount = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy