Class TrckMetricResource

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

public class TrckMetricResource extends Object
Collection of various metrics/tags/labels associated against some execution/deployment
  • Constructor Details

    • TrckMetricResource

      protected TrckMetricResource()
      Default constructor for TrckMetricResource.
  • Method Details

    • executionId

      @Nonnull public TrckMetricResource executionId(@Nonnull String executionId)
      Set the executionId of this TrckMetricResource instance and return the same instance.
      Parameters:
      executionId - Generic ID
      Returns:
      The same instance of this TrckMetricResource class
    • getExecutionId

      @Nonnull public String getExecutionId()
      Generic ID
      Returns:
      executionId The executionId of this TrckMetricResource instance.
    • setExecutionId

      public void setExecutionId(@Nonnull String executionId)
      Set the executionId of this TrckMetricResource instance.
      Parameters:
      executionId - Generic ID
    • createdAt

      @Nonnull public TrckMetricResource createdAt(@Nullable OffsetDateTime createdAt)
      Set the createdAt of this TrckMetricResource instance and return the same instance.
      Parameters:
      createdAt - Time when the metric was created or logged in RFC3339 format
      Returns:
      The same instance of this TrckMetricResource class
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      Time when the metric was created or logged in RFC3339 format
      Returns:
      createdAt The createdAt of this TrckMetricResource instance.
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
      Set the createdAt of this TrckMetricResource instance.
      Parameters:
      createdAt - Time when the metric was created or logged in RFC3339 format
    • modifiedAt

      @Nonnull public TrckMetricResource modifiedAt(@Nullable OffsetDateTime modifiedAt)
      Set the modifiedAt of this TrckMetricResource instance and return the same instance.
      Parameters:
      modifiedAt - Time when the metric was created or logged in RFC3339 format
      Returns:
      The same instance of this TrckMetricResource class
    • getModifiedAt

      @Nonnull public OffsetDateTime getModifiedAt()
      Time when the metric was created or logged in RFC3339 format
      Returns:
      modifiedAt The modifiedAt of this TrckMetricResource instance.
    • setModifiedAt

      public void setModifiedAt(@Nullable OffsetDateTime modifiedAt)
      Set the modifiedAt of this TrckMetricResource instance.
      Parameters:
      modifiedAt - Time when the metric was created or logged in RFC3339 format
    • metrics

      @Nonnull public TrckMetricResource metrics(@Nullable List<TrckMetric> metrics)
      Set the metrics of this TrckMetricResource instance and return the same instance.
      Parameters:
      metrics - Array of Metric items
      Returns:
      The same instance of this TrckMetricResource class
    • addMetricsItem

      @Nonnull public TrckMetricResource addMetricsItem(@Nonnull TrckMetric metricsItem)
      Add one metrics instance to this TrckMetricResource.
      Parameters:
      metricsItem - The metrics that should be added
      Returns:
      The same instance of type TrckMetricResource
    • getMetrics

      @Nonnull public List<TrckMetric> getMetrics()
      Array of Metric items
      Returns:
      metrics The metrics of this TrckMetricResource instance.
    • setMetrics

      public void setMetrics(@Nullable List<TrckMetric> metrics)
      Set the metrics of this TrckMetricResource instance.
      Parameters:
      metrics - Array of Metric items
    • tags

      @Nonnull public TrckMetricResource tags(@Nullable List<TrckTag> tags)
      Set the tags of this TrckMetricResource instance and return the same instance.
      Parameters:
      tags - a list of name-value object pairs associated with the execution/deployment. Tags are queryable.
      Returns:
      The same instance of this TrckMetricResource class
    • addTagsItem

      @Nonnull public TrckMetricResource addTagsItem(@Nonnull TrckTag tagsItem)
      Add one tags instance to this TrckMetricResource.
      Parameters:
      tagsItem - The tags that should be added
      Returns:
      The same instance of type TrckMetricResource
    • getTags

      @Nonnull public List<TrckTag> getTags()
      a list of name-value object pairs associated with the execution/deployment. Tags are queryable.
      Returns:
      tags The tags of this TrckMetricResource instance.
    • setTags

      public void setTags(@Nullable List<TrckTag> tags)
      Set the tags of this TrckMetricResource instance.
      Parameters:
      tags - a list of name-value object pairs associated with the execution/deployment. Tags are queryable.
    • customInfo

      @Nonnull public TrckMetricResource customInfo(@Nullable List<TrckCustomInfoObject> customInfo)
      Set the customInfo of this TrckMetricResource instance and return the same instance.
      Parameters:
      customInfo -
      Returns:
      The same instance of this TrckMetricResource class
    • addCustomInfoItem

      @Nonnull public TrckMetricResource addCustomInfoItem(@Nonnull TrckCustomInfoObject customInfoItem)
      Add one customInfo instance to this TrckMetricResource.
      Parameters:
      customInfoItem - The customInfo that should be added
      Returns:
      The same instance of type TrckMetricResource
    • getCustomInfo

      @Nonnull public List<TrckCustomInfoObject> getCustomInfo()
      Returns:
      customInfo The customInfo of this TrckMetricResource instance.
    • setCustomInfo

      public void setCustomInfo(@Nullable List<TrckCustomInfoObject> customInfo)
      Set the customInfo of this TrckMetricResource instance.
      Parameters:
      customInfo -
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the TrckMetricResource.
      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 TrckMetricResource 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 TrckMetricResource 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 TrckMetricResource 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 TrckMetricResource.Builder create()
      Create a type-safe, fluent-api builder object to construct a new TrckMetricResource instance with all required arguments.