Skip to main content

hanzo_client/models/
code_file.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 CodeFile {
16    /// ID is the file's path RELATIVE to its session's artifact directory, which is also how it is fetched: GET /v1/exec/download/{session}/{id}.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    /// Name is the display name. On an ANSWER it carries the `{session}/{id}` identifier whole, because the client matches on that prefix.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// SessionID is the other accepted spelling of the same fact on the way IN. Both are read; whichever is set wins.
23    #[serde(rename = "session_id", skip_serializing_if = "Option::is_none")]
24    pub session_id: Option<String>,
25    /// StorageSessionID names the session holding the bytes, and is the spelling the answer always uses.
26    #[serde(rename = "storage_session_id", skip_serializing_if = "Option::is_none")]
27    pub storage_session_id: Option<String>,
28}
29
30impl CodeFile {
31    pub fn new() -> CodeFile {
32        CodeFile {
33            id: None,
34            name: None,
35            session_id: None,
36            storage_session_id: None,
37        }
38    }
39}
40