hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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,
        }
    }
}