commonMain.aws.sdk.kotlin.services.imagebuilder.model.ComponentConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of imagebuilder-jvm Show documentation
Show all versions of imagebuilder-jvm Show documentation
The AWS SDK for Kotlin client for imagebuilder
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.imagebuilder.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Configuration details of the component.
*/
public class ComponentConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the component.
*/
public val componentArn: kotlin.String = requireNotNull(builder.componentArn) { "A non-null value must be provided for componentArn" }
/**
* A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
*/
public val parameters: List? = builder.parameters
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.imagebuilder.model.ComponentConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComponentConfiguration(")
append("componentArn=$componentArn,")
append("parameters=$parameters")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = componentArn.hashCode()
result = 31 * result + (parameters?.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 ComponentConfiguration
if (componentArn != other.componentArn) return false
if (parameters != other.parameters) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.imagebuilder.model.ComponentConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the component.
*/
public var componentArn: kotlin.String? = null
/**
* A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
*/
public var parameters: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.imagebuilder.model.ComponentConfiguration) : this() {
this.componentArn = x.componentArn
this.parameters = x.parameters
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.imagebuilder.model.ComponentConfiguration = ComponentConfiguration(this)
internal fun correctErrors(): Builder {
if (componentArn == null) componentArn = ""
return this
}
}
}