1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 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 DatabaseVersion {
/// The versioned ID. Pass this to `download`, `checksum` and `metadata`.
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "version")]
pub version: i32,
#[serde(rename = "summary")]
pub summary: String,
/// The formats this version is BUILT in. Asking for another is a 400, not a gap - the `_provider` catalogs are keyed by provider ID, so no MMDB exists for them.
#[serde(rename = "formats")]
pub formats: Vec<models::DatabaseFormat>,
/// The formats an evaluation sample is published in, if any.
#[serde(rename = "sample_formats", skip_serializing_if = "Option::is_none")]
pub sample_formats: Option<Vec<models::DatabaseFormat>>,
}
impl DatabaseVersion {
pub fn new(
id: String,
version: i32,
summary: String,
formats: Vec<models::DatabaseFormat>,
) -> DatabaseVersion {
DatabaseVersion { id, version, summary, formats, sample_formats: None }
}
}