Class CacheCreationTokenDetails

java.lang.Object
com.sap.ai.sdk.orchestration.model.CacheCreationTokenDetails

public class CacheCreationTokenDetails extends Object
Breakdown of cache creation tokens by TTL (Anthropic only).
  • Constructor Details

    • CacheCreationTokenDetails

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

    • ephemeral5mInputTokens

      @Nonnull public CacheCreationTokenDetails ephemeral5mInputTokens(@Nullable Integer ephemeral5mInputTokens)
      Set the ephemeral5mInputTokens of this CacheCreationTokenDetails instance and return the same instance.
      Parameters:
      ephemeral5mInputTokens - Tokens cached with 5-minute TTL.
      Returns:
      The same instance of this CacheCreationTokenDetails class
    • getEphemeral5mInputTokens

      @Nonnull public Integer getEphemeral5mInputTokens()
      Tokens cached with 5-minute TTL.
      Returns:
      ephemeral5mInputTokens The ephemeral5mInputTokens of this CacheCreationTokenDetails instance.
    • setEphemeral5mInputTokens

      public void setEphemeral5mInputTokens(@Nullable Integer ephemeral5mInputTokens)
      Set the ephemeral5mInputTokens of this CacheCreationTokenDetails instance.
      Parameters:
      ephemeral5mInputTokens - Tokens cached with 5-minute TTL.
    • ephemeral1hInputTokens

      @Nonnull public CacheCreationTokenDetails ephemeral1hInputTokens(@Nullable Integer ephemeral1hInputTokens)
      Set the ephemeral1hInputTokens of this CacheCreationTokenDetails instance and return the same instance.
      Parameters:
      ephemeral1hInputTokens - Tokens cached with 1-hour TTL.
      Returns:
      The same instance of this CacheCreationTokenDetails class
    • getEphemeral1hInputTokens

      @Nonnull public Integer getEphemeral1hInputTokens()
      Tokens cached with 1-hour TTL.
      Returns:
      ephemeral1hInputTokens The ephemeral1hInputTokens of this CacheCreationTokenDetails instance.
    • setEphemeral1hInputTokens

      public void setEphemeral1hInputTokens(@Nullable Integer ephemeral1hInputTokens)
      Set the ephemeral1hInputTokens of this CacheCreationTokenDetails instance.
      Parameters:
      ephemeral1hInputTokens - Tokens cached with 1-hour TTL.
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the CacheCreationTokenDetails.
      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 CacheCreationTokenDetails 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 CacheCreationTokenDetails 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 CacheCreationTokenDetails 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 CacheCreationTokenDetails create()
      Create a new CacheCreationTokenDetails instance. No arguments are required.