/*
 * 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};

/// GetFriendsDemographicsResponse : Get friend demographics
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetFriendsDemographicsResponse {
    /// true if friend demographic information is available.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// Percentage per gender.
    #[serde(rename = "genders", skip_serializing_if = "Option::is_none")]
    pub genders: Option<Vec<models::GenderTile>>,
    /// Percentage per age group.
    #[serde(rename = "ages", skip_serializing_if = "Option::is_none")]
    pub ages: Option<Vec<models::AgeTile>>,
    /// Percentage per area.
    #[serde(rename = "areas", skip_serializing_if = "Option::is_none")]
    pub areas: Option<Vec<models::AreaTile>>,
    /// Percentage by OS.
    #[serde(rename = "appTypes", skip_serializing_if = "Option::is_none")]
    pub app_types: Option<Vec<models::AppTypeTile>>,
    /// Percentage per friendship duration.
    #[serde(rename = "subscriptionPeriods", skip_serializing_if = "Option::is_none")]
    pub subscription_periods: Option<Vec<models::SubscriptionPeriodTile>>,
}

impl GetFriendsDemographicsResponse {
    /// Get friend demographics
    pub fn new() -> GetFriendsDemographicsResponse {
        GetFriendsDemographicsResponse {
            available: None,
            genders: None,
            ages: None,
            areas: None,
            app_types: None,
            subscription_periods: None,
        }
    }
}

