// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Body carrying a workflow's full YAML definition for validate, plan, apply, or export.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeclarativeWorkflowRequest {
    /// Workflow YAML definition
    pub yaml_definition: String,
    /// Project that should own a workflow created from this spec. Required when applying a spec that creates a new workflow.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub project_id: Option<String>,
}
impl DeclarativeWorkflowRequest {
    /// Construct a new `DeclarativeWorkflowRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(yaml_definition: impl Into<String>) -> Self {
        Self {
            yaml_definition: yaml_definition.into(),
            project_id: Default::default(),
        }
    }
}
