commonMain.aws.sdk.kotlin.services.dataexchange.model.CreateRevisionRequest.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 CreateRevisionRequest 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" }
/**
* A revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.CreateRevisionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRevisionRequest(")
append("comment=$comment,")
append("dataSetId=$dataSetId,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (dataSetId.hashCode())
result = 31 * result + (tags?.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 CreateRevisionRequest
if (comment != other.comment) return false
if (dataSetId != other.dataSetId) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.CreateRevisionRequest = 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
/**
* A revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.CreateRevisionRequest) : this() {
this.comment = x.comment
this.dataSetId = x.dataSetId
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.CreateRevisionRequest = CreateRevisionRequest(this)
internal fun correctErrors(): Builder {
if (dataSetId == null) dataSetId = ""
return this
}
}
}