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

commonMain.aws.sdk.kotlin.services.codeartifact.model.DeletePackageVersionsRequest.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 DeletePackageVersionsRequest private constructor(builder: Builder) {
    /**
     * The name of the domain that contains the package to delete.
     */
    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 expected status of the package version to delete.
     */
    public val expectedStatus: aws.sdk.kotlin.services.codeartifact.model.PackageVersionStatus? = builder.expectedStatus
    /**
     * The format of the package versions to delete.
     */
    public val format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = builder.format
    /**
     * The namespace of the package versions to be deleted. The package component that specifies its namespace depends on its type. For example:
     *
     * The namespace is required when deleting package versions of the following formats:
     * + Maven
     * + Swift
     * + generic
     * +  The namespace of a Maven package version is its `groupId`.
     * +  The namespace of an npm or Swift package version is its `scope`.
     * + The namespace of a generic package is its `namespace`.
     * +  Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
     */
    public val namespace: kotlin.String? = builder.namespace
    /**
     * The name of the package with the versions to delete.
     */
    public val `package`: kotlin.String? = builder.`package`
    /**
     * The name of the repository that contains the package versions to delete.
     */
    public val repository: kotlin.String? = builder.repository
    /**
     * An array of strings that specify the versions of the package to delete.
     */
    public val versions: List? = builder.versions

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

    override fun toString(): kotlin.String = buildString {
        append("DeletePackageVersionsRequest(")
        append("domain=$domain,")
        append("domainOwner=$domainOwner,")
        append("expectedStatus=$expectedStatus,")
        append("format=$format,")
        append("namespace=$namespace,")
        append("package=$`package`,")
        append("repository=$repository,")
        append("versions=$versions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = domain?.hashCode() ?: 0
        result = 31 * result + (domainOwner?.hashCode() ?: 0)
        result = 31 * result + (expectedStatus?.hashCode() ?: 0)
        result = 31 * result + (format?.hashCode() ?: 0)
        result = 31 * result + (namespace?.hashCode() ?: 0)
        result = 31 * result + (`package`?.hashCode() ?: 0)
        result = 31 * result + (repository?.hashCode() ?: 0)
        result = 31 * result + (versions?.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 DeletePackageVersionsRequest

        if (domain != other.domain) return false
        if (domainOwner != other.domainOwner) return false
        if (expectedStatus != other.expectedStatus) return false
        if (format != other.format) return false
        if (namespace != other.namespace) return false
        if (`package` != other.`package`) return false
        if (repository != other.repository) return false
        if (versions != other.versions) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the domain that contains the package to delete.
         */
        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 expected status of the package version to delete.
         */
        public var expectedStatus: aws.sdk.kotlin.services.codeartifact.model.PackageVersionStatus? = null
        /**
         * The format of the package versions to delete.
         */
        public var format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = null
        /**
         * The namespace of the package versions to be deleted. The package component that specifies its namespace depends on its type. For example:
         *
         * The namespace is required when deleting package versions of the following formats:
         * + Maven
         * + Swift
         * + generic
         * +  The namespace of a Maven package version is its `groupId`.
         * +  The namespace of an npm or Swift package version is its `scope`.
         * + The namespace of a generic package is its `namespace`.
         * +  Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
         */
        public var namespace: kotlin.String? = null
        /**
         * The name of the package with the versions to delete.
         */
        public var `package`: kotlin.String? = null
        /**
         * The name of the repository that contains the package versions to delete.
         */
        public var repository: kotlin.String? = null
        /**
         * An array of strings that specify the versions of the package to delete.
         */
        public var versions: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.DeletePackageVersionsRequest) : this() {
            this.domain = x.domain
            this.domainOwner = x.domainOwner
            this.expectedStatus = x.expectedStatus
            this.format = x.format
            this.namespace = x.namespace
            this.`package` = x.`package`
            this.repository = x.repository
            this.versions = x.versions
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy