
commonMain.aws.sdk.kotlin.services.ecr.model.ImageScanningConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ecr.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The image scanning configuration for a repository.
*/
public class ImageScanningConfiguration private constructor(builder: Builder) {
/**
* The setting that determines whether images are scanned after being pushed to a repository. If set to `true`, images will be scanned after being pushed. If this parameter is not specified, it will default to `false` and images will not be scanned unless a scan is manually started with the [API_StartImageScan](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html) API.
*/
public val scanOnPush: kotlin.Boolean = builder.scanOnPush
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecr.model.ImageScanningConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ImageScanningConfiguration(")
append("scanOnPush=$scanOnPush")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = scanOnPush.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 ImageScanningConfiguration
if (scanOnPush != other.scanOnPush) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecr.model.ImageScanningConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The setting that determines whether images are scanned after being pushed to a repository. If set to `true`, images will be scanned after being pushed. If this parameter is not specified, it will default to `false` and images will not be scanned unless a scan is manually started with the [API_StartImageScan](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html) API.
*/
public var scanOnPush: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ecr.model.ImageScanningConfiguration) : this() {
this.scanOnPush = x.scanOnPush
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ecr.model.ImageScanningConfiguration = ImageScanningConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy