Skip to content
Permalink
Browse files

Issue #524: Fretboard: Add kdoc to Experiment properties

Closes #524: Fretboard: Add kdoc to Experiment properties
  • Loading branch information...
fercarcedo authored and pocmo committed Jul 30, 2018
1 parent 5db9827 commit b8b94f5d421717c0c488656d0838f3478d9f37ad
@@ -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

0 comments on commit b8b94f5

Please sign in to comment.
You can’t perform that action at this time.