late 0.0.1411

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.650.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 UpdateSalesforceSettingsRequest {
    /// Create a Lead or Contact for an inbox contact that matches nobody by phone (any phone field) or email. A match is linked as it is and never updated.
    #[serde(rename = "syncContacts", skip_serializing_if = "Option::is_none")]
    pub sync_contacts: Option<bool>,
    /// Log inbound and outbound inbox messages as one conversation Task per person, channel and day.
    #[serde(rename = "logMessages", skip_serializing_if = "Option::is_none")]
    pub log_messages: Option<bool>,
    /// What a person new to Salesforce is created as. Leads get Company `[not provided]`.
    #[serde(rename = "createAs", skip_serializing_if = "Option::is_none")]
    pub create_as: Option<CreateAs>,
    /// Mark sent messages in the transcript as delivered, read or failed.
    #[serde(rename = "logDeliveryStatus", skip_serializing_if = "Option::is_none")]
    pub log_delivery_status: Option<bool>,
    /// Count closed-won Opportunities as sales on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Turning it on also fills in the Opportunities won in the last 90 days. Lost or reopened Opportunities stop counting.
    #[serde(
        rename = "useOpportunitiesInResults",
        skip_serializing_if = "Option::is_none"
    )]
    pub use_opportunities_in_results: Option<bool>,
    /// Send each newly closed-won Opportunity once as a Purchase event (source `salesforce`, event id `salesforce_opp_{orgId}_{opportunityId}`) to the profile's event destinations, with the email and phone of its primary contact role, else the first Contact of its Account. Opportunities won before it was turned on are not sent.
    #[serde(
        rename = "reportOpportunitiesToAds",
        skip_serializing_if = "Option::is_none"
    )]
    pub report_opportunities_to_ads: Option<bool>,
}

impl UpdateSalesforceSettingsRequest {
    pub fn new() -> UpdateSalesforceSettingsRequest {
        UpdateSalesforceSettingsRequest {
            sync_contacts: None,
            log_messages: None,
            create_as: None,
            log_delivery_status: None,
            use_opportunities_in_results: None,
            report_opportunities_to_ads: None,
        }
    }
}
/// What a person new to Salesforce is created as. Leads get Company `[not provided]`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CreateAs {
    #[serde(rename = "lead")]
    Lead,
    #[serde(rename = "contact")]
    Contact,
}

impl Default for CreateAs {
    fn default() -> CreateAs {
        Self::Lead
    }
}