Skip to main content

hanzo_client/models/
sync_req.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SyncReq {
16    /// 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.
17    #[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
18    pub actor: Option<String>,
19    /// Direction is both (the default), pull, push or off.
20    #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
21    pub direction: Option<String>,
22    /// Kind is what is being synced. Only \"git\" today, which is also the default.
23    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
24    pub kind: Option<String>,
25    /// Run reconciles once immediately after the upsert, in the background.
26    #[serde(rename = "run", skip_serializing_if = "Option::is_none")]
27    pub run: Option<bool>,
28    /// Source is the upstream end. Required.
29    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
30    pub source: Option<Box<models::EndpointReq>>,
31    /// Target is the downstream end. Optional for git: a native repository named after the source is derived when it is omitted.
32    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
33    pub target: Option<Box<models::EndpointReq>>,
34    /// Trigger is what starts a reconcile: webhook (the default), poll or manual.
35    #[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
36    pub trigger: Option<String>,
37}
38
39impl SyncReq {
40    pub fn new() -> SyncReq {
41        SyncReq {
42            actor: None,
43            direction: None,
44            kind: None,
45            run: None,
46            source: None,
47            target: None,
48            trigger: None,
49        }
50    }
51}
52