All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.EvaluationSegment.kt Maven / Gradle / Ivy

@file:UseSerializers(AnySerializer::class)

package com.amplitude.experiment.evaluation

import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers

@Serializable
data class EvaluationSegment(
    // How to bucket the user given a matching condition.
    val bucket: EvaluationBucket? = null,

    // The targeting conditions. On match, bucket the user. The outer list
    // is operated with "OR" and the inner list is operated with "AND".
    val conditions: List>? = null,

    // The default variant if the conditions match but either no bucket is set,
    // or the bucket does not produce a variant.
    val variant: String? = null,

    // An object of metadata for this segment. For example, contains the
    // segment name and may contain the experiment key associated with this
    // segment. The bucketing segment's metadata is passed back in the
    // evaluation result along with the flag metadata.
    val metadata: Map? = null
)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy