mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-15 10:44:18 +00:00
79 lines
3.7 KiB
Rust
79 lines
3.7 KiB
Rust
/*
|
|
* Tribufu API
|
|
*
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.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 = "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 = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub region: 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,
|
|
asn: None,
|
|
isp: None,
|
|
continent: None,
|
|
country: None,
|
|
region: None,
|
|
city: None,
|
|
postal_code: None,
|
|
calling_code: None,
|
|
tld: None,
|
|
language: None,
|
|
timezone: None,
|
|
currency: None,
|
|
latitude: None,
|
|
longitude: None,
|
|
}
|
|
}
|
|
}
|
|
|