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

/// TextProfileDetail : High-cardinality text column (>200 distinct values).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TextProfileDetail {
    /// 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,
}

impl TextProfileDetail {
    /// High-cardinality text column (>200 distinct values).
    pub fn new(avg_length: f64, max_length: i64, min_length: i64) -> TextProfileDetail {
        TextProfileDetail {
            avg_length,
            max_length,
            min_length,
        }
    }
}
