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

/// CreateStandaloneAdRequestPlacementAssetsRulesInnerPlacements : Placements this asset is pinned to. At least one field must be set (an empty rule is invalid — that role is served by the default asset). Same enums as the top-level `placements` object.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestPlacementAssetsRulesInnerPlacements {
    #[serde(rename = "publisherPlatforms", skip_serializing_if = "Option::is_none")]
    pub publisher_platforms: Option<Vec<PublisherPlatforms>>,
    #[serde(rename = "facebookPositions", skip_serializing_if = "Option::is_none")]
    pub facebook_positions: Option<Vec<FacebookPositions>>,
    #[serde(rename = "instagramPositions", skip_serializing_if = "Option::is_none")]
    pub instagram_positions: Option<Vec<InstagramPositions>>,
    #[serde(rename = "messengerPositions", skip_serializing_if = "Option::is_none")]
    pub messenger_positions: Option<Vec<MessengerPositions>>,
    #[serde(
        rename = "audienceNetworkPositions",
        skip_serializing_if = "Option::is_none"
    )]
    pub audience_network_positions: Option<Vec<AudienceNetworkPositions>>,
    #[serde(rename = "threadsPositions", skip_serializing_if = "Option::is_none")]
    pub threads_positions: Option<Vec<ThreadsPositions>>,
    #[serde(rename = "whatsappPositions", skip_serializing_if = "Option::is_none")]
    pub whatsapp_positions: Option<Vec<WhatsappPositions>>,
    #[serde(rename = "devicePlatforms", skip_serializing_if = "Option::is_none")]
    pub device_platforms: Option<Vec<DevicePlatforms>>,
}

impl CreateStandaloneAdRequestPlacementAssetsRulesInnerPlacements {
    /// Placements this asset is pinned to. At least one field must be set (an empty rule is invalid — that role is served by the default asset). Same enums as the top-level `placements` object.
    pub fn new() -> CreateStandaloneAdRequestPlacementAssetsRulesInnerPlacements {
        CreateStandaloneAdRequestPlacementAssetsRulesInnerPlacements {
            publisher_platforms: None,
            facebook_positions: None,
            instagram_positions: None,
            messenger_positions: None,
            audience_network_positions: None,
            threads_positions: None,
            whatsapp_positions: None,
            device_platforms: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PublisherPlatforms {
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "threads")]
    Threads,
    #[serde(rename = "messenger")]
    Messenger,
    #[serde(rename = "audience_network")]
    AudienceNetwork,
}

impl Default for PublisherPlatforms {
    fn default() -> PublisherPlatforms {
        Self::Facebook
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FacebookPositions {
    #[serde(rename = "feed")]
    Feed,
    #[serde(rename = "right_hand_column")]
    RightHandColumn,
    #[serde(rename = "marketplace")]
    Marketplace,
    #[serde(rename = "video_feeds")]
    VideoFeeds,
    #[serde(rename = "story")]
    Story,
    #[serde(rename = "search")]
    Search,
    #[serde(rename = "instream_video")]
    InstreamVideo,
    #[serde(rename = "facebook_reels")]
    FacebookReels,
    #[serde(rename = "facebook_reels_overlay")]
    FacebookReelsOverlay,
    #[serde(rename = "profile_feed")]
    ProfileFeed,
    #[serde(rename = "notification")]
    Notification,
}

impl Default for FacebookPositions {
    fn default() -> FacebookPositions {
        Self::Feed
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum InstagramPositions {
    #[serde(rename = "stream")]
    Stream,
    #[serde(rename = "story")]
    Story,
    #[serde(rename = "explore")]
    Explore,
    #[serde(rename = "explore_home")]
    ExploreHome,
    #[serde(rename = "reels")]
    Reels,
    #[serde(rename = "profile_feed")]
    ProfileFeed,
    #[serde(rename = "ig_search")]
    IgSearch,
    #[serde(rename = "profile_reels")]
    ProfileReels,
}

impl Default for InstagramPositions {
    fn default() -> InstagramPositions {
        Self::Stream
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MessengerPositions {
    #[serde(rename = "messenger_home")]
    MessengerHome,
    #[serde(rename = "sponsored_messages")]
    SponsoredMessages,
    #[serde(rename = "story")]
    Story,
}

impl Default for MessengerPositions {
    fn default() -> MessengerPositions {
        Self::MessengerHome
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AudienceNetworkPositions {
    #[serde(rename = "classic")]
    Classic,
    #[serde(rename = "rewarded_video")]
    RewardedVideo,
}

impl Default for AudienceNetworkPositions {
    fn default() -> AudienceNetworkPositions {
        Self::Classic
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ThreadsPositions {
    #[serde(rename = "threads_stream")]
    ThreadsStream,
}

impl Default for ThreadsPositions {
    fn default() -> ThreadsPositions {
        Self::ThreadsStream
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum WhatsappPositions {
    #[serde(rename = "status")]
    Status,
}

impl Default for WhatsappPositions {
    fn default() -> WhatsappPositions {
        Self::Status
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DevicePlatforms {
    #[serde(rename = "mobile")]
    Mobile,
    #[serde(rename = "desktop")]
    Desktop,
}

impl Default for DevicePlatforms {
    fn default() -> DevicePlatforms {
        Self::Mobile
    }
}
