Class MetadataUpdateItem

java.lang.Object
com.sap.ai.sdk.grounding.model.MetadataUpdateItem

public class MetadataUpdateItem extends Object
MetadataUpdateItem
  • Constructor Details

    • MetadataUpdateItem

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

    • ids

      @Nonnull public MetadataUpdateItem ids(@Nonnull List<UUID> ids)
      Set the ids of this MetadataUpdateItem instance and return the same instance.
      Parameters:
      ids - List of collection or document or chunk ids for which the metadata should be updated
      Returns:
      The same instance of this MetadataUpdateItem class
    • addIdsItem

      @Nonnull public MetadataUpdateItem addIdsItem(@Nonnull UUID idsItem)
      Add one ids instance to this MetadataUpdateItem.
      Parameters:
      idsItem - The ids that should be added
      Returns:
      The same instance of type MetadataUpdateItem
    • getIds

      @Nonnull public List<UUID> getIds()
      List of collection or document or chunk ids for which the metadata should be updated
      Returns:
      ids The ids of this MetadataUpdateItem instance.
    • setIds

      public void setIds(@Nonnull List<UUID> ids)
      Set the ids of this MetadataUpdateItem instance.
      Parameters:
      ids - List of collection or document or chunk ids for which the metadata should be updated
    • metadataUpdates

      @Nonnull public MetadataUpdateItem metadataUpdates(@Nonnull List<MetadataKeyUpdate> metadataUpdates)
      Set the metadataUpdates of this MetadataUpdateItem instance and return the same instance.
      Parameters:
      metadataUpdates - List of metadata updates for the given resource ids
      Returns:
      The same instance of this MetadataUpdateItem class
    • addMetadataUpdatesItem

      @Nonnull public MetadataUpdateItem addMetadataUpdatesItem(@Nonnull MetadataKeyUpdate metadataUpdatesItem)
      Add one metadataUpdates instance to this MetadataUpdateItem.
      Parameters:
      metadataUpdatesItem - The metadataUpdates that should be added
      Returns:
      The same instance of type MetadataUpdateItem
    • getMetadataUpdates

      @Nonnull public List<MetadataKeyUpdate> getMetadataUpdates()
      List of metadata updates for the given resource ids
      Returns:
      metadataUpdates The metadataUpdates of this MetadataUpdateItem instance.
    • setMetadataUpdates

      public void setMetadataUpdates(@Nonnull List<MetadataKeyUpdate> metadataUpdates)
      Set the metadataUpdates of this MetadataUpdateItem instance.
      Parameters:
      metadataUpdates - List of metadata updates for the given resource ids
    • getCustomFieldNames

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