/*
* 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.104.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LinkedInPlatformDataAudience : Organization pages only. Audience targeting for the post (Ads Manager's \"Targeted audience\"), sent as LinkedIn's distribution.targetEntities: OR inside a facet, AND across facets. LinkedIn rejects the post when the targeted audience is under 300 members, and Zernio rejects it on a personal profile. URN facets accept a full urn:li:<type>:<id> or the bare numeric id; find ids with GET /v1/ads/targeting/search?platform=linkedin (types country, region, industry, jobFunction, seniority, companySize).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinkedInPlatformDataAudience {
/// ISO 3166-1 alpha-2 codes with a built-in LinkedIn geo URN (same list as geoRestriction.countries, merged with it). Other countries and sub-country regions go in geoLocations.
#[serde(rename = "countries", skip_serializing_if = "Option::is_none")]
pub countries: Option<Vec<String>>,
/// LinkedIn geo URNs or ids (urn:li:geo:103644278 or 103644278): countries, states, regions, cities.
#[serde(rename = "geoLocations", skip_serializing_if = "Option::is_none")]
pub geo_locations: Option<Vec<String>>,
/// Members' LinkedIn interface locale, e.g. { language: es, country: ES }.
#[serde(rename = "interfaceLocales", skip_serializing_if = "Option::is_none")]
pub interface_locales: Option<Vec<models::LinkedInPlatformDataAudienceInterfaceLocalesInner>>,
/// urn:li:industry:<id> or id.
#[serde(rename = "industries", skip_serializing_if = "Option::is_none")]
pub industries: Option<Vec<String>>,
/// urn:li:function:<id> or id.
#[serde(rename = "jobFunctions", skip_serializing_if = "Option::is_none")]
pub job_functions: Option<Vec<String>>,
/// urn:li:seniority:<id> or id.
#[serde(rename = "seniorities", skip_serializing_if = "Option::is_none")]
pub seniorities: Option<Vec<String>>,
/// Company size of the member's current employer.
#[serde(rename = "staffCountRanges", skip_serializing_if = "Option::is_none")]
pub staff_count_ranges: Option<Vec<StaffCountRanges>>,
/// urn:li:degree:<id> or id (LinkedIn standardized degrees).
#[serde(rename = "degrees", skip_serializing_if = "Option::is_none")]
pub degrees: Option<Vec<String>>,
/// urn:li:fieldOfStudy:<id> or id (LinkedIn standardized fields of study).
#[serde(rename = "fieldsOfStudy", skip_serializing_if = "Option::is_none")]
pub fields_of_study: Option<Vec<String>>,
/// Schools, as urn:li:organization:<id> or id (LinkedIn's Organization Lookup).
#[serde(rename = "organizations", skip_serializing_if = "Option::is_none")]
pub organizations: Option<Vec<String>>,
}
impl LinkedInPlatformDataAudience {
/// Organization pages only. Audience targeting for the post (Ads Manager's \"Targeted audience\"), sent as LinkedIn's distribution.targetEntities: OR inside a facet, AND across facets. LinkedIn rejects the post when the targeted audience is under 300 members, and Zernio rejects it on a personal profile. URN facets accept a full urn:li:<type>:<id> or the bare numeric id; find ids with GET /v1/ads/targeting/search?platform=linkedin (types country, region, industry, jobFunction, seniority, companySize).
pub fn new() -> LinkedInPlatformDataAudience {
LinkedInPlatformDataAudience {
countries: None,
geo_locations: None,
interface_locales: None,
industries: None,
job_functions: None,
seniorities: None,
staff_count_ranges: None,
degrees: None,
fields_of_study: None,
organizations: None,
}
}
}
/// Company size of the member's current employer.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StaffCountRanges {
#[serde(rename = "SIZE_1")]
Size1,
#[serde(rename = "SIZE_2_TO_10")]
Size2To10,
#[serde(rename = "SIZE_11_TO_50")]
Size11To50,
#[serde(rename = "SIZE_51_TO_200")]
Size51To200,
#[serde(rename = "SIZE_201_TO_500")]
Size201To500,
#[serde(rename = "SIZE_501_TO_1000")]
Size501To1000,
#[serde(rename = "SIZE_1001_TO_5000")]
Size1001To5000,
#[serde(rename = "SIZE_5001_TO_10000")]
Size5001To10000,
#[serde(rename = "SIZE_10001_OR_MORE")]
Size10001OrMore,
}
impl Default for StaffCountRanges {
fn default() -> StaffCountRanges {
Self::Size1
}
}