Class UserRateMetricDefinition

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

public final class UserRateMetricDefinition extends ExperimentMetricDefinition
The definition of a UserRate metric definition. Calculates the percentage of users who encounter a start event and subsequently an end event. Users must encounter events in the specified order.
  • Constructor Details

    • UserRateMetricDefinition

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

    • getType

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

      public ObservedEvent getStartEvent()
      Get the startEvent property: The start event to observe as the rate denominator.
      Returns:
      the startEvent value.
    • setStartEvent

      public UserRateMetricDefinition setStartEvent(ObservedEvent startEvent)
      Set the startEvent property: The start event to observe as the rate denominator.

      Required when create the resource.

      Parameters:
      startEvent - the startEvent value to set.
      Returns:
      the UserRateMetricDefinition object itself.
    • getEndEvent

      public ObservedEvent getEndEvent()
      Get the endEvent property: The end event to observe, which is a condition for the rate numerator.
      Returns:
      the endEvent value.
    • setEndEvent

      public UserRateMetricDefinition setEndEvent(ObservedEvent endEvent)
      Set the endEvent property: The end event to observe, which is a condition for the rate numerator.

      Required when create the resource.

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