rdap 0.2.0

A modern RDAP (Registration Data Access Protocol) client
Documentation
//! Entity (person / organization / role) model (RFC 7483 Section 5.1).

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

/// An entity representing a person, organization, or role (RFC 7483 Section 5.1).
///
/// Entities can appear as top-level query results or nested within other
/// objects (domains, ASNs, IP networks) as contacts.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Entity {
    /// RDAP object class name — `"entity"` 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. `"ORG-LA1994-RIPE"`, `"GOGL"`).
    #[serde(default)]
    pub handle: Option<String>,

    /// Contact information in jCard format ([RFC 7095]).
    #[serde(rename = "vcardArray", default)]
    pub vcard: Option<VCard>,

    /// Roles this entity plays relative to its parent (e.g. `"registrant"`, `"technical"`, `"abuse"`).
    #[serde(default)]
    pub roles: Vec<String>,

    /// Public identifiers (e.g. IANA Registrar ID).
    #[serde(rename = "publicIds", default)]
    pub public_ids: Vec<PublicId>,

    /// Nested entities (e.g. abuse contacts within an organization).
    #[serde(default)]
    pub entities: Vec<Entity>,

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

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

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

    /// Events where this entity was the actor (e.g. performed a transfer).
    #[serde(rename = "asEventActor", default)]
    pub as_event_actor: Vec<Event>,

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

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

    /// IP networks associated with this entity.
    #[serde(default)]
    pub networks: Vec<IpNetwork>,

    /// Autonomous System Numbers associated with this entity.
    #[serde(default)]
    pub autnums: Vec<Autnum>,

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