camunda_client/models/external_task_query_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/// ExternalTaskQueryDto : A JSON object with the following properties:
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExternalTaskQueryDto {
17 /// Filter by an external task's id.
18 #[serde(rename = "externalTaskId", skip_serializing_if = "Option::is_none")]
19 pub external_task_id: Option<String>,
20 /// Filter by the comma-separated list of external task ids.
21 #[serde(rename = "externalTaskIdIn", skip_serializing_if = "Option::is_none")]
22 pub external_task_id_in: Option<Vec<String>>,
23 /// Filter by an external task topic.
24 #[serde(rename = "topicName", skip_serializing_if = "Option::is_none")]
25 pub topic_name: Option<String>,
26 /// Filter by the id of the worker that the task was most recently locked by.
27 #[serde(rename = "workerId", skip_serializing_if = "Option::is_none")]
28 pub worker_id: Option<String>,
29 /// Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task.
30 #[serde(rename = "locked", skip_serializing_if = "Option::is_none")]
31 pub locked: Option<bool>,
32 /// Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task.
33 #[serde(rename = "notLocked", skip_serializing_if = "Option::is_none")]
34 pub not_locked: Option<bool>,
35 /// Only include external tasks that have a positive (> 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task.
36 #[serde(rename = "withRetriesLeft", skip_serializing_if = "Option::is_none")]
37 pub with_retries_left: Option<bool>,
38 /// Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any external task.
39 #[serde(rename = "noRetriesLeft", skip_serializing_if = "Option::is_none")]
40 pub no_retries_left: Option<bool>,
41 /// Restrict to external tasks that have a lock that expires after a given date. By [default](https://docs.camunda.org/manual/7.13/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`.
42 #[serde(rename = "lockExpirationAfter", skip_serializing_if = "Option::is_none")]
43 pub lock_expiration_after: Option<String>,
44 /// Restrict to external tasks that have a lock that expires before a given date. By [default](https://docs.camunda.org/manual/7.13/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`.
45 #[serde(rename = "lockExpirationBefore", skip_serializing_if = "Option::is_none")]
46 pub lock_expiration_before: Option<String>,
47 /// Filter by the id of the activity that an external task is created for.
48 #[serde(rename = "activityId", skip_serializing_if = "Option::is_none")]
49 pub activity_id: Option<String>,
50 /// Filter by the comma-separated list of ids of the activities that an external task is created for.
51 #[serde(rename = "activityIdIn", skip_serializing_if = "Option::is_none")]
52 pub activity_id_in: Option<Vec<String>>,
53 /// Filter by the id of the execution that an external task belongs to.
54 #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")]
55 pub execution_id: Option<String>,
56 /// Filter by the id of the process instance that an external task belongs to.
57 #[serde(rename = "processInstanceId", skip_serializing_if = "Option::is_none")]
58 pub process_instance_id: Option<String>,
59 /// Filter by a comma-separated list of process instance ids that an external task may belong to.
60 #[serde(rename = "processInstanceIdIn", skip_serializing_if = "Option::is_none")]
61 pub process_instance_id_in: Option<Vec<String>>,
62 /// Filter by the id of the process definition that an external task belongs to.
63 #[serde(rename = "processDefinitionId", skip_serializing_if = "Option::is_none")]
64 pub process_definition_id: Option<String>,
65 /// Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids.
66 #[serde(rename = "tenantIdIn", skip_serializing_if = "Option::is_none")]
67 pub tenant_id_in: Option<Vec<String>>,
68 /// Only include active tasks. Value may only be `true`, as `false` matches any external task.
69 #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
70 pub active: Option<bool>,
71 /// Only include suspended tasks. Value may only be `true`, as `false` matches any external task.
72 #[serde(rename = "suspended", skip_serializing_if = "Option::is_none")]
73 pub suspended: Option<bool>,
74 /// Only include jobs with a priority higher than or equal to the given value. Value must be a valid `long` value.
75 #[serde(rename = "priorityHigherThanOrEquals", skip_serializing_if = "Option::is_none")]
76 pub priority_higher_than_or_equals: Option<i64>,
77 /// Only include jobs with a priority lower than or equal to the given value. Value must be a valid `long` value.
78 #[serde(rename = "priorityLowerThanOrEquals", skip_serializing_if = "Option::is_none")]
79 pub priority_lower_than_or_equals: Option<i64>,
80 /// A JSON array of criteria to sort the result by. Each element of the array is a JSON object that specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. The ordering objects have the following properties: **Note:** The `sorting` properties will not be applied to the External Task count query.
81 #[serde(rename = "sorting", skip_serializing_if = "Option::is_none")]
82 pub sorting: Option<Vec<crate::models::ExternalTaskQueryDtoSorting>>,
83}
84
85impl ExternalTaskQueryDto {
86 /// A JSON object with the following properties:
87 pub fn new() -> ExternalTaskQueryDto {
88 ExternalTaskQueryDto {
89 external_task_id: None,
90 external_task_id_in: None,
91 topic_name: None,
92 worker_id: None,
93 locked: None,
94 not_locked: None,
95 with_retries_left: None,
96 no_retries_left: None,
97 lock_expiration_after: None,
98 lock_expiration_before: None,
99 activity_id: None,
100 activity_id_in: None,
101 execution_id: None,
102 process_instance_id: None,
103 process_instance_id_in: None,
104 process_definition_id: None,
105 tenant_id_in: None,
106 active: None,
107 suspended: None,
108 priority_higher_than_or_equals: None,
109 priority_lower_than_or_equals: None,
110 sorting: None,
111 }
112 }
113}
114
115