Class PercentileMetricDefinition

java.lang.Object
com.azure.analytics.onlineexperimentation.models.ExperimentMetricDefinition
com.azure.analytics.onlineexperimentation.models.PercentileMetricDefinition
All Implemented Interfaces:
com.azure.json.JsonSerializable<ExperimentMetricDefinition>

public final class PercentileMetricDefinition extends ExperimentMetricDefinition
The definition of a Percentile metric definition. Calculates a specified percentile of an event property.
  • Constructor Details

    • PercentileMetricDefinition

      public PercentileMetricDefinition()
      Creates an instance of PercentileMetricDefinition class.
  • Method Details

    • getType

      public ExperimentMetricType getType()
      Get the type property: Discriminator property for ExperimentMetricDefinition.
      Overrides:
      getType in class ExperimentMetricDefinition
      Returns:
      the type value.
    • getValue

      public AggregatedValue getValue()
      Get the value property: The value to aggregate, including the event name and property to measure.
      Returns:
      the value value.
    • setValue

      Set the value property: The value to aggregate, including the event name and property to measure.

      Required when create the resource.

      Parameters:
      value - the value value to set.
      Returns:
      the PercentileMetricDefinition object itself.
    • getPercentile

      public double getPercentile()
      Get the percentile property: The percentile to measure.
      Returns:
      the percentile value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ExperimentMetricDefinition>
      Overrides:
      toJson in class ExperimentMetricDefinition
      Throws:
      IOException
    • fromJson

      public static PercentileMetricDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PercentileMetricDefinition from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PercentileMetricDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the PercentileMetricDefinition.
    • setPercentile

      public PercentileMetricDefinition setPercentile(double percentile)
      Set the percentile property: The percentile to measure.

      Required when create the resource.

      Parameters:
      percentile - the percentile value to set.
      Returns:
      the PercentileMetricDefinition object itself.