insight-line 0.0.2

This document describes LINE Messaging API(Insight).
Documentation
/*
 * LINE Messaging API(Insight)
 *
 * This document describes LINE Messaging API(Insight).
 *
 * The version of the OpenAPI document: 0.0.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// GetNumberOfFollowersResponse : Get number of followers
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetNumberOfFollowersResponse {
    /// Calculation status.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// The number of times, as of the specified date, that a user added this LINE Official Account as a friend for the first time. The number doesn't decrease even if a user later blocks the account or when they delete their LINE account. 
    #[serde(rename = "followers", skip_serializing_if = "Option::is_none")]
    pub followers: Option<i64>,
    /// The number of users, as of the specified date, that the LINE Official Account can reach through targeted messages based on gender, age, and/or region. This number only includes users who are active on LINE or LINE services and whose demographics have a high level of certainty. 
    #[serde(rename = "targetedReaches", skip_serializing_if = "Option::is_none")]
    pub targeted_reaches: Option<i64>,
    /// The number of users blocking the account as of the specified date. The number decreases when a user unblocks the account.   
    #[serde(rename = "blocks", skip_serializing_if = "Option::is_none")]
    pub blocks: Option<i64>,
}

impl GetNumberOfFollowersResponse {
    /// Get number of followers
    pub fn new() -> GetNumberOfFollowersResponse {
        GetNumberOfFollowersResponse {
            status: None,
            followers: None,
            targeted_reaches: None,
            blocks: None,
        }
    }
}
/// Calculation status.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "ready")]
    Ready,
    #[serde(rename = "unready")]
    Unready,
    #[serde(rename = "out_of_service")]
    OutOfService,
}

impl Default for Status {
    fn default() -> Status {
        Self::Ready
    }
}