commonMain.aws.sdk.kotlin.services.personalize.model.CreateDataDeletionJobRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personalize-jvm Show documentation
Show all versions of personalize-jvm Show documentation
The AWS SDK for Kotlin client for Personalize
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.personalize.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateDataDeletionJobRequest private constructor(builder: Builder) {
/**
* The Amazon S3 bucket that contains the list of userIds of the users to delete.
*/
public val dataSource: aws.sdk.kotlin.services.personalize.model.DataSource? = builder.dataSource
/**
* The Amazon Resource Name (ARN) of the dataset group that has the datasets you want to delete records from.
*/
public val datasetGroupArn: kotlin.String? = builder.datasetGroupArn
/**
* The name for the data deletion job.
*/
public val jobName: kotlin.String? = builder.jobName
/**
* The Amazon Resource Name (ARN) of the IAM role that has permissions to read from the Amazon S3 data source.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* A list of [tags](https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html) to apply to the data deletion job.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.CreateDataDeletionJobRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDataDeletionJobRequest(")
append("dataSource=$dataSource,")
append("datasetGroupArn=$datasetGroupArn,")
append("jobName=$jobName,")
append("roleArn=$roleArn,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataSource?.hashCode() ?: 0
result = 31 * result + (datasetGroupArn?.hashCode() ?: 0)
result = 31 * result + (jobName?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
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 CreateDataDeletionJobRequest
if (dataSource != other.dataSource) return false
if (datasetGroupArn != other.datasetGroupArn) return false
if (jobName != other.jobName) return false
if (roleArn != other.roleArn) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.CreateDataDeletionJobRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon S3 bucket that contains the list of userIds of the users to delete.
*/
public var dataSource: aws.sdk.kotlin.services.personalize.model.DataSource? = null
/**
* The Amazon Resource Name (ARN) of the dataset group that has the datasets you want to delete records from.
*/
public var datasetGroupArn: kotlin.String? = null
/**
* The name for the data deletion job.
*/
public var jobName: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role that has permissions to read from the Amazon S3 data source.
*/
public var roleArn: kotlin.String? = null
/**
* A list of [tags](https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html) to apply to the data deletion job.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalize.model.CreateDataDeletionJobRequest) : this() {
this.dataSource = x.dataSource
this.datasetGroupArn = x.datasetGroupArn
this.jobName = x.jobName
this.roleArn = x.roleArn
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalize.model.CreateDataDeletionJobRequest = CreateDataDeletionJobRequest(this)
/**
* construct an [aws.sdk.kotlin.services.personalize.model.DataSource] inside the given [block]
*/
public fun dataSource(block: aws.sdk.kotlin.services.personalize.model.DataSource.Builder.() -> kotlin.Unit) {
this.dataSource = aws.sdk.kotlin.services.personalize.model.DataSource.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}