Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions src/main/java/com/google/firebase/remoteconfig/ParameterValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,30 @@ private RolloutValue(String rolloutId, String value, double percent) {
this.percent = percent;
}

/**
* Gets the ID of the Rollout linked to this value.
*
* @return The Rollout ID
*/
public String getRolloutId() {
return rolloutId;
}

/**
* Gets the value that is being rolled out.
*
* @return The rollout value
*/
public String getValue() {
return value;
}

/**
* Gets the rollout percentage representing the exposure of rollout value
* in the target audience.
*
* @return Percentage of audience exposed to the rollout
*/
public double getPercent() {
return percent;
}
Expand Down Expand Up @@ -256,6 +272,11 @@ private PersonalizationValue(String personalizationId) {
this.personalizationId = personalizationId;
}

/**
* Gets the ID of the Personalization linked to this value.
*
* @return The Personalization ID
*/
public String getPersonalizationId() {
return personalizationId;
}
Expand Down Expand Up @@ -320,10 +341,20 @@ public static ExperimentVariantValue ofNoChange(String variantId) {
return new ExperimentVariantValue(variantId, null, true);
}

/**
* Gets the ID of the experiment variant.
*
* @return The variant ID
*/
public String getVariantId() {
return variantId;
}

/**
* Gets the value of the experiment variant.
*
* @return The variant value
*/
@Nullable
public String getValue() {
return value;
Expand All @@ -334,6 +365,11 @@ Boolean getNoChange() {
return noChange;
}

/**
* Returns whether the experiment variant is a no-change variant.
*
* @return true if the experiment variant is a no-change variant, and false otherwise.
*/
public boolean isNoChange() {
return Boolean.TRUE.equals(noChange);
}
Expand Down Expand Up @@ -370,10 +406,20 @@ private ExperimentValue(String experimentId, List<ExperimentVariantValue> varian
this.variantValues = variantValues;
}

/**
* Gets the ID of the experiment linked to this value.
*
* @return The Experiment ID
*/
public String getExperimentId() {
return experimentId;
}

/**
* Gets a collection of variant values served by the experiment.
*
* @return List of {@link ExperimentVariantValue}
*/
public List<ExperimentVariantValue> getExperimentVariantValues() {
return variantValues;
}
Expand Down
Loading