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

commonMain.aws.sdk.kotlin.services.deadline.model.CustomerManagedWorkerCapabilities.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 worker capabilities for a customer managed workflow.
 */
public class CustomerManagedWorkerCapabilities private constructor(builder: Builder) {
    /**
     * The range of the accelerator.
     */
    public val acceleratorCount: aws.sdk.kotlin.services.deadline.model.AcceleratorCountRange? = builder.acceleratorCount
    /**
     * The total memory (MiB) for the customer managed worker capabilities.
     */
    public val acceleratorTotalMemoryMib: aws.sdk.kotlin.services.deadline.model.AcceleratorTotalMemoryMibRange? = builder.acceleratorTotalMemoryMib
    /**
     * The accelerator types for the customer managed worker capabilities.
     */
    public val acceleratorTypes: List? = builder.acceleratorTypes
    /**
     * The CPU architecture type for the customer managed worker capabilities.
     */
    public val cpuArchitectureType: aws.sdk.kotlin.services.deadline.model.CpuArchitectureType = requireNotNull(builder.cpuArchitectureType) { "A non-null value must be provided for cpuArchitectureType" }
    /**
     * Custom requirement ranges for customer managed worker capabilities.
     */
    public val customAmounts: List? = builder.customAmounts
    /**
     * Custom attributes for the customer manged worker capabilities.
     */
    public val customAttributes: List? = builder.customAttributes
    /**
     * The memory (MiB).
     */
    public val memoryMib: aws.sdk.kotlin.services.deadline.model.MemoryMibRange? = builder.memoryMib
    /**
     * The operating system (OS) family.
     */
    public val osFamily: aws.sdk.kotlin.services.deadline.model.CustomerManagedFleetOperatingSystemFamily = requireNotNull(builder.osFamily) { "A non-null value must be provided for osFamily" }
    /**
     * The vCPU count for the customer manged worker capabilities.
     */
    public val vCpuCount: aws.sdk.kotlin.services.deadline.model.VCpuCountRange? = builder.vCpuCount

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

    override fun toString(): kotlin.String = buildString {
        append("CustomerManagedWorkerCapabilities(")
        append("acceleratorCount=$acceleratorCount,")
        append("acceleratorTotalMemoryMib=$acceleratorTotalMemoryMib,")
        append("acceleratorTypes=$acceleratorTypes,")
        append("cpuArchitectureType=$cpuArchitectureType,")
        append("customAmounts=$customAmounts,")
        append("customAttributes=$customAttributes,")
        append("memoryMib=$memoryMib,")
        append("osFamily=$osFamily,")
        append("vCpuCount=$vCpuCount")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = acceleratorCount?.hashCode() ?: 0
        result = 31 * result + (acceleratorTotalMemoryMib?.hashCode() ?: 0)
        result = 31 * result + (acceleratorTypes?.hashCode() ?: 0)
        result = 31 * result + (cpuArchitectureType.hashCode())
        result = 31 * result + (customAmounts?.hashCode() ?: 0)
        result = 31 * result + (customAttributes?.hashCode() ?: 0)
        result = 31 * result + (memoryMib?.hashCode() ?: 0)
        result = 31 * result + (osFamily.hashCode())
        result = 31 * result + (vCpuCount?.hashCode() ?: 0)
        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 CustomerManagedWorkerCapabilities

        if (acceleratorCount != other.acceleratorCount) return false
        if (acceleratorTotalMemoryMib != other.acceleratorTotalMemoryMib) return false
        if (acceleratorTypes != other.acceleratorTypes) return false
        if (cpuArchitectureType != other.cpuArchitectureType) return false
        if (customAmounts != other.customAmounts) return false
        if (customAttributes != other.customAttributes) return false
        if (memoryMib != other.memoryMib) return false
        if (osFamily != other.osFamily) return false
        if (vCpuCount != other.vCpuCount) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The range of the accelerator.
         */
        public var acceleratorCount: aws.sdk.kotlin.services.deadline.model.AcceleratorCountRange? = null
        /**
         * The total memory (MiB) for the customer managed worker capabilities.
         */
        public var acceleratorTotalMemoryMib: aws.sdk.kotlin.services.deadline.model.AcceleratorTotalMemoryMibRange? = null
        /**
         * The accelerator types for the customer managed worker capabilities.
         */
        public var acceleratorTypes: List? = null
        /**
         * The CPU architecture type for the customer managed worker capabilities.
         */
        public var cpuArchitectureType: aws.sdk.kotlin.services.deadline.model.CpuArchitectureType? = null
        /**
         * Custom requirement ranges for customer managed worker capabilities.
         */
        public var customAmounts: List? = null
        /**
         * Custom attributes for the customer manged worker capabilities.
         */
        public var customAttributes: List? = null
        /**
         * The memory (MiB).
         */
        public var memoryMib: aws.sdk.kotlin.services.deadline.model.MemoryMibRange? = null
        /**
         * The operating system (OS) family.
         */
        public var osFamily: aws.sdk.kotlin.services.deadline.model.CustomerManagedFleetOperatingSystemFamily? = null
        /**
         * The vCPU count for the customer manged worker capabilities.
         */
        public var vCpuCount: aws.sdk.kotlin.services.deadline.model.VCpuCountRange? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.CustomerManagedWorkerCapabilities) : this() {
            this.acceleratorCount = x.acceleratorCount
            this.acceleratorTotalMemoryMib = x.acceleratorTotalMemoryMib
            this.acceleratorTypes = x.acceleratorTypes
            this.cpuArchitectureType = x.cpuArchitectureType
            this.customAmounts = x.customAmounts
            this.customAttributes = x.customAttributes
            this.memoryMib = x.memoryMib
            this.osFamily = x.osFamily
            this.vCpuCount = x.vCpuCount
        }

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

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

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

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

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

        internal fun correctErrors(): Builder {
            if (cpuArchitectureType == null) cpuArchitectureType = CpuArchitectureType.SdkUnknown("no value provided")
            if (osFamily == null) osFamily = CustomerManagedFleetOperatingSystemFamily.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy