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

commonMain.aws.sdk.kotlin.services.finspace.model.CreateKxChangesetRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.finspace.model



public class CreateKxChangesetRequest private constructor(builder: Builder) {
    /**
     * A list of change request objects that are run in order. A change request object consists of changeType , s3Path, and a dbPath. A changeType can has the following values:
     * + PUT – Adds or updates files in a database.
     * + DELETE – Deletes files in a database.
     *
     * All the change requests require a mandatory *dbPath* attribute that defines the path within the database directory. The *s3Path* attribute defines the s3 source file path and is required for a PUT change type.
     *
     * Here is an example of how you can use the change request object:
     *
     * `[ { "changeType": "PUT", "s3Path":"s3://bucket/db/2020.01.02/", "dbPath":"/2020.01.02/"}, { "changeType": "PUT", "s3Path":"s3://bucket/db/sym", "dbPath":"/"}, { "changeType": "DELETE", "dbPath": "/2020.01.01/"} ]`
     *
     * In this example, the first request with *PUT* change type allows you to add files in the given s3Path under the *2020.01.02* partition of the database. The second request with *PUT* change type allows you to add a single sym file at database root location. The last request with *DELETE* change type allows you to delete the files under the *2020.01.01* partition of the database.
     */
    public val changeRequests: List? = builder.changeRequests
    /**
     * A token that ensures idempotency. This token expires in 10 minutes.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The name of the kdb database.
     */
    public val databaseName: kotlin.String? = requireNotNull(builder.databaseName) { "A non-null value must be provided for databaseName" }
    /**
     * A unique identifier of the kdb environment.
     */
    public val environmentId: kotlin.String? = requireNotNull(builder.environmentId) { "A non-null value must be provided for environmentId" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateKxChangesetRequest(")
        append("changeRequests=$changeRequests,")
        append("clientToken=$clientToken,")
        append("databaseName=$databaseName,")
        append("environmentId=$environmentId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = changeRequests?.hashCode() ?: 0
        result = 31 * result + (clientToken?.hashCode() ?: 0)
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (environmentId?.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 CreateKxChangesetRequest

        if (changeRequests != other.changeRequests) return false
        if (clientToken != other.clientToken) return false
        if (databaseName != other.databaseName) return false
        if (environmentId != other.environmentId) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of change request objects that are run in order. A change request object consists of changeType , s3Path, and a dbPath. A changeType can has the following values:
         * + PUT – Adds or updates files in a database.
         * + DELETE – Deletes files in a database.
         *
         * All the change requests require a mandatory *dbPath* attribute that defines the path within the database directory. The *s3Path* attribute defines the s3 source file path and is required for a PUT change type.
         *
         * Here is an example of how you can use the change request object:
         *
         * `[ { "changeType": "PUT", "s3Path":"s3://bucket/db/2020.01.02/", "dbPath":"/2020.01.02/"}, { "changeType": "PUT", "s3Path":"s3://bucket/db/sym", "dbPath":"/"}, { "changeType": "DELETE", "dbPath": "/2020.01.01/"} ]`
         *
         * In this example, the first request with *PUT* change type allows you to add files in the given s3Path under the *2020.01.02* partition of the database. The second request with *PUT* change type allows you to add a single sym file at database root location. The last request with *DELETE* change type allows you to delete the files under the *2020.01.01* partition of the database.
         */
        public var changeRequests: List? = null
        /**
         * A token that ensures idempotency. This token expires in 10 minutes.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The name of the kdb database.
         */
        public var databaseName: kotlin.String? = null
        /**
         * A unique identifier of the kdb environment.
         */
        public var environmentId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.finspace.model.CreateKxChangesetRequest) : this() {
            this.changeRequests = x.changeRequests
            this.clientToken = x.clientToken
            this.databaseName = x.databaseName
            this.environmentId = x.environmentId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.finspace.model.CreateKxChangesetRequest = CreateKxChangesetRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy