late 0.0.1376

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.587.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 CreatePlatformInviteRequest {
    /// The profile the account is connected to.
    #[serde(rename = "profileId")]
    pub profile_id: String,
    #[serde(rename = "platform")]
    pub platform: Platform,
    /// Reconnect this existing account instead of adding a new one. It must belong to the profile and platform.
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    /// Instagram only. instagram_login (the default) uses Instagram Login, facebook_login uses Facebook Login. A reconnect link keeps the method the account was connected with.
    #[serde(rename = "loginMethod", skip_serializing_if = "Option::is_none")]
    pub login_method: Option<LoginMethod>,
    /// Days until the link expires.
    #[serde(rename = "expiresInDays", skip_serializing_if = "Option::is_none")]
    pub expires_in_days: Option<i32>,
}

impl CreatePlatformInviteRequest {
    pub fn new(profile_id: String, platform: Platform) -> CreatePlatformInviteRequest {
        CreatePlatformInviteRequest {
            profile_id,
            platform,
            account_id: None,
            login_method: None,
            expires_in_days: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "linkedin")]
    Linkedin,
    #[serde(rename = "twitter")]
    Twitter,
    #[serde(rename = "threads")]
    Threads,
    #[serde(rename = "tiktok")]
    Tiktok,
    #[serde(rename = "youtube")]
    Youtube,
    #[serde(rename = "pinterest")]
    Pinterest,
    #[serde(rename = "reddit")]
    Reddit,
    #[serde(rename = "bluesky")]
    Bluesky,
    #[serde(rename = "snapchat")]
    Snapchat,
    #[serde(rename = "googlebusiness")]
    Googlebusiness,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Facebook
    }
}
/// Instagram only. instagram_login (the default) uses Instagram Login, facebook_login uses Facebook Login. A reconnect link keeps the method the account was connected with.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LoginMethod {
    #[serde(rename = "instagram_login")]
    InstagramLogin,
    #[serde(rename = "facebook_login")]
    FacebookLogin,
}

impl Default for LoginMethod {
    fn default() -> LoginMethod {
        Self::InstagramLogin
    }
}