// 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 DeclarativePlanFieldChange {
    pub path: Vec<DeclarativePlanFieldChangePathOneOf>,
    pub path_display: String,
    pub action: DeclarativePlanFieldChangeAction,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub before: Option<serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub after: Option<serde_json::Value>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub before_sensitive: Option<bool>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub after_sensitive: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub unified_diff: Option<String>,
}
impl DeclarativePlanFieldChange {
    /// Construct a new `DeclarativePlanFieldChange` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        path: Vec<DeclarativePlanFieldChangePathOneOf>,
        path_display: impl Into<String>,
        action: DeclarativePlanFieldChangeAction,
    ) -> Self {
        Self {
            path,
            path_display: path_display.into(),
            action,
            before: Default::default(),
            after: Default::default(),
            before_sensitive: Default::default(),
            after_sensitive: Default::default(),
            unified_diff: Default::default(),
        }
    }
}
