All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.ecr.model.RepositoryScanningConfiguration.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 details of the scanning configuration for a repository.
 */
public class RepositoryScanningConfiguration private constructor(builder: Builder) {
    /**
     * The scan filters applied to the repository.
     */
    public val appliedScanFilters: List? = builder.appliedScanFilters
    /**
     * The ARN of the repository.
     */
    public val repositoryArn: kotlin.String? = builder.repositoryArn
    /**
     * The name of the repository.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName
    /**
     * The scan frequency for the repository.
     */
    public val scanFrequency: aws.sdk.kotlin.services.ecr.model.ScanFrequency? = builder.scanFrequency
    /**
     * Whether or not scan on push is configured for the repository.
     */
    public val scanOnPush: kotlin.Boolean = builder.scanOnPush

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecr.model.RepositoryScanningConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RepositoryScanningConfiguration(")
        append("appliedScanFilters=$appliedScanFilters,")
        append("repositoryArn=$repositoryArn,")
        append("repositoryName=$repositoryName,")
        append("scanFrequency=$scanFrequency,")
        append("scanOnPush=$scanOnPush")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appliedScanFilters?.hashCode() ?: 0
        result = 31 * result + (repositoryArn?.hashCode() ?: 0)
        result = 31 * result + (repositoryName?.hashCode() ?: 0)
        result = 31 * result + (scanFrequency?.hashCode() ?: 0)
        result = 31 * 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 RepositoryScanningConfiguration

        if (appliedScanFilters != other.appliedScanFilters) return false
        if (repositoryArn != other.repositoryArn) return false
        if (repositoryName != other.repositoryName) return false
        if (scanFrequency != other.scanFrequency) return false
        if (scanOnPush != other.scanOnPush) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecr.model.RepositoryScanningConfiguration = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The scan filters applied to the repository.
         */
        public var appliedScanFilters: List? = null
        /**
         * The ARN of the repository.
         */
        public var repositoryArn: kotlin.String? = null
        /**
         * The name of the repository.
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The scan frequency for the repository.
         */
        public var scanFrequency: aws.sdk.kotlin.services.ecr.model.ScanFrequency? = null
        /**
         * Whether or not scan on push is configured for the repository.
         */
        public var scanOnPush: kotlin.Boolean = false

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.RepositoryScanningConfiguration) : this() {
            this.appliedScanFilters = x.appliedScanFilters
            this.repositoryArn = x.repositoryArn
            this.repositoryName = x.repositoryName
            this.scanFrequency = x.scanFrequency
            this.scanOnPush = x.scanOnPush
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.ecr.model.RepositoryScanningConfiguration = RepositoryScanningConfiguration(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy