commonMain.aws.sdk.kotlin.services.dataexchange.model.UpdateRevisionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateRevisionRequest private constructor(builder: Builder) {
/**
* An optional comment about the revision.
*/
public val comment: kotlin.String? = builder.comment
/**
* The unique identifier for a data set.
*/
public val dataSetId: kotlin.String = requireNotNull(builder.dataSetId) { "A non-null value must be provided for dataSetId" }
/**
* Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.
*/
public val finalized: kotlin.Boolean = builder.finalized
/**
* The unique identifier for a revision.
*/
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.UpdateRevisionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRevisionRequest(")
append("comment=$comment,")
append("dataSetId=$dataSetId,")
append("finalized=$finalized,")
append("revisionId=$revisionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (dataSetId.hashCode())
result = 31 * result + (finalized.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 UpdateRevisionRequest
if (comment != other.comment) return false
if (dataSetId != other.dataSetId) return false
if (finalized != other.finalized) return false
if (revisionId != other.revisionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.UpdateRevisionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An optional comment about the revision.
*/
public var comment: kotlin.String? = null
/**
* The unique identifier for a data set.
*/
public var dataSetId: kotlin.String? = null
/**
* Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.
*/
public var finalized: kotlin.Boolean = false
/**
* The unique identifier for a revision.
*/
public var revisionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.UpdateRevisionRequest) : this() {
this.comment = x.comment
this.dataSetId = x.dataSetId
this.finalized = x.finalized
this.revisionId = x.revisionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.UpdateRevisionRequest = UpdateRevisionRequest(this)
internal fun correctErrors(): Builder {
if (dataSetId == null) dataSetId = ""
if (revisionId == null) revisionId = ""
return this
}
}
}