rdap 0.2.0

A modern RDAP (Registration Data Access Protocol) client
Documentation
//! IP Network model (RFC 7483 Section 5.4).

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

/// IP network allocation information (RFC 7483 Section 5.4).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IpNetwork {
    /// RDAP object class name — `"ip network"` 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. `"NET-8-8-8-0-2"`).
    #[serde(default)]
    pub handle: Option<String>,

    /// Starting IP address of the network range.
    #[serde(rename = "startAddress", default)]
    pub start_address: Option<String>,

    /// Ending IP address of the network range.
    #[serde(rename = "endAddress", default)]
    pub end_address: Option<String>,

    /// IP version — `"v4"` or `"v6"`.
    #[serde(rename = "ipVersion", default)]
    pub ip_version: Option<String>,

    /// Descriptive name of the network (e.g. `"GOGL"`, `"APNIC-LABS"`).
    #[serde(default)]
    pub name: Option<String>,

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

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

    /// Handle of the parent network (e.g. `"NET-8-0-0-0-0"`).
    #[serde(rename = "parentHandle", default)]
    pub parent_handle: Option<String>,

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

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

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

    /// Links related to this network.
    #[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>,
}