/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IpAddress {
    #[serde(rename = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub address: Option<Option<String>>,
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    #[serde(rename = "network", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub network: Option<Option<String>>,
    #[serde(rename = "reserved", skip_serializing_if = "Option::is_none")]
    pub reserved: Option<bool>,
    #[serde(rename = "banned", skip_serializing_if = "Option::is_none")]
    pub banned: Option<bool>,
    #[serde(rename = "asn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub asn: Option<Option<String>>,
    #[serde(rename = "isp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub isp: Option<Option<String>>,
    #[serde(rename = "continent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub continent: Option<Option<String>>,
    #[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub country: Option<Option<String>>,
    #[serde(rename = "province", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub province: Option<Option<String>>,
    #[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub city: Option<Option<String>>,
    #[serde(rename = "postal_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub postal_code: Option<Option<String>>,
    #[serde(rename = "calling_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub calling_code: Option<Option<String>>,
    #[serde(rename = "tld", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub tld: Option<Option<String>>,
    #[serde(rename = "language", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub language: Option<Option<String>>,
    #[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub timezone: Option<Option<String>>,
    #[serde(rename = "currency", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub currency: Option<Option<String>>,
    #[serde(rename = "latitude", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub latitude: Option<Option<f32>>,
    #[serde(rename = "longitude", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub longitude: Option<Option<f32>>,
}

impl IpAddress {
    pub fn new() -> IpAddress {
        IpAddress {
            address: None,
            version: None,
            network: None,
            reserved: None,
            banned: None,
            asn: None,
            isp: None,
            continent: None,
            country: None,
            province: None,
            city: None,
            postal_code: None,
            calling_code: None,
            tld: None,
            language: None,
            timezone: None,
            currency: None,
            latitude: None,
            longitude: None,
        }
    }
}

