webhook-line 1.0.1

Webhook event definition of the LINE Messaging API
Documentation
/*
 * Webhook Type Definition
 *
 * Webhook event definition of the LINE Messaging API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FileMessageContent {
    /// Type
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// Message ID
    #[serde(rename = "id")]
    pub id: String,
    /// File name
    #[serde(rename = "fileName")]
    pub file_name: String,
    /// File size in bytes
    #[serde(rename = "fileSize")]
    pub file_size: i32,
}

impl FileMessageContent {
    pub fn new(
        r#type: String,
        id: String,
        file_name: String,
        file_size: i32,
    ) -> FileMessageContent {
        FileMessageContent {
            r#type: Some(r#type),
            id,
            file_name,
            file_size,
        }
    }
}