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

commonMain.aws.sdk.kotlin.services.codeartifact.model.GetPackageVersionReadmeResponse.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 GetPackageVersionReadmeResponse private constructor(builder: Builder) {
    /**
     * The format of the package with the requested readme file.
     */
    public val format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = builder.format
    /**
     * The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:
     * +  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 that contains the returned readme file.
     */
    public val `package`: kotlin.String? = builder.`package`
    /**
     * The text of the returned readme file.
     */
    public val readme: kotlin.String? = builder.readme
    /**
     * The version of the package with the requested readme file.
     */
    public val version: kotlin.String? = builder.version
    /**
     * The current revision associated with the package version.
     */
    public val versionRevision: kotlin.String? = builder.versionRevision

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

    override fun toString(): kotlin.String = buildString {
        append("GetPackageVersionReadmeResponse(")
        append("format=$format,")
        append("namespace=$namespace,")
        append("package=$`package`,")
        append("readme=$readme,")
        append("version=$version,")
        append("versionRevision=$versionRevision")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = format?.hashCode() ?: 0
        result = 31 * result + (namespace?.hashCode() ?: 0)
        result = 31 * result + (`package`?.hashCode() ?: 0)
        result = 31 * result + (readme?.hashCode() ?: 0)
        result = 31 * result + (version?.hashCode() ?: 0)
        result = 31 * result + (versionRevision?.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 GetPackageVersionReadmeResponse

        if (format != other.format) return false
        if (namespace != other.namespace) return false
        if (`package` != other.`package`) return false
        if (readme != other.readme) return false
        if (version != other.version) return false
        if (versionRevision != other.versionRevision) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The format of the package with the requested readme file.
         */
        public var format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = null
        /**
         * The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:
         * +  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 that contains the returned readme file.
         */
        public var `package`: kotlin.String? = null
        /**
         * The text of the returned readme file.
         */
        public var readme: kotlin.String? = null
        /**
         * The version of the package with the requested readme file.
         */
        public var version: kotlin.String? = null
        /**
         * The current revision associated with the package version.
         */
        public var versionRevision: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.GetPackageVersionReadmeResponse) : this() {
            this.format = x.format
            this.namespace = x.namespace
            this.`package` = x.`package`
            this.readme = x.readme
            this.version = x.version
            this.versionRevision = x.versionRevision
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy