commonMain.aws.sdk.kotlin.services.dataexchange.model.CreateDataSetRequest.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 CreateDataSetRequest private constructor(builder: Builder) {
/**
* The type of asset that is added to a data set.
*/
public val assetType: aws.sdk.kotlin.services.dataexchange.model.AssetType = requireNotNull(builder.assetType) { "A non-null value must be provided for assetType" }
/**
* A description for the data set. This value can be up to 16,348 characters long.
*/
public val description: kotlin.String = requireNotNull(builder.description) { "A non-null value must be provided for description" }
/**
* The name of the data set.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A data set tag is an optional label that you can assign to a data set 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.CreateDataSetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDataSetRequest(")
append("assetType=$assetType,")
append("description=$description,")
append("name=$name,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assetType.hashCode()
result = 31 * result + (description.hashCode())
result = 31 * result + (name.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 CreateDataSetRequest
if (assetType != other.assetType) return false
if (description != other.description) return false
if (name != other.name) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.CreateDataSetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The type of asset that is added to a data set.
*/
public var assetType: aws.sdk.kotlin.services.dataexchange.model.AssetType? = null
/**
* A description for the data set. This value can be up to 16,348 characters long.
*/
public var description: kotlin.String? = null
/**
* The name of the data set.
*/
public var name: kotlin.String? = null
/**
* A data set tag is an optional label that you can assign to a data set 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.CreateDataSetRequest) : this() {
this.assetType = x.assetType
this.description = x.description
this.name = x.name
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.CreateDataSetRequest = CreateDataSetRequest(this)
internal fun correctErrors(): Builder {
if (assetType == null) assetType = AssetType.SdkUnknown("no value provided")
if (description == null) description = ""
if (name == null) name = ""
return this
}
}
}