Class SumMetricDefinition

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

public final class SumMetricDefinition extends ExperimentMetricDefinition
The definition of a Sum metric definition. Calculates the sum of a specified event property. Experiment analysis accounts for unequal traffic allocation.
  • Constructor Details

    • SumMetricDefinition

      public SumMetricDefinition()
      Creates an instance of SumMetricDefinition 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.
      Returns:
      the value value.
    • setValue

      public SumMetricDefinition setValue(AggregatedValue value)
      Set the value property: The value to aggregate.

      Required when create the resource.

      Parameters:
      value - the value value to set.
      Returns:
      the SumMetricDefinition object itself.
    • 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 SumMetricDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SumMetricDefinition from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SumMetricDefinition 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 SumMetricDefinition.