/*
 * 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.1
 * 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 ImportWhatsAppContactsRequest {
    /// WhatsApp social account ID
    #[serde(rename = "accountId")]
    pub account_id: String,
    /// Contacts to import (max 1000)
    #[serde(rename = "contacts")]
    pub contacts: Vec<models::ImportWhatsAppContactsRequestContactsInner>,
    /// Tags applied to all imported contacts
    #[serde(rename = "defaultTags", skip_serializing_if = "Option::is_none")]
    pub default_tags: Option<Vec<String>>,
    /// Groups applied to all imported contacts
    #[serde(rename = "defaultGroups", skip_serializing_if = "Option::is_none")]
    pub default_groups: Option<Vec<String>>,
    /// Skip contacts with existing phone numbers
    #[serde(rename = "skipDuplicates", skip_serializing_if = "Option::is_none")]
    pub skip_duplicates: Option<bool>,
}

impl ImportWhatsAppContactsRequest {
    pub fn new(
        account_id: String,
        contacts: Vec<models::ImportWhatsAppContactsRequestContactsInner>,
    ) -> ImportWhatsAppContactsRequest {
        ImportWhatsAppContactsRequest {
            account_id,
            contacts,
            default_tags: None,
            default_groups: None,
            skip_duplicates: None,
        }
    }
}
