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

commonMain.aws.sdk.kotlin.services.amplify.model.CreateDeploymentResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.amplify.model



/**
 * The result structure for the create a new deployment request.
 */
public class CreateDeploymentResponse private constructor(builder: Builder) {
    /**
     * When the `fileMap` argument is provided in the request, `fileUploadUrls` will contain a map of file names to upload URLs.
     */
    public val fileUploadUrls: Map = requireNotNull(builder.fileUploadUrls) { "A non-null value must be provided for fileUploadUrls" }
    /**
     * The job ID for this deployment. will supply to start deployment api.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * When the `fileMap` argument is not provided in the request, this `zipUploadUrl` is returned.
     */
    public val zipUploadUrl: kotlin.String = requireNotNull(builder.zipUploadUrl) { "A non-null value must be provided for zipUploadUrl" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDeploymentResponse(")
        append("fileUploadUrls=$fileUploadUrls,")
        append("jobId=$jobId,")
        append("zipUploadUrl=$zipUploadUrl")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = fileUploadUrls.hashCode()
        result = 31 * result + (jobId?.hashCode() ?: 0)
        result = 31 * result + (zipUploadUrl.hashCode())
        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 CreateDeploymentResponse

        if (fileUploadUrls != other.fileUploadUrls) return false
        if (jobId != other.jobId) return false
        if (zipUploadUrl != other.zipUploadUrl) return false

        return true
    }

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

    public class Builder {
        /**
         * When the `fileMap` argument is provided in the request, `fileUploadUrls` will contain a map of file names to upload URLs.
         */
        public var fileUploadUrls: Map? = null
        /**
         * The job ID for this deployment. will supply to start deployment api.
         */
        public var jobId: kotlin.String? = null
        /**
         * When the `fileMap` argument is not provided in the request, this `zipUploadUrl` is returned.
         */
        public var zipUploadUrl: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.amplify.model.CreateDeploymentResponse) : this() {
            this.fileUploadUrls = x.fileUploadUrls
            this.jobId = x.jobId
            this.zipUploadUrl = x.zipUploadUrl
        }

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

        internal fun correctErrors(): Builder {
            if (fileUploadUrls == null) fileUploadUrls = emptyMap()
            if (zipUploadUrl == null) zipUploadUrl = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy