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

commonMain.aws.sdk.kotlin.services.ecr.model.PullThroughCacheRule.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details of a pull through cache rule.
 */
public class PullThroughCacheRule private constructor(builder: Builder) {
    /**
     * The date and time the pull through cache was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The ARN of the Secrets Manager secret associated with the pull through cache rule.
     */
    public val credentialArn: kotlin.String? = builder.credentialArn
    /**
     * The Amazon ECR repository prefix associated with the pull through cache rule.
     */
    public val ecrRepositoryPrefix: kotlin.String? = builder.ecrRepositoryPrefix
    /**
     * The Amazon Web Services account ID associated with the registry the pull through cache rule is associated with.
     */
    public val registryId: kotlin.String? = builder.registryId
    /**
     * The date and time, in JavaScript date format, when the pull through cache rule was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
    /**
     * The name of the upstream source registry associated with the pull through cache rule.
     */
    public val upstreamRegistry: aws.sdk.kotlin.services.ecr.model.UpstreamRegistry? = builder.upstreamRegistry
    /**
     * The upstream registry URL associated with the pull through cache rule.
     */
    public val upstreamRegistryUrl: kotlin.String? = builder.upstreamRegistryUrl

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

    override fun toString(): kotlin.String = buildString {
        append("PullThroughCacheRule(")
        append("createdAt=$createdAt,")
        append("credentialArn=$credentialArn,")
        append("ecrRepositoryPrefix=$ecrRepositoryPrefix,")
        append("registryId=$registryId,")
        append("updatedAt=$updatedAt,")
        append("upstreamRegistry=$upstreamRegistry,")
        append("upstreamRegistryUrl=$upstreamRegistryUrl")
        append(")")
    }

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

        if (createdAt != other.createdAt) return false
        if (credentialArn != other.credentialArn) return false
        if (ecrRepositoryPrefix != other.ecrRepositoryPrefix) return false
        if (registryId != other.registryId) return false
        if (updatedAt != other.updatedAt) return false
        if (upstreamRegistry != other.upstreamRegistry) return false
        if (upstreamRegistryUrl != other.upstreamRegistryUrl) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time the pull through cache was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the Secrets Manager secret associated with the pull through cache rule.
         */
        public var credentialArn: kotlin.String? = null
        /**
         * The Amazon ECR repository prefix associated with the pull through cache rule.
         */
        public var ecrRepositoryPrefix: kotlin.String? = null
        /**
         * The Amazon Web Services account ID associated with the registry the pull through cache rule is associated with.
         */
        public var registryId: kotlin.String? = null
        /**
         * The date and time, in JavaScript date format, when the pull through cache rule was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the upstream source registry associated with the pull through cache rule.
         */
        public var upstreamRegistry: aws.sdk.kotlin.services.ecr.model.UpstreamRegistry? = null
        /**
         * The upstream registry URL associated with the pull through cache rule.
         */
        public var upstreamRegistryUrl: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.PullThroughCacheRule) : this() {
            this.createdAt = x.createdAt
            this.credentialArn = x.credentialArn
            this.ecrRepositoryPrefix = x.ecrRepositoryPrefix
            this.registryId = x.registryId
            this.updatedAt = x.updatedAt
            this.upstreamRegistry = x.upstreamRegistry
            this.upstreamRegistryUrl = x.upstreamRegistryUrl
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy