commonMain.aws.sdk.kotlin.services.imagebuilder.model.ImageScanningConfiguration.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
/**
* Contains settings for Image Builder image resource and container image scans.
*/
public class ImageScanningConfiguration private constructor(builder: Builder) {
/**
* Contains Amazon ECR settings for vulnerability scans.
*/
public val ecrConfiguration: aws.sdk.kotlin.services.imagebuilder.model.EcrConfiguration? = builder.ecrConfiguration
/**
* A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
*/
public val imageScanningEnabled: kotlin.Boolean? = builder.imageScanningEnabled
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.imagebuilder.model.ImageScanningConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ImageScanningConfiguration(")
append("ecrConfiguration=$ecrConfiguration,")
append("imageScanningEnabled=$imageScanningEnabled")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = ecrConfiguration?.hashCode() ?: 0
result = 31 * result + (imageScanningEnabled?.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 ImageScanningConfiguration
if (ecrConfiguration != other.ecrConfiguration) return false
if (imageScanningEnabled != other.imageScanningEnabled) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.imagebuilder.model.ImageScanningConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains Amazon ECR settings for vulnerability scans.
*/
public var ecrConfiguration: aws.sdk.kotlin.services.imagebuilder.model.EcrConfiguration? = null
/**
* A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
*/
public var imageScanningEnabled: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.imagebuilder.model.ImageScanningConfiguration) : this() {
this.ecrConfiguration = x.ecrConfiguration
this.imageScanningEnabled = x.imageScanningEnabled
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.imagebuilder.model.ImageScanningConfiguration = ImageScanningConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.imagebuilder.model.EcrConfiguration] inside the given [block]
*/
public fun ecrConfiguration(block: aws.sdk.kotlin.services.imagebuilder.model.EcrConfiguration.Builder.() -> kotlin.Unit) {
this.ecrConfiguration = aws.sdk.kotlin.services.imagebuilder.model.EcrConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}