camunda_client/models/
process_instance_query_dto.rs

1/*
2 * Camunda BPM REST API
3 *
4 * OpenApi Spec for Camunda BPM REST API.
5 *
6 * The version of the OpenAPI document: 7.13.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// ProcessInstanceQueryDto : A process instance query which defines a group of process instances
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProcessInstanceQueryDto {
17    /// Filter by the deployment the id belongs to.
18    #[serde(rename = "deploymentId", skip_serializing_if = "Option::is_none")]
19    pub deployment_id: Option<String>,
20    /// Filter by the process definition the instances run on.
21    #[serde(rename = "processDefinitionId", skip_serializing_if = "Option::is_none")]
22    pub process_definition_id: Option<String>,
23    /// Filter by the key of the process definition the instances run on.
24    #[serde(rename = "processDefinitionKey", skip_serializing_if = "Option::is_none")]
25    pub process_definition_key: Option<String>,
26    /// Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Must be a JSON array of Strings.
27    #[serde(rename = "processDefinitionKeyIn", skip_serializing_if = "Option::is_none")]
28    pub process_definition_key_in: Option<Vec<String>>,
29    /// Exclude instances by a list of process definition keys. A process instance must not have one of the given process definition keys. Must be a JSON array of Strings.
30    #[serde(rename = "processDefinitionKeyNotIn", skip_serializing_if = "Option::is_none")]
31    pub process_definition_key_not_in: Option<Vec<String>>,
32    /// Filter by process instance business key.
33    #[serde(rename = "businessKey", skip_serializing_if = "Option::is_none")]
34    pub business_key: Option<String>,
35    /// Filter by process instance business key that the parameter is a substring of.
36    #[serde(rename = "businessKeyLike", skip_serializing_if = "Option::is_none")]
37    pub business_key_like: Option<String>,
38    /// Filter by case instance id.
39    #[serde(rename = "caseInstanceId", skip_serializing_if = "Option::is_none")]
40    pub case_instance_id: Option<String>,
41    /// Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id.
42    #[serde(rename = "superProcessInstance", skip_serializing_if = "Option::is_none")]
43    pub super_process_instance: Option<String>,
44    /// Restrict query to all process instances that have the given process instance as a sub process instance. Takes a process instance id.
45    #[serde(rename = "subProcessInstance", skip_serializing_if = "Option::is_none")]
46    pub sub_process_instance: Option<String>,
47    /// Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id.
48    #[serde(rename = "superCaseInstance", skip_serializing_if = "Option::is_none")]
49    pub super_case_instance: Option<String>,
50    /// Restrict query to all process instances that have the given case instance as a sub case instance. Takes a case instance id.
51    #[serde(rename = "subCaseInstance", skip_serializing_if = "Option::is_none")]
52    pub sub_case_instance: Option<String>,
53    /// Only include active process instances. Value may only be true, as false is the default behavior.
54    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
55    pub active: Option<bool>,
56    /// Only include suspended process instances. Value may only be true, as false is the default behavior.
57    #[serde(rename = "suspended", skip_serializing_if = "Option::is_none")]
58    pub suspended: Option<bool>,
59    /// Filter by a list of process instance ids. Must be a JSON array of Strings.
60    #[serde(rename = "processInstanceIds", skip_serializing_if = "Option::is_none")]
61    pub process_instance_ids: Option<Vec<String>>,
62    /// Filter by presence of incidents. Selects only process instances that have an incident.
63    #[serde(rename = "withIncident", skip_serializing_if = "Option::is_none")]
64    pub with_incident: Option<bool>,
65    /// Filter by the incident id.
66    #[serde(rename = "incidentId", skip_serializing_if = "Option::is_none")]
67    pub incident_id: Option<String>,
68    /// Filter by the incident type. See the User Guide for a list of incident types.
69    #[serde(rename = "incidentType", skip_serializing_if = "Option::is_none")]
70    pub incident_type: Option<String>,
71    /// Filter by the incident message. Exact match.
72    #[serde(rename = "incidentMessage", skip_serializing_if = "Option::is_none")]
73    pub incident_message: Option<String>,
74    /// Filter by the incident message that the parameter is a substring of.
75    #[serde(rename = "incidentMessageLike", skip_serializing_if = "Option::is_none")]
76    pub incident_message_like: Option<String>,
77    /// Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Must be a JSON array of Strings.
78    #[serde(rename = "tenantIdIn", skip_serializing_if = "Option::is_none")]
79    pub tenant_id_in: Option<Vec<String>>,
80    /// Only include process instances which belong to no tenant. Value may only be true, as false is the default behavior.
81    #[serde(rename = "withoutTenantId", skip_serializing_if = "Option::is_none")]
82    pub without_tenant_id: Option<bool>,
83    /// Only include process instances which process definition has no tenant id.
84    #[serde(rename = "processDefinitionWithoutTenantId", skip_serializing_if = "Option::is_none")]
85    pub process_definition_without_tenant_id: Option<bool>,
86    /// Filter by a list of activity ids. A process instance must currently wait in a leaf activity with one of the given activity ids.
87    #[serde(rename = "activityIdIn", skip_serializing_if = "Option::is_none")]
88    pub activity_id_in: Option<Vec<String>>,
89    /// Restrict the query to all process instances that are top level process instances.
90    #[serde(rename = "rootProcessInstances", skip_serializing_if = "Option::is_none")]
91    pub root_process_instances: Option<bool>,
92    /// Restrict the query to all process instances that are leaf instances. (i.e. don't have any sub instances)
93    #[serde(rename = "leafProcessInstances", skip_serializing_if = "Option::is_none")]
94    pub leaf_process_instances: Option<bool>,
95    /// A JSON array to only include process instances that have variables with certain values. The array consists of objects with the three properties `name`, `operator` and `value`. `name` (String) is the variable name, `operator` (String) is the comparison operator to be used and `value` the variable value. The `value` may be String, Number or Boolean.  Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.
96    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
97    pub variables: Option<Vec<crate::models::VariableQueryParameterDto>>,
98    /// Match all variable names in this query case-insensitively. If set to true variableName and variablename are treated as equal.
99    #[serde(rename = "variableNamesIgnoreCase", skip_serializing_if = "Option::is_none")]
100    pub variable_names_ignore_case: Option<bool>,
101    /// Match all variable values in this query case-insensitively. If set to true variableValue and variablevalue are treated as equal.
102    #[serde(rename = "variableValuesIgnoreCase", skip_serializing_if = "Option::is_none")]
103    pub variable_values_ignore_case: Option<bool>,
104    /// A JSON array of nested process instance queries with OR semantics. A process instance matches a nested query if it fulfills at least one of the query's predicates. With multiple nested queries, a process instance must fulfill at least one predicate of each query (Conjunctive Normal Form). All process instance query properties can be used except for: `sorting` See the [User guide](https://docs.camunda.org/manual/7.13/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries.
105    #[serde(rename = "orQueries", skip_serializing_if = "Option::is_none")]
106    pub or_queries: Option<Vec<crate::models::ProcessInstanceQueryDto>>,
107    /// Apply sorting of the result
108    #[serde(rename = "sorting", skip_serializing_if = "Option::is_none")]
109    pub sorting: Option<Vec<crate::models::ProcessInstanceQueryDtoSorting>>,
110}
111
112impl ProcessInstanceQueryDto {
113    /// A process instance query which defines a group of process instances
114    pub fn new() -> ProcessInstanceQueryDto {
115        ProcessInstanceQueryDto {
116            deployment_id: None,
117            process_definition_id: None,
118            process_definition_key: None,
119            process_definition_key_in: None,
120            process_definition_key_not_in: None,
121            business_key: None,
122            business_key_like: None,
123            case_instance_id: None,
124            super_process_instance: None,
125            sub_process_instance: None,
126            super_case_instance: None,
127            sub_case_instance: None,
128            active: None,
129            suspended: None,
130            process_instance_ids: None,
131            with_incident: None,
132            incident_id: None,
133            incident_type: None,
134            incident_message: None,
135            incident_message_like: None,
136            tenant_id_in: None,
137            without_tenant_id: None,
138            process_definition_without_tenant_id: None,
139            activity_id_in: None,
140            root_process_instances: None,
141            leaf_process_instances: None,
142            variables: None,
143            variable_names_ignore_case: None,
144            variable_values_ignore_case: None,
145            or_queries: None,
146            sorting: None,
147        }
148    }
149}
150
151