commonMain.aws.sdk.kotlin.services.athena.model.ResultConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.athena.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the workgroup settings.
*/
public class ResultConfiguration private constructor(builder: Builder) {
/**
* Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is `BUCKET_OWNER_FULL_CONTROL`. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public val aclConfiguration: aws.sdk.kotlin.services.athena.model.AclConfiguration? = builder.aclConfiguration
/**
* If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, `SSE_KMS` or `CSE_KMS`) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public val encryptionConfiguration: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration? = builder.encryptionConfiguration
/**
* The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for `ExpectedBucketOwner` when it makes Amazon S3 calls to your specified output location. If the `ExpectedBucketOwner` Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.
*
* This is a client-side setting. If workgroup settings override client-side settings, then the query uses the `ExpectedBucketOwner` setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public val expectedBucketOwner: kotlin.String? = builder.expectedBucketOwner
/**
* The location in Amazon S3 where your query and calculation results are stored, such as `s3://path/to/query/bucket/`. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
*/
public val outputLocation: kotlin.String? = builder.outputLocation
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.ResultConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResultConfiguration(")
append("aclConfiguration=$aclConfiguration,")
append("encryptionConfiguration=$encryptionConfiguration,")
append("expectedBucketOwner=$expectedBucketOwner,")
append("outputLocation=$outputLocation")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = aclConfiguration?.hashCode() ?: 0
result = 31 * result + (encryptionConfiguration?.hashCode() ?: 0)
result = 31 * result + (expectedBucketOwner?.hashCode() ?: 0)
result = 31 * result + (outputLocation?.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 ResultConfiguration
if (aclConfiguration != other.aclConfiguration) return false
if (encryptionConfiguration != other.encryptionConfiguration) return false
if (expectedBucketOwner != other.expectedBucketOwner) return false
if (outputLocation != other.outputLocation) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.ResultConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is `BUCKET_OWNER_FULL_CONTROL`. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public var aclConfiguration: aws.sdk.kotlin.services.athena.model.AclConfiguration? = null
/**
* If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, `SSE_KMS` or `CSE_KMS`) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public var encryptionConfiguration: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration? = null
/**
* The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for `ExpectedBucketOwner` when it makes Amazon S3 calls to your specified output location. If the `ExpectedBucketOwner` Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.
*
* This is a client-side setting. If workgroup settings override client-side settings, then the query uses the `ExpectedBucketOwner` setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
*/
public var expectedBucketOwner: kotlin.String? = null
/**
* The location in Amazon S3 where your query and calculation results are stored, such as `s3://path/to/query/bucket/`. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
*/
public var outputLocation: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.ResultConfiguration) : this() {
this.aclConfiguration = x.aclConfiguration
this.encryptionConfiguration = x.encryptionConfiguration
this.expectedBucketOwner = x.expectedBucketOwner
this.outputLocation = x.outputLocation
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.ResultConfiguration = ResultConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.athena.model.AclConfiguration] inside the given [block]
*/
public fun aclConfiguration(block: aws.sdk.kotlin.services.athena.model.AclConfiguration.Builder.() -> kotlin.Unit) {
this.aclConfiguration = aws.sdk.kotlin.services.athena.model.AclConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.athena.model.EncryptionConfiguration] inside the given [block]
*/
public fun encryptionConfiguration(block: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration.Builder.() -> kotlin.Unit) {
this.encryptionConfiguration = aws.sdk.kotlin.services.athena.model.EncryptionConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}