FileMetadata class

Metadata for a file uploaded to Anthropic.

Annotations
  • @immutable

Constructors

FileMetadata({required String id, required String filename, required String mimeType, required int sizeBytes, required DateTime createdAt, String type = 'file', bool downloadable = false, FileScope? scope})
Creates a FileMetadata.
const
FileMetadata.fromJson(Map<String, dynamic> json)
Creates a FileMetadata from JSON.
factory

Properties

createdAt DateTime
RFC 3339 datetime string representing when the file was created.
final
downloadable bool
Whether the file can be downloaded.
final
filename String
Original filename of the uploaded file.
final
hashCode int
The hash code for this object.
no setteroverride
id String
Unique object identifier.
final
mimeType String
MIME type of the file.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope FileScope?
The scope of this file, indicating the context in which it was created.
final
sizeBytes int
Size of the file in bytes.
final
type String
Object type. Always "file".
final

Methods

copyWith({String? id, String? filename, String? mimeType, int? sizeBytes, DateTime? createdAt, String? type, bool? downloadable, Object? scope = unsetCopyWithValue}) FileMetadata
Creates a copy with replaced values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override