Class ExperimentMetricDefinition

java.lang.Object
com.azure.analytics.onlineexperimentation.models.ExperimentMetricDefinition
All Implemented Interfaces:
com.azure.json.JsonSerializable<ExperimentMetricDefinition>
Direct Known Subclasses:
AverageMetricDefinition, EventCountMetricDefinition, EventRateMetricDefinition, PercentileMetricDefinition, SumMetricDefinition, UserCountMetricDefinition, UserRateMetricDefinition

public class ExperimentMetricDefinition extends Object implements com.azure.json.JsonSerializable<ExperimentMetricDefinition>
The metric definition, which determines how the metric value is calculated from event data.
  • Constructor Details

    • ExperimentMetricDefinition

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

    • getType

      public ExperimentMetricType getType()
      Get the type property: Discriminator property for ExperimentMetricDefinition.
      Returns:
      the type 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>
      Throws:
      IOException
    • fromJson

      public static ExperimentMetricDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ExperimentMetricDefinition from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ExperimentMetricDefinition 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 ExperimentMetricDefinition.