commonMain.aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleAggregation.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
/**
* A type of analysis rule that enables query structure and specified queries that produce aggregate statistics.
*/
public class AnalysisRuleAggregation private constructor(builder: Builder) {
/**
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.
*
* The `additionalAnalyses` parameter is currently supported for the list analysis rule (`AnalysisRuleList`) and the custom analysis rule (`AnalysisRuleCustom`).
*/
public val additionalAnalyses: aws.sdk.kotlin.services.cleanrooms.model.AdditionalAnalyses? = builder.additionalAnalyses
/**
* The columns that query runners are allowed to use in aggregation queries.
*/
public val aggregateColumns: List = requireNotNull(builder.aggregateColumns) { "A non-null value must be provided for aggregateColumns" }
/**
* Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is `AND`.
*/
public val allowedJoinOperators: List? = builder.allowedJoinOperators
/**
* The columns that query runners are allowed to select, group by, or filter by.
*/
public val dimensionColumns: List = requireNotNull(builder.dimensionColumns) { "A non-null value must be provided for dimensionColumns" }
/**
* Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.
*/
public val joinColumns: List = requireNotNull(builder.joinColumns) { "A non-null value must be provided for joinColumns" }
/**
* Control that requires member who runs query to do a join with their configured table and/or other configured table in query.
*/
public val joinRequired: aws.sdk.kotlin.services.cleanrooms.model.JoinRequiredOption? = builder.joinRequired
/**
* Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.
*/
public val outputConstraints: List = requireNotNull(builder.outputConstraints) { "A non-null value must be provided for outputConstraints" }
/**
* Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.
*/
public val scalarFunctions: List = requireNotNull(builder.scalarFunctions) { "A non-null value must be provided for scalarFunctions" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleAggregation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AnalysisRuleAggregation(")
append("additionalAnalyses=$additionalAnalyses,")
append("aggregateColumns=$aggregateColumns,")
append("allowedJoinOperators=$allowedJoinOperators,")
append("dimensionColumns=$dimensionColumns,")
append("joinColumns=$joinColumns,")
append("joinRequired=$joinRequired,")
append("outputConstraints=$outputConstraints,")
append("scalarFunctions=$scalarFunctions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalAnalyses?.hashCode() ?: 0
result = 31 * result + (aggregateColumns.hashCode())
result = 31 * result + (allowedJoinOperators?.hashCode() ?: 0)
result = 31 * result + (dimensionColumns.hashCode())
result = 31 * result + (joinColumns.hashCode())
result = 31 * result + (joinRequired?.hashCode() ?: 0)
result = 31 * result + (outputConstraints.hashCode())
result = 31 * result + (scalarFunctions.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 AnalysisRuleAggregation
if (additionalAnalyses != other.additionalAnalyses) return false
if (aggregateColumns != other.aggregateColumns) return false
if (allowedJoinOperators != other.allowedJoinOperators) return false
if (dimensionColumns != other.dimensionColumns) return false
if (joinColumns != other.joinColumns) return false
if (joinRequired != other.joinRequired) return false
if (outputConstraints != other.outputConstraints) return false
if (scalarFunctions != other.scalarFunctions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleAggregation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.
*
* The `additionalAnalyses` parameter is currently supported for the list analysis rule (`AnalysisRuleList`) and the custom analysis rule (`AnalysisRuleCustom`).
*/
public var additionalAnalyses: aws.sdk.kotlin.services.cleanrooms.model.AdditionalAnalyses? = null
/**
* The columns that query runners are allowed to use in aggregation queries.
*/
public var aggregateColumns: List? = null
/**
* Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is `AND`.
*/
public var allowedJoinOperators: List? = null
/**
* The columns that query runners are allowed to select, group by, or filter by.
*/
public var dimensionColumns: List? = null
/**
* Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.
*/
public var joinColumns: List? = null
/**
* Control that requires member who runs query to do a join with their configured table and/or other configured table in query.
*/
public var joinRequired: aws.sdk.kotlin.services.cleanrooms.model.JoinRequiredOption? = null
/**
* Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.
*/
public var outputConstraints: List? = null
/**
* Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.
*/
public var scalarFunctions: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleAggregation) : this() {
this.additionalAnalyses = x.additionalAnalyses
this.aggregateColumns = x.aggregateColumns
this.allowedJoinOperators = x.allowedJoinOperators
this.dimensionColumns = x.dimensionColumns
this.joinColumns = x.joinColumns
this.joinRequired = x.joinRequired
this.outputConstraints = x.outputConstraints
this.scalarFunctions = x.scalarFunctions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleAggregation = AnalysisRuleAggregation(this)
internal fun correctErrors(): Builder {
if (aggregateColumns == null) aggregateColumns = emptyList()
if (dimensionColumns == null) dimensionColumns = emptyList()
if (joinColumns == null) joinColumns = emptyList()
if (outputConstraints == null) outputConstraints = emptyList()
if (scalarFunctions == null) scalarFunctions = emptyList()
return this
}
}
}