late 0.0.651

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadMessageSentMessageAttachmentsInner {
    /// Attachment type (image, video, file, sticker, audio)
    #[serde(rename = "type")]
    pub r#type: String,
    /// Where to fetch the attachment. For outgoing messages this is the media URL as sent, so for WhatsApp it is the URL you supplied when publishing (WhatsApp sends media by link), not a Zernio endpoint, and it needs no Zernio credentials. Contrast the inbound direction: `message.received` attachment URLs on WhatsApp point at the authenticated `GET /v1/whatsapp/media/{mediaId}`.
    #[serde(rename = "url")]
    pub url: String,
    /// Additional attachment metadata
    #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
    pub payload: Option<serde_json::Value>,
}

impl WebhookPayloadMessageSentMessageAttachmentsInner {
    pub fn new(r#type: String, url: String) -> WebhookPayloadMessageSentMessageAttachmentsInner {
        WebhookPayloadMessageSentMessageAttachmentsInner {
            r#type,
            url,
            payload: None,
        }
    }
}