Skip to main content

late/models/
webhook_payload_comment_comment_attachment.rs

1/*
2 * Zernio API
3 *
4 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5 *
6 * The version of the OpenAPI document: 1.0.4
7 * Contact: support@zernio.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// WebhookPayloadCommentCommentAttachment : Facebook only. Present on graphic-only comments (sticker, GIF, photo) that carry no text. URLs are ephemeral and may expire for Meta platforms (oe= expiry), so fetch promptly. Instagram comments do not support attachments.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhookPayloadCommentCommentAttachment {
17    /// Attachment type: sticker, animated_image_share, or photo.
18    #[serde(rename = "type")]
19    pub r#type: String,
20    /// Rendered image/preview URL (from attachment.media.image.src).
21    #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
22    pub image_url: Option<String>,
23    /// Source URL (from attachment.url). For GIFs this is an l.facebook.com redirect.
24    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
25    pub url: Option<String>,
26}
27
28impl WebhookPayloadCommentCommentAttachment {
29    /// Facebook only. Present on graphic-only comments (sticker, GIF, photo) that carry no text. URLs are ephemeral and may expire for Meta platforms (oe= expiry), so fetch promptly. Instagram comments do not support attachments.
30    pub fn new(r#type: String) -> WebhookPayloadCommentCommentAttachment {
31        WebhookPayloadCommentCommentAttachment {
32            r#type,
33            image_url: None,
34            url: None,
35        }
36    }
37}