camunda_client/apis/
task_api.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
11use std::rc::Rc;
12use std::borrow::Borrow;
13#[allow(unused_imports)]
14use std::option::Option;
15
16use reqwest;
17
18use super::{Error, configuration};
19
20pub struct TaskApiClient {
21    configuration: Rc<configuration::Configuration>,
22}
23
24impl TaskApiClient {
25    pub fn new(configuration: Rc<configuration::Configuration>) -> TaskApiClient {
26        TaskApiClient {
27            configuration,
28        }
29    }
30}
31
32pub trait TaskApi {
33    fn claim(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error>;
34    fn complete(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
35    fn create_task(&self, task_dto: Option<crate::models::TaskDto>) -> Result<(), Error>;
36    fn delegate_task(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error>;
37    fn delete_task(&self, id: &str) -> Result<(), Error>;
38    fn get_deployed_form(&self, id: &str) -> Result<std::path::PathBuf, Error>;
39    fn get_form(&self, id: &str) -> Result<crate::models::FormDto, Error>;
40    fn get_form_variables(&self, id: &str, variable_names: Option<&str>, deserialize_values: Option<bool>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
41    fn get_rendered_form(&self, id: &str) -> Result<std::path::PathBuf, Error>;
42    fn get_task(&self, id: &str) -> Result<crate::models::TaskDto, Error>;
43    fn get_tasks(&self, process_instance_id: Option<&str>, process_instance_id_in: Option<&str>, process_instance_business_key: Option<&str>, process_instance_business_key_expression: Option<&str>, process_instance_business_key_in: Option<&str>, process_instance_business_key_like: Option<&str>, process_instance_business_key_like_expression: Option<&str>, process_definition_id: Option<&str>, process_definition_key: Option<&str>, process_definition_key_in: Option<&str>, process_definition_name: Option<&str>, process_definition_name_like: Option<&str>, execution_id: Option<&str>, case_instance_id: Option<&str>, case_instance_business_key: Option<&str>, case_instance_business_key_like: Option<&str>, case_definition_id: Option<&str>, case_definition_key: Option<&str>, case_definition_name: Option<&str>, case_definition_name_like: Option<&str>, case_execution_id: Option<&str>, activity_instance_id_in: Option<&str>, tenant_id_in: Option<&str>, without_tenant_id: Option<bool>, assignee: Option<&str>, assignee_expression: Option<&str>, assignee_like: Option<&str>, assignee_like_expression: Option<&str>, assignee_in: Option<&str>, owner: Option<&str>, owner_expression: Option<&str>, candidate_group: Option<&str>, candidate_group_expression: Option<&str>, candidate_user: Option<&str>, candidate_user_expression: Option<&str>, include_assigned_tasks: Option<bool>, involved_user: Option<&str>, involved_user_expression: Option<&str>, assigned: Option<bool>, unassigned: Option<bool>, task_definition_key: Option<&str>, task_definition_key_in: Option<&str>, task_definition_key_like: Option<&str>, name: Option<&str>, name_not_equal: Option<&str>, name_like: Option<&str>, name_not_like: Option<&str>, description: Option<&str>, description_like: Option<&str>, priority: Option<i32>, max_priority: Option<i32>, min_priority: Option<i32>, due_date: Option<&str>, due_date_expression: Option<&str>, due_after: Option<&str>, due_after_expression: Option<&str>, due_before: Option<&str>, due_before_expression: Option<&str>, follow_up_date: Option<&str>, follow_up_date_expression: Option<&str>, follow_up_after: Option<&str>, follow_up_after_expression: Option<&str>, follow_up_before: Option<&str>, follow_up_before_expression: Option<&str>, follow_up_before_or_not_existent: Option<&str>, follow_up_before_or_not_existent_expression: Option<&str>, created_on: Option<&str>, created_on_expression: Option<&str>, created_after: Option<&str>, created_after_expression: Option<&str>, created_before: Option<&str>, created_before_expression: Option<&str>, delegation_state: Option<&str>, candidate_groups: Option<&str>, candidate_groups_expression: Option<&str>, with_candidate_groups: Option<bool>, without_candidate_groups: Option<bool>, with_candidate_users: Option<bool>, without_candidate_users: Option<bool>, active: Option<bool>, suspended: Option<bool>, task_variables: Option<&str>, process_variables: Option<&str>, case_instance_variables: Option<&str>, variable_names_ignore_case: Option<bool>, variable_values_ignore_case: Option<bool>, parent_task_id: Option<&str>, sort_by: Option<&str>, sort_order: Option<&str>, first_result: Option<i32>, max_results: Option<i32>) -> Result<Vec<crate::models::TaskDto>, Error>;
44    fn get_tasks_count(&self, process_instance_id: Option<&str>, process_instance_id_in: Option<&str>, process_instance_business_key: Option<&str>, process_instance_business_key_expression: Option<&str>, process_instance_business_key_in: Option<&str>, process_instance_business_key_like: Option<&str>, process_instance_business_key_like_expression: Option<&str>, process_definition_id: Option<&str>, process_definition_key: Option<&str>, process_definition_key_in: Option<&str>, process_definition_name: Option<&str>, process_definition_name_like: Option<&str>, execution_id: Option<&str>, case_instance_id: Option<&str>, case_instance_business_key: Option<&str>, case_instance_business_key_like: Option<&str>, case_definition_id: Option<&str>, case_definition_key: Option<&str>, case_definition_name: Option<&str>, case_definition_name_like: Option<&str>, case_execution_id: Option<&str>, activity_instance_id_in: Option<&str>, tenant_id_in: Option<&str>, without_tenant_id: Option<bool>, assignee: Option<&str>, assignee_expression: Option<&str>, assignee_like: Option<&str>, assignee_like_expression: Option<&str>, assignee_in: Option<&str>, owner: Option<&str>, owner_expression: Option<&str>, candidate_group: Option<&str>, candidate_group_expression: Option<&str>, candidate_user: Option<&str>, candidate_user_expression: Option<&str>, include_assigned_tasks: Option<bool>, involved_user: Option<&str>, involved_user_expression: Option<&str>, assigned: Option<bool>, unassigned: Option<bool>, task_definition_key: Option<&str>, task_definition_key_in: Option<&str>, task_definition_key_like: Option<&str>, name: Option<&str>, name_not_equal: Option<&str>, name_like: Option<&str>, name_not_like: Option<&str>, description: Option<&str>, description_like: Option<&str>, priority: Option<i32>, max_priority: Option<i32>, min_priority: Option<i32>, due_date: Option<&str>, due_date_expression: Option<&str>, due_after: Option<&str>, due_after_expression: Option<&str>, due_before: Option<&str>, due_before_expression: Option<&str>, follow_up_date: Option<&str>, follow_up_date_expression: Option<&str>, follow_up_after: Option<&str>, follow_up_after_expression: Option<&str>, follow_up_before: Option<&str>, follow_up_before_expression: Option<&str>, follow_up_before_or_not_existent: Option<&str>, follow_up_before_or_not_existent_expression: Option<&str>, created_on: Option<&str>, created_on_expression: Option<&str>, created_after: Option<&str>, created_after_expression: Option<&str>, created_before: Option<&str>, created_before_expression: Option<&str>, delegation_state: Option<&str>, candidate_groups: Option<&str>, candidate_groups_expression: Option<&str>, with_candidate_groups: Option<bool>, without_candidate_groups: Option<bool>, with_candidate_users: Option<bool>, without_candidate_users: Option<bool>, active: Option<bool>, suspended: Option<bool>, task_variables: Option<&str>, process_variables: Option<&str>, case_instance_variables: Option<&str>, variable_names_ignore_case: Option<bool>, variable_values_ignore_case: Option<bool>, parent_task_id: Option<&str>) -> Result<crate::models::CountResultDto, Error>;
45    fn handle_bpmn_error(&self, id: &str, task_bpmn_error_dto: Option<crate::models::TaskBpmnErrorDto>) -> Result<(), Error>;
46    fn handle_escalation(&self, id: &str, task_escalation_dto: Option<crate::models::TaskEscalationDto>) -> Result<(), Error>;
47    fn query_tasks(&self, first_result: Option<i32>, max_results: Option<i32>, task_query_dto: Option<crate::models::TaskQueryDto>) -> Result<Vec<crate::models::TaskDto>, Error>;
48    fn query_tasks_count(&self, task_query_dto: Option<crate::models::TaskQueryDto>) -> Result<crate::models::CountResultDto, Error>;
49    fn resolve(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<(), Error>;
50    fn set_assignee(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error>;
51    fn submit(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
52    fn unclaim(&self, id: &str) -> Result<(), Error>;
53    fn update_task(&self, id: &str, task_dto: Option<crate::models::TaskDto>) -> Result<(), Error>;
54}
55
56impl TaskApi for TaskApiClient {
57    fn claim(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error> {
58        let configuration: &configuration::Configuration = self.configuration.borrow();
59        let client = &configuration.client;
60
61        let uri_str = format!("{}/task/{id}/claim", configuration.base_path, id=crate::apis::urlencode(id));
62        let mut req_builder = client.post(uri_str.as_str());
63
64        if let Some(ref user_agent) = configuration.user_agent {
65            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
66        }
67        req_builder = req_builder.json(&user_id_dto);
68
69        // send request
70        let req = req_builder.build()?;
71
72        client.execute(req)?.error_for_status()?;
73        Ok(())
74    }
75
76    fn complete(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
77        let configuration: &configuration::Configuration = self.configuration.borrow();
78        let client = &configuration.client;
79
80        let uri_str = format!("{}/task/{id}/complete", configuration.base_path, id=crate::apis::urlencode(id));
81        let mut req_builder = client.post(uri_str.as_str());
82
83        if let Some(ref user_agent) = configuration.user_agent {
84            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
85        }
86        req_builder = req_builder.json(&complete_task_dto);
87
88        // send request
89        let req = req_builder.build()?;
90
91        Ok(client.execute(req)?.error_for_status()?.json()?)
92    }
93
94    fn create_task(&self, task_dto: Option<crate::models::TaskDto>) -> Result<(), Error> {
95        let configuration: &configuration::Configuration = self.configuration.borrow();
96        let client = &configuration.client;
97
98        let uri_str = format!("{}/task/create", configuration.base_path);
99        let mut req_builder = client.post(uri_str.as_str());
100
101        if let Some(ref user_agent) = configuration.user_agent {
102            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
103        }
104        req_builder = req_builder.json(&task_dto);
105
106        // send request
107        let req = req_builder.build()?;
108
109        client.execute(req)?.error_for_status()?;
110        Ok(())
111    }
112
113    fn delegate_task(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error> {
114        let configuration: &configuration::Configuration = self.configuration.borrow();
115        let client = &configuration.client;
116
117        let uri_str = format!("{}/task/{id}/delegate", configuration.base_path, id=crate::apis::urlencode(id));
118        let mut req_builder = client.post(uri_str.as_str());
119
120        if let Some(ref user_agent) = configuration.user_agent {
121            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
122        }
123        req_builder = req_builder.json(&user_id_dto);
124
125        // send request
126        let req = req_builder.build()?;
127
128        client.execute(req)?.error_for_status()?;
129        Ok(())
130    }
131
132    fn delete_task(&self, id: &str) -> Result<(), Error> {
133        let configuration: &configuration::Configuration = self.configuration.borrow();
134        let client = &configuration.client;
135
136        let uri_str = format!("{}/task/{id}", configuration.base_path, id=crate::apis::urlencode(id));
137        let mut req_builder = client.delete(uri_str.as_str());
138
139        if let Some(ref user_agent) = configuration.user_agent {
140            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
141        }
142
143        // send request
144        let req = req_builder.build()?;
145
146        client.execute(req)?.error_for_status()?;
147        Ok(())
148    }
149
150    fn get_deployed_form(&self, id: &str) -> Result<std::path::PathBuf, Error> {
151        let configuration: &configuration::Configuration = self.configuration.borrow();
152        let client = &configuration.client;
153
154        let uri_str = format!("{}/task/{id}/deployed-form", configuration.base_path, id=crate::apis::urlencode(id));
155        let mut req_builder = client.get(uri_str.as_str());
156
157        if let Some(ref user_agent) = configuration.user_agent {
158            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
159        }
160
161        // send request
162        let req = req_builder.build()?;
163
164        Ok(client.execute(req)?.error_for_status()?.json()?)
165    }
166
167    fn get_form(&self, id: &str) -> Result<crate::models::FormDto, Error> {
168        let configuration: &configuration::Configuration = self.configuration.borrow();
169        let client = &configuration.client;
170
171        let uri_str = format!("{}/task/{id}/form", configuration.base_path, id=crate::apis::urlencode(id));
172        let mut req_builder = client.get(uri_str.as_str());
173
174        if let Some(ref user_agent) = configuration.user_agent {
175            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
176        }
177
178        // send request
179        let req = req_builder.build()?;
180
181        Ok(client.execute(req)?.error_for_status()?.json()?)
182    }
183
184    fn get_form_variables(&self, id: &str, variable_names: Option<&str>, deserialize_values: Option<bool>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
185        let configuration: &configuration::Configuration = self.configuration.borrow();
186        let client = &configuration.client;
187
188        let uri_str = format!("{}/task/{id}/form-variables", configuration.base_path, id=crate::apis::urlencode(id));
189        let mut req_builder = client.get(uri_str.as_str());
190
191        if let Some(ref s) = variable_names {
192            req_builder = req_builder.query(&[("variableNames", &s.to_string())]);
193        }
194        if let Some(ref s) = deserialize_values {
195            req_builder = req_builder.query(&[("deserializeValues", &s.to_string())]);
196        }
197        if let Some(ref user_agent) = configuration.user_agent {
198            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
199        }
200
201        // send request
202        let req = req_builder.build()?;
203
204        Ok(client.execute(req)?.error_for_status()?.json()?)
205    }
206
207    fn get_rendered_form(&self, id: &str) -> Result<std::path::PathBuf, Error> {
208        let configuration: &configuration::Configuration = self.configuration.borrow();
209        let client = &configuration.client;
210
211        let uri_str = format!("{}/task/{id}/rendered-form", configuration.base_path, id=crate::apis::urlencode(id));
212        let mut req_builder = client.get(uri_str.as_str());
213
214        if let Some(ref user_agent) = configuration.user_agent {
215            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
216        }
217
218        // send request
219        let req = req_builder.build()?;
220
221        Ok(client.execute(req)?.error_for_status()?.json()?)
222    }
223
224    fn get_task(&self, id: &str) -> Result<crate::models::TaskDto, Error> {
225        let configuration: &configuration::Configuration = self.configuration.borrow();
226        let client = &configuration.client;
227
228        let uri_str = format!("{}/task/{id}", configuration.base_path, id=crate::apis::urlencode(id));
229        let mut req_builder = client.get(uri_str.as_str());
230
231        if let Some(ref user_agent) = configuration.user_agent {
232            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
233        }
234
235        // send request
236        let req = req_builder.build()?;
237
238        Ok(client.execute(req)?.error_for_status()?.json()?)
239    }
240
241    fn get_tasks(&self, process_instance_id: Option<&str>, process_instance_id_in: Option<&str>, process_instance_business_key: Option<&str>, process_instance_business_key_expression: Option<&str>, process_instance_business_key_in: Option<&str>, process_instance_business_key_like: Option<&str>, process_instance_business_key_like_expression: Option<&str>, process_definition_id: Option<&str>, process_definition_key: Option<&str>, process_definition_key_in: Option<&str>, process_definition_name: Option<&str>, process_definition_name_like: Option<&str>, execution_id: Option<&str>, case_instance_id: Option<&str>, case_instance_business_key: Option<&str>, case_instance_business_key_like: Option<&str>, case_definition_id: Option<&str>, case_definition_key: Option<&str>, case_definition_name: Option<&str>, case_definition_name_like: Option<&str>, case_execution_id: Option<&str>, activity_instance_id_in: Option<&str>, tenant_id_in: Option<&str>, without_tenant_id: Option<bool>, assignee: Option<&str>, assignee_expression: Option<&str>, assignee_like: Option<&str>, assignee_like_expression: Option<&str>, assignee_in: Option<&str>, owner: Option<&str>, owner_expression: Option<&str>, candidate_group: Option<&str>, candidate_group_expression: Option<&str>, candidate_user: Option<&str>, candidate_user_expression: Option<&str>, include_assigned_tasks: Option<bool>, involved_user: Option<&str>, involved_user_expression: Option<&str>, assigned: Option<bool>, unassigned: Option<bool>, task_definition_key: Option<&str>, task_definition_key_in: Option<&str>, task_definition_key_like: Option<&str>, name: Option<&str>, name_not_equal: Option<&str>, name_like: Option<&str>, name_not_like: Option<&str>, description: Option<&str>, description_like: Option<&str>, priority: Option<i32>, max_priority: Option<i32>, min_priority: Option<i32>, due_date: Option<&str>, due_date_expression: Option<&str>, due_after: Option<&str>, due_after_expression: Option<&str>, due_before: Option<&str>, due_before_expression: Option<&str>, follow_up_date: Option<&str>, follow_up_date_expression: Option<&str>, follow_up_after: Option<&str>, follow_up_after_expression: Option<&str>, follow_up_before: Option<&str>, follow_up_before_expression: Option<&str>, follow_up_before_or_not_existent: Option<&str>, follow_up_before_or_not_existent_expression: Option<&str>, created_on: Option<&str>, created_on_expression: Option<&str>, created_after: Option<&str>, created_after_expression: Option<&str>, created_before: Option<&str>, created_before_expression: Option<&str>, delegation_state: Option<&str>, candidate_groups: Option<&str>, candidate_groups_expression: Option<&str>, with_candidate_groups: Option<bool>, without_candidate_groups: Option<bool>, with_candidate_users: Option<bool>, without_candidate_users: Option<bool>, active: Option<bool>, suspended: Option<bool>, task_variables: Option<&str>, process_variables: Option<&str>, case_instance_variables: Option<&str>, variable_names_ignore_case: Option<bool>, variable_values_ignore_case: Option<bool>, parent_task_id: Option<&str>, sort_by: Option<&str>, sort_order: Option<&str>, first_result: Option<i32>, max_results: Option<i32>) -> Result<Vec<crate::models::TaskDto>, Error> {
242        let configuration: &configuration::Configuration = self.configuration.borrow();
243        let client = &configuration.client;
244
245        let uri_str = format!("{}/task", configuration.base_path);
246        let mut req_builder = client.get(uri_str.as_str());
247
248        if let Some(ref s) = process_instance_id {
249            req_builder = req_builder.query(&[("processInstanceId", &s.to_string())]);
250        }
251        if let Some(ref s) = process_instance_id_in {
252            req_builder = req_builder.query(&[("processInstanceIdIn", &s.to_string())]);
253        }
254        if let Some(ref s) = process_instance_business_key {
255            req_builder = req_builder.query(&[("processInstanceBusinessKey", &s.to_string())]);
256        }
257        if let Some(ref s) = process_instance_business_key_expression {
258            req_builder = req_builder.query(&[("processInstanceBusinessKeyExpression", &s.to_string())]);
259        }
260        if let Some(ref s) = process_instance_business_key_in {
261            req_builder = req_builder.query(&[("processInstanceBusinessKeyIn", &s.to_string())]);
262        }
263        if let Some(ref s) = process_instance_business_key_like {
264            req_builder = req_builder.query(&[("processInstanceBusinessKeyLike", &s.to_string())]);
265        }
266        if let Some(ref s) = process_instance_business_key_like_expression {
267            req_builder = req_builder.query(&[("processInstanceBusinessKeyLikeExpression", &s.to_string())]);
268        }
269        if let Some(ref s) = process_definition_id {
270            req_builder = req_builder.query(&[("processDefinitionId", &s.to_string())]);
271        }
272        if let Some(ref s) = process_definition_key {
273            req_builder = req_builder.query(&[("processDefinitionKey", &s.to_string())]);
274        }
275        if let Some(ref s) = process_definition_key_in {
276            req_builder = req_builder.query(&[("processDefinitionKeyIn", &s.to_string())]);
277        }
278        if let Some(ref s) = process_definition_name {
279            req_builder = req_builder.query(&[("processDefinitionName", &s.to_string())]);
280        }
281        if let Some(ref s) = process_definition_name_like {
282            req_builder = req_builder.query(&[("processDefinitionNameLike", &s.to_string())]);
283        }
284        if let Some(ref s) = execution_id {
285            req_builder = req_builder.query(&[("executionId", &s.to_string())]);
286        }
287        if let Some(ref s) = case_instance_id {
288            req_builder = req_builder.query(&[("caseInstanceId", &s.to_string())]);
289        }
290        if let Some(ref s) = case_instance_business_key {
291            req_builder = req_builder.query(&[("caseInstanceBusinessKey", &s.to_string())]);
292        }
293        if let Some(ref s) = case_instance_business_key_like {
294            req_builder = req_builder.query(&[("caseInstanceBusinessKeyLike", &s.to_string())]);
295        }
296        if let Some(ref s) = case_definition_id {
297            req_builder = req_builder.query(&[("caseDefinitionId", &s.to_string())]);
298        }
299        if let Some(ref s) = case_definition_key {
300            req_builder = req_builder.query(&[("caseDefinitionKey", &s.to_string())]);
301        }
302        if let Some(ref s) = case_definition_name {
303            req_builder = req_builder.query(&[("caseDefinitionName", &s.to_string())]);
304        }
305        if let Some(ref s) = case_definition_name_like {
306            req_builder = req_builder.query(&[("caseDefinitionNameLike", &s.to_string())]);
307        }
308        if let Some(ref s) = case_execution_id {
309            req_builder = req_builder.query(&[("caseExecutionId", &s.to_string())]);
310        }
311        if let Some(ref s) = activity_instance_id_in {
312            req_builder = req_builder.query(&[("activityInstanceIdIn", &s.to_string())]);
313        }
314        if let Some(ref s) = tenant_id_in {
315            req_builder = req_builder.query(&[("tenantIdIn", &s.to_string())]);
316        }
317        if let Some(ref s) = without_tenant_id {
318            req_builder = req_builder.query(&[("withoutTenantId", &s.to_string())]);
319        }
320        if let Some(ref s) = assignee {
321            req_builder = req_builder.query(&[("assignee", &s.to_string())]);
322        }
323        if let Some(ref s) = assignee_expression {
324            req_builder = req_builder.query(&[("assigneeExpression", &s.to_string())]);
325        }
326        if let Some(ref s) = assignee_like {
327            req_builder = req_builder.query(&[("assigneeLike", &s.to_string())]);
328        }
329        if let Some(ref s) = assignee_like_expression {
330            req_builder = req_builder.query(&[("assigneeLikeExpression", &s.to_string())]);
331        }
332        if let Some(ref s) = assignee_in {
333            req_builder = req_builder.query(&[("assigneeIn", &s.to_string())]);
334        }
335        if let Some(ref s) = owner {
336            req_builder = req_builder.query(&[("owner", &s.to_string())]);
337        }
338        if let Some(ref s) = owner_expression {
339            req_builder = req_builder.query(&[("ownerExpression", &s.to_string())]);
340        }
341        if let Some(ref s) = candidate_group {
342            req_builder = req_builder.query(&[("candidateGroup", &s.to_string())]);
343        }
344        if let Some(ref s) = candidate_group_expression {
345            req_builder = req_builder.query(&[("candidateGroupExpression", &s.to_string())]);
346        }
347        if let Some(ref s) = candidate_user {
348            req_builder = req_builder.query(&[("candidateUser", &s.to_string())]);
349        }
350        if let Some(ref s) = candidate_user_expression {
351            req_builder = req_builder.query(&[("candidateUserExpression", &s.to_string())]);
352        }
353        if let Some(ref s) = include_assigned_tasks {
354            req_builder = req_builder.query(&[("includeAssignedTasks", &s.to_string())]);
355        }
356        if let Some(ref s) = involved_user {
357            req_builder = req_builder.query(&[("involvedUser", &s.to_string())]);
358        }
359        if let Some(ref s) = involved_user_expression {
360            req_builder = req_builder.query(&[("involvedUserExpression", &s.to_string())]);
361        }
362        if let Some(ref s) = assigned {
363            req_builder = req_builder.query(&[("assigned", &s.to_string())]);
364        }
365        if let Some(ref s) = unassigned {
366            req_builder = req_builder.query(&[("unassigned", &s.to_string())]);
367        }
368        if let Some(ref s) = task_definition_key {
369            req_builder = req_builder.query(&[("taskDefinitionKey", &s.to_string())]);
370        }
371        if let Some(ref s) = task_definition_key_in {
372            req_builder = req_builder.query(&[("taskDefinitionKeyIn", &s.to_string())]);
373        }
374        if let Some(ref s) = task_definition_key_like {
375            req_builder = req_builder.query(&[("taskDefinitionKeyLike", &s.to_string())]);
376        }
377        if let Some(ref s) = name {
378            req_builder = req_builder.query(&[("name", &s.to_string())]);
379        }
380        if let Some(ref s) = name_not_equal {
381            req_builder = req_builder.query(&[("nameNotEqual", &s.to_string())]);
382        }
383        if let Some(ref s) = name_like {
384            req_builder = req_builder.query(&[("nameLike", &s.to_string())]);
385        }
386        if let Some(ref s) = name_not_like {
387            req_builder = req_builder.query(&[("nameNotLike", &s.to_string())]);
388        }
389        if let Some(ref s) = description {
390            req_builder = req_builder.query(&[("description", &s.to_string())]);
391        }
392        if let Some(ref s) = description_like {
393            req_builder = req_builder.query(&[("descriptionLike", &s.to_string())]);
394        }
395        if let Some(ref s) = priority {
396            req_builder = req_builder.query(&[("priority", &s.to_string())]);
397        }
398        if let Some(ref s) = max_priority {
399            req_builder = req_builder.query(&[("maxPriority", &s.to_string())]);
400        }
401        if let Some(ref s) = min_priority {
402            req_builder = req_builder.query(&[("minPriority", &s.to_string())]);
403        }
404        if let Some(ref s) = due_date {
405            req_builder = req_builder.query(&[("dueDate", &s.to_string())]);
406        }
407        if let Some(ref s) = due_date_expression {
408            req_builder = req_builder.query(&[("dueDateExpression", &s.to_string())]);
409        }
410        if let Some(ref s) = due_after {
411            req_builder = req_builder.query(&[("dueAfter", &s.to_string())]);
412        }
413        if let Some(ref s) = due_after_expression {
414            req_builder = req_builder.query(&[("dueAfterExpression", &s.to_string())]);
415        }
416        if let Some(ref s) = due_before {
417            req_builder = req_builder.query(&[("dueBefore", &s.to_string())]);
418        }
419        if let Some(ref s) = due_before_expression {
420            req_builder = req_builder.query(&[("dueBeforeExpression", &s.to_string())]);
421        }
422        if let Some(ref s) = follow_up_date {
423            req_builder = req_builder.query(&[("followUpDate", &s.to_string())]);
424        }
425        if let Some(ref s) = follow_up_date_expression {
426            req_builder = req_builder.query(&[("followUpDateExpression", &s.to_string())]);
427        }
428        if let Some(ref s) = follow_up_after {
429            req_builder = req_builder.query(&[("followUpAfter", &s.to_string())]);
430        }
431        if let Some(ref s) = follow_up_after_expression {
432            req_builder = req_builder.query(&[("followUpAfterExpression", &s.to_string())]);
433        }
434        if let Some(ref s) = follow_up_before {
435            req_builder = req_builder.query(&[("followUpBefore", &s.to_string())]);
436        }
437        if let Some(ref s) = follow_up_before_expression {
438            req_builder = req_builder.query(&[("followUpBeforeExpression", &s.to_string())]);
439        }
440        if let Some(ref s) = follow_up_before_or_not_existent {
441            req_builder = req_builder.query(&[("followUpBeforeOrNotExistent", &s.to_string())]);
442        }
443        if let Some(ref s) = follow_up_before_or_not_existent_expression {
444            req_builder = req_builder.query(&[("followUpBeforeOrNotExistentExpression", &s.to_string())]);
445        }
446        if let Some(ref s) = created_on {
447            req_builder = req_builder.query(&[("createdOn", &s.to_string())]);
448        }
449        if let Some(ref s) = created_on_expression {
450            req_builder = req_builder.query(&[("createdOnExpression", &s.to_string())]);
451        }
452        if let Some(ref s) = created_after {
453            req_builder = req_builder.query(&[("createdAfter", &s.to_string())]);
454        }
455        if let Some(ref s) = created_after_expression {
456            req_builder = req_builder.query(&[("createdAfterExpression", &s.to_string())]);
457        }
458        if let Some(ref s) = created_before {
459            req_builder = req_builder.query(&[("createdBefore", &s.to_string())]);
460        }
461        if let Some(ref s) = created_before_expression {
462            req_builder = req_builder.query(&[("createdBeforeExpression", &s.to_string())]);
463        }
464        if let Some(ref s) = delegation_state {
465            req_builder = req_builder.query(&[("delegationState", &s.to_string())]);
466        }
467        if let Some(ref s) = candidate_groups {
468            req_builder = req_builder.query(&[("candidateGroups", &s.to_string())]);
469        }
470        if let Some(ref s) = candidate_groups_expression {
471            req_builder = req_builder.query(&[("candidateGroupsExpression", &s.to_string())]);
472        }
473        if let Some(ref s) = with_candidate_groups {
474            req_builder = req_builder.query(&[("withCandidateGroups", &s.to_string())]);
475        }
476        if let Some(ref s) = without_candidate_groups {
477            req_builder = req_builder.query(&[("withoutCandidateGroups", &s.to_string())]);
478        }
479        if let Some(ref s) = with_candidate_users {
480            req_builder = req_builder.query(&[("withCandidateUsers", &s.to_string())]);
481        }
482        if let Some(ref s) = without_candidate_users {
483            req_builder = req_builder.query(&[("withoutCandidateUsers", &s.to_string())]);
484        }
485        if let Some(ref s) = active {
486            req_builder = req_builder.query(&[("active", &s.to_string())]);
487        }
488        if let Some(ref s) = suspended {
489            req_builder = req_builder.query(&[("suspended", &s.to_string())]);
490        }
491        if let Some(ref s) = task_variables {
492            req_builder = req_builder.query(&[("taskVariables", &s.to_string())]);
493        }
494        if let Some(ref s) = process_variables {
495            req_builder = req_builder.query(&[("processVariables", &s.to_string())]);
496        }
497        if let Some(ref s) = case_instance_variables {
498            req_builder = req_builder.query(&[("caseInstanceVariables", &s.to_string())]);
499        }
500        if let Some(ref s) = variable_names_ignore_case {
501            req_builder = req_builder.query(&[("variableNamesIgnoreCase", &s.to_string())]);
502        }
503        if let Some(ref s) = variable_values_ignore_case {
504            req_builder = req_builder.query(&[("variableValuesIgnoreCase", &s.to_string())]);
505        }
506        if let Some(ref s) = parent_task_id {
507            req_builder = req_builder.query(&[("parentTaskId", &s.to_string())]);
508        }
509        if let Some(ref s) = sort_by {
510            req_builder = req_builder.query(&[("sortBy", &s.to_string())]);
511        }
512        if let Some(ref s) = sort_order {
513            req_builder = req_builder.query(&[("sortOrder", &s.to_string())]);
514        }
515        if let Some(ref s) = first_result {
516            req_builder = req_builder.query(&[("firstResult", &s.to_string())]);
517        }
518        if let Some(ref s) = max_results {
519            req_builder = req_builder.query(&[("maxResults", &s.to_string())]);
520        }
521        if let Some(ref user_agent) = configuration.user_agent {
522            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
523        }
524
525        // send request
526        let req = req_builder.build()?;
527
528        Ok(client.execute(req)?.error_for_status()?.json()?)
529    }
530
531    fn get_tasks_count(&self, process_instance_id: Option<&str>, process_instance_id_in: Option<&str>, process_instance_business_key: Option<&str>, process_instance_business_key_expression: Option<&str>, process_instance_business_key_in: Option<&str>, process_instance_business_key_like: Option<&str>, process_instance_business_key_like_expression: Option<&str>, process_definition_id: Option<&str>, process_definition_key: Option<&str>, process_definition_key_in: Option<&str>, process_definition_name: Option<&str>, process_definition_name_like: Option<&str>, execution_id: Option<&str>, case_instance_id: Option<&str>, case_instance_business_key: Option<&str>, case_instance_business_key_like: Option<&str>, case_definition_id: Option<&str>, case_definition_key: Option<&str>, case_definition_name: Option<&str>, case_definition_name_like: Option<&str>, case_execution_id: Option<&str>, activity_instance_id_in: Option<&str>, tenant_id_in: Option<&str>, without_tenant_id: Option<bool>, assignee: Option<&str>, assignee_expression: Option<&str>, assignee_like: Option<&str>, assignee_like_expression: Option<&str>, assignee_in: Option<&str>, owner: Option<&str>, owner_expression: Option<&str>, candidate_group: Option<&str>, candidate_group_expression: Option<&str>, candidate_user: Option<&str>, candidate_user_expression: Option<&str>, include_assigned_tasks: Option<bool>, involved_user: Option<&str>, involved_user_expression: Option<&str>, assigned: Option<bool>, unassigned: Option<bool>, task_definition_key: Option<&str>, task_definition_key_in: Option<&str>, task_definition_key_like: Option<&str>, name: Option<&str>, name_not_equal: Option<&str>, name_like: Option<&str>, name_not_like: Option<&str>, description: Option<&str>, description_like: Option<&str>, priority: Option<i32>, max_priority: Option<i32>, min_priority: Option<i32>, due_date: Option<&str>, due_date_expression: Option<&str>, due_after: Option<&str>, due_after_expression: Option<&str>, due_before: Option<&str>, due_before_expression: Option<&str>, follow_up_date: Option<&str>, follow_up_date_expression: Option<&str>, follow_up_after: Option<&str>, follow_up_after_expression: Option<&str>, follow_up_before: Option<&str>, follow_up_before_expression: Option<&str>, follow_up_before_or_not_existent: Option<&str>, follow_up_before_or_not_existent_expression: Option<&str>, created_on: Option<&str>, created_on_expression: Option<&str>, created_after: Option<&str>, created_after_expression: Option<&str>, created_before: Option<&str>, created_before_expression: Option<&str>, delegation_state: Option<&str>, candidate_groups: Option<&str>, candidate_groups_expression: Option<&str>, with_candidate_groups: Option<bool>, without_candidate_groups: Option<bool>, with_candidate_users: Option<bool>, without_candidate_users: Option<bool>, active: Option<bool>, suspended: Option<bool>, task_variables: Option<&str>, process_variables: Option<&str>, case_instance_variables: Option<&str>, variable_names_ignore_case: Option<bool>, variable_values_ignore_case: Option<bool>, parent_task_id: Option<&str>) -> Result<crate::models::CountResultDto, Error> {
532        let configuration: &configuration::Configuration = self.configuration.borrow();
533        let client = &configuration.client;
534
535        let uri_str = format!("{}/task/count", configuration.base_path);
536        let mut req_builder = client.get(uri_str.as_str());
537
538        if let Some(ref s) = process_instance_id {
539            req_builder = req_builder.query(&[("processInstanceId", &s.to_string())]);
540        }
541        if let Some(ref s) = process_instance_id_in {
542            req_builder = req_builder.query(&[("processInstanceIdIn", &s.to_string())]);
543        }
544        if let Some(ref s) = process_instance_business_key {
545            req_builder = req_builder.query(&[("processInstanceBusinessKey", &s.to_string())]);
546        }
547        if let Some(ref s) = process_instance_business_key_expression {
548            req_builder = req_builder.query(&[("processInstanceBusinessKeyExpression", &s.to_string())]);
549        }
550        if let Some(ref s) = process_instance_business_key_in {
551            req_builder = req_builder.query(&[("processInstanceBusinessKeyIn", &s.to_string())]);
552        }
553        if let Some(ref s) = process_instance_business_key_like {
554            req_builder = req_builder.query(&[("processInstanceBusinessKeyLike", &s.to_string())]);
555        }
556        if let Some(ref s) = process_instance_business_key_like_expression {
557            req_builder = req_builder.query(&[("processInstanceBusinessKeyLikeExpression", &s.to_string())]);
558        }
559        if let Some(ref s) = process_definition_id {
560            req_builder = req_builder.query(&[("processDefinitionId", &s.to_string())]);
561        }
562        if let Some(ref s) = process_definition_key {
563            req_builder = req_builder.query(&[("processDefinitionKey", &s.to_string())]);
564        }
565        if let Some(ref s) = process_definition_key_in {
566            req_builder = req_builder.query(&[("processDefinitionKeyIn", &s.to_string())]);
567        }
568        if let Some(ref s) = process_definition_name {
569            req_builder = req_builder.query(&[("processDefinitionName", &s.to_string())]);
570        }
571        if let Some(ref s) = process_definition_name_like {
572            req_builder = req_builder.query(&[("processDefinitionNameLike", &s.to_string())]);
573        }
574        if let Some(ref s) = execution_id {
575            req_builder = req_builder.query(&[("executionId", &s.to_string())]);
576        }
577        if let Some(ref s) = case_instance_id {
578            req_builder = req_builder.query(&[("caseInstanceId", &s.to_string())]);
579        }
580        if let Some(ref s) = case_instance_business_key {
581            req_builder = req_builder.query(&[("caseInstanceBusinessKey", &s.to_string())]);
582        }
583        if let Some(ref s) = case_instance_business_key_like {
584            req_builder = req_builder.query(&[("caseInstanceBusinessKeyLike", &s.to_string())]);
585        }
586        if let Some(ref s) = case_definition_id {
587            req_builder = req_builder.query(&[("caseDefinitionId", &s.to_string())]);
588        }
589        if let Some(ref s) = case_definition_key {
590            req_builder = req_builder.query(&[("caseDefinitionKey", &s.to_string())]);
591        }
592        if let Some(ref s) = case_definition_name {
593            req_builder = req_builder.query(&[("caseDefinitionName", &s.to_string())]);
594        }
595        if let Some(ref s) = case_definition_name_like {
596            req_builder = req_builder.query(&[("caseDefinitionNameLike", &s.to_string())]);
597        }
598        if let Some(ref s) = case_execution_id {
599            req_builder = req_builder.query(&[("caseExecutionId", &s.to_string())]);
600        }
601        if let Some(ref s) = activity_instance_id_in {
602            req_builder = req_builder.query(&[("activityInstanceIdIn", &s.to_string())]);
603        }
604        if let Some(ref s) = tenant_id_in {
605            req_builder = req_builder.query(&[("tenantIdIn", &s.to_string())]);
606        }
607        if let Some(ref s) = without_tenant_id {
608            req_builder = req_builder.query(&[("withoutTenantId", &s.to_string())]);
609        }
610        if let Some(ref s) = assignee {
611            req_builder = req_builder.query(&[("assignee", &s.to_string())]);
612        }
613        if let Some(ref s) = assignee_expression {
614            req_builder = req_builder.query(&[("assigneeExpression", &s.to_string())]);
615        }
616        if let Some(ref s) = assignee_like {
617            req_builder = req_builder.query(&[("assigneeLike", &s.to_string())]);
618        }
619        if let Some(ref s) = assignee_like_expression {
620            req_builder = req_builder.query(&[("assigneeLikeExpression", &s.to_string())]);
621        }
622        if let Some(ref s) = assignee_in {
623            req_builder = req_builder.query(&[("assigneeIn", &s.to_string())]);
624        }
625        if let Some(ref s) = owner {
626            req_builder = req_builder.query(&[("owner", &s.to_string())]);
627        }
628        if let Some(ref s) = owner_expression {
629            req_builder = req_builder.query(&[("ownerExpression", &s.to_string())]);
630        }
631        if let Some(ref s) = candidate_group {
632            req_builder = req_builder.query(&[("candidateGroup", &s.to_string())]);
633        }
634        if let Some(ref s) = candidate_group_expression {
635            req_builder = req_builder.query(&[("candidateGroupExpression", &s.to_string())]);
636        }
637        if let Some(ref s) = candidate_user {
638            req_builder = req_builder.query(&[("candidateUser", &s.to_string())]);
639        }
640        if let Some(ref s) = candidate_user_expression {
641            req_builder = req_builder.query(&[("candidateUserExpression", &s.to_string())]);
642        }
643        if let Some(ref s) = include_assigned_tasks {
644            req_builder = req_builder.query(&[("includeAssignedTasks", &s.to_string())]);
645        }
646        if let Some(ref s) = involved_user {
647            req_builder = req_builder.query(&[("involvedUser", &s.to_string())]);
648        }
649        if let Some(ref s) = involved_user_expression {
650            req_builder = req_builder.query(&[("involvedUserExpression", &s.to_string())]);
651        }
652        if let Some(ref s) = assigned {
653            req_builder = req_builder.query(&[("assigned", &s.to_string())]);
654        }
655        if let Some(ref s) = unassigned {
656            req_builder = req_builder.query(&[("unassigned", &s.to_string())]);
657        }
658        if let Some(ref s) = task_definition_key {
659            req_builder = req_builder.query(&[("taskDefinitionKey", &s.to_string())]);
660        }
661        if let Some(ref s) = task_definition_key_in {
662            req_builder = req_builder.query(&[("taskDefinitionKeyIn", &s.to_string())]);
663        }
664        if let Some(ref s) = task_definition_key_like {
665            req_builder = req_builder.query(&[("taskDefinitionKeyLike", &s.to_string())]);
666        }
667        if let Some(ref s) = name {
668            req_builder = req_builder.query(&[("name", &s.to_string())]);
669        }
670        if let Some(ref s) = name_not_equal {
671            req_builder = req_builder.query(&[("nameNotEqual", &s.to_string())]);
672        }
673        if let Some(ref s) = name_like {
674            req_builder = req_builder.query(&[("nameLike", &s.to_string())]);
675        }
676        if let Some(ref s) = name_not_like {
677            req_builder = req_builder.query(&[("nameNotLike", &s.to_string())]);
678        }
679        if let Some(ref s) = description {
680            req_builder = req_builder.query(&[("description", &s.to_string())]);
681        }
682        if let Some(ref s) = description_like {
683            req_builder = req_builder.query(&[("descriptionLike", &s.to_string())]);
684        }
685        if let Some(ref s) = priority {
686            req_builder = req_builder.query(&[("priority", &s.to_string())]);
687        }
688        if let Some(ref s) = max_priority {
689            req_builder = req_builder.query(&[("maxPriority", &s.to_string())]);
690        }
691        if let Some(ref s) = min_priority {
692            req_builder = req_builder.query(&[("minPriority", &s.to_string())]);
693        }
694        if let Some(ref s) = due_date {
695            req_builder = req_builder.query(&[("dueDate", &s.to_string())]);
696        }
697        if let Some(ref s) = due_date_expression {
698            req_builder = req_builder.query(&[("dueDateExpression", &s.to_string())]);
699        }
700        if let Some(ref s) = due_after {
701            req_builder = req_builder.query(&[("dueAfter", &s.to_string())]);
702        }
703        if let Some(ref s) = due_after_expression {
704            req_builder = req_builder.query(&[("dueAfterExpression", &s.to_string())]);
705        }
706        if let Some(ref s) = due_before {
707            req_builder = req_builder.query(&[("dueBefore", &s.to_string())]);
708        }
709        if let Some(ref s) = due_before_expression {
710            req_builder = req_builder.query(&[("dueBeforeExpression", &s.to_string())]);
711        }
712        if let Some(ref s) = follow_up_date {
713            req_builder = req_builder.query(&[("followUpDate", &s.to_string())]);
714        }
715        if let Some(ref s) = follow_up_date_expression {
716            req_builder = req_builder.query(&[("followUpDateExpression", &s.to_string())]);
717        }
718        if let Some(ref s) = follow_up_after {
719            req_builder = req_builder.query(&[("followUpAfter", &s.to_string())]);
720        }
721        if let Some(ref s) = follow_up_after_expression {
722            req_builder = req_builder.query(&[("followUpAfterExpression", &s.to_string())]);
723        }
724        if let Some(ref s) = follow_up_before {
725            req_builder = req_builder.query(&[("followUpBefore", &s.to_string())]);
726        }
727        if let Some(ref s) = follow_up_before_expression {
728            req_builder = req_builder.query(&[("followUpBeforeExpression", &s.to_string())]);
729        }
730        if let Some(ref s) = follow_up_before_or_not_existent {
731            req_builder = req_builder.query(&[("followUpBeforeOrNotExistent", &s.to_string())]);
732        }
733        if let Some(ref s) = follow_up_before_or_not_existent_expression {
734            req_builder = req_builder.query(&[("followUpBeforeOrNotExistentExpression", &s.to_string())]);
735        }
736        if let Some(ref s) = created_on {
737            req_builder = req_builder.query(&[("createdOn", &s.to_string())]);
738        }
739        if let Some(ref s) = created_on_expression {
740            req_builder = req_builder.query(&[("createdOnExpression", &s.to_string())]);
741        }
742        if let Some(ref s) = created_after {
743            req_builder = req_builder.query(&[("createdAfter", &s.to_string())]);
744        }
745        if let Some(ref s) = created_after_expression {
746            req_builder = req_builder.query(&[("createdAfterExpression", &s.to_string())]);
747        }
748        if let Some(ref s) = created_before {
749            req_builder = req_builder.query(&[("createdBefore", &s.to_string())]);
750        }
751        if let Some(ref s) = created_before_expression {
752            req_builder = req_builder.query(&[("createdBeforeExpression", &s.to_string())]);
753        }
754        if let Some(ref s) = delegation_state {
755            req_builder = req_builder.query(&[("delegationState", &s.to_string())]);
756        }
757        if let Some(ref s) = candidate_groups {
758            req_builder = req_builder.query(&[("candidateGroups", &s.to_string())]);
759        }
760        if let Some(ref s) = candidate_groups_expression {
761            req_builder = req_builder.query(&[("candidateGroupsExpression", &s.to_string())]);
762        }
763        if let Some(ref s) = with_candidate_groups {
764            req_builder = req_builder.query(&[("withCandidateGroups", &s.to_string())]);
765        }
766        if let Some(ref s) = without_candidate_groups {
767            req_builder = req_builder.query(&[("withoutCandidateGroups", &s.to_string())]);
768        }
769        if let Some(ref s) = with_candidate_users {
770            req_builder = req_builder.query(&[("withCandidateUsers", &s.to_string())]);
771        }
772        if let Some(ref s) = without_candidate_users {
773            req_builder = req_builder.query(&[("withoutCandidateUsers", &s.to_string())]);
774        }
775        if let Some(ref s) = active {
776            req_builder = req_builder.query(&[("active", &s.to_string())]);
777        }
778        if let Some(ref s) = suspended {
779            req_builder = req_builder.query(&[("suspended", &s.to_string())]);
780        }
781        if let Some(ref s) = task_variables {
782            req_builder = req_builder.query(&[("taskVariables", &s.to_string())]);
783        }
784        if let Some(ref s) = process_variables {
785            req_builder = req_builder.query(&[("processVariables", &s.to_string())]);
786        }
787        if let Some(ref s) = case_instance_variables {
788            req_builder = req_builder.query(&[("caseInstanceVariables", &s.to_string())]);
789        }
790        if let Some(ref s) = variable_names_ignore_case {
791            req_builder = req_builder.query(&[("variableNamesIgnoreCase", &s.to_string())]);
792        }
793        if let Some(ref s) = variable_values_ignore_case {
794            req_builder = req_builder.query(&[("variableValuesIgnoreCase", &s.to_string())]);
795        }
796        if let Some(ref s) = parent_task_id {
797            req_builder = req_builder.query(&[("parentTaskId", &s.to_string())]);
798        }
799        if let Some(ref user_agent) = configuration.user_agent {
800            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
801        }
802
803        // send request
804        let req = req_builder.build()?;
805
806        Ok(client.execute(req)?.error_for_status()?.json()?)
807    }
808
809    fn handle_bpmn_error(&self, id: &str, task_bpmn_error_dto: Option<crate::models::TaskBpmnErrorDto>) -> Result<(), Error> {
810        let configuration: &configuration::Configuration = self.configuration.borrow();
811        let client = &configuration.client;
812
813        let uri_str = format!("{}/task/{id}/bpmnError", configuration.base_path, id=crate::apis::urlencode(id));
814        let mut req_builder = client.post(uri_str.as_str());
815
816        if let Some(ref user_agent) = configuration.user_agent {
817            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
818        }
819        req_builder = req_builder.json(&task_bpmn_error_dto);
820
821        // send request
822        let req = req_builder.build()?;
823
824        client.execute(req)?.error_for_status()?;
825        Ok(())
826    }
827
828    fn handle_escalation(&self, id: &str, task_escalation_dto: Option<crate::models::TaskEscalationDto>) -> Result<(), Error> {
829        let configuration: &configuration::Configuration = self.configuration.borrow();
830        let client = &configuration.client;
831
832        let uri_str = format!("{}/task/{id}/bpmnEscalation", configuration.base_path, id=crate::apis::urlencode(id));
833        let mut req_builder = client.post(uri_str.as_str());
834
835        if let Some(ref user_agent) = configuration.user_agent {
836            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
837        }
838        req_builder = req_builder.json(&task_escalation_dto);
839
840        // send request
841        let req = req_builder.build()?;
842
843        client.execute(req)?.error_for_status()?;
844        Ok(())
845    }
846
847    fn query_tasks(&self, first_result: Option<i32>, max_results: Option<i32>, task_query_dto: Option<crate::models::TaskQueryDto>) -> Result<Vec<crate::models::TaskDto>, Error> {
848        let configuration: &configuration::Configuration = self.configuration.borrow();
849        let client = &configuration.client;
850
851        let uri_str = format!("{}/task", configuration.base_path);
852        let mut req_builder = client.post(uri_str.as_str());
853
854        if let Some(ref s) = first_result {
855            req_builder = req_builder.query(&[("firstResult", &s.to_string())]);
856        }
857        if let Some(ref s) = max_results {
858            req_builder = req_builder.query(&[("maxResults", &s.to_string())]);
859        }
860        if let Some(ref user_agent) = configuration.user_agent {
861            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
862        }
863        req_builder = req_builder.json(&task_query_dto);
864
865        // send request
866        let req = req_builder.build()?;
867
868        Ok(client.execute(req)?.error_for_status()?.json()?)
869    }
870
871    fn query_tasks_count(&self, task_query_dto: Option<crate::models::TaskQueryDto>) -> Result<crate::models::CountResultDto, Error> {
872        let configuration: &configuration::Configuration = self.configuration.borrow();
873        let client = &configuration.client;
874
875        let uri_str = format!("{}/task/count", configuration.base_path);
876        let mut req_builder = client.post(uri_str.as_str());
877
878        if let Some(ref user_agent) = configuration.user_agent {
879            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
880        }
881        req_builder = req_builder.json(&task_query_dto);
882
883        // send request
884        let req = req_builder.build()?;
885
886        Ok(client.execute(req)?.error_for_status()?.json()?)
887    }
888
889    fn resolve(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<(), Error> {
890        let configuration: &configuration::Configuration = self.configuration.borrow();
891        let client = &configuration.client;
892
893        let uri_str = format!("{}/task/{id}/resolve", configuration.base_path, id=crate::apis::urlencode(id));
894        let mut req_builder = client.post(uri_str.as_str());
895
896        if let Some(ref user_agent) = configuration.user_agent {
897            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
898        }
899        req_builder = req_builder.json(&complete_task_dto);
900
901        // send request
902        let req = req_builder.build()?;
903
904        client.execute(req)?.error_for_status()?;
905        Ok(())
906    }
907
908    fn set_assignee(&self, id: &str, user_id_dto: Option<crate::models::UserIdDto>) -> Result<(), Error> {
909        let configuration: &configuration::Configuration = self.configuration.borrow();
910        let client = &configuration.client;
911
912        let uri_str = format!("{}/task/{id}/assignee", configuration.base_path, id=crate::apis::urlencode(id));
913        let mut req_builder = client.post(uri_str.as_str());
914
915        if let Some(ref user_agent) = configuration.user_agent {
916            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
917        }
918        req_builder = req_builder.json(&user_id_dto);
919
920        // send request
921        let req = req_builder.build()?;
922
923        client.execute(req)?.error_for_status()?;
924        Ok(())
925    }
926
927    fn submit(&self, id: &str, complete_task_dto: Option<crate::models::CompleteTaskDto>) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
928        let configuration: &configuration::Configuration = self.configuration.borrow();
929        let client = &configuration.client;
930
931        let uri_str = format!("{}/task/{id}/submit-form", configuration.base_path, id=crate::apis::urlencode(id));
932        let mut req_builder = client.post(uri_str.as_str());
933
934        if let Some(ref user_agent) = configuration.user_agent {
935            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
936        }
937        req_builder = req_builder.json(&complete_task_dto);
938
939        // send request
940        let req = req_builder.build()?;
941
942        Ok(client.execute(req)?.error_for_status()?.json()?)
943    }
944
945    fn unclaim(&self, id: &str) -> Result<(), Error> {
946        let configuration: &configuration::Configuration = self.configuration.borrow();
947        let client = &configuration.client;
948
949        let uri_str = format!("{}/task/{id}/unclaim", configuration.base_path, id=crate::apis::urlencode(id));
950        let mut req_builder = client.post(uri_str.as_str());
951
952        if let Some(ref user_agent) = configuration.user_agent {
953            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
954        }
955
956        // send request
957        let req = req_builder.build()?;
958
959        client.execute(req)?.error_for_status()?;
960        Ok(())
961    }
962
963    fn update_task(&self, id: &str, task_dto: Option<crate::models::TaskDto>) -> Result<(), Error> {
964        let configuration: &configuration::Configuration = self.configuration.borrow();
965        let client = &configuration.client;
966
967        let uri_str = format!("{}/task/{id}", configuration.base_path, id=crate::apis::urlencode(id));
968        let mut req_builder = client.put(uri_str.as_str());
969
970        if let Some(ref user_agent) = configuration.user_agent {
971            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
972        }
973        req_builder = req_builder.json(&task_dto);
974
975        // send request
976        let req = req_builder.build()?;
977
978        client.execute(req)?.error_for_status()?;
979        Ok(())
980    }
981
982}