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
60
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SyncView {
/// Actor is the identity a reconcile writes AS. It is the loop guard: a change this identity made is one we already have, so it is not synced back.
#[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
pub actor: Option<String>,
/// CreatedAt is when the link was first declared, RFC3339 in UTC.
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// Direction is which way work flows: \"both\", \"pull\" (target ← source), \"push\" (source → target), or \"off\" — which keeps the link declared and moves nothing.
#[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
pub direction: Option<String>,
/// ID is the link's handle, derived from its source and target — which is what makes re-declaring the same pair an update rather than a duplicate.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Kind is what is being synced. \"git\" today; the field exists so a storage or database link is a value here rather than a second route family.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Source is the side read FROM on a pull.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<Box<models::EndpointView>>,
/// Target is the side written TO on a push.
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<Box<models::EndpointView>>,
/// Trigger is what starts a reconcile: \"webhook\" (the provider tells us), \"poll\" (we ask on a schedule), or \"manual\" (only an explicit call).
#[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
pub trigger: Option<String>,
/// UpdatedAt is bumped by every reconcile, so it reads as the LAST-SYNCED time rather than the last edit. Absent until the first one runs.
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl SyncView {
pub fn new() -> SyncView {
SyncView {
actor: None,
created_at: None,
direction: None,
id: None,
kind: None,
source: None,
target: None,
trigger: None,
updated_at: None,
}
}
}