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
/*
* Asana
*
* This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/developer-docs/master/defs/asana_oas.yaml).
*
* The version of the OpenAPI document: 1.0
*
* Generated by: https://openapi-generator.tech
*/
/// EventResponseChange : Information about the type of change that has occurred. This field is only present when the value of the property `action`, describing the action taken on the **resource**, is `changed`.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventResponseChange {
/// The name of the field that has changed in the resource.
#[serde(rename = "field", skip_serializing_if = "Option::is_none")]
pub field: Option<String>,
/// The type of action taken on the **field** which has been changed. This can be one of `changed`, `added`, or `removed` depending on the nature of the change.
#[serde(rename = "action", skip_serializing_if = "Option::is_none")]
pub action: Option<String>,
/// *Conditional.* This property is only present when the **field's** `action` is `changed` and the `new_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) resource.
#[serde(rename = "new_value", skip_serializing_if = "Option::is_none")]
pub new_value: Option<serde_json::Value>,
/// *Conditional.* This property is only present when the **field's** `action` is `added` and the `added_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) resource.
#[serde(rename = "added_value", skip_serializing_if = "Option::is_none")]
pub added_value: Option<serde_json::Value>,
/// *Conditional.* This property is only present when the **field's** `action` is `removed` and the `removed_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) resource.
#[serde(rename = "removed_value", skip_serializing_if = "Option::is_none")]
pub removed_value: Option<serde_json::Value>,
}
impl EventResponseChange {
/// Information about the type of change that has occurred. This field is only present when the value of the property `action`, describing the action taken on the **resource**, is `changed`.
pub fn new() -> EventResponseChange {
EventResponseChange {
field: None,
action: None,
new_value: None,
added_value: None,
removed_value: None,
}
}
}