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

public final class ObservedEvent extends Object implements com.azure.json.JsonSerializable<ObservedEvent>
An event observed by a metric.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ObservedEvent class.
    ObservedEvent(String eventName)
    Creates an instance of ObservedEvent class with the specified event name.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ObservedEvent from the JsonReader.
    Get the eventName property: The name of the event.
    Get the filter property: [Optional] A condition to filter events.
    setEventName(String eventName)
    Set the eventName property: The name of the event.
    setFilter(String filter)
    Set the filter property: [Optional] A condition to filter events.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ObservedEvent

      public ObservedEvent()
      Creates an instance of ObservedEvent class.
    • ObservedEvent

      public ObservedEvent(String eventName)
      Creates an instance of ObservedEvent class with the specified event name.
      Parameters:
      eventName - the name of the event.
  • Method Details

    • getEventName

      public String getEventName()
      Get the eventName property: The name of the event.
      Returns:
      the eventName value.
    • setEventName

      public ObservedEvent setEventName(String eventName)
      Set the eventName property: The name of the event.

      Required when create the resource.

      Parameters:
      eventName - the eventName value to set.
      Returns:
      the ObservedEvent object itself.
    • getFilter

      public String getFilter()
      Get the filter property: [Optional] A condition to filter events.
      Returns:
      the filter value.
    • setFilter

      public ObservedEvent setFilter(String filter)
      Set the filter property: [Optional] A condition to filter events.
      Parameters:
      filter - the filter value to set.
      Returns:
      the ObservedEvent 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<ObservedEvent>
      Throws:
      IOException
    • fromJson

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