Class AiScenario

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

public class AiScenario extends Object
An ML Scenario consists of a number of executables. E.g., there can be one or several training executables, an inference (deployment) executable. An ML Scenario is versioned.
  • Constructor Details

    • AiScenario

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

    • name

      @Nonnull public AiScenario name(@Nonnull String name)
      Set the name of this AiScenario instance and return the same instance.
      Parameters:
      name - Name of the scenario
      Returns:
      The same instance of this AiScenario class
    • getName

      @Nonnull public String getName()
      Name of the scenario
      Returns:
      name The name of this AiScenario instance.
    • setName

      public void setName(@Nonnull String name)
      Set the name of this AiScenario instance.
      Parameters:
      name - Name of the scenario
    • description

      @Nonnull public AiScenario description(@Nullable String description)
      Set the description of this AiScenario instance and return the same instance.
      Parameters:
      description - Description of the scenario
      Returns:
      The same instance of this AiScenario class
    • getDescription

      @Nonnull public String getDescription()
      Description of the scenario
      Returns:
      description The description of this AiScenario instance.
    • setDescription

      public void setDescription(@Nullable String description)
      Set the description of this AiScenario instance.
      Parameters:
      description - Description of the scenario
    • labels

      @Nonnull public AiScenario labels(@Nullable List<AiScenarioLabel> labels)
      Set the labels of this AiScenario instance and return the same instance.
      Parameters:
      labels - Arbitrary labels as meta information
      Returns:
      The same instance of this AiScenario class
    • addLabelsItem

      @Nonnull public AiScenario addLabelsItem(@Nonnull AiScenarioLabel labelsItem)
      Add one labels instance to this AiScenario.
      Parameters:
      labelsItem - The labels that should be added
      Returns:
      The same instance of type AiScenario
    • getLabels

      @Nonnull public List<AiScenarioLabel> getLabels()
      Arbitrary labels as meta information
      Returns:
      labels The labels of this AiScenario instance.
    • setLabels

      public void setLabels(@Nullable List<AiScenarioLabel> labels)
      Set the labels of this AiScenario instance.
      Parameters:
      labels - Arbitrary labels as meta information
    • id

      @Nonnull public AiScenario id(@Nonnull String id)
      Set the id of this AiScenario instance and return the same instance.
      Parameters:
      id - ID of the scenario
      Returns:
      The same instance of this AiScenario class
    • getId

      @Nonnull public String getId()
      ID of the scenario
      Returns:
      id The id of this AiScenario instance.
    • setId

      public void setId(@Nonnull String id)
      Set the id of this AiScenario instance.
      Parameters:
      id - ID of the scenario
    • createdAt

      @Nonnull public AiScenario createdAt(@Nonnull OffsetDateTime createdAt)
      Set the createdAt of this AiScenario instance and return the same instance.
      Parameters:
      createdAt - Timestamp of resource creation
      Returns:
      The same instance of this AiScenario class
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      Timestamp of resource creation
      Returns:
      createdAt The createdAt of this AiScenario instance.
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
      Set the createdAt of this AiScenario instance.
      Parameters:
      createdAt - Timestamp of resource creation
    • modifiedAt

      @Nonnull public AiScenario modifiedAt(@Nonnull OffsetDateTime modifiedAt)
      Set the modifiedAt of this AiScenario instance and return the same instance.
      Parameters:
      modifiedAt - Timestamp of latest resource modification
      Returns:
      The same instance of this AiScenario class
    • getModifiedAt

      @Nonnull public OffsetDateTime getModifiedAt()
      Timestamp of latest resource modification
      Returns:
      modifiedAt The modifiedAt of this AiScenario instance.
    • setModifiedAt

      public void setModifiedAt(@Nonnull OffsetDateTime modifiedAt)
      Set the modifiedAt of this AiScenario instance.
      Parameters:
      modifiedAt - Timestamp of latest resource modification
    • getCustomFieldNames

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