commonMain.aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuery.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The parameters for an Clean Rooms protected query.
*/
public class ProtectedQuery private constructor(builder: Builder) {
/**
* The time at which the protected query was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The sensitivity parameters of the differential privacy results of the protected query.
*/
public val differentialPrivacy: aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyParameters? = builder.differentialPrivacy
/**
* An error thrown by the protected query.
*/
public val error: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryError? = builder.error
/**
* The identifier for a protected query instance.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The ARN of the membership.
*/
public val membershipArn: kotlin.String = requireNotNull(builder.membershipArn) { "A non-null value must be provided for membershipArn" }
/**
* The identifier for the membership.
*/
public val membershipId: kotlin.String = requireNotNull(builder.membershipId) { "A non-null value must be provided for membershipId" }
/**
* The result of the protected query.
*/
public val result: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResult? = builder.result
/**
* Contains any details needed to write the query results.
*/
public val resultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResultConfiguration? = builder.resultConfiguration
/**
* The protected query SQL parameters.
*/
public val sqlParameters: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuerySqlParameters? = builder.sqlParameters
/**
* Statistics about protected query execution.
*/
public val statistics: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatistics? = builder.statistics
/**
* The status of the query.
*/
public val status: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuery = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProtectedQuery(")
append("createTime=$createTime,")
append("differentialPrivacy=$differentialPrivacy,")
append("error=$error,")
append("id=$id,")
append("membershipArn=$membershipArn,")
append("membershipId=$membershipId,")
append("result=$result,")
append("resultConfiguration=$resultConfiguration,")
append("sqlParameters=*** Sensitive Data Redacted ***,")
append("statistics=$statistics,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createTime.hashCode()
result = 31 * result + (differentialPrivacy?.hashCode() ?: 0)
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (membershipArn.hashCode())
result = 31 * result + (membershipId.hashCode())
result = 31 * result + (result?.hashCode() ?: 0)
result = 31 * result + (resultConfiguration?.hashCode() ?: 0)
result = 31 * result + (sqlParameters?.hashCode() ?: 0)
result = 31 * result + (statistics?.hashCode() ?: 0)
result = 31 * result + (status.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 ProtectedQuery
if (createTime != other.createTime) return false
if (differentialPrivacy != other.differentialPrivacy) return false
if (error != other.error) return false
if (id != other.id) return false
if (membershipArn != other.membershipArn) return false
if (membershipId != other.membershipId) return false
if (result != other.result) return false
if (resultConfiguration != other.resultConfiguration) return false
if (sqlParameters != other.sqlParameters) return false
if (statistics != other.statistics) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuery = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time at which the protected query was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The sensitivity parameters of the differential privacy results of the protected query.
*/
public var differentialPrivacy: aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyParameters? = null
/**
* An error thrown by the protected query.
*/
public var error: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryError? = null
/**
* The identifier for a protected query instance.
*/
public var id: kotlin.String? = null
/**
* The ARN of the membership.
*/
public var membershipArn: kotlin.String? = null
/**
* The identifier for the membership.
*/
public var membershipId: kotlin.String? = null
/**
* The result of the protected query.
*/
public var result: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResult? = null
/**
* Contains any details needed to write the query results.
*/
public var resultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResultConfiguration? = null
/**
* The protected query SQL parameters.
*/
public var sqlParameters: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuerySqlParameters? = null
/**
* Statistics about protected query execution.
*/
public var statistics: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatistics? = null
/**
* The status of the query.
*/
public var status: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuery) : this() {
this.createTime = x.createTime
this.differentialPrivacy = x.differentialPrivacy
this.error = x.error
this.id = x.id
this.membershipArn = x.membershipArn
this.membershipId = x.membershipId
this.result = x.result
this.resultConfiguration = x.resultConfiguration
this.sqlParameters = x.sqlParameters
this.statistics = x.statistics
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuery = ProtectedQuery(this)
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyParameters] inside the given [block]
*/
public fun differentialPrivacy(block: aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyParameters.Builder.() -> kotlin.Unit) {
this.differentialPrivacy = aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryError] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryError.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryError.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResult] inside the given [block]
*/
public fun result(block: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResult.Builder.() -> kotlin.Unit) {
this.result = aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResultConfiguration] inside the given [block]
*/
public fun resultConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResultConfiguration.Builder.() -> kotlin.Unit) {
this.resultConfiguration = aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryResultConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuerySqlParameters] inside the given [block]
*/
public fun sqlParameters(block: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuerySqlParameters.Builder.() -> kotlin.Unit) {
this.sqlParameters = aws.sdk.kotlin.services.cleanrooms.model.ProtectedQuerySqlParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatistics] inside the given [block]
*/
public fun statistics(block: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatistics.Builder.() -> kotlin.Unit) {
this.statistics = aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryStatistics.invoke(block)
}
internal fun correctErrors(): Builder {
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (id == null) id = ""
if (membershipArn == null) membershipArn = ""
if (membershipId == null) membershipId = ""
if (status == null) status = ProtectedQueryStatus.SdkUnknown("no value provided")
return this
}
}
}