1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
 * Camunda BPM REST API
 *
 * OpenApi Spec for Camunda BPM REST API.
 *
 * The version of the OpenAPI document: 7.13.0
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FetchExternalTaskTopicDto {
    /// **Mandatory.** The topic's name.
    #[serde(rename = "topicName")]
    pub topic_name: String,
    /// **Mandatory.** The duration to lock the external tasks for in milliseconds.
    #[serde(rename = "lockDuration")]
    pub lock_duration: Option<i64>,
    /// A JSON array of `String` values that represent variable names. For each result task belonging to this topic, the given variables are returned as well if they are accessible from the external task's execution. If not provided - all variables will be fetched.
    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
    pub variables: Option<Vec<String>>,
    /// If `true` only local variables will be fetched.
    #[serde(rename = "localVariables", skip_serializing_if = "Option::is_none")]
    pub local_variables: Option<bool>,
    /// A `String` value which enables the filtering of tasks based on process instance business key.
    #[serde(rename = "businessKey", skip_serializing_if = "Option::is_none")]
    pub business_key: Option<String>,
    /// Filter tasks based on process definition id.
    #[serde(
        rename = "processDefinitionId",
        skip_serializing_if = "Option::is_none"
    )]
    pub process_definition_id: Option<String>,
    /// Filter tasks based on process definition ids.
    #[serde(
        rename = "processDefinitionIdIn",
        skip_serializing_if = "Option::is_none"
    )]
    pub process_definition_id_in: Option<Vec<String>>,
    /// Filter tasks based on process definition key.
    #[serde(
        rename = "processDefinitionKey",
        skip_serializing_if = "Option::is_none"
    )]
    pub process_definition_key: Option<String>,
    /// Filter tasks based on process definition keys.
    #[serde(
        rename = "processDefinitionKeyIn",
        skip_serializing_if = "Option::is_none"
    )]
    pub process_definition_key_in: Option<Vec<String>>,
    /// Filter tasks based on process definition version tag.
    #[serde(
        rename = "processDefinitionVersionTag",
        skip_serializing_if = "Option::is_none"
    )]
    pub process_definition_version_tag: Option<String>,
    /// Filter tasks without tenant id.
    #[serde(rename = "withoutTenantId", skip_serializing_if = "Option::is_none")]
    pub without_tenant_id: Option<bool>,
    /// Filter tasks based on tenant ids.
    #[serde(rename = "tenantIdIn", skip_serializing_if = "Option::is_none")]
    pub tenant_id_in: Option<Vec<String>>,
    /// A `JSON` object used for filtering tasks based on process instance variable values. A property name of the object represents a process variable name, while the property value represents the process variable value to filter tasks by.
    #[serde(rename = "processVariables", skip_serializing_if = "Option::is_none")]
    pub process_variables: Option<::std::collections::HashMap<String, serde_json::Value>>,
    /// Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default `false`).  If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath.  If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.
    #[serde(rename = "deserializeValues", skip_serializing_if = "Option::is_none")]
    pub deserialize_values: Option<bool>,
}

impl FetchExternalTaskTopicDto {
    pub fn new(topic_name: String, lock_duration: Option<i64>) -> FetchExternalTaskTopicDto {
        FetchExternalTaskTopicDto {
            topic_name,
            lock_duration,
            variables: None,
            local_variables: None,
            business_key: None,
            process_definition_id: None,
            process_definition_id_in: None,
            process_definition_key: None,
            process_definition_key_in: None,
            process_definition_version_tag: None,
            without_tenant_id: None,
            tenant_id_in: None,
            process_variables: None,
            deserialize_values: Some(true),
        }
    }
}