rdap 0.2.0

A modern RDAP (Registration Data Access Protocol) client
Documentation
//! Autonomous System Number model (RFC 7483 Section 5.5).

use super::*;
use serde::{Deserialize, Serialize};

/// Autonomous System Number (ASN) allocation information (RFC 7483 Section 5.5).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Autnum {
    /// RDAP object class name — `"autnum"` when present.
    #[serde(rename = "objectClassName", default)]
    pub object_class_name: Option<String>,

    /// RDAP conformance extensions advertised by the server.
    #[serde(rename = "rdapConformance", default)]
    pub conformance: Vec<String>,

    /// Server-level notices.
    #[serde(default)]
    pub notices: Vec<Notice>,

    /// Registry-unique handle (e.g. `"AS213605"`).
    #[serde(default)]
    pub handle: Option<String>,

    /// First AS number in the allocation range.
    #[serde(rename = "startAutnum", default)]
    pub start_autnum: Option<u32>,

    /// Last AS number in the allocation range (equals `start_autnum` for a single ASN).
    #[serde(rename = "endAutnum", default)]
    pub end_autnum: Option<u32>,

    /// IP version (`"v4"` or `"v6"`) if the ASN is version-specific.
    #[serde(rename = "ipVersion", default)]
    pub ip_version: Option<String>,

    /// Descriptive name of the AS (e.g. `"GOOGLE"`, `"Pysio-Research-NetWork"`).
    #[serde(default)]
    pub name: Option<String>,

    /// Allocation type (e.g. `"DIRECT ALLOCATION"`).
    #[serde(rename = "type", default)]
    pub as_type: Option<String>,

    /// Status values (e.g. `"active"`).
    #[serde(default)]
    pub status: Status,

    /// Two-letter country code of the ASN holder.
    #[serde(default)]
    pub country: Option<String>,

    /// Associated entities (admin, tech, abuse contacts, etc.).
    #[serde(default)]
    pub entities: Vec<Entity>,

    /// Remarks attached to this ASN object.
    #[serde(default)]
    pub remarks: Vec<Remark>,

    /// Links related to this ASN.
    #[serde(default)]
    pub links: Vec<Link>,

    /// WHOIS server hostname (legacy, RFC 3912).
    #[serde(default)]
    pub port43: Option<String>,

    /// Lifecycle events (registration, last changed, etc.).
    #[serde(default)]
    pub events: Vec<Event>,

    /// Language tag of the response (BCP 47).
    #[serde(default)]
    pub lang: Option<String>,
}