pub struct WorkflowDef {Show 18 fields
pub name: String,
pub description: Option<String>,
pub version: i32,
pub tasks: Vec<WorkflowTask>,
pub input_parameters: Vec<String>,
pub output_parameters: HashMap<String, Value>,
pub failure_workflow: Option<String>,
pub schema_version: i32,
pub restartable: bool,
pub workflow_status_listener_enabled: bool,
pub owner_email: Option<String>,
pub timeout_policy: WorkflowTimeoutPolicy,
pub timeout_seconds: i64,
pub variables: HashMap<String, Value>,
pub input_template: HashMap<String, Value>,
pub created_by: Option<String>,
pub update_time: Option<i64>,
pub create_time: Option<i64>,
}Expand description
Workflow definition.
Fields§
§name: StringWorkflow name.
description: Option<String>Workflow description.
version: i32Workflow version.
tasks: Vec<WorkflowTask>Tasks in the workflow.
input_parameters: Vec<String>Input parameters.
output_parameters: HashMap<String, Value>Output parameters.
failure_workflow: Option<String>Failure workflow name.
schema_version: i32Schema version.
restartable: boolRestartable flag.
workflow_status_listener_enabled: boolWorkflow status listener enabled.
owner_email: Option<String>Owner email.
timeout_policy: WorkflowTimeoutPolicyTimeout policy.
timeout_seconds: i64Timeout in seconds.
variables: HashMap<String, Value>Variables.
input_template: HashMap<String, Value>Input template.
created_by: Option<String>Created by.
update_time: Option<i64>Update time.
create_time: Option<i64>Create time.
Implementations§
Source§impl WorkflowDef
impl WorkflowDef
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set description.
Sourcepub fn with_version(self, version: i32) -> Self
pub fn with_version(self, version: i32) -> Self
Set version.
Sourcepub fn with_task(self, task: WorkflowTask) -> Self
pub fn with_task(self, task: WorkflowTask) -> Self
Add a task to the workflow.
Sourcepub fn with_tasks(self, tasks: Vec<WorkflowTask>) -> Self
pub fn with_tasks(self, tasks: Vec<WorkflowTask>) -> Self
Set tasks.
Sourcepub fn with_input_parameters(self, params: Vec<String>) -> Self
pub fn with_input_parameters(self, params: Vec<String>) -> Self
Set input parameters.
Sourcepub fn with_output_parameters(self, params: HashMap<String, Value>) -> Self
pub fn with_output_parameters(self, params: HashMap<String, Value>) -> Self
Set output parameters.
Sourcepub fn with_output_param(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_output_param( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add an output parameter.
Sourcepub fn with_failure_workflow(self, name: impl Into<String>) -> Self
pub fn with_failure_workflow(self, name: impl Into<String>) -> Self
Set failure workflow.
Sourcepub fn with_timeout(self, seconds: i64, policy: WorkflowTimeoutPolicy) -> Self
pub fn with_timeout(self, seconds: i64, policy: WorkflowTimeoutPolicy) -> Self
Set timeout.
Sourcepub fn with_owner(self, email: impl Into<String>) -> Self
pub fn with_owner(self, email: impl Into<String>) -> Self
Set owner email.
Trait Implementations§
Source§impl Clone for WorkflowDef
impl Clone for WorkflowDef
Source§impl Debug for WorkflowDef
impl Debug for WorkflowDef
Source§impl Default for WorkflowDef
impl Default for WorkflowDef
Source§impl<'de> Deserialize<'de> for WorkflowDef
impl<'de> Deserialize<'de> for WorkflowDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowDef
impl RefUnwindSafe for WorkflowDef
impl Send for WorkflowDef
impl Sync for WorkflowDef
impl Unpin for WorkflowDef
impl UnsafeUnpin for WorkflowDef
impl UnwindSafe for WorkflowDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more