/*
 * 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.4
 * 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 CreatePhoneNumberPortInRequest {
    /// E.164 numbers to port in.
    #[serde(rename = "phoneNumbers")]
    pub phone_numbers: Vec<String>,
    #[serde(rename = "endUser")]
    pub end_user: Box<models::CreatePhoneNumberPortInRequestEndUser>,
    /// Document id from POST /v1/phone-numbers/port-in/documents (kind=loa).
    #[serde(rename = "loaDocumentId")]
    pub loa_document_id: String,
    /// Document id from POST /v1/phone-numbers/port-in/documents (kind=invoice).
    #[serde(rename = "invoiceDocumentId")]
    pub invoice_document_id: String,
    /// Requested port date; the carrier confirms the actual FOC later.
    #[serde(
        rename = "focDatetimeRequested",
        skip_serializing_if = "Option::is_none"
    )]
    pub foc_datetime_requested: Option<String>,
    #[serde(rename = "customerReference", skip_serializing_if = "Option::is_none")]
    pub customer_reference: Option<String>,
}

impl CreatePhoneNumberPortInRequest {
    pub fn new(
        phone_numbers: Vec<String>,
        end_user: models::CreatePhoneNumberPortInRequestEndUser,
        loa_document_id: String,
        invoice_document_id: String,
    ) -> CreatePhoneNumberPortInRequest {
        CreatePhoneNumberPortInRequest {
            phone_numbers,
            end_user: Box::new(end_user),
            loa_document_id,
            invoice_document_id,
            foc_datetime_requested: None,
            customer_reference: None,
        }
    }
}
