Class CreateMetricWithQueryIr

java.lang.Object
ai.shipeasy.admin.model.CreateMetricWithQueryIr

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class CreateMetricWithQueryIr extends Object
Create a metric, supplying the query as a typed `query_ir`.
  • Field Details

  • Constructor Details

    • CreateMetricWithQueryIr

      public CreateMetricWithQueryIr()
  • Method Details

    • name

      public CreateMetricWithQueryIr name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Stable metric key. Single segment or `folder.name`; lowercase letters, digits, `_`/`-`; max 128 chars.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • folder

      public CreateMetricWithQueryIr folder(@Nullable String folder)
    • getFolder

      @Nullable public String getFolder()
      Optional folder name grouping items in the dashboard. Alphanumeric, `_` or `-` (no `/`). Part of the SDK lookup key (`<folder>/<name>`).
      Returns:
      folder
    • setFolder

      public void setFolder(@Nullable String folder)
    • eventName

      public CreateMetricWithQueryIr eventName(@Nonnull String eventName)
    • getEventName

      @Nonnull public String getEventName()
      Source event the query reads from.
      Returns:
      eventName
    • setEventName

      public void setEventName(@Nonnull String eventName)
    • queryIr

      public CreateMetricWithQueryIr queryIr(@Nonnull QueryIr queryIr)
    • getQueryIr

      @Nonnull public QueryIr getQueryIr()
      Get queryIr
      Returns:
      queryIr
    • setQueryIr

      public void setQueryIr(@Nonnull QueryIr queryIr)
    • winsorizePct

      public CreateMetricWithQueryIr winsorizePct(@Nullable Integer winsorizePct)
    • getWinsorizePct

      @Nullable public Integer getWinsorizePct()
      Winsorise percentile (1–99) to clamp outliers. Defaults to 99. minimum: 1 maximum: 99
      Returns:
      winsorizePct
    • setWinsorizePct

      public void setWinsorizePct(@Nullable Integer winsorizePct)
    • defaultMinEffectOfInterest

      public CreateMetricWithQueryIr defaultMinEffectOfInterest(@Nullable BigDecimal defaultMinEffectOfInterest)
    • getDefaultMinEffectOfInterest

      @Nullable public BigDecimal getDefaultMinEffectOfInterest()
      Default minimum effect of interest (relative, 0–1) — the smallest change in this metric worth acting on, used as the power-planning baseline. Intrinsic to the metric; an experiment overrides it per-attachment with `min_effect_of_interest` when a specific decision has a different cost/risk bar. `null` to omit.
      Returns:
      defaultMinEffectOfInterest
    • setDefaultMinEffectOfInterest

      public void setDefaultMinEffectOfInterest(@Nullable BigDecimal defaultMinEffectOfInterest)
    • direction

      public CreateMetricWithQueryIr direction(@Nullable MetricDirection direction)
    • getDirection

      @Nullable public MetricDirection getDirection()
      Get direction
      Returns:
      direction
    • setDirection

      public void setDirection(@Nullable MetricDirection direction)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to CreateMetricWithQueryIr
    • fromJson

      public static CreateMetricWithQueryIr fromJson(String jsonString) throws IOException
      Create an instance of CreateMetricWithQueryIr given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of CreateMetricWithQueryIr
      Throws:
      IOException - if the JSON string is invalid with respect to CreateMetricWithQueryIr
    • toJson

      public String toJson()
      Convert an instance of CreateMetricWithQueryIr to an JSON string
      Returns:
      JSON string