Skip to main content

internetdata/generated/models/
company.rs

1/*
2 * InternetData API
3 *
4 * 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.
5 *
6 * The version of the OpenAPI document: 2026.11.17
7 * Contact: support@internetdata.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Company : Who uses the address, from IP Company.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Company {
17    /// Who uses the address.
18    #[serde(rename = "name")]
19    pub name: String,
20    /// Their domain.
21    #[serde(rename = "domain")]
22    pub domain: String,
23    /// What kind of organization: hosting, isp, business, education, government. Paid plans and the trial.
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub r#type: Option<String>,
26    /// ISO 3166 country code. Paid plans and the trial.
27    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
28    pub country: Option<String>,
29}
30
31impl Company {
32    /// Who uses the address, from IP Company.
33    pub fn new(name: String, domain: String) -> Company {
34        Company { name, domain, r#type: None, country: None }
35    }
36}