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

commonMain.aws.sdk.kotlin.services.ecr.model.ValidatePullThroughCacheRuleRequest.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

public class ValidatePullThroughCacheRuleRequest private constructor(builder: Builder) {
    /**
     * The repository name prefix associated with the pull through cache rule.
     */
    public val ecrRepositoryPrefix: kotlin.String? = builder.ecrRepositoryPrefix
    /**
     * The registry ID associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
     */
    public val registryId: kotlin.String? = builder.registryId

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

    override fun toString(): kotlin.String = buildString {
        append("ValidatePullThroughCacheRuleRequest(")
        append("ecrRepositoryPrefix=$ecrRepositoryPrefix,")
        append("registryId=$registryId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ecrRepositoryPrefix?.hashCode() ?: 0
        result = 31 * result + (registryId?.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 ValidatePullThroughCacheRuleRequest

        if (ecrRepositoryPrefix != other.ecrRepositoryPrefix) return false
        if (registryId != other.registryId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The repository name prefix associated with the pull through cache rule.
         */
        public var ecrRepositoryPrefix: kotlin.String? = null
        /**
         * The registry ID associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
         */
        public var registryId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.ValidatePullThroughCacheRuleRequest) : this() {
            this.ecrRepositoryPrefix = x.ecrRepositoryPrefix
            this.registryId = x.registryId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy