Record Class AnthropicApi.FileMetadata

java.lang.Object
java.lang.Record
org.springframework.ai.anthropic.api.AnthropicApi.FileMetadata
Record Components:
id - Unique file identifier (format: file_*)
filename - Original filename with extension
size - File size in bytes
mimeType - MIME type (e.g., application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
createdAt - When the file was created (ISO 8601 timestamp)
expiresAt - When the file will be automatically deleted (ISO 8601 timestamp)
Enclosing class:
AnthropicApi

public static record AnthropicApi.FileMetadata(String id, String filename, Long size, String mimeType, String createdAt, String expiresAt) extends Record
Metadata for a file generated by Claude Skills or uploaded via Files API. Files expire after a certain period (typically 24 hours).
Since:
1.0.0
Author:
Christian Tzolov, Mariusz Bernacki, Thomas Vitale, Jihoon Kim, Alexandros Pappas, Jonghoon Park, Claudio Silva Junior, Filip Hrisafov, Soby Chacko, Austin Dase
  • Constructor Details

    • FileMetadata

      public FileMetadata(String id, String filename, Long size, String mimeType, String createdAt, String expiresAt)
      Creates an instance of a FileMetadata record class.
      Parameters:
      id - the value for the id record component
      filename - the value for the filename record component
      size - the value for the size record component
      mimeType - the value for the mimeType record component
      createdAt - the value for the createdAt record component
      expiresAt - the value for the expiresAt record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • filename

      public String filename()
      Returns the value of the filename record component.
      Returns:
      the value of the filename record component
    • size

      public Long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • mimeType

      public String mimeType()
      Returns the value of the mimeType record component.
      Returns:
      the value of the mimeType record component
    • createdAt

      public String createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • expiresAt

      public String expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component