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

commonMain.aws.sdk.kotlin.services.codeartifact.model.PutPackageOriginConfigurationResponse.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 PutPackageOriginConfigurationResponse private constructor(builder: Builder) {
    /**
     * A [PackageOriginConfiguration](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginConfiguration.html) object that describes the origin configuration set for the package. It contains a [PackageOriginRestrictions](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html) object that describes how new versions of the package can be introduced to the repository.
     */
    public val originConfiguration: aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration? = builder.originConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("PutPackageOriginConfigurationResponse(")
        append("originConfiguration=$originConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = originConfiguration?.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 PutPackageOriginConfigurationResponse

        if (originConfiguration != other.originConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A [PackageOriginConfiguration](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginConfiguration.html) object that describes the origin configuration set for the package. It contains a [PackageOriginRestrictions](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html) object that describes how new versions of the package can be introduced to the repository.
         */
        public var originConfiguration: aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PutPackageOriginConfigurationResponse) : this() {
            this.originConfiguration = x.originConfiguration
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy