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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Hotdata API
*
* Powerful data platform API for instant databases, queries, and analytics.
*
* The version of the OpenAPI document: 1.0.0
* Contact: developers@hotdata.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LineageForkInfo : One database forked directly from the one being asked about.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LineageForkInfo {
#[serde(rename = "database_id")]
pub database_id: String,
/// False once the fork has been deleted. The record of it is kept either way, so a source can still account for everything taken from it.
#[serde(rename = "exists")]
pub exists: bool,
/// When the fork was taken.
#[serde(
rename = "forked_at",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub forked_at: Option<Option<String>>,
/// Absent once the fork has been deleted — only the record of it remains.
#[serde(
rename = "name",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub name: Option<Option<String>>,
/// Version of this database's data that the fork copied. See `forked_from.snapshot_id`.
#[serde(
rename = "snapshot_id",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub snapshot_id: Option<Option<i64>>,
}
impl LineageForkInfo {
/// One database forked directly from the one being asked about.
pub fn new(database_id: String, exists: bool) -> LineageForkInfo {
LineageForkInfo {
database_id,
exists,
forked_at: None,
name: None,
snapshot_id: None,
}
}
}