// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Subdocument {
    /// The name of the subdocument
    pub name: String,
    /// The description of the subdocument
    ///
    /// Defaults to ``.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub description: Option<String>,
    /// When true, this subdocument type can appear more than once in the document — the split will identify each distinct instance (runs an extra vision-based refinement pass).
    ///
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub allow_multiple_instances: Option<bool>,
}
impl Subdocument {
    /// Construct a new `Subdocument` with the required fields set.
    #[allow(deprecated)]
    pub fn new(name: impl Into<String>) -> Self {
        Self {
            name: name.into(),
            description: Default::default(),
            allow_multiple_instances: Default::default(),
        }
    }
}
