// 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 ValidationError {
    pub loc: Vec<DeclarativePlanFieldChangePathOneOf>,
    pub msg: String,
    #[serde(rename = "type")]
    pub type_: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub input: Option<serde_json::Value>,
    /// Defaults to `{}`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub ctx: Option<std::collections::HashMap<String, serde_json::Value>>,
}
impl ValidationError {
    /// Construct a new `ValidationError` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        loc: Vec<DeclarativePlanFieldChangePathOneOf>,
        msg: impl Into<String>,
        type_: impl Into<String>,
    ) -> Self {
        Self {
            loc,
            msg: msg.into(),
            type_: type_.into(),
            input: Default::default(),
            ctx: Default::default(),
        }
    }
}
