hotdata 0.1.2

Powerful data platform API for datasets, queries, and analytics.
Documentation
/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// UploadInfo : Single upload info for listing
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UploadInfo {
    #[serde(
        rename = "content_type",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub content_type: Option<Option<String>>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
    #[serde(rename = "status")]
    pub status: String,
}

impl UploadInfo {
    /// Single upload info for listing
    pub fn new(created_at: String, id: String, size_bytes: i64, status: String) -> UploadInfo {
        UploadInfo {
            content_type: None,
            created_at,
            id,
            size_bytes,
            status,
        }
    }
}