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

commonMain.aws.sdk.kotlin.services.ecrpublic.model.CreateRepositoryResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ecrpublic.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateRepositoryResponse private constructor(builder: Builder) {
    /**
     * The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
     */
    public val catalogData: aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogData? = builder.catalogData
    /**
     * The repository that was created.
     */
    public val repository: aws.sdk.kotlin.services.ecrpublic.model.Repository? = builder.repository

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRepositoryResponse(")
        append("catalogData=$catalogData,")
        append("repository=$repository")
        append(")")
    }

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

        if (catalogData != other.catalogData) return false
        if (repository != other.repository) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
         */
        public var catalogData: aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogData? = null
        /**
         * The repository that was created.
         */
        public var repository: aws.sdk.kotlin.services.ecrpublic.model.Repository? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.CreateRepositoryResponse) : this() {
            this.catalogData = x.catalogData
            this.repository = x.repository
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogData] inside the given [block]
         */
        public fun catalogData(block: aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogData.Builder.() -> kotlin.Unit) {
            this.catalogData = aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogData.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.ecrpublic.model.Repository] inside the given [block]
         */
        public fun repository(block: aws.sdk.kotlin.services.ecrpublic.model.Repository.Builder.() -> kotlin.Unit) {
            this.repository = aws.sdk.kotlin.services.ecrpublic.model.Repository.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy