hanzo_client/models/listing.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Listing {
16 /// LastModified is when the BYTES last changed, as RFC 3339 in UTC to the second — `2026-01-02T03:04:05Z`, the sandbox's own `date -u -r` on the file. It is an mtime and not a creation time, so a file a later run overwrote carries that run's clock. Never empty: a row exists only because `find` stat-ed the file.
17 #[serde(rename = "lastModified", skip_serializing_if = "Option::is_none")]
18 pub last_modified: Option<String>,
19 /// Name is the file's IDENTIFIER, `{session_id}/{fileId}` whole — never the bare filename, and never URL-escaped. It is exactly what GET /v1/exec/download takes after its prefix, and hanzo.chat matches it as a PREFIX (`name.startsWith(session + \"/\")`) to decide which rows belong to a session it is holding. `fileId` is the path RELATIVE to the session's artifact directory, so it carries `/` for anything the run wrote in a sub-directory.
20 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21 pub name: Option<String>,
22}
23
24impl Listing {
25 pub fn new() -> Listing {
26 Listing {
27 last_modified: None,
28 name: None,
29 }
30 }
31}
32