Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Issue #524: Fretboard: Add kdoc to Experiment properties
Browse files Browse the repository at this point in the history
Closes #524: Fretboard: Add kdoc to Experiment properties
  • Loading branch information
fercarcedo authored and pocmo committed Aug 1, 2018
1 parent 5db9827 commit b8b94f5
Showing 1 changed file with 56 additions and 0 deletions.
Expand Up @@ -10,30 +10,86 @@ package mozilla.components.service.fretboard
* storage mechanism
*/
data class Experiment(
/**
* Unique identifier of the experiment
*/
val id: String,
/**
* Human-readable name of the experiment
*/
val name: String? = null,
/**
* Detailed description of the experiment
*/
val description: String? = null,
/**
* Filters for enabling the experiment
*/
val match: Matcher? = null,
/**
* Experiment buckets
*/
val bucket: Bucket? = null,
/**
* Last modified date, as a UNIX timestamp
*/
val lastModified: Long? = null,
/**
* Experiment associated metadata
*/
val payload: ExperimentPayload? = null
) {
data class Matcher(
/**
* Language of the device, as a regex
*/
val language: String? = null,
/**
* id (package name) of the expected application, as a regex
*/
val appId: String? = null,
/**
* Regions where the experiment should be enabled
*/
val regions: List<String>? = null,
/**
* Required app version, as a regex
*/
val version: String? = null,
/**
* Required device manufacturer, as a regex
*/
val manufacturer: String? = null,
/**
* Required device model, as a regex
*/
val device: String? = null,
/**
* Required country, as a three-letter abbreviation
*/
val country: String? = null,
/**
* Required app release channel (alpha, beta, ...), as a regex
*/
val releaseChannel: String? = null
)

data class Bucket(
/**
* Maximum bucket (exclusive), values from 0 to 100
*/
val max: Int? = null,
/**
* Minimum bucket (inclusive), values from 0 to 100
*/
val min: Int? = null
)

/**
* Compares experiments by their id
*
* @return true if the two experiments have the same id, false otherwise
*/
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
Expand Down

0 comments on commit b8b94f5

Please sign in to comment.