Class ExperimentMetric

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

public final class ExperimentMetric extends Object implements com.azure.json.JsonSerializable<ExperimentMetric>
Defines experiment metric metadata and computation details.
  • Constructor Details

    • ExperimentMetric

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

    • getId

      public String getId()
      Get the id property: Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores.
      Returns:
      the id value.
    • getLifecycle

      public LifecycleStage getLifecycle()
      Get the lifecycle property: Determines whether it is included in experiment analysis.
      Returns:
      the lifecycle value.
    • setLifecycle

      public ExperimentMetric setLifecycle(LifecycleStage lifecycle)
      Set the lifecycle property: Determines whether it is included in experiment analysis.

      Required when create the resource.

      Parameters:
      lifecycle - the lifecycle value to set.
      Returns:
      the ExperimentMetric object itself.
    • getDisplayName

      public String getDisplayName()
      Get the displayName property: A user-friendly display name for the experiment metric shown in reports and dashboards.
      Returns:
      the displayName value.
    • setDisplayName

      public ExperimentMetric setDisplayName(String displayName)
      Set the displayName property: A user-friendly display name for the experiment metric shown in reports and dashboards.

      Required when create the resource.

      Parameters:
      displayName - the displayName value to set.
      Returns:
      the ExperimentMetric object itself.
    • getDescription

      public String getDescription()
      Get the description property: A detailed description of the experiment metric.
      Returns:
      the description value.
    • setDescription

      public ExperimentMetric setDescription(String description)
      Set the description property: A detailed description of the experiment metric.

      Required when create the resource.

      Parameters:
      description - the description value to set.
      Returns:
      the ExperimentMetric object itself.
    • getCategories

      public List<String> getCategories()
      Get the categories property: Categories associated with the experiment metric. Used for organizing and filtering metrics.
      Returns:
      the categories value.
    • setCategories

      public ExperimentMetric setCategories(List<String> categories)
      Set the categories property: Categories associated with the experiment metric. Used for organizing and filtering metrics.

      Required when create the resource.

      Parameters:
      categories - the categories value to set.
      Returns:
      the ExperimentMetric object itself.
    • getDesiredDirection

      public DesiredDirection getDesiredDirection()
      Get the desiredDirection property: The desired direction for changes in the metric value.
      Returns:
      the desiredDirection value.
    • setDesiredDirection

      public ExperimentMetric setDesiredDirection(DesiredDirection desiredDirection)
      Set the desiredDirection property: The desired direction for changes in the metric value.

      Required when create the resource.

      Parameters:
      desiredDirection - the desiredDirection value to set.
      Returns:
      the ExperimentMetric object itself.
    • getDefinition

      public ExperimentMetricDefinition getDefinition()
      Get the definition property: The metric definition specifying how the metric value is calculated from event data.
      Returns:
      the definition value.
    • setDefinition

      public ExperimentMetric setDefinition(ExperimentMetricDefinition definition)
      Set the definition property: The metric definition specifying how the metric value is calculated from event data.

      Required when create the resource.

      Parameters:
      definition - the definition value to set.
      Returns:
      the ExperimentMetric object itself.
    • getETag

      public String getETag()
      Get the eTag property: ETag of the experiment metric.
      Returns:
      the eTag value.
    • getLastModifiedAt

      public OffsetDateTime getLastModifiedAt()
      Get the lastModifiedAt property: The timestamp (UTC) of the last modification to the experiment metric resource.
      Returns:
      the lastModifiedAt value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ExperimentMetric>
      Throws:
      IOException
    • fromJson

      public static ExperimentMetric fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ExperimentMetric from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ExperimentMetric if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ExperimentMetric.