commonMain.aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyTemplateParametersOutput.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
/**
* The epsilon and noise parameter values that were used for the differential privacy template.
*/
public class DifferentialPrivacyTemplateParametersOutput private constructor(builder: Builder) {
/**
* The epsilon value that you specified.
*/
public val epsilon: kotlin.Int = requireNotNull(builder.epsilon) { "A non-null value must be provided for epsilon" }
/**
* Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.
*/
public val usersNoisePerQuery: kotlin.Int = requireNotNull(builder.usersNoisePerQuery) { "A non-null value must be provided for usersNoisePerQuery" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyTemplateParametersOutput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DifferentialPrivacyTemplateParametersOutput(")
append("epsilon=$epsilon,")
append("usersNoisePerQuery=$usersNoisePerQuery")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = epsilon
result = 31 * result + (usersNoisePerQuery)
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 DifferentialPrivacyTemplateParametersOutput
if (epsilon != other.epsilon) return false
if (usersNoisePerQuery != other.usersNoisePerQuery) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyTemplateParametersOutput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The epsilon value that you specified.
*/
public var epsilon: kotlin.Int? = null
/**
* Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.
*/
public var usersNoisePerQuery: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyTemplateParametersOutput) : this() {
this.epsilon = x.epsilon
this.usersNoisePerQuery = x.usersNoisePerQuery
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.DifferentialPrivacyTemplateParametersOutput = DifferentialPrivacyTemplateParametersOutput(this)
internal fun correctErrors(): Builder {
if (epsilon == null) epsilon = 0
if (usersNoisePerQuery == null) usersNoisePerQuery = 0
return this
}
}
}