Class EventRateMetricDefinition

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

public final class EventRateMetricDefinition extends ExperimentMetricDefinition
The definition of an EventRate metric definition. Calculates the percentage of events satisfying a specified condition.
  • Constructor Details

    • EventRateMetricDefinition

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

    • getType

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

      public ObservedEvent getEvent()
      Get the event property: Event to observe as the rate denominator.
      Returns:
      the event value.
    • setEvent

      public EventRateMetricDefinition setEvent(ObservedEvent event)
      Set the event property: Event to observe as the rate denominator.

      Required when create the resource.

      Parameters:
      event - the event value to set.
      Returns:
      the EventRateMetricDefinition object itself.
    • getRateCondition

      public String getRateCondition()
      Get the rateCondition property: The event contributes to the rate numerator if it satisfies this condition.
      Returns:
      the rateCondition value.
    • setRateCondition

      public EventRateMetricDefinition setRateCondition(String rateCondition)
      Set the rateCondition property: The event contributes to the rate numerator if it satisfies this condition.

      Required when create the resource.

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