// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Create a new workflow run from a workflow id, an optional version selector, and optional inputs.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateWorkflowRunRequest {
    /// Workflow id for the fresh run.
    pub workflow_id: String,
    /// Mapping of start_document block IDs to their input documents.
    ///
    /// Defaults to `{}`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub documents: Option<std::collections::HashMap<String, MimeData>>,
    /// Mapping of start-json block IDs to their input JSON data.
    ///
    /// Defaults to `{}`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub json_inputs: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Workflow version to run: 'production', 'draft', or a pinned version id like 'ver_...'. Only valid for fresh-run creation.
    ///
    /// Defaults to `production`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub version: Option<String>,
}
impl CreateWorkflowRunRequest {
    /// Construct a new `CreateWorkflowRunRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(workflow_id: impl Into<String>) -> Self {
        Self {
            workflow_id: workflow_id.into(),
            documents: Default::default(),
            json_inputs: Default::default(),
            version: Default::default(),
        }
    }
}
