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
/*
* 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
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookResponse {
/// Globally unique identifier of the resource, as a string.
#[serde(rename = "gid", skip_serializing_if = "Option::is_none")]
pub gid: Option<String>,
/// The base type of this resource.
#[serde(rename = "resource_type", skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
/// If true, the webhook will send events - if false it is considered inactive and will not generate events.
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
#[serde(rename = "resource", skip_serializing_if = "Option::is_none")]
pub resource: Option<Box<crate::models::AsanaNamedResource>>,
/// The URL to receive the HTTP POST.
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
/// The time at which this resource was created.
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// The timestamp when the webhook last received an error when sending an event to the target.
#[serde(
rename = "last_failure_at",
skip_serializing_if = "Option::is_none"
)]
pub last_failure_at: Option<String>,
/// The contents of the last error response sent to the webhook when attempting to deliver events to the target.
#[serde(
rename = "last_failure_content",
skip_serializing_if = "Option::is_none"
)]
pub last_failure_content: Option<String>,
/// The timestamp when the webhook last successfully sent an event to the target.
#[serde(
rename = "last_success_at",
skip_serializing_if = "Option::is_none"
)]
pub last_success_at: Option<String>,
/// Whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
#[serde(rename = "filters", skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<crate::models::WebhookFilter>>,
}
impl WebhookResponse {
pub fn new() -> WebhookResponse {
WebhookResponse {
gid: None,
resource_type: None,
active: None,
resource: None,
target: None,
created_at: None,
last_failure_at: None,
last_failure_content: None,
last_success_at: None,
filters: None,
}
}
}