hotdata 0.7.0

Powerful data platform API for datasets, queries, and analytics.
Documentation
/*
 * Hotdata API
 *
 * Powerful data platform API for managed databases, 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};

/// FinalizeUploadResponse : Response body for `POST /v1/uploads/{upload_id}/finalize`: the finalized upload, ready to be loaded into a managed table.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FinalizeUploadResponse {
    #[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,
    /// The validated size of the uploaded file in bytes.
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "upload_id")]
    pub upload_id: String,
}

impl FinalizeUploadResponse {
    /// Response body for `POST /v1/uploads/{upload_id}/finalize`: the finalized upload, ready to be loaded into a managed table.
    pub fn new(
        created_at: String,
        size_bytes: i64,
        status: String,
        upload_id: String,
    ) -> FinalizeUploadResponse {
        FinalizeUploadResponse {
            content_type: None,
            created_at,
            size_bytes,
            status,
            upload_id,
        }
    }
}