Class AiArtifactPostData

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

public class AiArtifactPostData 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

    • AiArtifactPostData

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

    • labels

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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