commonMain.aws.sdk.kotlin.services.comprehend.model.OutputDataConfig.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
/**
* Provides configuration parameters for the output of inference jobs.
*/
public class OutputDataConfig private constructor(builder: Builder) {
/**
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. Specify the Key Id of a symmetric key, because you cannot use an asymmetric key for uploading data to S3.
*
* The KmsKeyId can be one of the following formats:
* + KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
* + Amazon Resource Name (ARN) of a KMS Key: `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
* + KMS Key Alias: `"alias/ExampleAlias"`
* + ARN of a KMS Key Alias: `"arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"`
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
/**
* When you use the `OutputDataConfig` object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same Region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output file.
*
* When the topic detection job is finished, the service creates an output file in a directory specific to the job. The `S3Uri` field contains the location of the output file, called `output.tar.gz`. It is a compressed archive that contains the ouput of the operation.
*
* For a PII entity detection job, the output file is plain text, not a compressed archive. The output file name is the same as the input file, with `.out` appended at the end.
*/
public val s3Uri: kotlin.String = requireNotNull(builder.s3Uri) { "A non-null value must be provided for s3Uri" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.OutputDataConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OutputDataConfig(")
append("kmsKeyId=$kmsKeyId,")
append("s3Uri=$s3Uri")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kmsKeyId?.hashCode() ?: 0
result = 31 * result + (s3Uri.hashCode())
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 OutputDataConfig
if (kmsKeyId != other.kmsKeyId) return false
if (s3Uri != other.s3Uri) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.OutputDataConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. Specify the Key Id of a symmetric key, because you cannot use an asymmetric key for uploading data to S3.
*
* The KmsKeyId can be one of the following formats:
* + KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
* + Amazon Resource Name (ARN) of a KMS Key: `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
* + KMS Key Alias: `"alias/ExampleAlias"`
* + ARN of a KMS Key Alias: `"arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"`
*/
public var kmsKeyId: kotlin.String? = null
/**
* When you use the `OutputDataConfig` object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same Region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output file.
*
* When the topic detection job is finished, the service creates an output file in a directory specific to the job. The `S3Uri` field contains the location of the output file, called `output.tar.gz`. It is a compressed archive that contains the ouput of the operation.
*
* For a PII entity detection job, the output file is plain text, not a compressed archive. The output file name is the same as the input file, with `.out` appended at the end.
*/
public var s3Uri: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.OutputDataConfig) : this() {
this.kmsKeyId = x.kmsKeyId
this.s3Uri = x.s3Uri
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.OutputDataConfig = OutputDataConfig(this)
internal fun correctErrors(): Builder {
if (s3Uri == null) s3Uri = ""
return this
}
}
}