/*
 * 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};

/// CreatePhoneNumberPortInRequestEndUser : End-user / current-carrier account info that authorizes the port.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreatePhoneNumberPortInRequestEndUser {
    #[serde(rename = "entityName")]
    pub entity_name: String,
    #[serde(rename = "authPersonName")]
    pub auth_person_name: String,
    #[serde(rename = "billingPhoneNumber", skip_serializing_if = "Option::is_none")]
    pub billing_phone_number: Option<String>,
    #[serde(rename = "accountNumber", skip_serializing_if = "Option::is_none")]
    pub account_number: Option<String>,
    /// Transfer PIN. Forwarded to the carrier, never stored.
    #[serde(rename = "pinPasscode", skip_serializing_if = "Option::is_none")]
    pub pin_passcode: Option<String>,
    #[serde(rename = "streetAddress")]
    pub street_address: String,
    #[serde(rename = "extendedAddress", skip_serializing_if = "Option::is_none")]
    pub extended_address: Option<String>,
    #[serde(rename = "locality")]
    pub locality: String,
    #[serde(rename = "administrativeArea")]
    pub administrative_area: String,
    #[serde(rename = "postalCode")]
    pub postal_code: String,
    #[serde(rename = "countryCode")]
    pub country_code: String,
}

impl CreatePhoneNumberPortInRequestEndUser {
    /// End-user / current-carrier account info that authorizes the port.
    pub fn new(
        entity_name: String,
        auth_person_name: String,
        street_address: String,
        locality: String,
        administrative_area: String,
        postal_code: String,
        country_code: String,
    ) -> CreatePhoneNumberPortInRequestEndUser {
        CreatePhoneNumberPortInRequestEndUser {
            entity_name,
            auth_person_name,
            billing_phone_number: None,
            account_number: None,
            pin_passcode: None,
            street_address,
            extended_address: None,
            locality,
            administrative_area,
            postal_code,
            country_code,
        }
    }
}
