commonMain.aws.sdk.kotlin.services.glue.model.MlTransform.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure for a machine learning transform.
*/
public class MlTransform private constructor(builder: Builder) {
/**
* A timestamp. The time and date that this machine learning transform was created.
*/
public val createdOn: aws.smithy.kotlin.runtime.time.Instant? = builder.createdOn
/**
* A user-defined, long-form description text for the machine learning transform. Descriptions are not guaranteed to be unique and can be changed at any time.
*/
public val description: kotlin.String? = builder.description
/**
* An `EvaluationMetrics` object. Evaluation metrics provide an estimate of the quality of your machine learning transform.
*/
public val evaluationMetrics: aws.sdk.kotlin.services.glue.model.EvaluationMetrics? = builder.evaluationMetrics
/**
* This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see [Glue Versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) in the developer guide.
*/
public val glueVersion: kotlin.String? = builder.glueVersion
/**
* A list of Glue table definitions used by the transform.
*/
public val inputRecordTables: List? = builder.inputRecordTables
/**
* A count identifier for the labeling files generated by Glue for this transform. As you create a better transform, you can iteratively download, label, and upload the labeling file.
*/
public val labelCount: kotlin.Int = builder.labelCount
/**
* A timestamp. The last point in time when this machine learning transform was modified.
*/
public val lastModifiedOn: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedOn
/**
* The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the [Glue pricing page](http://aws.amazon.com/glue/pricing/).
*
* `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
* + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
* + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
* + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
* + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
*
* When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
*/
public val maxCapacity: kotlin.Double? = builder.maxCapacity
/**
* The maximum number of times to retry after an `MLTaskRun` of the machine learning transform fails.
*/
public val maxRetries: kotlin.Int? = builder.maxRetries
/**
* A user-defined name for the machine learning transform. Names are not guaranteed unique and can be changed at any time.
*/
public val name: kotlin.String? = builder.name
/**
* The number of workers of a defined `workerType` that are allocated when a task of the transform runs.
*
* If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
*/
public val numberOfWorkers: kotlin.Int? = builder.numberOfWorkers
/**
* A `TransformParameters` object. You can use parameters to tune (customize) the behavior of the machine learning transform by specifying what data it learns from and your preference on various tradeoffs (such as precious vs. recall, or accuracy vs. cost).
*/
public val parameters: aws.sdk.kotlin.services.glue.model.TransformParameters? = builder.parameters
/**
* The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both Glue service role permissions to Glue resources, and Amazon S3 permissions required by the transform.
* + This role needs Glue service role permissions to allow access to resources in Glue. See [Attach a Policy to IAM Users That Access Glue](https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html).
* + This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.
*/
public val role: kotlin.String? = builder.role
/**
* A map of key-value pairs representing the columns and data types that this transform can run against. Has an upper bound of 100 columns.
*/
public val schema: List? = builder.schema
/**
* The current status of the machine learning transform.
*/
public val status: aws.sdk.kotlin.services.glue.model.TransformStatusType? = builder.status
/**
* The timeout in minutes of the machine learning transform.
*/
public val timeout: kotlin.Int? = builder.timeout
/**
* The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS.
*/
public val transformEncryption: aws.sdk.kotlin.services.glue.model.TransformEncryption? = builder.transformEncryption
/**
* The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to be unique and does not change.
*/
public val transformId: kotlin.String? = builder.transformId
/**
* The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of Standard, G.1X, or G.2X.
* + For the `Standard` worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
* + For the `G.1X` worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.
* + For the `G.2X` worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.
*
* `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
* + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
* + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
* + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
* + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
*/
public val workerType: aws.sdk.kotlin.services.glue.model.WorkerType? = builder.workerType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.MlTransform = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MlTransform(")
append("createdOn=$createdOn,")
append("description=$description,")
append("evaluationMetrics=$evaluationMetrics,")
append("glueVersion=$glueVersion,")
append("inputRecordTables=$inputRecordTables,")
append("labelCount=$labelCount,")
append("lastModifiedOn=$lastModifiedOn,")
append("maxCapacity=$maxCapacity,")
append("maxRetries=$maxRetries,")
append("name=$name,")
append("numberOfWorkers=$numberOfWorkers,")
append("parameters=$parameters,")
append("role=$role,")
append("schema=$schema,")
append("status=$status,")
append("timeout=$timeout,")
append("transformEncryption=$transformEncryption,")
append("transformId=$transformId,")
append("workerType=$workerType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdOn?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (evaluationMetrics?.hashCode() ?: 0)
result = 31 * result + (glueVersion?.hashCode() ?: 0)
result = 31 * result + (inputRecordTables?.hashCode() ?: 0)
result = 31 * result + (labelCount)
result = 31 * result + (lastModifiedOn?.hashCode() ?: 0)
result = 31 * result + (maxCapacity?.hashCode() ?: 0)
result = 31 * result + (maxRetries ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (numberOfWorkers ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (role?.hashCode() ?: 0)
result = 31 * result + (schema?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (timeout ?: 0)
result = 31 * result + (transformEncryption?.hashCode() ?: 0)
result = 31 * result + (transformId?.hashCode() ?: 0)
result = 31 * result + (workerType?.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 MlTransform
if (createdOn != other.createdOn) return false
if (description != other.description) return false
if (evaluationMetrics != other.evaluationMetrics) return false
if (glueVersion != other.glueVersion) return false
if (inputRecordTables != other.inputRecordTables) return false
if (labelCount != other.labelCount) return false
if (lastModifiedOn != other.lastModifiedOn) return false
if (maxCapacity != other.maxCapacity) return false
if (maxRetries != other.maxRetries) return false
if (name != other.name) return false
if (numberOfWorkers != other.numberOfWorkers) return false
if (parameters != other.parameters) return false
if (role != other.role) return false
if (schema != other.schema) return false
if (status != other.status) return false
if (timeout != other.timeout) return false
if (transformEncryption != other.transformEncryption) return false
if (transformId != other.transformId) return false
if (workerType != other.workerType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.MlTransform = Builder(this).apply(block).build()
public class Builder {
/**
* A timestamp. The time and date that this machine learning transform was created.
*/
public var createdOn: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A user-defined, long-form description text for the machine learning transform. Descriptions are not guaranteed to be unique and can be changed at any time.
*/
public var description: kotlin.String? = null
/**
* An `EvaluationMetrics` object. Evaluation metrics provide an estimate of the quality of your machine learning transform.
*/
public var evaluationMetrics: aws.sdk.kotlin.services.glue.model.EvaluationMetrics? = null
/**
* This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see [Glue Versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) in the developer guide.
*/
public var glueVersion: kotlin.String? = null
/**
* A list of Glue table definitions used by the transform.
*/
public var inputRecordTables: List? = null
/**
* A count identifier for the labeling files generated by Glue for this transform. As you create a better transform, you can iteratively download, label, and upload the labeling file.
*/
public var labelCount: kotlin.Int = 0
/**
* A timestamp. The last point in time when this machine learning transform was modified.
*/
public var lastModifiedOn: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the [Glue pricing page](http://aws.amazon.com/glue/pricing/).
*
* `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
* + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
* + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
* + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
* + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
*
* When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
*/
public var maxCapacity: kotlin.Double? = null
/**
* The maximum number of times to retry after an `MLTaskRun` of the machine learning transform fails.
*/
public var maxRetries: kotlin.Int? = null
/**
* A user-defined name for the machine learning transform. Names are not guaranteed unique and can be changed at any time.
*/
public var name: kotlin.String? = null
/**
* The number of workers of a defined `workerType` that are allocated when a task of the transform runs.
*
* If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
*/
public var numberOfWorkers: kotlin.Int? = null
/**
* A `TransformParameters` object. You can use parameters to tune (customize) the behavior of the machine learning transform by specifying what data it learns from and your preference on various tradeoffs (such as precious vs. recall, or accuracy vs. cost).
*/
public var parameters: aws.sdk.kotlin.services.glue.model.TransformParameters? = null
/**
* The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both Glue service role permissions to Glue resources, and Amazon S3 permissions required by the transform.
* + This role needs Glue service role permissions to allow access to resources in Glue. See [Attach a Policy to IAM Users That Access Glue](https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html).
* + This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.
*/
public var role: kotlin.String? = null
/**
* A map of key-value pairs representing the columns and data types that this transform can run against. Has an upper bound of 100 columns.
*/
public var schema: List? = null
/**
* The current status of the machine learning transform.
*/
public var status: aws.sdk.kotlin.services.glue.model.TransformStatusType? = null
/**
* The timeout in minutes of the machine learning transform.
*/
public var timeout: kotlin.Int? = null
/**
* The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS.
*/
public var transformEncryption: aws.sdk.kotlin.services.glue.model.TransformEncryption? = null
/**
* The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to be unique and does not change.
*/
public var transformId: kotlin.String? = null
/**
* The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of Standard, G.1X, or G.2X.
* + For the `Standard` worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
* + For the `G.1X` worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.
* + For the `G.2X` worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.
*
* `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
* + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
* + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
* + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
* + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
*/
public var workerType: aws.sdk.kotlin.services.glue.model.WorkerType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.MlTransform) : this() {
this.createdOn = x.createdOn
this.description = x.description
this.evaluationMetrics = x.evaluationMetrics
this.glueVersion = x.glueVersion
this.inputRecordTables = x.inputRecordTables
this.labelCount = x.labelCount
this.lastModifiedOn = x.lastModifiedOn
this.maxCapacity = x.maxCapacity
this.maxRetries = x.maxRetries
this.name = x.name
this.numberOfWorkers = x.numberOfWorkers
this.parameters = x.parameters
this.role = x.role
this.schema = x.schema
this.status = x.status
this.timeout = x.timeout
this.transformEncryption = x.transformEncryption
this.transformId = x.transformId
this.workerType = x.workerType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.MlTransform = MlTransform(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.EvaluationMetrics] inside the given [block]
*/
public fun evaluationMetrics(block: aws.sdk.kotlin.services.glue.model.EvaluationMetrics.Builder.() -> kotlin.Unit) {
this.evaluationMetrics = aws.sdk.kotlin.services.glue.model.EvaluationMetrics.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.TransformParameters] inside the given [block]
*/
public fun parameters(block: aws.sdk.kotlin.services.glue.model.TransformParameters.Builder.() -> kotlin.Unit) {
this.parameters = aws.sdk.kotlin.services.glue.model.TransformParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.TransformEncryption] inside the given [block]
*/
public fun transformEncryption(block: aws.sdk.kotlin.services.glue.model.TransformEncryption.Builder.() -> kotlin.Unit) {
this.transformEncryption = aws.sdk.kotlin.services.glue.model.TransformEncryption.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}