aws.sdk.kotlin.services.sagemaker.model.TrialComponentSource.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
/**
* The Amazon Resource Name (ARN) and job type of the source of a trial component.
*/
class TrialComponentSource private constructor(builder: BuilderImpl) {
/**
* The source ARN.
*/
val sourceArn: String? = builder.sourceArn
/**
* The source job type.
*/
val sourceType: String? = builder.sourceType
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): TrialComponentSource = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TrialComponentSource(")
append("sourceArn=$sourceArn,")
append("sourceType=$sourceType)")
}
override fun hashCode(): kotlin.Int {
var result = sourceArn?.hashCode() ?: 0
result = 31 * result + (sourceType?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as TrialComponentSource
if (sourceArn != other.sourceArn) return false
if (sourceType != other.sourceType) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): TrialComponentSource = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): TrialComponentSource
/**
* The source ARN.
*/
fun sourceArn(sourceArn: String): FluentBuilder
/**
* The source job type.
*/
fun sourceType(sourceType: String): FluentBuilder
}
interface DslBuilder {
/**
* The source ARN.
*/
var sourceArn: String?
/**
* The source job type.
*/
var sourceType: String?
fun build(): TrialComponentSource
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var sourceArn: String? = null
override var sourceType: String? = null
constructor(x: TrialComponentSource) : this() {
this.sourceArn = x.sourceArn
this.sourceType = x.sourceType
}
override fun build(): TrialComponentSource = TrialComponentSource(this)
override fun sourceArn(sourceArn: String): FluentBuilder = apply { this.sourceArn = sourceArn }
override fun sourceType(sourceType: String): FluentBuilder = apply { this.sourceType = sourceType }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy