camunda_client/models/
restart_process_instance_modification_instruction_dto.rs

1/*
2 * Camunda BPM REST API
3 *
4 * OpenApi Spec for Camunda BPM REST API.
5 *
6 * The version of the OpenAPI document: 7.13.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RestartProcessInstanceModificationInstructionDto {
16    /// **Mandatory**. One of the following values: `startBeforeActivity`, `startAfterActivity`, `startTransition`.  * A `startBeforeActivity` instruction requests to enter a given activity. * A `startAfterActivity` instruction requests to execute the single outgoing sequence flow of a given activity. * A `startTransition` instruction requests to execute a specific sequence flow.
17    #[serde(rename = "type")]
18    pub _type: Type,
19    /// **Can be used with instructions of types** `startBeforeActivity` and `startAfterActivity`. Specifies the sequence flow to start.
20    #[serde(rename = "activityId", skip_serializing_if = "Option::is_none")]
21    pub activity_id: Option<String>,
22    /// **Can be used with instructions of types** `startTransition`. Specifies the sequence flow to start.
23    #[serde(rename = "transitionId", skip_serializing_if = "Option::is_none")]
24    pub transition_id: Option<String>,
25}
26
27impl RestartProcessInstanceModificationInstructionDto {
28    pub fn new(_type: Type) -> RestartProcessInstanceModificationInstructionDto {
29        RestartProcessInstanceModificationInstructionDto {
30            _type,
31            activity_id: None,
32            transition_id: None,
33        }
34    }
35}
36
37/// **Mandatory**. One of the following values: `startBeforeActivity`, `startAfterActivity`, `startTransition`.  * A `startBeforeActivity` instruction requests to enter a given activity. * A `startAfterActivity` instruction requests to execute the single outgoing sequence flow of a given activity. * A `startTransition` instruction requests to execute a specific sequence flow.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Type {
40    #[serde(rename = "startBeforeActivity")]
41    StartBeforeActivity,
42    #[serde(rename = "startAfterActivity")]
43    StartAfterActivity,
44    #[serde(rename = "startTransition")]
45    StartTransition,
46}
47