Package com.sap.ai.sdk.core.model

# Class TrckGetMetric

java.lang.Object
com.sap.ai.sdk.core.model.TrckGetMetric

public class TrckGetMetric extends Object
Key-value metrics, where the value is numeric. Metric can also have optional step and label fields.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `TrckGetMetric.Builder`
  Builder helper class.
  `static interface`
  `TrckGetMetric.Builder1`
  Builder helper class.
  `static interface`
  `TrckGetMetric.Builder2`
  Builder helper class.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `TrckGetMetric()`
  Default constructor for TrckGetMetric.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TrckGetMetric`
  `addLabelsItem(TrckLabel labelsItem)`
  Add one labels instance to this `TrckGetMetric`.
  `static TrckGetMetric.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `TrckGetMetric` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `TrckGetMetric`.
  `List<TrckLabel>`
  `getLabels()`
  a list of name-value object pairs associated with some metric.
  `String`
  `getName()`
  Name of the metric
  `Integer`
  `getStep()`
  step is an optional integer that represents any measurement of training progress (number of training iterations, number of epochs, and so on) for the metric minimum: 0
  `OffsetDateTime`
  `getTimestamp()`
  Time when the metric was created or logged in RFC3339 format
  `BigDecimal`
  `getValue()`
  Numeric Value of the metric
  `int`
  `hashCode()`
  `TrckGetMetric`
  `labels(List<TrckLabel> labels)`
  Set the labels of this `TrckGetMetric` instance and return the same instance.
  `TrckGetMetric`
  `name(String name)`
  Set the name of this `TrckGetMetric` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `TrckGetMetric` instance.
  `void`
  `setLabels(List<TrckLabel> labels)`
  Set the labels of this `TrckGetMetric` instance.
  `void`
  `setName(String name)`
  Set the name of this `TrckGetMetric` instance.
  `void`
  `setStep(Integer step)`
  Set the step of this `TrckGetMetric` instance.
  `void`
  `setTimestamp(OffsetDateTime timestamp)`
  Set the timestamp of this `TrckGetMetric` instance.
  `void`
  `setValue(BigDecimal value)`
  Set the value of this `TrckGetMetric` instance.
  `TrckGetMetric`
  `step(Integer step)`
  Set the step of this `TrckGetMetric` instance and return the same instance.
  `TrckGetMetric`
  `timestamp(OffsetDateTime timestamp)`
  Set the timestamp of this `TrckGetMetric` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `TrckGetMetric` instance including unrecognized properties.
  `String`
  `toString()`
  `TrckGetMetric`
  `value(BigDecimal value)`
  Set the value of this `TrckGetMetric` instance and return the same instance.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TrckGetMetric

    protected TrckGetMetric()
    Default constructor for TrckGetMetric.

- ## Method Details

  - ### name

    @Nonnull public TrckGetMetric name(@Nonnull String name)
    Set the name of this `TrckGetMetric` instance and return the same instance.
    Parameters:
      `name` - Name of the metric
    Returns:
      The same instance of this `TrckGetMetric` class

  - ### getName

    @Nonnull public String getName()
    Name of the metric
    Returns:
      name The name of this `TrckGetMetric` instance.

  - ### setName

    public void setName(@Nonnull String name)
    Set the name of this `TrckGetMetric` instance.
    Parameters:
      `name` - Name of the metric

  - ### value

    @Nonnull public TrckGetMetric value(@Nonnull BigDecimal value)
    Set the value of this `TrckGetMetric` instance and return the same instance.
    Parameters:
      `value` - Numeric Value of the metric
    Returns:
      The same instance of this `TrckGetMetric` class

  - ### getValue

    @Nonnull public BigDecimal getValue()
    Numeric Value of the metric
    Returns:
      value The value of this `TrckGetMetric` instance.

  - ### setValue

    public void setValue(@Nonnull BigDecimal value)
    Set the value of this `TrckGetMetric` instance.
    Parameters:
      `value` - Numeric Value of the metric

  - ### timestamp

    @Nonnull public TrckGetMetric timestamp(@Nonnull OffsetDateTime timestamp)
    Set the timestamp of this `TrckGetMetric` instance and return the same instance.
    Parameters:
      `timestamp` - Time when the metric was created or logged in RFC3339 format
    Returns:
      The same instance of this `TrckGetMetric` class

  - ### getTimestamp

    @Nonnull public OffsetDateTime getTimestamp()
    Time when the metric was created or logged in RFC3339 format
    Returns:
      timestamp The timestamp of this `TrckGetMetric` instance.

  - ### setTimestamp

    public void setTimestamp(@Nonnull OffsetDateTime timestamp)
    Set the timestamp of this `TrckGetMetric` instance.
    Parameters:
      `timestamp` - Time when the metric was created or logged in RFC3339 format

  - ### step

    @Nonnull public TrckGetMetric step(@Nullable Integer step)
    Set the step of this `TrckGetMetric` instance and return the same instance.
    Parameters:
      `step` - step is an optional integer that represents any measurement of training progress (number of training iterations, number of epochs, and so on) for the metric Minimum: 0
    Returns:
      The same instance of this `TrckGetMetric` class

  - ### getStep

    @Nonnull public Integer getStep()
    step is an optional integer that represents any measurement of training progress (number of training iterations, number of epochs, and so on) for the metric minimum: 0
    Returns:
      step The step of this `TrckGetMetric` instance.

  - ### setStep

    public void setStep(@Nullable Integer step)
    Set the step of this `TrckGetMetric` instance.
    Parameters:
      `step` - step is an optional integer that represents any measurement of training progress (number of training iterations, number of epochs, and so on) for the metric Minimum: 0

  - ### labels

    @Nonnull public TrckGetMetric labels(@Nullable List<TrckLabel> labels)
    Set the labels of this `TrckGetMetric` instance and return the same instance.
    Parameters:
      `labels` - a list of name-value object pairs associated with some metric.
    Returns:
      The same instance of this `TrckGetMetric` class

  - ### addLabelsItem

    @Nonnull public TrckGetMetric addLabelsItem(@Nonnull TrckLabel labelsItem)
    Add one labels instance to this `TrckGetMetric`.
    Parameters:
      `labelsItem` - The labels that should be added
    Returns:
      The same instance of type `TrckGetMetric`

  - ### getLabels

    @Nonnull public List<TrckLabel> getLabels()
    a list of name-value object pairs associated with some metric.
    Returns:
      labels The labels of this `TrckGetMetric` instance.

  - ### setLabels

    public void setLabels(@Nullable List<TrckLabel> labels)
    Set the labels of this `TrckGetMetric` instance.
    Parameters:
      `labels` - a list of name-value object pairs associated with some metric.

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `TrckGetMetric`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `TrckGetMetric` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `TrckGetMetric` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `TrckGetMetric` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static TrckGetMetric.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `TrckGetMetric` instance with all required arguments.