commonMain.aws.sdk.kotlin.services.codebuild.model.BatchRestrictions.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
/**
* Specifies restrictions for the batch build.
*/
public class BatchRestrictions private constructor(builder: Builder) {
/**
* An array of strings that specify the compute types that are allowed for the batch build. See [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *CodeBuild User Guide* for these values.
*/
public val computeTypesAllowed: List? = builder.computeTypesAllowed
/**
* Specifies the maximum number of builds allowed.
*/
public val maximumBuildsAllowed: kotlin.Int? = builder.maximumBuildsAllowed
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.BatchRestrictions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchRestrictions(")
append("computeTypesAllowed=$computeTypesAllowed,")
append("maximumBuildsAllowed=$maximumBuildsAllowed")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = computeTypesAllowed?.hashCode() ?: 0
result = 31 * result + (maximumBuildsAllowed ?: 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 BatchRestrictions
if (computeTypesAllowed != other.computeTypesAllowed) return false
if (maximumBuildsAllowed != other.maximumBuildsAllowed) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.BatchRestrictions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of strings that specify the compute types that are allowed for the batch build. See [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *CodeBuild User Guide* for these values.
*/
public var computeTypesAllowed: List? = null
/**
* Specifies the maximum number of builds allowed.
*/
public var maximumBuildsAllowed: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.BatchRestrictions) : this() {
this.computeTypesAllowed = x.computeTypesAllowed
this.maximumBuildsAllowed = x.maximumBuildsAllowed
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.BatchRestrictions = BatchRestrictions(this)
internal fun correctErrors(): Builder {
return this
}
}
}