webhook_line/models/
action_result.rs

1/*
2 * Webhook Type Definition
3 *
4 * Webhook event definition of the LINE Messaging API
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ActionResult {
16    #[serde(rename = "type")]
17    pub r#type: Type,
18    /// Base64-encoded binary data
19    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
20    pub data: Option<String>,
21}
22
23impl ActionResult {
24    pub fn new(r#type: Type) -> ActionResult {
25        ActionResult {
26            r#type,
27            data: None,
28        }
29    }
30}
31/// 
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
33pub enum Type {
34    #[serde(rename = "void")]
35    Void,
36    #[serde(rename = "binary")]
37    Binary,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::Void
43    }
44}
45