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.
76 lines
3.0 KiB
Swift
76 lines
3.0 KiB
Swift
//
|
|
// Consumer.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Consumer: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AckFloor is the highest contiguously acknowledged sequence pair. */
|
|
public var ackFloor: Sequences?
|
|
/** Config is the consumer's configuration. */
|
|
public var config: Durable?
|
|
/** Created is when the consumer was created. */
|
|
public var created: Date?
|
|
/** Delivered is the highest delivered sequence pair. */
|
|
public var delivered: Sequences?
|
|
/** Name is the consumer name. */
|
|
public var name: String?
|
|
/** AckPending is the number of delivered, not yet acknowledged messages. */
|
|
public var numAckPending: Int64?
|
|
/** Pending is the number of messages yet to be delivered. */
|
|
public var numPending: Int?
|
|
/** Redelivered is the number of messages currently being redelivered. */
|
|
public var numRedelivered: Int64?
|
|
/** Waiting is the number of pull requests waiting for messages. */
|
|
public var numWaiting: Int64?
|
|
/** Stream is the stream this consumer reads. */
|
|
public var streamName: String?
|
|
|
|
public init(ackFloor: Sequences? = nil, config: Durable? = nil, created: Date? = nil, delivered: Sequences? = nil, name: String? = nil, numAckPending: Int64? = nil, numPending: Int? = nil, numRedelivered: Int64? = nil, numWaiting: Int64? = nil, streamName: String? = nil) {
|
|
self.ackFloor = ackFloor
|
|
self.config = config
|
|
self.created = created
|
|
self.delivered = delivered
|
|
self.name = name
|
|
self.numAckPending = numAckPending
|
|
self.numPending = numPending
|
|
self.numRedelivered = numRedelivered
|
|
self.numWaiting = numWaiting
|
|
self.streamName = streamName
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case ackFloor = "ack_floor"
|
|
case config
|
|
case created
|
|
case delivered
|
|
case name
|
|
case numAckPending = "num_ack_pending"
|
|
case numPending = "num_pending"
|
|
case numRedelivered = "num_redelivered"
|
|
case numWaiting = "num_waiting"
|
|
case streamName = "stream_name"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(ackFloor, forKey: .ackFloor)
|
|
try container.encodeIfPresent(config, forKey: .config)
|
|
try container.encodeIfPresent(created, forKey: .created)
|
|
try container.encodeIfPresent(delivered, forKey: .delivered)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(numAckPending, forKey: .numAckPending)
|
|
try container.encodeIfPresent(numPending, forKey: .numPending)
|
|
try container.encodeIfPresent(numRedelivered, forKey: .numRedelivered)
|
|
try container.encodeIfPresent(numWaiting, forKey: .numWaiting)
|
|
try container.encodeIfPresent(streamName, forKey: .streamName)
|
|
}
|
|
}
|
|
|