/*
 * 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};

/// UpsertDatabaseContextRequest : Request body for POST `/v1/databases/{database_id}/context`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpsertDatabaseContextRequest {
    #[serde(rename = "content")]
    pub content: String,
    /// Upsert key in the catalog. Validated with dataset table-name rules (preserves case): ASCII letter or `_` first; then alphanumeric or `_` only; 1–128 chars; not a SQL reserved word.
    #[serde(rename = "name")]
    pub name: String,
}

impl UpsertDatabaseContextRequest {
    /// Request body for POST `/v1/databases/{database_id}/context`.
    pub fn new(content: String, name: String) -> UpsertDatabaseContextRequest {
        UpsertDatabaseContextRequest { content, name }
    }
}
