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

commonMain.aws.sdk.kotlin.services.dataexchange.model.ImportAssetFromSignedUrlRequestDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Details of the operation to be performed by the job.
 */
public class ImportAssetFromSignedUrlRequestDetails private constructor(builder: Builder) {
    /**
     * The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name.
     */
    public val assetName: kotlin.String = requireNotNull(builder.assetName) { "A non-null value must be provided for assetName" }
    /**
     * The unique identifier for the data set associated with this import job.
     */
    public val dataSetId: kotlin.String = requireNotNull(builder.dataSetId) { "A non-null value must be provided for dataSetId" }
    /**
     * The Base64-encoded Md5 hash for the asset, used to ensure the integrity of the file at that location.
     */
    public val md5Hash: kotlin.String = requireNotNull(builder.md5Hash) { "A non-null value must be provided for md5Hash" }
    /**
     * The unique identifier for the revision associated with this import request.
     */
    public val revisionId: kotlin.String = requireNotNull(builder.revisionId) { "A non-null value must be provided for revisionId" }

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

    override fun toString(): kotlin.String = buildString {
        append("ImportAssetFromSignedUrlRequestDetails(")
        append("assetName=$assetName,")
        append("dataSetId=$dataSetId,")
        append("md5Hash=$md5Hash,")
        append("revisionId=$revisionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetName.hashCode()
        result = 31 * result + (dataSetId.hashCode())
        result = 31 * result + (md5Hash.hashCode())
        result = 31 * result + (revisionId.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 ImportAssetFromSignedUrlRequestDetails

        if (assetName != other.assetName) return false
        if (dataSetId != other.dataSetId) return false
        if (md5Hash != other.md5Hash) return false
        if (revisionId != other.revisionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name.
         */
        public var assetName: kotlin.String? = null
        /**
         * The unique identifier for the data set associated with this import job.
         */
        public var dataSetId: kotlin.String? = null
        /**
         * The Base64-encoded Md5 hash for the asset, used to ensure the integrity of the file at that location.
         */
        public var md5Hash: kotlin.String? = null
        /**
         * The unique identifier for the revision associated with this import request.
         */
        public var revisionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.ImportAssetFromSignedUrlRequestDetails) : this() {
            this.assetName = x.assetName
            this.dataSetId = x.dataSetId
            this.md5Hash = x.md5Hash
            this.revisionId = x.revisionId
        }

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

        internal fun correctErrors(): Builder {
            if (assetName == null) assetName = ""
            if (dataSetId == null) dataSetId = ""
            if (md5Hash == null) md5Hash = ""
            if (revisionId == null) revisionId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy