insight_line/models/
get_statistics_per_unit_response_message.rs

1/*
2 * LINE Messaging API(Insight)
3 *
4 * This document describes LINE Messaging API(Insight).
5 *
6 * The version of the OpenAPI document: 0.0.1
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 GetStatisticsPerUnitResponseMessage {
16    /// Bubble's serial number.
17    #[serde(rename = "seq")]
18    pub seq: i32,
19    /// Number of times the bubble was displayed.
20    #[serde(rename = "impression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub impression: Option<Option<i64>>,
22    /// Number of times audio or video in the bubble started playing.
23    #[serde(rename = "mediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub media_played: Option<Option<i64>>,
25    /// Number of times audio or video in the bubble started playing and was played 25% of the total time.
26    #[serde(rename = "mediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub media_played25_percent: Option<Option<i64>>,
28    /// Number of times audio or video in the bubble started playing and was played 50% of the total time.
29    #[serde(rename = "mediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub media_played50_percent: Option<Option<i64>>,
31    /// Number of times audio or video in the bubble started playing and was played 75% of the total time.
32    #[serde(rename = "mediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub media_played75_percent: Option<Option<i64>>,
34    /// Number of times audio or video in the bubble started playing and was played 100% of the total time.
35    #[serde(rename = "mediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub media_played100_percent: Option<Option<i64>>,
37    /// Number of users the bubble was displayed.
38    #[serde(rename = "uniqueImpression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub unique_impression: Option<Option<i64>>,
40    /// Number of users that started playing audio or video in the bubble.
41    #[serde(rename = "uniqueMediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
42    pub unique_media_played: Option<Option<i64>>,
43    /// Number of users that started playing audio or video in the bubble and played 25% of the total time.
44    #[serde(rename = "uniqueMediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
45    pub unique_media_played25_percent: Option<Option<i64>>,
46    /// Number of users that started playing audio or video in the bubble and played 50% of the total time.
47    #[serde(rename = "uniqueMediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
48    pub unique_media_played50_percent: Option<Option<i64>>,
49    /// Number of users that started playing audio or video in the bubble and played 75% of the total time.
50    #[serde(rename = "uniqueMediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub unique_media_played75_percent: Option<Option<i64>>,
52    /// Number of users that started playing audio or video in the bubble and played 100% of the total time.
53    #[serde(rename = "uniqueMediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
54    pub unique_media_played100_percent: Option<Option<i64>>,
55}
56
57impl GetStatisticsPerUnitResponseMessage {
58    pub fn new(seq: i32) -> GetStatisticsPerUnitResponseMessage {
59        GetStatisticsPerUnitResponseMessage {
60            seq,
61            impression: None,
62            media_played: None,
63            media_played25_percent: None,
64            media_played50_percent: None,
65            media_played75_percent: None,
66            media_played100_percent: None,
67            unique_impression: None,
68            unique_media_played: None,
69            unique_media_played25_percent: None,
70            unique_media_played50_percent: None,
71            unique_media_played75_percent: None,
72            unique_media_played100_percent: None,
73        }
74    }
75}
76