pipedrive-rs 0.1.0

Rust PipedriveClient
Documentation
/*
 * Pipedrive API v1
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddChannel200ResponseData {
    /// The unique channel ID used internally in omnichannel-api and the frontend of the extension
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The name of the channel
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The URL for an icon that represents your channel
    #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")]
    pub avatar_url: Option<String>,
    /// The channel ID you specified while creating the channel
    #[serde(rename = "provider_channel_id", skip_serializing_if = "Option::is_none")]
    pub provider_channel_id: Option<String>,
    /// The client_id of your app in Pipedrive marketplace
    #[serde(rename = "marketplace_client_id", skip_serializing_if = "Option::is_none")]
    pub marketplace_client_id: Option<String>,
    /// The ID of the user's company in Pipedrive
    #[serde(rename = "pd_company_id", skip_serializing_if = "Option::is_none")]
    pub pd_company_id: Option<i32>,
    /// The ID of the user in Pipedrive
    #[serde(rename = "pd_user_id", skip_serializing_if = "Option::is_none")]
    pub pd_user_id: Option<i32>,
    /// The date and time when your channel was created in the API
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Value of the provider_type sent to this endpoint
    #[serde(rename = "provider_type", skip_serializing_if = "Option::is_none")]
    pub provider_type: Option<ProviderType>,
    /// Value of the template_support sent to this endpoint
    #[serde(rename = "template_support", skip_serializing_if = "Option::is_none")]
    pub template_support: Option<bool>,
}

impl AddChannel200ResponseData {
    pub fn new() -> AddChannel200ResponseData {
        AddChannel200ResponseData {
            id: None,
            name: None,
            avatar_url: None,
            provider_channel_id: None,
            marketplace_client_id: None,
            pd_company_id: None,
            pd_user_id: None,
            created_at: None,
            provider_type: None,
            template_support: None,
        }
    }
}

/// Value of the provider_type sent to this endpoint
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderType {
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "whatsapp")]
    Whatsapp,
    #[serde(rename = "other")]
    Other,
}

impl Default for ProviderType {
    fn default() -> ProviderType {
        Self::Facebook
    }
}