// 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 DeclarativePlanResourceChange {
    pub address: String,
    pub target: DeclarativePlanResourceChangeTarget,
    pub target_id: String,
    pub name: String,
    /// Resource kind for this plan entry. `workflow` and `edge` are flat singletons; for `target='block'` this carries the block's concrete type (e.g. `extract`, `api_call`) so the plan summary can render type-specific labels.
    #[serde(rename = "type")]
    pub type_: DeclarativePlanResourceChangeType,
    pub actions: Vec<DeclarativePlanResourceChangeActions>,
    pub summary: String,
    pub change: DeclarativePlanChange,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub path: Option<String>,
}
impl DeclarativePlanResourceChange {
    /// Construct a new `DeclarativePlanResourceChange` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        address: impl Into<String>,
        target: DeclarativePlanResourceChangeTarget,
        target_id: impl Into<String>,
        name: impl Into<String>,
        type_: DeclarativePlanResourceChangeType,
        actions: Vec<DeclarativePlanResourceChangeActions>,
        summary: impl Into<String>,
        change: DeclarativePlanChange,
    ) -> Self {
        Self {
            address: address.into(),
            target,
            target_id: target_id.into(),
            name: name.into(),
            type_,
            actions,
            summary: summary.into(),
            change,
            path: Default::default(),
        }
    }
}
