commonMain.aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationInput.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codebuild-jvm Show documentation
Show all versions of codebuild-jvm Show documentation
The AWS SDK for Kotlin client for CodeBuild
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codebuild.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The scaling configuration input of a compute fleet.
*/
public class ScalingConfigurationInput private constructor(builder: Builder) {
/**
* The maximum number of instances in the fleet when auto-scaling.
*/
public val maxCapacity: kotlin.Int? = builder.maxCapacity
/**
* The scaling type for a compute fleet.
*/
public val scalingType: aws.sdk.kotlin.services.codebuild.model.FleetScalingType? = builder.scalingType
/**
* A list of `TargetTrackingScalingConfiguration` objects.
*/
public val targetTrackingScalingConfigs: List? = builder.targetTrackingScalingConfigs
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationInput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScalingConfigurationInput(")
append("maxCapacity=$maxCapacity,")
append("scalingType=$scalingType,")
append("targetTrackingScalingConfigs=$targetTrackingScalingConfigs")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxCapacity ?: 0
result = 31 * result + (scalingType?.hashCode() ?: 0)
result = 31 * result + (targetTrackingScalingConfigs?.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 ScalingConfigurationInput
if (maxCapacity != other.maxCapacity) return false
if (scalingType != other.scalingType) return false
if (targetTrackingScalingConfigs != other.targetTrackingScalingConfigs) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationInput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The maximum number of instances in the fleet when auto-scaling.
*/
public var maxCapacity: kotlin.Int? = null
/**
* The scaling type for a compute fleet.
*/
public var scalingType: aws.sdk.kotlin.services.codebuild.model.FleetScalingType? = null
/**
* A list of `TargetTrackingScalingConfiguration` objects.
*/
public var targetTrackingScalingConfigs: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationInput) : this() {
this.maxCapacity = x.maxCapacity
this.scalingType = x.scalingType
this.targetTrackingScalingConfigs = x.targetTrackingScalingConfigs
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationInput = ScalingConfigurationInput(this)
internal fun correctErrors(): Builder {
return this
}
}
}