-
Notifications
You must be signed in to change notification settings - Fork 9
/
StreamTransactionsResponse.swift
53 lines (43 loc) · 1.76 KB
/
StreamTransactionsResponse.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// StreamTransactionsResponse.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
@available(*, deprecated, renamed: "GatewayAPI.StreamTransactionsResponse")
public typealias StreamTransactionsResponse = GatewayAPI.StreamTransactionsResponse
extension GatewayAPI {
public struct StreamTransactionsResponse: Codable, Hashable {
public private(set) var ledgerState: LedgerState
/** Total number of items in underlying collection, fragment of which is available in `items` collection. */
public private(set) var totalCount: Int64?
/** If specified, contains a cursor to query next page of the `items` collection. */
public private(set) var nextCursor: String?
/** The page of user transactions. */
public private(set) var items: [CommittedTransactionInfo]
public init(ledgerState: LedgerState, totalCount: Int64? = nil, nextCursor: String? = nil, items: [CommittedTransactionInfo]) {
self.ledgerState = ledgerState
self.totalCount = totalCount
self.nextCursor = nextCursor
self.items = items
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case ledgerState = "ledger_state"
case totalCount = "total_count"
case nextCursor = "next_cursor"
case items
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(ledgerState, forKey: .ledgerState)
try container.encodeIfPresent(totalCount, forKey: .totalCount)
try container.encodeIfPresent(nextCursor, forKey: .nextCursor)
try container.encode(items, forKey: .items)
}
}
}