hotdata 0.10.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};

/// ForkDatabaseRequest : Request body for POST /databases/{database_id}/fork
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ForkDatabaseRequest {
    /// When the fork expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"` or `\"7d\"`. When omitted, a still-future expiry on the source is carried over; otherwise the fork never expires.
    #[serde(
        rename = "expires_at",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_at: Option<Option<String>>,
    /// Optional display label for the fork. When omitted, the source database's name (if any) is carried over.
    #[serde(
        rename = "name",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub name: Option<Option<String>>,
}

impl ForkDatabaseRequest {
    /// Request body for POST /databases/{database_id}/fork
    pub fn new() -> ForkDatabaseRequest {
        ForkDatabaseRequest {
            expires_at: None,
            name: None,
        }
    }
}