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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ColumnProfileDetailOneOf1 {
    /// Average string length
    #[serde(rename = "avg_length")]
    pub avg_length: f64,
    /// Longest string length in the column
    #[serde(rename = "max_length")]
    pub max_length: i64,
    /// Shortest string length in the column
    #[serde(rename = "min_length")]
    pub min_length: i64,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl ColumnProfileDetailOneOf1 {
    pub fn new(
        avg_length: f64,
        max_length: i64,
        min_length: i64,
        r#type: Type,
    ) -> ColumnProfileDetailOneOf1 {
        ColumnProfileDetailOneOf1 {
            avg_length,
            max_length,
            min_length,
            r#type,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "text")]
    Text,
}

impl Default for Type {
    fn default() -> Type {
        Self::Text
    }
}
