webhook_line/models/emoji.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 Emoji {
16 /// Index position for a character in text, with the first character being at position 0.
17 #[serde(rename = "index")]
18 pub index: i32,
19 /// The length of the LINE emoji string. For LINE emoji (hello), 7 is the length.
20 #[serde(rename = "length")]
21 pub length: i32,
22 /// Product ID for a LINE emoji set.
23 #[serde(rename = "productId")]
24 pub product_id: String,
25 /// ID for a LINE emoji inside a set.
26 #[serde(rename = "emojiId")]
27 pub emoji_id: String,
28}
29
30impl Emoji {
31 pub fn new(index: i32, length: i32, product_id: String, emoji_id: String) -> Emoji {
32 Emoji {
33 index,
34 length,
35 product_id,
36 emoji_id,
37 }
38 }
39}
40