1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* InternetData API
*
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
*
* The version of the OpenAPI document: 2026.11.17
* Contact: support@internetdata.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Asn : The network announcing the address, from IP ASN.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Asn {
/// The AS announcing the address, 0 where none does.
#[serde(rename = "asn")]
pub asn: i32,
/// Its operator.
#[serde(rename = "name")]
pub name: String,
/// Its operator's domain.
#[serde(rename = "domain")]
pub domain: String,
/// The kind of network it runs.
#[serde(rename = "type")]
pub r#type: String,
/// The announced prefix covering the address.
#[serde(rename = "prefix")]
pub prefix: String,
/// The country its registry assigned it to. Paid plans and the trial.
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// The announcement's RPKI status. Paid plans and the trial.
#[serde(rename = "rpki_status", skip_serializing_if = "Option::is_none")]
pub rpki_status: Option<String>,
}
impl Asn {
/// The network announcing the address, from IP ASN.
pub fn new(asn: i32, name: String, domain: String, r#type: String, prefix: String) -> Asn {
Asn { asn, name, domain, r#type, prefix, country: None, rpki_status: None }
}
}