/*
* 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).
*
* The version of the OpenAPI document: 1.11.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TargetingSpecExcludedLocations : Geo to exclude from the audience. Mirrors the inclusion geo shape: excluded cities can carry a radius catchment and excluded custom (lat/lng) pins are supported, both on Meta (excluded_geo_locations).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TargetingSpecExcludedLocations {
#[serde(rename = "countries", skip_serializing_if = "Option::is_none")]
pub countries: Option<Vec<String>>,
/// Meta only. Continents and trade blocs to exclude (`excluded_geo_locations.country_groups`).
#[serde(rename = "countryGroups", skip_serializing_if = "Option::is_none")]
pub country_groups: Option<Vec<CountryGroups>>,
#[serde(rename = "regions", skip_serializing_if = "Option::is_none")]
pub regions:
Option<Vec<models::UpdateCampaignTargetingRequestTargetingLocationsOneOfRegionsInner>>,
/// Cities to exclude. Optional `radius` + `distanceUnit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
#[serde(rename = "cities", skip_serializing_if = "Option::is_none")]
pub cities: Option<Vec<models::TargetingSpecExcludedLocationsCitiesInner>>,
#[serde(rename = "zips", skip_serializing_if = "Option::is_none")]
pub zips:
Option<Vec<models::UpdateCampaignTargetingRequestTargetingLocationsOneOfRegionsInner>>,
/// Named points of interest to exclude. `key` from /v1/ads/targeting/search.
#[serde(rename = "places", skip_serializing_if = "Option::is_none")]
pub places: Option<Vec<models::TargetingSpecExcludedLocationsPlacesInner>>,
/// Named neighbourhood areas to exclude. `key` from /v1/ads/targeting/search.
#[serde(rename = "neighborhoods", skip_serializing_if = "Option::is_none")]
pub neighborhoods: Option<Vec<models::TargetingSpecExcludedLocationsPlacesInner>>,
/// Point-radius (lat/lng) pins to exclude (Meta excluded_geo_locations.custom_locations). Mirrors the inclusion customLocations shape.
#[serde(rename = "customLocations", skip_serializing_if = "Option::is_none")]
pub custom_locations: Option<Vec<models::TargetingSpecCustomLocationsInner>>,
}
impl TargetingSpecExcludedLocations {
/// Geo to exclude from the audience. Mirrors the inclusion geo shape: excluded cities can carry a radius catchment and excluded custom (lat/lng) pins are supported, both on Meta (excluded_geo_locations).
pub fn new() -> TargetingSpecExcludedLocations {
TargetingSpecExcludedLocations {
countries: None,
country_groups: None,
regions: None,
cities: None,
zips: None,
places: None,
neighborhoods: None,
custom_locations: None,
}
}
}
/// Meta only. Continents and trade blocs to exclude (`excluded_geo_locations.country_groups`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CountryGroups {
#[serde(rename = "africa")]
Africa,
#[serde(rename = "asia")]
Asia,
#[serde(rename = "europe")]
Europe,
#[serde(rename = "north_america")]
NorthAmerica,
#[serde(rename = "south_america")]
SouthAmerica,
#[serde(rename = "oceania")]
Oceania,
#[serde(rename = "central_america")]
CentralAmerica,
#[serde(rename = "caribbean")]
Caribbean,
#[serde(rename = "eea")]
Eea,
#[serde(rename = "euro_area")]
EuroArea,
#[serde(rename = "nafta")]
Nafta,
#[serde(rename = "mercosur")]
Mercosur,
#[serde(rename = "afta")]
Afta,
#[serde(rename = "apec")]
Apec,
#[serde(rename = "gcc")]
Gcc,
#[serde(rename = "cisfta")]
Cisfta,
#[serde(rename = "emerging_markets")]
EmergingMarkets,
#[serde(rename = "itunes_app_store")]
ItunesAppStore,
#[serde(rename = "android_free_store")]
AndroidFreeStore,
#[serde(rename = "android_paid_store")]
AndroidPaidStore,
}
impl Default for CountryGroups {
fn default() -> CountryGroups {
Self::Africa
}
}