mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
61 lines
2.2 KiB
Swift
61 lines
2.2 KiB
Swift
//
|
|
// SyncReq.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SyncReq: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** 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. */
|
|
public var actor: String?
|
|
/** Direction is both (the default), pull, push or off. */
|
|
public var direction: String?
|
|
/** Kind is what is being synced. Only \"git\" today, which is also the default. */
|
|
public var kind: String?
|
|
/** Run reconciles once immediately after the upsert, in the background. */
|
|
public var run: Bool?
|
|
/** Source is the upstream end. Required. */
|
|
public var source: EndpointReq?
|
|
/** Target is the downstream end. Optional for git: a native repository named after the source is derived when it is omitted. */
|
|
public var target: EndpointReq?
|
|
/** Trigger is what starts a reconcile: webhook (the default), poll or manual. */
|
|
public var trigger: String?
|
|
|
|
public init(actor: String? = nil, direction: String? = nil, kind: String? = nil, run: Bool? = nil, source: EndpointReq? = nil, target: EndpointReq? = nil, trigger: String? = nil) {
|
|
self.actor = actor
|
|
self.direction = direction
|
|
self.kind = kind
|
|
self.run = run
|
|
self.source = source
|
|
self.target = target
|
|
self.trigger = trigger
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case actor
|
|
case direction
|
|
case kind
|
|
case run
|
|
case source
|
|
case target
|
|
case trigger
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(actor, forKey: .actor)
|
|
try container.encodeIfPresent(direction, forKey: .direction)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(run, forKey: .run)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(target, forKey: .target)
|
|
try container.encodeIfPresent(trigger, forKey: .trigger)
|
|
}
|
|
}
|
|
|