utapi_rs/models/usage_info.rs
1use serde::Deserialize;
2
3#[derive(Debug, Deserialize)]
4/// `UploadthingUsageInfo` holds statistics about the usage of the UploadThing service.
5///
6/// It contains information about the total bytes transferred, a human-readable representation
7/// of the total bytes, application-specific byte counts, the number of files uploaded,
8/// and the limits imposed on the usage.
9pub struct UploadthingUsageInfo {
10 /// The total number of bytes uploaded.
11 pub total_bytes: i64,
12
13 /// A human-readable string representing the total number of bytes uploaded.
14 pub total_readable: String,
15
16 /// The total number of bytes uploaded attributed to the application level.
17 pub app_total_bytes: f32,
18
19 /// A human-readable string representing the application-specific total bytes uploaded.
20 pub app_total_readable: String,
21
22 /// The count of uploaded files.
23 pub files_uploaded: i32,
24
25 /// The upper limit of bytes that can be uploaded, as a floating-point number.
26 pub limit_bytes: f32,
27
28 /// A human-readable string representing the upper limit of bytes that can be uploaded.
29 pub limit_readable: String,
30}