Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Condition(val userCondition: UserCondition? = null, val segmentCondition: SegmentCondition? = null, val prerequisiteFlagCondition: PrerequisiteFlagCondition? = null) : ConditionAccessor

Container class for different condition types.

Link copied to clipboard
@Serializable
data class Config(val preferences: Preferences?, var settings: Map<String, Setting>? = null, var segments: Array<Segment>? = null)

ConfigCat config.

Link copied to clipboard
@Serializable
data class PercentageOption(val percentage: Int = 0, val value: SettingValue, val variationId: String? = null)

Percentage option.

Link copied to clipboard
@Serializable
data class Preferences(val baseUrl: String, val redirect: Int = 0, val salt: String?)

The config preferences.

Link copied to clipboard
@Serializable
data class PrerequisiteFlagCondition(val prerequisiteFlagKey: String? = null, val prerequisiteComparator: Int = -1, val value: SettingValue? = null)

Prerequisite Flag Condition.

Link copied to clipboard
@Serializable
data class Segment(val name: String? = null, val segmentRules: Array<UserCondition>? = null)

ConfigCat segment.

Link copied to clipboard
@Serializable
data class SegmentCondition(val segmentIndex: Int = -1, val segmentComparator: Int = -1)

Segment Condition.

Link copied to clipboard
@Serializable
data class ServedValue(val value: SettingValue, val variationId: String? = null)
Link copied to clipboard
@Serializable
data class Setting(var type: Int = -1, val percentageAttribute: String? = null, val percentageOptions: Array<PercentageOption>? = null, val targetingRules: Array<TargetingRule>? = null, val settingValue: SettingValue, val variationId: String? = null)

Describes a feature flag / setting.

Link copied to clipboard

Describes the type of ConfigCat Feature Flag / Setting.

Link copied to clipboard
@Serializable
data class SettingValue(var booleanValue: Boolean? = null, var stringValue: String? = null, var integerValue: Int? = null, var doubleValue: Double? = null)

Setting Value contains the proper value based on type.

Link copied to clipboard
@Serializable
data class TargetingRule(val conditions: Array<Condition>? = null, val percentageOptions: Array<PercentageOption>? = null, val servedValue: ServedValue? = null)

Targeting rule.

Link copied to clipboard
@Serializable
data class UserCondition(val comparisonAttribute: String, val comparator: Int = -1, val stringValue: String? = null, val doubleValue: Double? = null, val stringArrayValue: Array<String>? = null) : ConditionAccessor

User Condition.