commonMain.aws.sdk.kotlin.services.comprehend.model.CreateFlywheelRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateFlywheelRequest private constructor(builder: Builder) {
/**
* To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set `TaskConfig` or `ModelType` if you specify an `ActiveModelArn`.
*/
public val activeModelArn: kotlin.String? = builder.activeModelArn
/**
* A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend the permissions required to access the flywheel data in the data lake.
*/
public val dataAccessRoleArn: kotlin.String? = builder.dataAccessRoleArn
/**
* Enter the S3 location for the data lake. You can specify a new S3 bucket or a new folder of an existing S3 bucket. The flywheel creates the data lake at this location.
*/
public val dataLakeS3Uri: kotlin.String? = builder.dataLakeS3Uri
/**
* Data security configurations.
*/
public val dataSecurityConfig: aws.sdk.kotlin.services.comprehend.model.DataSecurityConfig? = builder.dataSecurityConfig
/**
* Name for the flywheel.
*/
public val flywheelName: kotlin.String? = builder.flywheelName
/**
* The model type. You need to set `ModelType` if you are creating a flywheel for a new model.
*/
public val modelType: aws.sdk.kotlin.services.comprehend.model.ModelType? = builder.modelType
/**
* The tags to associate with this flywheel.
*/
public val tags: List? = builder.tags
/**
* Configuration about the model associated with the flywheel. You need to set `TaskConfig` if you are creating a flywheel for a new model.
*/
public val taskConfig: aws.sdk.kotlin.services.comprehend.model.TaskConfig? = builder.taskConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.CreateFlywheelRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateFlywheelRequest(")
append("activeModelArn=$activeModelArn,")
append("clientRequestToken=$clientRequestToken,")
append("dataAccessRoleArn=$dataAccessRoleArn,")
append("dataLakeS3Uri=$dataLakeS3Uri,")
append("dataSecurityConfig=$dataSecurityConfig,")
append("flywheelName=$flywheelName,")
append("modelType=$modelType,")
append("tags=$tags,")
append("taskConfig=$taskConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = activeModelArn?.hashCode() ?: 0
result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
result = 31 * result + (dataAccessRoleArn?.hashCode() ?: 0)
result = 31 * result + (dataLakeS3Uri?.hashCode() ?: 0)
result = 31 * result + (dataSecurityConfig?.hashCode() ?: 0)
result = 31 * result + (flywheelName?.hashCode() ?: 0)
result = 31 * result + (modelType?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (taskConfig?.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 CreateFlywheelRequest
if (activeModelArn != other.activeModelArn) return false
if (clientRequestToken != other.clientRequestToken) return false
if (dataAccessRoleArn != other.dataAccessRoleArn) return false
if (dataLakeS3Uri != other.dataLakeS3Uri) return false
if (dataSecurityConfig != other.dataSecurityConfig) return false
if (flywheelName != other.flywheelName) return false
if (modelType != other.modelType) return false
if (tags != other.tags) return false
if (taskConfig != other.taskConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.CreateFlywheelRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set `TaskConfig` or `ModelType` if you specify an `ActiveModelArn`.
*/
public var activeModelArn: kotlin.String? = null
/**
* A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
*/
public var clientRequestToken: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend the permissions required to access the flywheel data in the data lake.
*/
public var dataAccessRoleArn: kotlin.String? = null
/**
* Enter the S3 location for the data lake. You can specify a new S3 bucket or a new folder of an existing S3 bucket. The flywheel creates the data lake at this location.
*/
public var dataLakeS3Uri: kotlin.String? = null
/**
* Data security configurations.
*/
public var dataSecurityConfig: aws.sdk.kotlin.services.comprehend.model.DataSecurityConfig? = null
/**
* Name for the flywheel.
*/
public var flywheelName: kotlin.String? = null
/**
* The model type. You need to set `ModelType` if you are creating a flywheel for a new model.
*/
public var modelType: aws.sdk.kotlin.services.comprehend.model.ModelType? = null
/**
* The tags to associate with this flywheel.
*/
public var tags: List? = null
/**
* Configuration about the model associated with the flywheel. You need to set `TaskConfig` if you are creating a flywheel for a new model.
*/
public var taskConfig: aws.sdk.kotlin.services.comprehend.model.TaskConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.CreateFlywheelRequest) : this() {
this.activeModelArn = x.activeModelArn
this.clientRequestToken = x.clientRequestToken
this.dataAccessRoleArn = x.dataAccessRoleArn
this.dataLakeS3Uri = x.dataLakeS3Uri
this.dataSecurityConfig = x.dataSecurityConfig
this.flywheelName = x.flywheelName
this.modelType = x.modelType
this.tags = x.tags
this.taskConfig = x.taskConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.CreateFlywheelRequest = CreateFlywheelRequest(this)
/**
* construct an [aws.sdk.kotlin.services.comprehend.model.DataSecurityConfig] inside the given [block]
*/
public fun dataSecurityConfig(block: aws.sdk.kotlin.services.comprehend.model.DataSecurityConfig.Builder.() -> kotlin.Unit) {
this.dataSecurityConfig = aws.sdk.kotlin.services.comprehend.model.DataSecurityConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.comprehend.model.TaskConfig] inside the given [block]
*/
public fun taskConfig(block: aws.sdk.kotlin.services.comprehend.model.TaskConfig.Builder.() -> kotlin.Unit) {
this.taskConfig = aws.sdk.kotlin.services.comprehend.model.TaskConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}