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
46
47
48
49
50
51
/*
* 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.15
* Contact: support@internetdata.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AsnPrefix {
/// The announced prefix.
#[serde(rename = "prefix")]
pub prefix: String,
/// How many peers saw it.
#[serde(rename = "peer_count")]
pub peer_count: i32,
/// Its RPKI status.
#[serde(rename = "rpki_status")]
pub rpki_status: String,
/// The first day BGP Route saw it.
#[serde(rename = "first_seen")]
pub first_seen: String,
/// Where its first address is.
#[serde(rename = "country")]
pub country: String,
/// IPv4 addresses it covers; 0 for IPv6.
#[serde(rename = "size")]
pub size: i32,
/// Every other AS announcing it.
#[serde(rename = "other_origins")]
pub other_origins: Vec<i32>,
}
impl AsnPrefix {
pub fn new(
prefix: String,
peer_count: i32,
rpki_status: String,
first_seen: String,
country: String,
size: i32,
other_origins: Vec<i32>,
) -> AsnPrefix {
AsnPrefix { prefix, peer_count, rpki_status, first_seen, country, size, other_origins }
}
}