late 0.0.1092

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.162.2
 * 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 GrantBusinessPartnerRequest {
    /// Meta business portfolio id of the partner (numeric string).
    #[serde(rename = "businessId")]
    pub business_id: String,
    /// Tasks granted on the Page, Meta's permitted_tasks vocabulary. Defaults to ADVERTISE and ANALYZE. The bare names are what Business Settings shows; the PROFILE_PLUS_ names are the New Pages Experience tasks and the only way to grant FACEBOOK_ACCESS or REVENUE. Granting MANAGE also yields MANAGE_LEADS.
    #[serde(rename = "permittedTasks", skip_serializing_if = "Option::is_none")]
    pub permitted_tasks: Option<Vec<PermittedTasks>>,
}

impl GrantBusinessPartnerRequest {
    pub fn new(business_id: String) -> GrantBusinessPartnerRequest {
        GrantBusinessPartnerRequest {
            business_id,
            permitted_tasks: None,
        }
    }
}
/// Tasks granted on the Page, Meta's permitted_tasks vocabulary. Defaults to ADVERTISE and ANALYZE. The bare names are what Business Settings shows; the PROFILE_PLUS_ names are the New Pages Experience tasks and the only way to grant FACEBOOK_ACCESS or REVENUE. Granting MANAGE also yields MANAGE_LEADS.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PermittedTasks {
    #[serde(rename = "MANAGE")]
    Manage,
    #[serde(rename = "CREATE_CONTENT")]
    CreateContent,
    #[serde(rename = "MODERATE")]
    Moderate,
    #[serde(rename = "MESSAGING")]
    Messaging,
    #[serde(rename = "ADVERTISE")]
    Advertise,
    #[serde(rename = "ANALYZE")]
    Analyze,
    #[serde(rename = "MODERATE_COMMUNITY")]
    ModerateCommunity,
    #[serde(rename = "MANAGE_JOBS")]
    ManageJobs,
    #[serde(rename = "PAGES_MESSAGING")]
    PagesMessaging,
    #[serde(rename = "PAGES_MESSAGING_SUBSCRIPTIONS")]
    PagesMessagingSubscriptions,
    #[serde(rename = "READ_PAGE_MAILBOXES")]
    ReadPageMailboxes,
    #[serde(rename = "VIEW_MONETIZATION_INSIGHTS")]
    ViewMonetizationInsights,
    #[serde(rename = "MANAGE_LEADS")]
    ManageLeads,
    #[serde(rename = "CASHIER_ROLE")]
    CashierRole,
    #[serde(rename = "GLOBAL_STRUCTURE_MANAGEMENT")]
    GlobalStructureManagement,
    #[serde(rename = "PROFILE_PLUS_FULL_CONTROL")]
    ProfilePlusFullControl,
    #[serde(rename = "PROFILE_PLUS_MANAGE")]
    ProfilePlusManage,
    #[serde(rename = "PROFILE_PLUS_FACEBOOK_ACCESS")]
    ProfilePlusFacebookAccess,
    #[serde(rename = "PROFILE_PLUS_CREATE_CONTENT")]
    ProfilePlusCreateContent,
    #[serde(rename = "PROFILE_PLUS_MODERATE")]
    ProfilePlusModerate,
    #[serde(rename = "PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY")]
    ProfilePlusModerateDelegateCommunity,
    #[serde(rename = "PROFILE_PLUS_MESSAGING")]
    ProfilePlusMessaging,
    #[serde(rename = "PROFILE_PLUS_ADVERTISE")]
    ProfilePlusAdvertise,
    #[serde(rename = "PROFILE_PLUS_ANALYZE")]
    ProfilePlusAnalyze,
    #[serde(rename = "PROFILE_PLUS_REVENUE")]
    ProfilePlusRevenue,
    #[serde(rename = "PROFILE_PLUS_MANAGE_LEADS")]
    ProfilePlusManageLeads,
    #[serde(rename = "PROFILE_PLUS_CREATIVE_MANAGEMENT")]
    ProfilePlusCreativeManagement,
    #[serde(rename = "PROFILE_PLUS_CREATOR_MANAGEMENT")]
    ProfilePlusCreatorManagement,
    #[serde(rename = "PROFILE_PLUS_GLOBAL_STRUCTURE_MANAGEMENT")]
    ProfilePlusGlobalStructureManagement,
}

impl Default for PermittedTasks {
    fn default() -> PermittedTasks {
        Self::Manage
    }
}