asana 0.1.1

asana bindings for rust
Documentation
/*
 * 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 WebhookRequest {
    /// A resource ID to subscribe to. Many Asana resources are valid to create webhooks on, but higher-level resources require filters.
    #[serde(rename = "resource")]
    pub resource: String,
    /// The URL to receive the HTTP POST. The full URL will be used to deliver events from this webhook (including parameters) which allows encoding of application-specific state when the webhook is created.
    #[serde(rename = "target")]
    pub target: String,
    /// An array of WebhookFilter objects to specify a 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 WebhookRequest {
    pub fn new(resource: String, target: String) -> WebhookRequest {
        WebhookRequest { resource, target, filters: None }
    }
}