hatchet-sdk 0.2.8

This is an unofficial Rust SDK for Hatchet, a distributed, fault-tolerant task queue.
Documentation
/*
 * Hatchet API
 *
 * The Hatchet API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::clients::rest::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1WorkflowRunCreateRequest {
    /// The name of the workflow.
    #[serde(rename = "workflowName")]
    pub workflow_name: String,
    #[serde(rename = "input")]
    pub input: serde_json::Value,
    #[serde(rename = "additionalMetadata", skip_serializing_if = "Option::is_none")]
    pub additional_metadata: Option<serde_json::Value>,
    /// The priority of the workflow run.
    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
    pub priority: Option<i32>,
}

impl V1WorkflowRunCreateRequest {
    pub fn new(workflow_name: String, input: serde_json::Value) -> V1WorkflowRunCreateRequest {
        V1WorkflowRunCreateRequest {
            workflow_name,
            input,
            additional_metadata: None,
            priority: None,
        }
    }
}