camunda_client/apis/
process_definition_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::borrow::Borrow;
12#[allow(unused_imports)]
13use std::option::Option;
14use std::rc::Rc;
15
16use reqwest;
17
18use super::{configuration, Error};
19
20pub struct ProcessDefinitionApiClient {
21    configuration: Rc<configuration::Configuration>,
22}
23
24impl ProcessDefinitionApiClient {
25    pub fn new(configuration: Rc<configuration::Configuration>) -> ProcessDefinitionApiClient {
26        ProcessDefinitionApiClient { configuration }
27    }
28}
29
30pub trait ProcessDefinitionApi {
31    fn delete_process_definition(
32        &self,
33        id: &str,
34        cascade: Option<bool>,
35        skip_custom_listeners: Option<bool>,
36        skip_io_mappings: Option<bool>,
37    ) -> Result<(), Error>;
38    fn delete_process_definitions_by_key(
39        &self,
40        key: &str,
41        cascade: Option<bool>,
42        skip_custom_listeners: Option<bool>,
43        skip_io_mappings: Option<bool>,
44    ) -> Result<(), Error>;
45    fn delete_process_definitions_by_key_and_tenant_id(
46        &self,
47        key: &str,
48        tenant_id: &str,
49        cascade: Option<bool>,
50        skip_custom_listeners: Option<bool>,
51        skip_io_mappings: Option<bool>,
52    ) -> Result<(), Error>;
53    fn get_activity_statistics(
54        &self,
55        id: &str,
56        failed_jobs: Option<bool>,
57        incidents: Option<bool>,
58        incidents_for_type: Option<&str>,
59    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error>;
60    fn get_activity_statistics_by_process_definition_key(
61        &self,
62        key: &str,
63        failed_jobs: Option<bool>,
64        incidents: Option<bool>,
65        incidents_for_type: Option<&str>,
66    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error>;
67    fn get_activity_statistics_by_process_definition_key_and_tenant_id(
68        &self,
69        key: &str,
70        tenant_id: &str,
71        failed_jobs: Option<bool>,
72        incidents: Option<bool>,
73        incidents_for_type: Option<&str>,
74    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error>;
75    fn get_deployed_start_form(&self, id: &str) -> Result<std::path::PathBuf, Error>;
76    fn get_deployed_start_form_by_key(&self, key: &str) -> Result<std::path::PathBuf, Error>;
77    fn get_deployed_start_form_by_key_and_tenant_id(
78        &self,
79        key: &str,
80        tenant_id: &str,
81    ) -> Result<std::path::PathBuf, Error>;
82    fn get_latest_process_definition_by_tenant_id(
83        &self,
84        key: &str,
85        tenant_id: &str,
86    ) -> Result<crate::models::ProcessDefinitionDto, Error>;
87    fn get_process_definition(
88        &self,
89        id: &str,
90    ) -> Result<crate::models::ProcessDefinitionDto, Error>;
91    fn get_process_definition_bpmn20_xml(
92        &self,
93        id: &str,
94    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error>;
95    fn get_process_definition_bpmn20_xml_by_key(
96        &self,
97        key: &str,
98    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error>;
99    fn get_process_definition_bpmn20_xml_by_key_and_tenant_id(
100        &self,
101        key: &str,
102        tenant_id: &str,
103    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error>;
104    fn get_process_definition_by_key(
105        &self,
106        key: &str,
107    ) -> Result<crate::models::ProcessDefinitionDto, Error>;
108    fn get_process_definition_diagram(&self, id: &str) -> Result<std::path::PathBuf, Error>;
109    fn get_process_definition_diagram_by_key(&self, key: &str)
110        -> Result<std::path::PathBuf, Error>;
111    fn get_process_definition_diagram_by_key_and_tenant_id(
112        &self,
113        key: &str,
114        tenant_id: &str,
115    ) -> Result<std::path::PathBuf, Error>;
116    fn get_process_definition_statistics(
117        &self,
118        failed_jobs: Option<bool>,
119        incidents: Option<bool>,
120        incidents_for_type: Option<&str>,
121        root_incidents: Option<bool>,
122    ) -> Result<Vec<crate::models::ProcessDefinitionStatisticsResultDto>, Error>;
123    fn get_process_definitions(
124        &self,
125        process_definition_id: Option<&str>,
126        process_definition_id_in: Option<&str>,
127        name: Option<&str>,
128        name_like: Option<&str>,
129        deployment_id: Option<&str>,
130        deployed_after: Option<String>,
131        deployed_at: Option<String>,
132        key: Option<&str>,
133        keys_in: Option<&str>,
134        key_like: Option<&str>,
135        category: Option<&str>,
136        category_like: Option<&str>,
137        version: Option<i32>,
138        latest_version: Option<bool>,
139        resource_name: Option<&str>,
140        resource_name_like: Option<&str>,
141        startable_by: Option<&str>,
142        active: Option<bool>,
143        suspended: Option<bool>,
144        incident_id: Option<&str>,
145        incident_type: Option<&str>,
146        incident_message: Option<&str>,
147        incident_message_like: Option<&str>,
148        tenant_id_in: Option<&str>,
149        without_tenant_id: Option<bool>,
150        include_process_definitions_without_tenant_id: Option<bool>,
151        version_tag: Option<&str>,
152        version_tag_like: Option<&str>,
153        without_version_tag: Option<bool>,
154        startable_in_tasklist: Option<bool>,
155        not_startable_in_tasklist: Option<bool>,
156        startable_permission_check: Option<bool>,
157        sort_by: Option<&str>,
158        sort_order: Option<&str>,
159        first_result: Option<i32>,
160        max_results: Option<i32>,
161    ) -> Result<Vec<crate::models::ProcessDefinitionDto>, Error>;
162    fn get_process_definitions_count(
163        &self,
164        process_definition_id: Option<&str>,
165        process_definition_id_in: Option<&str>,
166        name: Option<&str>,
167        name_like: Option<&str>,
168        deployment_id: Option<&str>,
169        deployed_after: Option<String>,
170        deployed_at: Option<String>,
171        key: Option<&str>,
172        keys_in: Option<&str>,
173        key_like: Option<&str>,
174        category: Option<&str>,
175        category_like: Option<&str>,
176        version: Option<i32>,
177        latest_version: Option<bool>,
178        resource_name: Option<&str>,
179        resource_name_like: Option<&str>,
180        startable_by: Option<&str>,
181        active: Option<bool>,
182        suspended: Option<bool>,
183        incident_id: Option<&str>,
184        incident_type: Option<&str>,
185        incident_message: Option<&str>,
186        incident_message_like: Option<&str>,
187        tenant_id_in: Option<&str>,
188        without_tenant_id: Option<bool>,
189        include_process_definitions_without_tenant_id: Option<bool>,
190        version_tag: Option<&str>,
191        version_tag_like: Option<&str>,
192        without_version_tag: Option<bool>,
193        startable_in_tasklist: Option<bool>,
194        not_startable_in_tasklist: Option<bool>,
195        startable_permission_check: Option<bool>,
196    ) -> Result<crate::models::CountResultDto, Error>;
197    fn get_rendered_start_form(&self, id: &str) -> Result<std::path::PathBuf, Error>;
198    fn get_rendered_start_form_by_key(&self, key: &str) -> Result<std::path::PathBuf, Error>;
199    fn get_rendered_start_form_by_key_and_tenant_id(
200        &self,
201        key: &str,
202        tenant_id: &str,
203    ) -> Result<std::path::PathBuf, Error>;
204    fn get_start_form(&self, id: &str) -> Result<crate::models::FormDto, Error>;
205    fn get_start_form_by_key(&self, key: &str) -> Result<crate::models::FormDto, Error>;
206    fn get_start_form_by_key_and_tenant_id(
207        &self,
208        key: &str,
209        tenant_id: &str,
210    ) -> Result<crate::models::FormDto, Error>;
211    fn get_start_form_variables(
212        &self,
213        id: &str,
214        variable_names: Option<&str>,
215        deserialize_values: Option<bool>,
216    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
217    fn get_start_form_variables_by_key(
218        &self,
219        key: &str,
220        variable_names: Option<&str>,
221        deserialize_values: Option<bool>,
222    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
223    fn get_start_form_variables_by_key_and_tenant_id(
224        &self,
225        key: &str,
226        tenant_id: &str,
227        variable_names: Option<&str>,
228        deserialize_values: Option<bool>,
229    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error>;
230    fn restart_process_instance(
231        &self,
232        id: &str,
233        restart_process_instance_dto: Option<crate::models::RestartProcessInstanceDto>,
234    ) -> Result<(), Error>;
235    fn restart_process_instance_async_operation(
236        &self,
237        id: &str,
238        restart_process_instance_dto: Option<crate::models::RestartProcessInstanceDto>,
239    ) -> Result<crate::models::BatchDto, Error>;
240    fn start_process_instance(
241        &self,
242        id: &str,
243        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
244    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error>;
245    fn start_process_instance_by_key(
246        &self,
247        key: &str,
248        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
249    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error>;
250    fn start_process_instance_by_key_and_tenant_id(
251        &self,
252        key: &str,
253        tenant_id: &str,
254        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
255    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error>;
256    fn submit_form(
257        &self,
258        id: &str,
259        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
260    ) -> Result<crate::models::ProcessInstanceDto, Error>;
261    fn submit_form_by_key(
262        &self,
263        key: &str,
264        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
265    ) -> Result<crate::models::ProcessInstanceDto, Error>;
266    fn submit_form_by_key_and_tenant_id(
267        &self,
268        key: &str,
269        tenant_id: &str,
270        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
271    ) -> Result<crate::models::ProcessInstanceDto, Error>;
272    fn update_history_time_to_live_by_process_definition_id(
273        &self,
274        id: &str,
275        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
276    ) -> Result<(), Error>;
277    fn update_history_time_to_live_by_process_definition_key(
278        &self,
279        key: &str,
280        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
281    ) -> Result<(), Error>;
282    fn update_history_time_to_live_by_process_definition_key_and_tenant_id(
283        &self,
284        key: &str,
285        tenant_id: &str,
286        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
287    ) -> Result<(), Error>;
288    fn update_process_definition_suspension_state(
289        &self,
290        process_definition_suspension_state_dto: Option<
291            crate::models::ProcessDefinitionSuspensionStateDto,
292        >,
293    ) -> Result<(), Error>;
294    fn update_process_definition_suspension_state_by_id(
295        &self,
296        id: &str,
297        process_definition_suspension_state_dto: Option<
298            crate::models::ProcessDefinitionSuspensionStateDto,
299        >,
300    ) -> Result<(), Error>;
301    fn update_process_definition_suspension_state_by_key(
302        &self,
303        key: &str,
304        process_definition_suspension_state_dto: Option<
305            crate::models::ProcessDefinitionSuspensionStateDto,
306        >,
307    ) -> Result<(), Error>;
308    fn update_process_definition_suspension_state_by_key_and_tenant_id(
309        &self,
310        key: &str,
311        tenant_id: &str,
312        process_definition_suspension_state_dto: Option<
313            crate::models::ProcessDefinitionSuspensionStateDto,
314        >,
315    ) -> Result<(), Error>;
316}
317
318impl ProcessDefinitionApi for ProcessDefinitionApiClient {
319    fn delete_process_definition(
320        &self,
321        id: &str,
322        cascade: Option<bool>,
323        skip_custom_listeners: Option<bool>,
324        skip_io_mappings: Option<bool>,
325    ) -> Result<(), Error> {
326        let configuration: &configuration::Configuration = self.configuration.borrow();
327        let client = &configuration.client;
328
329        let uri_str = format!(
330            "{}/process-definition/{id}",
331            configuration.base_path,
332            id = crate::apis::urlencode(id)
333        );
334        let mut req_builder = client.delete(uri_str.as_str());
335
336        if let Some(ref s) = cascade {
337            req_builder = req_builder.query(&[("cascade", &s.to_string())]);
338        }
339        if let Some(ref s) = skip_custom_listeners {
340            req_builder = req_builder.query(&[("skipCustomListeners", &s.to_string())]);
341        }
342        if let Some(ref s) = skip_io_mappings {
343            req_builder = req_builder.query(&[("skipIoMappings", &s.to_string())]);
344        }
345        if let Some(ref user_agent) = configuration.user_agent {
346            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
347        }
348
349        // send request
350        let req = req_builder.build()?;
351
352        client.execute(req)?.error_for_status()?;
353        Ok(())
354    }
355
356    fn delete_process_definitions_by_key(
357        &self,
358        key: &str,
359        cascade: Option<bool>,
360        skip_custom_listeners: Option<bool>,
361        skip_io_mappings: Option<bool>,
362    ) -> Result<(), Error> {
363        let configuration: &configuration::Configuration = self.configuration.borrow();
364        let client = &configuration.client;
365
366        let uri_str = format!(
367            "{}/process-definition/key/{key}",
368            configuration.base_path,
369            key = crate::apis::urlencode(key)
370        );
371        let mut req_builder = client.delete(uri_str.as_str());
372
373        if let Some(ref s) = cascade {
374            req_builder = req_builder.query(&[("cascade", &s.to_string())]);
375        }
376        if let Some(ref s) = skip_custom_listeners {
377            req_builder = req_builder.query(&[("skipCustomListeners", &s.to_string())]);
378        }
379        if let Some(ref s) = skip_io_mappings {
380            req_builder = req_builder.query(&[("skipIoMappings", &s.to_string())]);
381        }
382        if let Some(ref user_agent) = configuration.user_agent {
383            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
384        }
385
386        // send request
387        let req = req_builder.build()?;
388
389        client.execute(req)?.error_for_status()?;
390        Ok(())
391    }
392
393    fn delete_process_definitions_by_key_and_tenant_id(
394        &self,
395        key: &str,
396        tenant_id: &str,
397        cascade: Option<bool>,
398        skip_custom_listeners: Option<bool>,
399        skip_io_mappings: Option<bool>,
400    ) -> Result<(), Error> {
401        let configuration: &configuration::Configuration = self.configuration.borrow();
402        let client = &configuration.client;
403
404        let uri_str = format!(
405            "{}/process-definition/key/{key}/tenant/{tenant_id}",
406            configuration.base_path,
407            key = crate::apis::urlencode(key),
408            tenant_id = crate::apis::urlencode(tenant_id)
409        );
410        let mut req_builder = client.delete(uri_str.as_str());
411
412        if let Some(ref s) = cascade {
413            req_builder = req_builder.query(&[("cascade", &s.to_string())]);
414        }
415        if let Some(ref s) = skip_custom_listeners {
416            req_builder = req_builder.query(&[("skipCustomListeners", &s.to_string())]);
417        }
418        if let Some(ref s) = skip_io_mappings {
419            req_builder = req_builder.query(&[("skipIoMappings", &s.to_string())]);
420        }
421        if let Some(ref user_agent) = configuration.user_agent {
422            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
423        }
424
425        // send request
426        let req = req_builder.build()?;
427
428        client.execute(req)?.error_for_status()?;
429        Ok(())
430    }
431
432    fn get_activity_statistics(
433        &self,
434        id: &str,
435        failed_jobs: Option<bool>,
436        incidents: Option<bool>,
437        incidents_for_type: Option<&str>,
438    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error> {
439        let configuration: &configuration::Configuration = self.configuration.borrow();
440        let client = &configuration.client;
441
442        let uri_str = format!(
443            "{}/process-definition/{id}/statistics",
444            configuration.base_path,
445            id = crate::apis::urlencode(id)
446        );
447        let mut req_builder = client.get(uri_str.as_str());
448
449        if let Some(ref s) = failed_jobs {
450            req_builder = req_builder.query(&[("failedJobs", &s.to_string())]);
451        }
452        if let Some(ref s) = incidents {
453            req_builder = req_builder.query(&[("incidents", &s.to_string())]);
454        }
455        if let Some(ref s) = incidents_for_type {
456            req_builder = req_builder.query(&[("incidentsForType", &s.to_string())]);
457        }
458        if let Some(ref user_agent) = configuration.user_agent {
459            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
460        }
461
462        // send request
463        let req = req_builder.build()?;
464
465        Ok(client.execute(req)?.error_for_status()?.json()?)
466    }
467
468    fn get_activity_statistics_by_process_definition_key(
469        &self,
470        key: &str,
471        failed_jobs: Option<bool>,
472        incidents: Option<bool>,
473        incidents_for_type: Option<&str>,
474    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error> {
475        let configuration: &configuration::Configuration = self.configuration.borrow();
476        let client = &configuration.client;
477
478        let uri_str = format!(
479            "{}/process-definition/key/{key}/statistics",
480            configuration.base_path,
481            key = crate::apis::urlencode(key)
482        );
483        let mut req_builder = client.get(uri_str.as_str());
484
485        if let Some(ref s) = failed_jobs {
486            req_builder = req_builder.query(&[("failedJobs", &s.to_string())]);
487        }
488        if let Some(ref s) = incidents {
489            req_builder = req_builder.query(&[("incidents", &s.to_string())]);
490        }
491        if let Some(ref s) = incidents_for_type {
492            req_builder = req_builder.query(&[("incidentsForType", &s.to_string())]);
493        }
494        if let Some(ref user_agent) = configuration.user_agent {
495            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
496        }
497
498        // send request
499        let req = req_builder.build()?;
500
501        Ok(client.execute(req)?.error_for_status()?.json()?)
502    }
503
504    fn get_activity_statistics_by_process_definition_key_and_tenant_id(
505        &self,
506        key: &str,
507        tenant_id: &str,
508        failed_jobs: Option<bool>,
509        incidents: Option<bool>,
510        incidents_for_type: Option<&str>,
511    ) -> Result<Vec<crate::models::ActivityStatisticsResultDto>, Error> {
512        let configuration: &configuration::Configuration = self.configuration.borrow();
513        let client = &configuration.client;
514
515        let uri_str = format!(
516            "{}/process-definition/key/{key}/tenant/{tenant_id}/statistics",
517            configuration.base_path,
518            key = crate::apis::urlencode(key),
519            tenant_id = crate::apis::urlencode(tenant_id)
520        );
521        let mut req_builder = client.get(uri_str.as_str());
522
523        if let Some(ref s) = failed_jobs {
524            req_builder = req_builder.query(&[("failedJobs", &s.to_string())]);
525        }
526        if let Some(ref s) = incidents {
527            req_builder = req_builder.query(&[("incidents", &s.to_string())]);
528        }
529        if let Some(ref s) = incidents_for_type {
530            req_builder = req_builder.query(&[("incidentsForType", &s.to_string())]);
531        }
532        if let Some(ref user_agent) = configuration.user_agent {
533            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
534        }
535
536        // send request
537        let req = req_builder.build()?;
538
539        Ok(client.execute(req)?.error_for_status()?.json()?)
540    }
541
542    fn get_deployed_start_form(&self, id: &str) -> Result<std::path::PathBuf, Error> {
543        let configuration: &configuration::Configuration = self.configuration.borrow();
544        let client = &configuration.client;
545
546        let uri_str = format!(
547            "{}/process-definition/{id}/deployed-start-form",
548            configuration.base_path,
549            id = crate::apis::urlencode(id)
550        );
551        let mut req_builder = client.get(uri_str.as_str());
552
553        if let Some(ref user_agent) = configuration.user_agent {
554            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
555        }
556
557        // send request
558        let req = req_builder.build()?;
559
560        Ok(client.execute(req)?.error_for_status()?.json()?)
561    }
562
563    fn get_deployed_start_form_by_key(&self, key: &str) -> Result<std::path::PathBuf, Error> {
564        let configuration: &configuration::Configuration = self.configuration.borrow();
565        let client = &configuration.client;
566
567        let uri_str = format!(
568            "{}/process-definition/key/{key}/deployed-start-form",
569            configuration.base_path,
570            key = crate::apis::urlencode(key)
571        );
572        let mut req_builder = client.get(uri_str.as_str());
573
574        if let Some(ref user_agent) = configuration.user_agent {
575            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
576        }
577
578        // send request
579        let req = req_builder.build()?;
580
581        Ok(client.execute(req)?.error_for_status()?.json()?)
582    }
583
584    fn get_deployed_start_form_by_key_and_tenant_id(
585        &self,
586        key: &str,
587        tenant_id: &str,
588    ) -> Result<std::path::PathBuf, Error> {
589        let configuration: &configuration::Configuration = self.configuration.borrow();
590        let client = &configuration.client;
591
592        let uri_str = format!(
593            "{}/process-definition/key/{key}/tenant/{tenant_id}/deployed-start-form",
594            configuration.base_path,
595            key = crate::apis::urlencode(key),
596            tenant_id = crate::apis::urlencode(tenant_id)
597        );
598        let mut req_builder = client.get(uri_str.as_str());
599
600        if let Some(ref user_agent) = configuration.user_agent {
601            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
602        }
603
604        // send request
605        let req = req_builder.build()?;
606
607        Ok(client.execute(req)?.error_for_status()?.json()?)
608    }
609
610    fn get_latest_process_definition_by_tenant_id(
611        &self,
612        key: &str,
613        tenant_id: &str,
614    ) -> Result<crate::models::ProcessDefinitionDto, Error> {
615        let configuration: &configuration::Configuration = self.configuration.borrow();
616        let client = &configuration.client;
617
618        let uri_str = format!(
619            "{}/process-definition/key/{key}/tenant/{tenant_id}",
620            configuration.base_path,
621            key = crate::apis::urlencode(key),
622            tenant_id = crate::apis::urlencode(tenant_id)
623        );
624        let mut req_builder = client.get(uri_str.as_str());
625
626        if let Some(ref user_agent) = configuration.user_agent {
627            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
628        }
629
630        // send request
631        let req = req_builder.build()?;
632
633        Ok(client.execute(req)?.error_for_status()?.json()?)
634    }
635
636    fn get_process_definition(
637        &self,
638        id: &str,
639    ) -> Result<crate::models::ProcessDefinitionDto, Error> {
640        let configuration: &configuration::Configuration = self.configuration.borrow();
641        let client = &configuration.client;
642
643        let uri_str = format!(
644            "{}/process-definition/{id}",
645            configuration.base_path,
646            id = crate::apis::urlencode(id)
647        );
648        let mut req_builder = client.get(uri_str.as_str());
649
650        if let Some(ref user_agent) = configuration.user_agent {
651            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
652        }
653
654        // send request
655        let req = req_builder.build()?;
656
657        Ok(client.execute(req)?.error_for_status()?.json()?)
658    }
659
660    fn get_process_definition_bpmn20_xml(
661        &self,
662        id: &str,
663    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error> {
664        let configuration: &configuration::Configuration = self.configuration.borrow();
665        let client = &configuration.client;
666
667        let uri_str = format!(
668            "{}/process-definition/{id}/xml",
669            configuration.base_path,
670            id = crate::apis::urlencode(id)
671        );
672        let mut req_builder = client.get(uri_str.as_str());
673
674        if let Some(ref user_agent) = configuration.user_agent {
675            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
676        }
677
678        // send request
679        let req = req_builder.build()?;
680
681        Ok(client.execute(req)?.error_for_status()?.json()?)
682    }
683
684    fn get_process_definition_bpmn20_xml_by_key(
685        &self,
686        key: &str,
687    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error> {
688        let configuration: &configuration::Configuration = self.configuration.borrow();
689        let client = &configuration.client;
690
691        let uri_str = format!(
692            "{}/process-definition/key/{key}/xml",
693            configuration.base_path,
694            key = crate::apis::urlencode(key)
695        );
696        let mut req_builder = client.get(uri_str.as_str());
697
698        if let Some(ref user_agent) = configuration.user_agent {
699            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
700        }
701
702        // send request
703        let req = req_builder.build()?;
704
705        Ok(client.execute(req)?.error_for_status()?.json()?)
706    }
707
708    fn get_process_definition_bpmn20_xml_by_key_and_tenant_id(
709        &self,
710        key: &str,
711        tenant_id: &str,
712    ) -> Result<crate::models::ProcessDefinitionDiagramDto, Error> {
713        let configuration: &configuration::Configuration = self.configuration.borrow();
714        let client = &configuration.client;
715
716        let uri_str = format!(
717            "{}/process-definition/key/{key}/tenant/{tenant_id}/xml",
718            configuration.base_path,
719            key = crate::apis::urlencode(key),
720            tenant_id = crate::apis::urlencode(tenant_id)
721        );
722        let mut req_builder = client.get(uri_str.as_str());
723
724        if let Some(ref user_agent) = configuration.user_agent {
725            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
726        }
727
728        // send request
729        let req = req_builder.build()?;
730
731        Ok(client.execute(req)?.error_for_status()?.json()?)
732    }
733
734    fn get_process_definition_by_key(
735        &self,
736        key: &str,
737    ) -> Result<crate::models::ProcessDefinitionDto, Error> {
738        let configuration: &configuration::Configuration = self.configuration.borrow();
739        let client = &configuration.client;
740
741        let uri_str = format!(
742            "{}/process-definition/key/{key}",
743            configuration.base_path,
744            key = crate::apis::urlencode(key)
745        );
746        let mut req_builder = client.get(uri_str.as_str());
747
748        if let Some(ref user_agent) = configuration.user_agent {
749            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
750        }
751
752        // send request
753        let req = req_builder.build()?;
754
755        Ok(client.execute(req)?.error_for_status()?.json()?)
756    }
757
758    fn get_process_definition_diagram(&self, id: &str) -> Result<std::path::PathBuf, Error> {
759        let configuration: &configuration::Configuration = self.configuration.borrow();
760        let client = &configuration.client;
761
762        let uri_str = format!(
763            "{}/process-definition/{id}/diagram",
764            configuration.base_path,
765            id = crate::apis::urlencode(id)
766        );
767        let mut req_builder = client.get(uri_str.as_str());
768
769        if let Some(ref user_agent) = configuration.user_agent {
770            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
771        }
772
773        // send request
774        let req = req_builder.build()?;
775
776        Ok(client.execute(req)?.error_for_status()?.json()?)
777    }
778
779    fn get_process_definition_diagram_by_key(
780        &self,
781        key: &str,
782    ) -> Result<std::path::PathBuf, Error> {
783        let configuration: &configuration::Configuration = self.configuration.borrow();
784        let client = &configuration.client;
785
786        let uri_str = format!(
787            "{}/process-definition/key/{key}/diagram",
788            configuration.base_path,
789            key = crate::apis::urlencode(key)
790        );
791        let mut req_builder = client.get(uri_str.as_str());
792
793        if let Some(ref user_agent) = configuration.user_agent {
794            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
795        }
796
797        // send request
798        let req = req_builder.build()?;
799
800        Ok(client.execute(req)?.error_for_status()?.json()?)
801    }
802
803    fn get_process_definition_diagram_by_key_and_tenant_id(
804        &self,
805        key: &str,
806        tenant_id: &str,
807    ) -> Result<std::path::PathBuf, Error> {
808        let configuration: &configuration::Configuration = self.configuration.borrow();
809        let client = &configuration.client;
810
811        let uri_str = format!(
812            "{}/process-definition/key/{key}/tenant/{tenant_id}/diagram",
813            configuration.base_path,
814            key = crate::apis::urlencode(key),
815            tenant_id = crate::apis::urlencode(tenant_id)
816        );
817        let mut req_builder = client.get(uri_str.as_str());
818
819        if let Some(ref user_agent) = configuration.user_agent {
820            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
821        }
822
823        // send request
824        let req = req_builder.build()?;
825
826        Ok(client.execute(req)?.error_for_status()?.json()?)
827    }
828
829    fn get_process_definition_statistics(
830        &self,
831        failed_jobs: Option<bool>,
832        incidents: Option<bool>,
833        incidents_for_type: Option<&str>,
834        root_incidents: Option<bool>,
835    ) -> Result<Vec<crate::models::ProcessDefinitionStatisticsResultDto>, Error> {
836        let configuration: &configuration::Configuration = self.configuration.borrow();
837        let client = &configuration.client;
838
839        let uri_str = format!("{}/process-definition/statistics", configuration.base_path);
840        let mut req_builder = client.get(uri_str.as_str());
841
842        if let Some(ref s) = failed_jobs {
843            req_builder = req_builder.query(&[("failedJobs", &s.to_string())]);
844        }
845        if let Some(ref s) = incidents {
846            req_builder = req_builder.query(&[("incidents", &s.to_string())]);
847        }
848        if let Some(ref s) = incidents_for_type {
849            req_builder = req_builder.query(&[("incidentsForType", &s.to_string())]);
850        }
851        if let Some(ref s) = root_incidents {
852            req_builder = req_builder.query(&[("rootIncidents", &s.to_string())]);
853        }
854        if let Some(ref user_agent) = configuration.user_agent {
855            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
856        }
857
858        // send request
859        let req = req_builder.build()?;
860
861        Ok(client.execute(req)?.error_for_status()?.json()?)
862    }
863
864    fn get_process_definitions(
865        &self,
866        process_definition_id: Option<&str>,
867        process_definition_id_in: Option<&str>,
868        name: Option<&str>,
869        name_like: Option<&str>,
870        deployment_id: Option<&str>,
871        deployed_after: Option<String>,
872        deployed_at: Option<String>,
873        key: Option<&str>,
874        keys_in: Option<&str>,
875        key_like: Option<&str>,
876        category: Option<&str>,
877        category_like: Option<&str>,
878        version: Option<i32>,
879        latest_version: Option<bool>,
880        resource_name: Option<&str>,
881        resource_name_like: Option<&str>,
882        startable_by: Option<&str>,
883        active: Option<bool>,
884        suspended: Option<bool>,
885        incident_id: Option<&str>,
886        incident_type: Option<&str>,
887        incident_message: Option<&str>,
888        incident_message_like: Option<&str>,
889        tenant_id_in: Option<&str>,
890        without_tenant_id: Option<bool>,
891        include_process_definitions_without_tenant_id: Option<bool>,
892        version_tag: Option<&str>,
893        version_tag_like: Option<&str>,
894        without_version_tag: Option<bool>,
895        startable_in_tasklist: Option<bool>,
896        not_startable_in_tasklist: Option<bool>,
897        startable_permission_check: Option<bool>,
898        sort_by: Option<&str>,
899        sort_order: Option<&str>,
900        first_result: Option<i32>,
901        max_results: Option<i32>,
902    ) -> Result<Vec<crate::models::ProcessDefinitionDto>, Error> {
903        let configuration: &configuration::Configuration = self.configuration.borrow();
904        let client = &configuration.client;
905
906        let uri_str = format!("{}/process_definition", configuration.base_path);
907        let mut req_builder = client.get(uri_str.as_str());
908
909        if let Some(ref s) = process_definition_id {
910            req_builder = req_builder.query(&[("processDefinitionId", &s.to_string())]);
911        }
912        if let Some(ref s) = process_definition_id_in {
913            req_builder = req_builder.query(&[("processDefinitionIdIn", &s.to_string())]);
914        }
915        if let Some(ref s) = name {
916            req_builder = req_builder.query(&[("name", &s.to_string())]);
917        }
918        if let Some(ref s) = name_like {
919            req_builder = req_builder.query(&[("nameLike", &s.to_string())]);
920        }
921        if let Some(ref s) = deployment_id {
922            req_builder = req_builder.query(&[("deploymentId", &s.to_string())]);
923        }
924        if let Some(ref s) = deployed_after {
925            req_builder = req_builder.query(&[("deployedAfter", &s.to_string())]);
926        }
927        if let Some(ref s) = deployed_at {
928            req_builder = req_builder.query(&[("deployedAt", &s.to_string())]);
929        }
930        if let Some(ref s) = key {
931            req_builder = req_builder.query(&[("key", &s.to_string())]);
932        }
933        if let Some(ref s) = keys_in {
934            req_builder = req_builder.query(&[("keysIn", &s.to_string())]);
935        }
936        if let Some(ref s) = key_like {
937            req_builder = req_builder.query(&[("keyLike", &s.to_string())]);
938        }
939        if let Some(ref s) = category {
940            req_builder = req_builder.query(&[("category", &s.to_string())]);
941        }
942        if let Some(ref s) = category_like {
943            req_builder = req_builder.query(&[("categoryLike", &s.to_string())]);
944        }
945        if let Some(ref s) = version {
946            req_builder = req_builder.query(&[("version", &s.to_string())]);
947        }
948        if let Some(ref s) = latest_version {
949            req_builder = req_builder.query(&[("latestVersion", &s.to_string())]);
950        }
951        if let Some(ref s) = resource_name {
952            req_builder = req_builder.query(&[("resourceName", &s.to_string())]);
953        }
954        if let Some(ref s) = resource_name_like {
955            req_builder = req_builder.query(&[("resourceNameLike", &s.to_string())]);
956        }
957        if let Some(ref s) = startable_by {
958            req_builder = req_builder.query(&[("startableBy", &s.to_string())]);
959        }
960        if let Some(ref s) = active {
961            req_builder = req_builder.query(&[("active", &s.to_string())]);
962        }
963        if let Some(ref s) = suspended {
964            req_builder = req_builder.query(&[("suspended", &s.to_string())]);
965        }
966        if let Some(ref s) = incident_id {
967            req_builder = req_builder.query(&[("incidentId", &s.to_string())]);
968        }
969        if let Some(ref s) = incident_type {
970            req_builder = req_builder.query(&[("incidentType", &s.to_string())]);
971        }
972        if let Some(ref s) = incident_message {
973            req_builder = req_builder.query(&[("incidentMessage", &s.to_string())]);
974        }
975        if let Some(ref s) = incident_message_like {
976            req_builder = req_builder.query(&[("incidentMessageLike", &s.to_string())]);
977        }
978        if let Some(ref s) = tenant_id_in {
979            req_builder = req_builder.query(&[("tenantIdIn", &s.to_string())]);
980        }
981        if let Some(ref s) = without_tenant_id {
982            req_builder = req_builder.query(&[("withoutTenantId", &s.to_string())]);
983        }
984        if let Some(ref s) = include_process_definitions_without_tenant_id {
985            req_builder =
986                req_builder.query(&[("includeProcessDefinitionsWithoutTenantId", &s.to_string())]);
987        }
988        if let Some(ref s) = version_tag {
989            req_builder = req_builder.query(&[("versionTag", &s.to_string())]);
990        }
991        if let Some(ref s) = version_tag_like {
992            req_builder = req_builder.query(&[("versionTagLike", &s.to_string())]);
993        }
994        if let Some(ref s) = without_version_tag {
995            req_builder = req_builder.query(&[("withoutVersionTag", &s.to_string())]);
996        }
997        if let Some(ref s) = startable_in_tasklist {
998            req_builder = req_builder.query(&[("startableInTasklist", &s.to_string())]);
999        }
1000        if let Some(ref s) = not_startable_in_tasklist {
1001            req_builder = req_builder.query(&[("notStartableInTasklist", &s.to_string())]);
1002        }
1003        if let Some(ref s) = startable_permission_check {
1004            req_builder = req_builder.query(&[("startablePermissionCheck", &s.to_string())]);
1005        }
1006        if let Some(ref s) = sort_by {
1007            req_builder = req_builder.query(&[("sortBy", &s.to_string())]);
1008        }
1009        if let Some(ref s) = sort_order {
1010            req_builder = req_builder.query(&[("sortOrder", &s.to_string())]);
1011        }
1012        if let Some(ref s) = first_result {
1013            req_builder = req_builder.query(&[("firstResult", &s.to_string())]);
1014        }
1015        if let Some(ref s) = max_results {
1016            req_builder = req_builder.query(&[("maxResults", &s.to_string())]);
1017        }
1018        if let Some(ref user_agent) = configuration.user_agent {
1019            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1020        }
1021
1022        // send request
1023        let req = req_builder.build()?;
1024
1025        Ok(client.execute(req)?.error_for_status()?.json()?)
1026    }
1027
1028    fn get_process_definitions_count(
1029        &self,
1030        process_definition_id: Option<&str>,
1031        process_definition_id_in: Option<&str>,
1032        name: Option<&str>,
1033        name_like: Option<&str>,
1034        deployment_id: Option<&str>,
1035        deployed_after: Option<String>,
1036        deployed_at: Option<String>,
1037        key: Option<&str>,
1038        keys_in: Option<&str>,
1039        key_like: Option<&str>,
1040        category: Option<&str>,
1041        category_like: Option<&str>,
1042        version: Option<i32>,
1043        latest_version: Option<bool>,
1044        resource_name: Option<&str>,
1045        resource_name_like: Option<&str>,
1046        startable_by: Option<&str>,
1047        active: Option<bool>,
1048        suspended: Option<bool>,
1049        incident_id: Option<&str>,
1050        incident_type: Option<&str>,
1051        incident_message: Option<&str>,
1052        incident_message_like: Option<&str>,
1053        tenant_id_in: Option<&str>,
1054        without_tenant_id: Option<bool>,
1055        include_process_definitions_without_tenant_id: Option<bool>,
1056        version_tag: Option<&str>,
1057        version_tag_like: Option<&str>,
1058        without_version_tag: Option<bool>,
1059        startable_in_tasklist: Option<bool>,
1060        not_startable_in_tasklist: Option<bool>,
1061        startable_permission_check: Option<bool>,
1062    ) -> Result<crate::models::CountResultDto, Error> {
1063        let configuration: &configuration::Configuration = self.configuration.borrow();
1064        let client = &configuration.client;
1065
1066        let uri_str = format!("{}/process-definition/count", configuration.base_path);
1067        let mut req_builder = client.get(uri_str.as_str());
1068
1069        if let Some(ref s) = process_definition_id {
1070            req_builder = req_builder.query(&[("processDefinitionId", &s.to_string())]);
1071        }
1072        if let Some(ref s) = process_definition_id_in {
1073            req_builder = req_builder.query(&[("processDefinitionIdIn", &s.to_string())]);
1074        }
1075        if let Some(ref s) = name {
1076            req_builder = req_builder.query(&[("name", &s.to_string())]);
1077        }
1078        if let Some(ref s) = name_like {
1079            req_builder = req_builder.query(&[("nameLike", &s.to_string())]);
1080        }
1081        if let Some(ref s) = deployment_id {
1082            req_builder = req_builder.query(&[("deploymentId", &s.to_string())]);
1083        }
1084        if let Some(ref s) = deployed_after {
1085            req_builder = req_builder.query(&[("deployedAfter", &s.to_string())]);
1086        }
1087        if let Some(ref s) = deployed_at {
1088            req_builder = req_builder.query(&[("deployedAt", &s.to_string())]);
1089        }
1090        if let Some(ref s) = key {
1091            req_builder = req_builder.query(&[("key", &s.to_string())]);
1092        }
1093        if let Some(ref s) = keys_in {
1094            req_builder = req_builder.query(&[("keysIn", &s.to_string())]);
1095        }
1096        if let Some(ref s) = key_like {
1097            req_builder = req_builder.query(&[("keyLike", &s.to_string())]);
1098        }
1099        if let Some(ref s) = category {
1100            req_builder = req_builder.query(&[("category", &s.to_string())]);
1101        }
1102        if let Some(ref s) = category_like {
1103            req_builder = req_builder.query(&[("categoryLike", &s.to_string())]);
1104        }
1105        if let Some(ref s) = version {
1106            req_builder = req_builder.query(&[("version", &s.to_string())]);
1107        }
1108        if let Some(ref s) = latest_version {
1109            req_builder = req_builder.query(&[("latestVersion", &s.to_string())]);
1110        }
1111        if let Some(ref s) = resource_name {
1112            req_builder = req_builder.query(&[("resourceName", &s.to_string())]);
1113        }
1114        if let Some(ref s) = resource_name_like {
1115            req_builder = req_builder.query(&[("resourceNameLike", &s.to_string())]);
1116        }
1117        if let Some(ref s) = startable_by {
1118            req_builder = req_builder.query(&[("startableBy", &s.to_string())]);
1119        }
1120        if let Some(ref s) = active {
1121            req_builder = req_builder.query(&[("active", &s.to_string())]);
1122        }
1123        if let Some(ref s) = suspended {
1124            req_builder = req_builder.query(&[("suspended", &s.to_string())]);
1125        }
1126        if let Some(ref s) = incident_id {
1127            req_builder = req_builder.query(&[("incidentId", &s.to_string())]);
1128        }
1129        if let Some(ref s) = incident_type {
1130            req_builder = req_builder.query(&[("incidentType", &s.to_string())]);
1131        }
1132        if let Some(ref s) = incident_message {
1133            req_builder = req_builder.query(&[("incidentMessage", &s.to_string())]);
1134        }
1135        if let Some(ref s) = incident_message_like {
1136            req_builder = req_builder.query(&[("incidentMessageLike", &s.to_string())]);
1137        }
1138        if let Some(ref s) = tenant_id_in {
1139            req_builder = req_builder.query(&[("tenantIdIn", &s.to_string())]);
1140        }
1141        if let Some(ref s) = without_tenant_id {
1142            req_builder = req_builder.query(&[("withoutTenantId", &s.to_string())]);
1143        }
1144        if let Some(ref s) = include_process_definitions_without_tenant_id {
1145            req_builder =
1146                req_builder.query(&[("includeProcessDefinitionsWithoutTenantId", &s.to_string())]);
1147        }
1148        if let Some(ref s) = version_tag {
1149            req_builder = req_builder.query(&[("versionTag", &s.to_string())]);
1150        }
1151        if let Some(ref s) = version_tag_like {
1152            req_builder = req_builder.query(&[("versionTagLike", &s.to_string())]);
1153        }
1154        if let Some(ref s) = without_version_tag {
1155            req_builder = req_builder.query(&[("withoutVersionTag", &s.to_string())]);
1156        }
1157        if let Some(ref s) = startable_in_tasklist {
1158            req_builder = req_builder.query(&[("startableInTasklist", &s.to_string())]);
1159        }
1160        if let Some(ref s) = not_startable_in_tasklist {
1161            req_builder = req_builder.query(&[("notStartableInTasklist", &s.to_string())]);
1162        }
1163        if let Some(ref s) = startable_permission_check {
1164            req_builder = req_builder.query(&[("startablePermissionCheck", &s.to_string())]);
1165        }
1166        if let Some(ref user_agent) = configuration.user_agent {
1167            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1168        }
1169
1170        // send request
1171        let req = req_builder.build()?;
1172
1173        Ok(client.execute(req)?.error_for_status()?.json()?)
1174    }
1175
1176    fn get_rendered_start_form(&self, id: &str) -> Result<std::path::PathBuf, Error> {
1177        let configuration: &configuration::Configuration = self.configuration.borrow();
1178        let client = &configuration.client;
1179
1180        let uri_str = format!(
1181            "{}/process-definition/{id}/rendered-form",
1182            configuration.base_path,
1183            id = crate::apis::urlencode(id)
1184        );
1185        let mut req_builder = client.get(uri_str.as_str());
1186
1187        if let Some(ref user_agent) = configuration.user_agent {
1188            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1189        }
1190
1191        // send request
1192        let req = req_builder.build()?;
1193
1194        Ok(client.execute(req)?.error_for_status()?.json()?)
1195    }
1196
1197    fn get_rendered_start_form_by_key(&self, key: &str) -> Result<std::path::PathBuf, Error> {
1198        let configuration: &configuration::Configuration = self.configuration.borrow();
1199        let client = &configuration.client;
1200
1201        let uri_str = format!(
1202            "{}/process-definition/key/{key}/rendered-form",
1203            configuration.base_path,
1204            key = crate::apis::urlencode(key)
1205        );
1206        let mut req_builder = client.get(uri_str.as_str());
1207
1208        if let Some(ref user_agent) = configuration.user_agent {
1209            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1210        }
1211
1212        // send request
1213        let req = req_builder.build()?;
1214
1215        Ok(client.execute(req)?.error_for_status()?.json()?)
1216    }
1217
1218    fn get_rendered_start_form_by_key_and_tenant_id(
1219        &self,
1220        key: &str,
1221        tenant_id: &str,
1222    ) -> Result<std::path::PathBuf, Error> {
1223        let configuration: &configuration::Configuration = self.configuration.borrow();
1224        let client = &configuration.client;
1225
1226        let uri_str = format!(
1227            "{}/process-definition/key/{key}/tenant/{tenant_id}/rendered-form",
1228            configuration.base_path,
1229            key = crate::apis::urlencode(key),
1230            tenant_id = crate::apis::urlencode(tenant_id)
1231        );
1232        let mut req_builder = client.get(uri_str.as_str());
1233
1234        if let Some(ref user_agent) = configuration.user_agent {
1235            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1236        }
1237
1238        // send request
1239        let req = req_builder.build()?;
1240
1241        Ok(client.execute(req)?.error_for_status()?.json()?)
1242    }
1243
1244    fn get_start_form(&self, id: &str) -> Result<crate::models::FormDto, Error> {
1245        let configuration: &configuration::Configuration = self.configuration.borrow();
1246        let client = &configuration.client;
1247
1248        let uri_str = format!(
1249            "{}/process-definition/{id}/startForm",
1250            configuration.base_path,
1251            id = crate::apis::urlencode(id)
1252        );
1253        let mut req_builder = client.get(uri_str.as_str());
1254
1255        if let Some(ref user_agent) = configuration.user_agent {
1256            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1257        }
1258
1259        // send request
1260        let req = req_builder.build()?;
1261
1262        Ok(client.execute(req)?.error_for_status()?.json()?)
1263    }
1264
1265    fn get_start_form_by_key(&self, key: &str) -> Result<crate::models::FormDto, Error> {
1266        let configuration: &configuration::Configuration = self.configuration.borrow();
1267        let client = &configuration.client;
1268
1269        let uri_str = format!(
1270            "{}/process-definition/key/{key}/startForm",
1271            configuration.base_path,
1272            key = crate::apis::urlencode(key)
1273        );
1274        let mut req_builder = client.get(uri_str.as_str());
1275
1276        if let Some(ref user_agent) = configuration.user_agent {
1277            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1278        }
1279
1280        // send request
1281        let req = req_builder.build()?;
1282
1283        Ok(client.execute(req)?.error_for_status()?.json()?)
1284    }
1285
1286    fn get_start_form_by_key_and_tenant_id(
1287        &self,
1288        key: &str,
1289        tenant_id: &str,
1290    ) -> Result<crate::models::FormDto, Error> {
1291        let configuration: &configuration::Configuration = self.configuration.borrow();
1292        let client = &configuration.client;
1293
1294        let uri_str = format!(
1295            "{}/process-definition/key/{key}/tenant/{tenant_id}/startForm",
1296            configuration.base_path,
1297            key = crate::apis::urlencode(key),
1298            tenant_id = crate::apis::urlencode(tenant_id)
1299        );
1300        let mut req_builder = client.get(uri_str.as_str());
1301
1302        if let Some(ref user_agent) = configuration.user_agent {
1303            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1304        }
1305
1306        // send request
1307        let req = req_builder.build()?;
1308
1309        Ok(client.execute(req)?.error_for_status()?.json()?)
1310    }
1311
1312    fn get_start_form_variables(
1313        &self,
1314        id: &str,
1315        variable_names: Option<&str>,
1316        deserialize_values: Option<bool>,
1317    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
1318        let configuration: &configuration::Configuration = self.configuration.borrow();
1319        let client = &configuration.client;
1320
1321        let uri_str = format!(
1322            "{}/process-definition/{id}/form-variables",
1323            configuration.base_path,
1324            id = crate::apis::urlencode(id)
1325        );
1326        let mut req_builder = client.get(uri_str.as_str());
1327
1328        if let Some(ref s) = variable_names {
1329            req_builder = req_builder.query(&[("variableNames", &s.to_string())]);
1330        }
1331        if let Some(ref s) = deserialize_values {
1332            req_builder = req_builder.query(&[("deserializeValues", &s.to_string())]);
1333        }
1334        if let Some(ref user_agent) = configuration.user_agent {
1335            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1336        }
1337
1338        // send request
1339        let req = req_builder.build()?;
1340
1341        Ok(client.execute(req)?.error_for_status()?.json()?)
1342    }
1343
1344    fn get_start_form_variables_by_key(
1345        &self,
1346        key: &str,
1347        variable_names: Option<&str>,
1348        deserialize_values: Option<bool>,
1349    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
1350        let configuration: &configuration::Configuration = self.configuration.borrow();
1351        let client = &configuration.client;
1352
1353        let uri_str = format!(
1354            "{}/process-definition/key/{key}/form-variables",
1355            configuration.base_path,
1356            key = crate::apis::urlencode(key)
1357        );
1358        let mut req_builder = client.get(uri_str.as_str());
1359
1360        if let Some(ref s) = variable_names {
1361            req_builder = req_builder.query(&[("variableNames", &s.to_string())]);
1362        }
1363        if let Some(ref s) = deserialize_values {
1364            req_builder = req_builder.query(&[("deserializeValues", &s.to_string())]);
1365        }
1366        if let Some(ref user_agent) = configuration.user_agent {
1367            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1368        }
1369
1370        // send request
1371        let req = req_builder.build()?;
1372
1373        Ok(client.execute(req)?.error_for_status()?.json()?)
1374    }
1375
1376    fn get_start_form_variables_by_key_and_tenant_id(
1377        &self,
1378        key: &str,
1379        tenant_id: &str,
1380        variable_names: Option<&str>,
1381        deserialize_values: Option<bool>,
1382    ) -> Result<::std::collections::HashMap<String, crate::models::VariableValueDto>, Error> {
1383        let configuration: &configuration::Configuration = self.configuration.borrow();
1384        let client = &configuration.client;
1385
1386        let uri_str = format!(
1387            "{}/process-definition/key/{key}/tenant/{tenant_id}/form-variables",
1388            configuration.base_path,
1389            key = crate::apis::urlencode(key),
1390            tenant_id = crate::apis::urlencode(tenant_id)
1391        );
1392        let mut req_builder = client.get(uri_str.as_str());
1393
1394        if let Some(ref s) = variable_names {
1395            req_builder = req_builder.query(&[("variableNames", &s.to_string())]);
1396        }
1397        if let Some(ref s) = deserialize_values {
1398            req_builder = req_builder.query(&[("deserializeValues", &s.to_string())]);
1399        }
1400        if let Some(ref user_agent) = configuration.user_agent {
1401            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1402        }
1403
1404        // send request
1405        let req = req_builder.build()?;
1406
1407        Ok(client.execute(req)?.error_for_status()?.json()?)
1408    }
1409
1410    fn restart_process_instance(
1411        &self,
1412        id: &str,
1413        restart_process_instance_dto: Option<crate::models::RestartProcessInstanceDto>,
1414    ) -> Result<(), Error> {
1415        let configuration: &configuration::Configuration = self.configuration.borrow();
1416        let client = &configuration.client;
1417
1418        let uri_str = format!(
1419            "{}/process-definition/{id}/restart",
1420            configuration.base_path,
1421            id = crate::apis::urlencode(id)
1422        );
1423        let mut req_builder = client.post(uri_str.as_str());
1424
1425        if let Some(ref user_agent) = configuration.user_agent {
1426            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1427        }
1428        req_builder = req_builder.json(&restart_process_instance_dto);
1429
1430        // send request
1431        let req = req_builder.build()?;
1432
1433        client.execute(req)?.error_for_status()?;
1434        Ok(())
1435    }
1436
1437    fn restart_process_instance_async_operation(
1438        &self,
1439        id: &str,
1440        restart_process_instance_dto: Option<crate::models::RestartProcessInstanceDto>,
1441    ) -> Result<crate::models::BatchDto, Error> {
1442        let configuration: &configuration::Configuration = self.configuration.borrow();
1443        let client = &configuration.client;
1444
1445        let uri_str = format!(
1446            "{}/process-definition/{id}/restart-async",
1447            configuration.base_path,
1448            id = crate::apis::urlencode(id)
1449        );
1450        let mut req_builder = client.post(uri_str.as_str());
1451
1452        if let Some(ref user_agent) = configuration.user_agent {
1453            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1454        }
1455        req_builder = req_builder.json(&restart_process_instance_dto);
1456
1457        // send request
1458        let req = req_builder.build()?;
1459
1460        Ok(client.execute(req)?.error_for_status()?.json()?)
1461    }
1462
1463    fn start_process_instance(
1464        &self,
1465        id: &str,
1466        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
1467    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error> {
1468        let configuration: &configuration::Configuration = self.configuration.borrow();
1469        let client = &configuration.client;
1470
1471        let uri_str = format!(
1472            "{}/process-definition/{id}/start",
1473            configuration.base_path,
1474            id = crate::apis::urlencode(id)
1475        );
1476        let mut req_builder = client.post(uri_str.as_str());
1477
1478        if let Some(ref user_agent) = configuration.user_agent {
1479            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1480        }
1481        req_builder = req_builder.json(&start_process_instance_dto);
1482
1483        // send request
1484        let req = req_builder.build()?;
1485
1486        Ok(client.execute(req)?.error_for_status()?.json()?)
1487    }
1488
1489    fn start_process_instance_by_key(
1490        &self,
1491        key: &str,
1492        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
1493    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error> {
1494        let configuration: &configuration::Configuration = self.configuration.borrow();
1495        let client = &configuration.client;
1496
1497        let uri_str = format!(
1498            "{}/process-definition/key/{key}/start",
1499            configuration.base_path,
1500            key = crate::apis::urlencode(key)
1501        );
1502        let mut req_builder = client.post(uri_str.as_str());
1503
1504        if let Some(ref user_agent) = configuration.user_agent {
1505            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1506        }
1507        req_builder = req_builder.json(&start_process_instance_dto);
1508
1509        // send request
1510        let req = req_builder.build()?;
1511
1512        Ok(client.execute(req)?.error_for_status()?.json()?)
1513    }
1514
1515    fn start_process_instance_by_key_and_tenant_id(
1516        &self,
1517        key: &str,
1518        tenant_id: &str,
1519        start_process_instance_dto: Option<crate::models::StartProcessInstanceDto>,
1520    ) -> Result<crate::models::ProcessInstanceWithVariablesDto, Error> {
1521        let configuration: &configuration::Configuration = self.configuration.borrow();
1522        let client = &configuration.client;
1523
1524        let uri_str = format!(
1525            "{}/process-definition/key/{key}/tenant/{tenant_id}/start",
1526            configuration.base_path,
1527            key = crate::apis::urlencode(key),
1528            tenant_id = crate::apis::urlencode(tenant_id)
1529        );
1530        let mut req_builder = client.post(uri_str.as_str());
1531
1532        if let Some(ref user_agent) = configuration.user_agent {
1533            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1534        }
1535        req_builder = req_builder.json(&start_process_instance_dto);
1536
1537        // send request
1538        let req = req_builder.build()?;
1539
1540        Ok(client.execute(req)?.error_for_status()?.json()?)
1541    }
1542
1543    fn submit_form(
1544        &self,
1545        id: &str,
1546        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
1547    ) -> Result<crate::models::ProcessInstanceDto, Error> {
1548        let configuration: &configuration::Configuration = self.configuration.borrow();
1549        let client = &configuration.client;
1550
1551        let uri_str = format!(
1552            "{}/process-definition/{id}/submit-form",
1553            configuration.base_path,
1554            id = crate::apis::urlencode(id)
1555        );
1556        let mut req_builder = client.post(uri_str.as_str());
1557
1558        if let Some(ref user_agent) = configuration.user_agent {
1559            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1560        }
1561        req_builder = req_builder.json(&start_process_instance_form_dto);
1562
1563        // send request
1564        let req = req_builder.build()?;
1565
1566        Ok(client.execute(req)?.error_for_status()?.json()?)
1567    }
1568
1569    fn submit_form_by_key(
1570        &self,
1571        key: &str,
1572        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
1573    ) -> Result<crate::models::ProcessInstanceDto, Error> {
1574        let configuration: &configuration::Configuration = self.configuration.borrow();
1575        let client = &configuration.client;
1576
1577        let uri_str = format!(
1578            "{}/process-definition/key/{key}/submit-form",
1579            configuration.base_path,
1580            key = crate::apis::urlencode(key)
1581        );
1582        let mut req_builder = client.post(uri_str.as_str());
1583
1584        if let Some(ref user_agent) = configuration.user_agent {
1585            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1586        }
1587        req_builder = req_builder.json(&start_process_instance_form_dto);
1588
1589        // send request
1590        let req = req_builder.build()?;
1591
1592        Ok(client.execute(req)?.error_for_status()?.json()?)
1593    }
1594
1595    fn submit_form_by_key_and_tenant_id(
1596        &self,
1597        key: &str,
1598        tenant_id: &str,
1599        start_process_instance_form_dto: Option<crate::models::StartProcessInstanceFormDto>,
1600    ) -> Result<crate::models::ProcessInstanceDto, Error> {
1601        let configuration: &configuration::Configuration = self.configuration.borrow();
1602        let client = &configuration.client;
1603
1604        let uri_str = format!(
1605            "{}/process-definition/key/{key}/tenant/{tenant_id}/submit-form",
1606            configuration.base_path,
1607            key = crate::apis::urlencode(key),
1608            tenant_id = crate::apis::urlencode(tenant_id)
1609        );
1610        let mut req_builder = client.post(uri_str.as_str());
1611
1612        if let Some(ref user_agent) = configuration.user_agent {
1613            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1614        }
1615        req_builder = req_builder.json(&start_process_instance_form_dto);
1616
1617        // send request
1618        let req = req_builder.build()?;
1619
1620        Ok(client.execute(req)?.error_for_status()?.json()?)
1621    }
1622
1623    fn update_history_time_to_live_by_process_definition_id(
1624        &self,
1625        id: &str,
1626        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
1627    ) -> Result<(), Error> {
1628        let configuration: &configuration::Configuration = self.configuration.borrow();
1629        let client = &configuration.client;
1630
1631        let uri_str = format!(
1632            "{}/process-definition/{id}/history-time-to-live",
1633            configuration.base_path,
1634            id = crate::apis::urlencode(id)
1635        );
1636        let mut req_builder = client.put(uri_str.as_str());
1637
1638        if let Some(ref user_agent) = configuration.user_agent {
1639            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1640        }
1641        req_builder = req_builder.json(&history_time_to_live_dto);
1642
1643        // send request
1644        let req = req_builder.build()?;
1645
1646        client.execute(req)?.error_for_status()?;
1647        Ok(())
1648    }
1649
1650    fn update_history_time_to_live_by_process_definition_key(
1651        &self,
1652        key: &str,
1653        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
1654    ) -> Result<(), Error> {
1655        let configuration: &configuration::Configuration = self.configuration.borrow();
1656        let client = &configuration.client;
1657
1658        let uri_str = format!(
1659            "{}/process-definition/key/{key}/history-time-to-live",
1660            configuration.base_path,
1661            key = crate::apis::urlencode(key)
1662        );
1663        let mut req_builder = client.put(uri_str.as_str());
1664
1665        if let Some(ref user_agent) = configuration.user_agent {
1666            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1667        }
1668        req_builder = req_builder.json(&history_time_to_live_dto);
1669
1670        // send request
1671        let req = req_builder.build()?;
1672
1673        client.execute(req)?.error_for_status()?;
1674        Ok(())
1675    }
1676
1677    fn update_history_time_to_live_by_process_definition_key_and_tenant_id(
1678        &self,
1679        key: &str,
1680        tenant_id: &str,
1681        history_time_to_live_dto: Option<crate::models::HistoryTimeToLiveDto>,
1682    ) -> Result<(), Error> {
1683        let configuration: &configuration::Configuration = self.configuration.borrow();
1684        let client = &configuration.client;
1685
1686        let uri_str = format!(
1687            "{}/process-definition/key/{key}/tenant/{tenant_id}/history-time-to-live",
1688            configuration.base_path,
1689            key = crate::apis::urlencode(key),
1690            tenant_id = crate::apis::urlencode(tenant_id)
1691        );
1692        let mut req_builder = client.put(uri_str.as_str());
1693
1694        if let Some(ref user_agent) = configuration.user_agent {
1695            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1696        }
1697        req_builder = req_builder.json(&history_time_to_live_dto);
1698
1699        // send request
1700        let req = req_builder.build()?;
1701
1702        client.execute(req)?.error_for_status()?;
1703        Ok(())
1704    }
1705
1706    fn update_process_definition_suspension_state(
1707        &self,
1708        process_definition_suspension_state_dto: Option<
1709            crate::models::ProcessDefinitionSuspensionStateDto,
1710        >,
1711    ) -> Result<(), Error> {
1712        let configuration: &configuration::Configuration = self.configuration.borrow();
1713        let client = &configuration.client;
1714
1715        let uri_str = format!("{}/process-definition/suspended", configuration.base_path);
1716        let mut req_builder = client.put(uri_str.as_str());
1717
1718        if let Some(ref user_agent) = configuration.user_agent {
1719            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1720        }
1721        req_builder = req_builder.json(&process_definition_suspension_state_dto);
1722
1723        // send request
1724        let req = req_builder.build()?;
1725
1726        client.execute(req)?.error_for_status()?;
1727        Ok(())
1728    }
1729
1730    fn update_process_definition_suspension_state_by_id(
1731        &self,
1732        id: &str,
1733        process_definition_suspension_state_dto: Option<
1734            crate::models::ProcessDefinitionSuspensionStateDto,
1735        >,
1736    ) -> Result<(), Error> {
1737        let configuration: &configuration::Configuration = self.configuration.borrow();
1738        let client = &configuration.client;
1739
1740        let uri_str = format!(
1741            "{}/process-definition/{id}/suspended",
1742            configuration.base_path,
1743            id = crate::apis::urlencode(id)
1744        );
1745        let mut req_builder = client.put(uri_str.as_str());
1746
1747        if let Some(ref user_agent) = configuration.user_agent {
1748            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1749        }
1750        req_builder = req_builder.json(&process_definition_suspension_state_dto);
1751
1752        // send request
1753        let req = req_builder.build()?;
1754
1755        client.execute(req)?.error_for_status()?;
1756        Ok(())
1757    }
1758
1759    fn update_process_definition_suspension_state_by_key(
1760        &self,
1761        key: &str,
1762        process_definition_suspension_state_dto: Option<
1763            crate::models::ProcessDefinitionSuspensionStateDto,
1764        >,
1765    ) -> Result<(), Error> {
1766        let configuration: &configuration::Configuration = self.configuration.borrow();
1767        let client = &configuration.client;
1768
1769        let uri_str = format!(
1770            "{}/process-definition/key/{key}/suspended",
1771            configuration.base_path,
1772            key = crate::apis::urlencode(key)
1773        );
1774        let mut req_builder = client.put(uri_str.as_str());
1775
1776        if let Some(ref user_agent) = configuration.user_agent {
1777            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1778        }
1779        req_builder = req_builder.json(&process_definition_suspension_state_dto);
1780
1781        // send request
1782        let req = req_builder.build()?;
1783
1784        client.execute(req)?.error_for_status()?;
1785        Ok(())
1786    }
1787
1788    fn update_process_definition_suspension_state_by_key_and_tenant_id(
1789        &self,
1790        key: &str,
1791        tenant_id: &str,
1792        process_definition_suspension_state_dto: Option<
1793            crate::models::ProcessDefinitionSuspensionStateDto,
1794        >,
1795    ) -> Result<(), Error> {
1796        let configuration: &configuration::Configuration = self.configuration.borrow();
1797        let client = &configuration.client;
1798
1799        let uri_str = format!(
1800            "{}/process-definition/key/{key}/tenant/{tenant_id}/suspended",
1801            configuration.base_path,
1802            key = crate::apis::urlencode(key),
1803            tenant_id = crate::apis::urlencode(tenant_id)
1804        );
1805        let mut req_builder = client.put(uri_str.as_str());
1806
1807        if let Some(ref user_agent) = configuration.user_agent {
1808            req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1809        }
1810        req_builder = req_builder.json(&process_definition_suspension_state_dto);
1811
1812        // send request
1813        let req = req_builder.build()?;
1814
1815        client.execute(req)?.error_for_status()?;
1816        Ok(())
1817    }
1818}