mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
81 lines
3.7 KiB
Swift
81 lines
3.7 KiB
Swift
//
|
|
// Durable.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Durable: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Ack is the acknowledgment policy: explicit (default), all, or none. */
|
|
public var ackPolicy: String?
|
|
/** AckWait is how long the broker waits for an ack before redelivering, e.g. \"30s\" (default). */
|
|
public var ackWait: String?
|
|
/** Deliver is where delivery starts: all (default), last, new, by_start_sequence, by_start_time, or last_per_subject. */
|
|
public var deliverPolicy: String?
|
|
/** Description says what this consumer is for. */
|
|
public var description: String?
|
|
/** Name is the durable consumer name (alphanumeric, hyphens, underscores). */
|
|
public var durableName: String?
|
|
/** Filter delivers only messages on this org-relative subject (wildcards supported). */
|
|
public var filterSubject: String?
|
|
/** MaxAckPending caps unacknowledged messages in flight (default 1000). */
|
|
public var maxAckPending: Int64?
|
|
/** MaxDeliver caps delivery attempts per message; -1 (default) is unlimited. */
|
|
public var maxDeliver: Int64?
|
|
/** StartSeq is the starting sequence for deliver_policy by_start_sequence. */
|
|
public var optStartSeq: Int?
|
|
/** StartTime is the starting instant for deliver_policy by_start_time. */
|
|
public var optStartTime: Date?
|
|
/** Replay is the replay pacing: instant (default) or original. */
|
|
public var replayPolicy: String?
|
|
|
|
public init(ackPolicy: String? = nil, ackWait: String? = nil, deliverPolicy: String? = nil, description: String? = nil, durableName: String? = nil, filterSubject: String? = nil, maxAckPending: Int64? = nil, maxDeliver: Int64? = nil, optStartSeq: Int? = nil, optStartTime: Date? = nil, replayPolicy: String? = nil) {
|
|
self.ackPolicy = ackPolicy
|
|
self.ackWait = ackWait
|
|
self.deliverPolicy = deliverPolicy
|
|
self.description = description
|
|
self.durableName = durableName
|
|
self.filterSubject = filterSubject
|
|
self.maxAckPending = maxAckPending
|
|
self.maxDeliver = maxDeliver
|
|
self.optStartSeq = optStartSeq
|
|
self.optStartTime = optStartTime
|
|
self.replayPolicy = replayPolicy
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case ackPolicy = "ack_policy"
|
|
case ackWait = "ack_wait"
|
|
case deliverPolicy = "deliver_policy"
|
|
case description
|
|
case durableName = "durable_name"
|
|
case filterSubject = "filter_subject"
|
|
case maxAckPending = "max_ack_pending"
|
|
case maxDeliver = "max_deliver"
|
|
case optStartSeq = "opt_start_seq"
|
|
case optStartTime = "opt_start_time"
|
|
case replayPolicy = "replay_policy"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(ackPolicy, forKey: .ackPolicy)
|
|
try container.encodeIfPresent(ackWait, forKey: .ackWait)
|
|
try container.encodeIfPresent(deliverPolicy, forKey: .deliverPolicy)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(durableName, forKey: .durableName)
|
|
try container.encodeIfPresent(filterSubject, forKey: .filterSubject)
|
|
try container.encodeIfPresent(maxAckPending, forKey: .maxAckPending)
|
|
try container.encodeIfPresent(maxDeliver, forKey: .maxDeliver)
|
|
try container.encodeIfPresent(optStartSeq, forKey: .optStartSeq)
|
|
try container.encodeIfPresent(optStartTime, forKey: .optStartTime)
|
|
try container.encodeIfPresent(replayPolicy, forKey: .replayPolicy)
|
|
}
|
|
}
|
|
|