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
/*
* InternetData API
*
* The InternetData API. Please see https://docs.internetdata.io/api for more details.
*
* The version of the OpenAPI document: 2026.09.13
* Contact: dev@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>,
}
impl DatabaseVersion {
pub fn new(
id: String,
version: i32,
summary: String,
formats: Vec<models::DatabaseFormat>,
) -> DatabaseVersion {
DatabaseVersion { id, version, summary, formats }
}
}