Class AiArtifact

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

public class AiArtifact extends Object
Base data of the artifact; this is the data that can be provided when the artifact is created; `name` and `kind` are required because they constitute important semantic filtering criteria for use in training / inference executables (`name` is a semantic handle of the artifact within a scenario and `kind` specifies the type of usage, e.g. you would only want to allow models in the model operator).
  • Constructor Details

    • AiArtifact

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

    • labels

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

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

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

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

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

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

      public void setName(@Nonnull String name)
      Set the name of this AiArtifact instance.
      Parameters:
      name - Name of the artifact
    • kind

      @Nonnull public AiArtifact kind(@Nonnull AiArtifact.KindEnum kind)
      Set the kind of this AiArtifact instance and return the same instance.
      Parameters:
      kind - Kind of the artifact, i.e. model or dataset
      Returns:
      The same instance of this AiArtifact class
    • getKind

      @Nonnull public AiArtifact.KindEnum getKind()
      Kind of the artifact, i.e. model or dataset
      Returns:
      kind The kind of this AiArtifact instance.
    • setKind

      public void setKind(@Nonnull AiArtifact.KindEnum kind)
      Set the kind of this AiArtifact instance.
      Parameters:
      kind - Kind of the artifact, i.e. model or dataset
    • url

      @Nonnull public AiArtifact url(@Nonnull String url)
      Set the url of this AiArtifact instance and return the same instance.
      Parameters:
      url - Reference to the location of the artifact.
      Returns:
      The same instance of this AiArtifact class
    • getUrl

      @Nonnull public String getUrl()
      Reference to the location of the artifact.
      Returns:
      url The url of this AiArtifact instance.
    • setUrl

      public void setUrl(@Nonnull String url)
      Set the url of this AiArtifact instance.
      Parameters:
      url - Reference to the location of the artifact.
    • description

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

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

      public void setDescription(@Nullable String description)
      Set the description of this AiArtifact instance.
      Parameters:
      description - Description of the artifact
    • id

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

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

      public void setId(@Nonnull String id)
      Set the id of this AiArtifact instance.
      Parameters:
      id - ID of the artifact
    • scenarioId

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

      @Nonnull public String getScenarioId()
      ID of the scenario
      Returns:
      scenarioId The scenarioId of this AiArtifact instance.
    • setScenarioId

      public void setScenarioId(@Nonnull String scenarioId)
      Set the scenarioId of this AiArtifact instance.
      Parameters:
      scenarioId - ID of the scenario
    • configurationId

      @Nonnull public AiArtifact configurationId(@Nullable String configurationId)
      Set the configurationId of this AiArtifact instance and return the same instance.
      Parameters:
      configurationId - ID of the configuration
      Returns:
      The same instance of this AiArtifact class
    • getConfigurationId

      @Nonnull public String getConfigurationId()
      ID of the configuration
      Returns:
      configurationId The configurationId of this AiArtifact instance.
    • setConfigurationId

      public void setConfigurationId(@Nullable String configurationId)
      Set the configurationId of this AiArtifact instance.
      Parameters:
      configurationId - ID of the configuration
    • executionId

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

      @Nonnull public String getExecutionId()
      ID of the execution
      Returns:
      executionId The executionId of this AiArtifact instance.
    • setExecutionId

      public void setExecutionId(@Nullable String executionId)
      Set the executionId of this AiArtifact instance.
      Parameters:
      executionId - ID of the execution
    • createdAt

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

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

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

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

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

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

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

      @Nullable public AiScenario getScenario()
      Get scenario
      Returns:
      scenario The scenario of this AiArtifact instance.
    • setScenario

      public void setScenario(@Nullable AiScenario scenario)
      Set the scenario of this AiArtifact instance.
      Parameters:
      scenario - The scenario of this AiArtifact
    • getCustomFieldNames

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