late 0.0.1352

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.531.0
 * 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 BrowseAdTargeting200ResponseNodesInner {
    /// Identifies the node within this response. Not a Meta id: never put it in a targeting spec.
    #[serde(rename = "nodeId")]
    pub node_id: String,
    /// nodeId of the parent organizational node, null for a root.
    #[serde(rename = "parentNodeId", deserialize_with = "Option::deserialize")]
    pub parent_node_id: Option<String>,
    /// Meta targeting id, null on organizational nodes.
    #[serde(rename = "id", deserialize_with = "Option::deserialize")]
    pub id: Option<String>,
    #[serde(rename = "name")]
    pub name: String,
    /// Meta's targeting spec key (interests, behaviors, industries, life_events, education_statuses, relationship_statuses, family_statuses, income, ...). Null on most organizational nodes.
    #[serde(rename = "type", deserialize_with = "Option::deserialize")]
    pub r#type: Option<String>,
    /// Labels of the ancestors, root first. Does not include the node itself.
    #[serde(rename = "path")]
    pub path: Vec<String>,
    /// True when the node can be targeted (it has a Meta id).
    #[serde(rename = "selectable")]
    pub selectable: bool,
    /// Meta's description, when it has one.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Meta's estimated audience size, lower bound, when reported.
    #[serde(
        rename = "audienceSizeLowerBound",
        skip_serializing_if = "Option::is_none"
    )]
    pub audience_size_lower_bound: Option<i32>,
    /// Meta's estimated audience size, upper bound, when reported.
    #[serde(
        rename = "audienceSizeUpperBound",
        skip_serializing_if = "Option::is_none"
    )]
    pub audience_size_upper_bound: Option<i32>,
}

impl BrowseAdTargeting200ResponseNodesInner {
    pub fn new(
        node_id: String,
        parent_node_id: Option<String>,
        id: Option<String>,
        name: String,
        r#type: Option<String>,
        path: Vec<String>,
        selectable: bool,
    ) -> BrowseAdTargeting200ResponseNodesInner {
        BrowseAdTargeting200ResponseNodesInner {
            node_id,
            parent_node_id,
            id,
            name,
            r#type,
            path,
            selectable,
            description: None,
            audience_size_lower_bound: None,
            audience_size_upper_bound: None,
        }
    }
}