late 0.0.297

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SearchAdTargeting200ResponseResultsInner {
    /// The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec.
    #[serde(rename = "id")]
    pub id: String,
    /// Human-readable label.
    #[serde(rename = "name")]
    pub name: String,
    /// What the result is (e.g. city, region, country, zip, metro, interest, behavior, income).
    #[serde(rename = "type")]
    pub r#type: String,
    /// Optional breadcrumb of parent labels (e.g. ['United States', 'California', 'Los Angeles']). Disambiguates same-named results.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<Vec<String>>,
    /// Optional estimated reachable users for this option, when the platform returns it.
    #[serde(rename = "audienceSize", skip_serializing_if = "Option::is_none")]
    pub audience_size: Option<i32>,
}

impl SearchAdTargeting200ResponseResultsInner {
    pub fn new(
        id: String,
        name: String,
        r#type: String,
    ) -> SearchAdTargeting200ResponseResultsInner {
        SearchAdTargeting200ResponseResultsInner {
            id,
            name,
            r#type,
            path: None,
            audience_size: None,
        }
    }
}