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

commonMain.aws.sdk.kotlin.services.codeartifact.model.UpdateRepositoryRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codeartifact.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateRepositoryRequest private constructor(builder: Builder) {
    /**
     * An updated repository description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the domain associated with the repository to update.
     */
    public val domain: kotlin.String? = builder.domain
    /**
     * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
     */
    public val domainOwner: kotlin.String? = builder.domainOwner
    /**
     * The name of the repository to update.
     */
    public val repository: kotlin.String? = builder.repository
    /**
     * A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see [Working with upstream repositories](https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html).
     */
    public val upstreams: List? = builder.upstreams

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateRepositoryRequest(")
        append("description=$description,")
        append("domain=$domain,")
        append("domainOwner=$domainOwner,")
        append("repository=$repository,")
        append("upstreams=$upstreams")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (domain?.hashCode() ?: 0)
        result = 31 * result + (domainOwner?.hashCode() ?: 0)
        result = 31 * result + (repository?.hashCode() ?: 0)
        result = 31 * result + (upstreams?.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 UpdateRepositoryRequest

        if (description != other.description) return false
        if (domain != other.domain) return false
        if (domainOwner != other.domainOwner) return false
        if (repository != other.repository) return false
        if (upstreams != other.upstreams) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An updated repository description.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the domain associated with the repository to update.
         */
        public var domain: kotlin.String? = null
        /**
         * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
         */
        public var domainOwner: kotlin.String? = null
        /**
         * The name of the repository to update.
         */
        public var repository: kotlin.String? = null
        /**
         * A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see [Working with upstream repositories](https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html).
         */
        public var upstreams: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.UpdateRepositoryRequest) : this() {
            this.description = x.description
            this.domain = x.domain
            this.domainOwner = x.domainOwner
            this.repository = x.repository
            this.upstreams = x.upstreams
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy