internetdata 2.12.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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BitTorrentDetail {
    /// A client here answered, or two or more reported it at once.
    #[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
    pub verified: Option<bool>,
    /// A client here derived its node ID from the address (BEP 42).
    #[serde(rename = "id_matches_ip", skip_serializing_if = "Option::is_none")]
    pub id_matches_ip: Option<bool>,
    /// The first day a client was seen here.
    #[serde(rename = "first_seen", skip_serializing_if = "Option::is_none")]
    pub first_seen: Option<String>,
    /// The last day.
    #[serde(rename = "last_seen", skip_serializing_if = "Option::is_none")]
    pub last_seen: Option<String>,
    /// The last day one answered, empty when none did.
    #[serde(rename = "last_reachable", skip_serializing_if = "Option::is_none")]
    pub last_reachable: Option<String>,
    /// On how many days.
    #[serde(rename = "days_seen", skip_serializing_if = "Option::is_none")]
    pub days_seen: Option<i32>,
    /// Distinct ports over the window.
    #[serde(rename = "num_ports", skip_serializing_if = "Option::is_none")]
    pub num_ports: Option<i32>,
    /// The most on one day.
    #[serde(rename = "peak_num_ports", skip_serializing_if = "Option::is_none")]
    pub peak_num_ports: Option<i32>,
    /// A DHT indexer rather than people.
    #[serde(rename = "indexer", skip_serializing_if = "Option::is_none")]
    pub indexer: Option<bool>,
    /// The two-letter codes its clients name themselves by.
    #[serde(rename = "clients", skip_serializing_if = "Option::is_none")]
    pub clients: Option<Vec<String>>,
}

impl BitTorrentDetail {
    pub fn new() -> BitTorrentDetail {
        BitTorrentDetail {
            verified: None,
            id_matches_ip: None,
            first_seen: None,
            last_seen: None,
            last_reachable: None,
            days_seen: None,
            num_ports: None,
            peak_num_ports: None,
            indexer: None,
            clients: None,
        }
    }
}