commonMain.aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2FleetConfiguration.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 configuration details for a service managed Amazon EC2 fleet.
*/
public class ServiceManagedEc2FleetConfiguration private constructor(builder: Builder) {
/**
* The Amazon EC2 instance capabilities.
*/
public val instanceCapabilities: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceCapabilities? = builder.instanceCapabilities
/**
* The Amazon EC2 market type.
*/
public val instanceMarketOptions: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceMarketOptions? = builder.instanceMarketOptions
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2FleetConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceManagedEc2FleetConfiguration(")
append("instanceCapabilities=$instanceCapabilities,")
append("instanceMarketOptions=$instanceMarketOptions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = instanceCapabilities?.hashCode() ?: 0
result = 31 * result + (instanceMarketOptions?.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 ServiceManagedEc2FleetConfiguration
if (instanceCapabilities != other.instanceCapabilities) return false
if (instanceMarketOptions != other.instanceMarketOptions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2FleetConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon EC2 instance capabilities.
*/
public var instanceCapabilities: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceCapabilities? = null
/**
* The Amazon EC2 market type.
*/
public var instanceMarketOptions: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceMarketOptions? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2FleetConfiguration) : this() {
this.instanceCapabilities = x.instanceCapabilities
this.instanceMarketOptions = x.instanceMarketOptions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2FleetConfiguration = ServiceManagedEc2FleetConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceCapabilities] inside the given [block]
*/
public fun instanceCapabilities(block: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceCapabilities.Builder.() -> kotlin.Unit) {
this.instanceCapabilities = aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceCapabilities.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceMarketOptions] inside the given [block]
*/
public fun instanceMarketOptions(block: aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceMarketOptions.Builder.() -> kotlin.Unit) {
this.instanceMarketOptions = aws.sdk.kotlin.services.deadline.model.ServiceManagedEc2InstanceMarketOptions.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}