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};
/// LineageAncestorInfo : One database up a fork chain.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LineageAncestorInfo {
#[serde(rename = "database_id")]
pub database_id: String,
/// False once the ancestor has been deleted. Its place in the chain is kept either way, and the ancestry continues past it.
#[serde(rename = "exists")]
pub exists: bool,
/// When the next database down the chain was forked from it.
#[serde(
rename = "forked_at",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub forked_at: Option<Option<String>>,
/// The ancestor's current label, or the one captured at fork time when it no longer exists.
#[serde(
rename = "name",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub name: Option<Option<String>>,
/// Version of this ancestor's data that the next database down the chain 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 LineageAncestorInfo {
/// One database up a fork chain.
pub fn new(database_id: String, exists: bool) -> LineageAncestorInfo {
LineageAncestorInfo {
database_id,
exists,
forked_at: None,
name: None,
snapshot_id: None,
}
}
}