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

commonMain.aws.sdk.kotlin.services.ecr.model.ReplicationConfiguration.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 replication configuration for a registry.
 */
public class ReplicationConfiguration private constructor(builder: Builder) {
    /**
     * An array of objects representing the replication destinations and repository filters for a replication configuration.
     */
    public val rules: List = requireNotNull(builder.rules) { "A non-null value must be provided for rules" }

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

    override fun toString(): kotlin.String = buildString {
        append("ReplicationConfiguration(")
        append("rules=$rules")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = rules.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 ReplicationConfiguration

        if (rules != other.rules) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An array of objects representing the replication destinations and repository filters for a replication configuration.
         */
        public var rules: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.ReplicationConfiguration) : this() {
            this.rules = x.rules
        }

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

        internal fun correctErrors(): Builder {
            if (rules == null) rules = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy