internetdata 3.0.0

The official Rust client library for the InternetData API: look up IP addresses, AS numbers and domains, and download the IP intelligence databases.
Documentation
/*
 * 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};

/// Whois : IP Whois's most specific record covering the address. Paid plans and the trial.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Whois {
    /// Network name of the most specific record covering the address.
    #[serde(rename = "id")]
    pub id: String,
    /// Its holder.
    #[serde(rename = "name")]
    pub name: String,
    /// The registry's handle for the holder.
    #[serde(rename = "org")]
    pub org: String,
    /// ISO 3166 country code.
    #[serde(rename = "country")]
    pub country: String,
    /// The registry's assignment status.
    #[serde(rename = "status")]
    pub status: String,
    /// The registry, or rwhois.
    #[serde(rename = "source")]
    pub source: String,
    /// The holder's domain.
    #[serde(rename = "domain")]
    pub domain: String,
    /// The record's abuse contact.
    #[serde(rename = "abuse_email")]
    pub abuse_email: String,
    /// The AS announcing the record's start address.
    #[serde(rename = "asn")]
    pub asn: i32,
}

impl Whois {
    /// IP Whois's most specific record covering the address. Paid plans and the trial.
    pub fn new(
        id: String,
        name: String,
        org: String,
        country: String,
        status: String,
        source: String,
        domain: String,
        abuse_email: String,
        asn: i32,
    ) -> Whois {
        Whois { id, name, org, country, status, source, domain, abuse_email, asn }
    }
}