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

commonMain.aws.sdk.kotlin.services.ecrpublic.model.CreateRepositoryRequest.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 CreateRepositoryRequest private constructor(builder: Builder) {
    /**
     * The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
     */
    public val catalogData: aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogDataInput? = builder.catalogData
    /**
     * The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name can be specified on its own (for example `nginx-web-app`) or prepended with a namespace to group the repository into a category (for example `project-a/nginx-web-app`).
     */
    public val repositoryName: kotlin.String? = builder.repositoryName
    /**
     * The metadata that you apply to each repository to help categorize and organize your repositories. Each tag consists of a key and an optional value. You define both of them. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRepositoryRequest(")
        append("catalogData=$catalogData,")
        append("repositoryName=$repositoryName,")
        append("tags=$tags")
        append(")")
    }

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

        if (catalogData != other.catalogData) return false
        if (repositoryName != other.repositoryName) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
         */
        public var catalogData: aws.sdk.kotlin.services.ecrpublic.model.RepositoryCatalogDataInput? = null
        /**
         * The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name can be specified on its own (for example `nginx-web-app`) or prepended with a namespace to group the repository into a category (for example `project-a/nginx-web-app`).
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The metadata that you apply to each repository to help categorize and organize your repositories. Each tag consists of a key and an optional value. You define both of them. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
         */
        public var tags: List? = null

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy