commonMain.aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationOutput.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 output of a compute fleet.
*/
public class ScalingConfigurationOutput private constructor(builder: Builder) {
/**
* The desired number of instances in the fleet when auto-scaling.
*/
public val desiredCapacity: kotlin.Int? = builder.desiredCapacity
/**
* 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.ScalingConfigurationOutput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScalingConfigurationOutput(")
append("desiredCapacity=$desiredCapacity,")
append("maxCapacity=$maxCapacity,")
append("scalingType=$scalingType,")
append("targetTrackingScalingConfigs=$targetTrackingScalingConfigs")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = desiredCapacity ?: 0
result = 31 * 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 ScalingConfigurationOutput
if (desiredCapacity != other.desiredCapacity) return false
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.ScalingConfigurationOutput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The desired number of instances in the fleet when auto-scaling.
*/
public var desiredCapacity: kotlin.Int? = null
/**
* 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.ScalingConfigurationOutput) : this() {
this.desiredCapacity = x.desiredCapacity
this.maxCapacity = x.maxCapacity
this.scalingType = x.scalingType
this.targetTrackingScalingConfigs = x.targetTrackingScalingConfigs
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationOutput = ScalingConfigurationOutput(this)
internal fun correctErrors(): Builder {
return this
}
}
}