Class EventCountMetricDefinition

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

public final class EventCountMetricDefinition extends ExperimentMetricDefinition
The definition of an EventCount metric definition. Counts the occurrences of a specified event.
  • Constructor Details

    • EventCountMetricDefinition

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

      public EventCountMetricDefinition setEvent(ObservedEvent event)
      Set the event property: Event to observe.

      Required when create the resource.

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