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
/*
* 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 SyncReq {
/// Actor is the identity the sync writes as, used as the loop guard so its own writes do not re-trigger it. Defaults to the deployment's GIT_SYNC_ACTOR.
#[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
pub actor: Option<String>,
/// Direction is both (the default), pull, push or off.
#[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
pub direction: Option<String>,
/// Kind is what is being synced. Only \"git\" today, which is also the default.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Run reconciles once immediately after the upsert, in the background.
#[serde(rename = "run", skip_serializing_if = "Option::is_none")]
pub run: Option<bool>,
/// Source is the upstream end. Required.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<Box<models::EndpointReq>>,
/// Target is the downstream end. Optional for git: a native repository named after the source is derived when it is omitted.
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<Box<models::EndpointReq>>,
/// Trigger is what starts a reconcile: webhook (the default), poll or manual.
#[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
pub trigger: Option<String>,
}
impl SyncReq {
pub fn new() -> SyncReq {
SyncReq {
actor: None,
direction: None,
kind: None,
run: None,
source: None,
target: None,
trigger: None,
}
}
}