commonMain.aws.sdk.kotlin.services.codebuild.model.FleetProxyRule.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
/**
* Information about the proxy rule for your reserved capacity instances.
*/
public class FleetProxyRule private constructor(builder: Builder) {
/**
* The behavior of the proxy rule.
*/
public val effect: aws.sdk.kotlin.services.codebuild.model.FleetProxyRuleEffectType = requireNotNull(builder.effect) { "A non-null value must be provided for effect" }
/**
* The destination of the proxy rule.
*/
public val entities: List = requireNotNull(builder.entities) { "A non-null value must be provided for entities" }
/**
* The type of proxy rule.
*/
public val type: aws.sdk.kotlin.services.codebuild.model.FleetProxyRuleType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.FleetProxyRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FleetProxyRule(")
append("effect=$effect,")
append("entities=$entities,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = effect.hashCode()
result = 31 * result + (entities.hashCode())
result = 31 * result + (type.hashCode())
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 FleetProxyRule
if (effect != other.effect) return false
if (entities != other.entities) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.FleetProxyRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The behavior of the proxy rule.
*/
public var effect: aws.sdk.kotlin.services.codebuild.model.FleetProxyRuleEffectType? = null
/**
* The destination of the proxy rule.
*/
public var entities: List? = null
/**
* The type of proxy rule.
*/
public var type: aws.sdk.kotlin.services.codebuild.model.FleetProxyRuleType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.FleetProxyRule) : this() {
this.effect = x.effect
this.entities = x.entities
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.FleetProxyRule = FleetProxyRule(this)
internal fun correctErrors(): Builder {
if (effect == null) effect = FleetProxyRuleEffectType.SdkUnknown("no value provided")
if (entities == null) entities = emptyList()
if (type == null) type = FleetProxyRuleType.SdkUnknown("no value provided")
return this
}
}
}