KoolbaseObject class
Constructors
-
KoolbaseObject({required String id, required String projectId, required String bucketId, required String r2Bucket, String? userId, required String path, required int size, String? contentType, Map<
String, String> metadata = const <String, String>{}, required DateTime createdAt, required DateTime updatedAt}) -
const
-
KoolbaseObject.fromJson(Map<
String, dynamic> json) -
factory
Properties
- bucketId → String
-
final
- contentType → String?
-
final
- createdAt → DateTime
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
-
metadata
→ Map<
String, String> -
User-defined key/value metadata attached to this object. Always
non-null — empty when no metadata has been set (the server returns
{}rather than null so SDK callers can treat this as a guaranteed map without nil checks). Set on upload viaupload(metadata: ...)or mutated post-upload viaupdateMetadata(...).final - path → String
-
final
- projectId → String
-
final
- r2Bucket → String
-
Name of the physical R2 bucket holding this object's bytes
(Gap #2).
koolbase-storage-publicmeans the object has a stable CDN URL accessible via publicUrl; anything else (typicallykoolbase-storage) means the object is in private storage and must be fetched via KoolbaseStorageClient.getDownloadUrl, which returns a short-lived presigned URL.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
final
- updatedAt → DateTime
-
final
- userId → String?
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicUrl(
String bucketName, {KoolbaseImageTransform? transform}) → String? -
Returns the stable CDN URL for this object if its bytes physically
live in the public R2 bucket,
nullotherwise. -
publicUrlWithPreset(
String bucketName, String presetName) → String? -
Returns the named-preset CDN URL for this object, or
nullif the object isn't in the public R2 bucket. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited