hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * 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/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Blob {
    /// Data is the file's bytes, verbatim, base64 on the wire. Empty for a directory and for an empty file alike; Dir is what tells those apart.
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<String>,
    /// Dir says which of the two answers this is: true and the path is a directory, so read Entries; false and it is a file, so read Data. Nothing else distinguishes them — an empty file and an empty directory look alike here.
    #[serde(rename = "dir", skip_serializing_if = "Option::is_none")]
    pub dir: Option<bool>,
    /// Entries is a directory's contents as bare NAMES, not paths — one level, no recursion, dotfiles included, \".\" and \"..\" excluded (`ls -1A`). Empty for a file, and for an empty directory.
    #[serde(rename = "entries", skip_serializing_if = "Option::is_none")]
    pub entries: Option<Vec<String>>,
    /// Path is the RESOLVED absolute path that was read — the caller's relative path joined onto the sandbox's working directory (Leased.Workdir), so it names the same file for a reader who does not know the class.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
}

impl Blob {
    pub fn new() -> Blob {
        Blob {
            data: None,
            dir: None,
            entries: None,
            path: None,
        }
    }
}