| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- import Foundation
- import FirebaseDataConnect
- public struct LargeIntTypeKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension LargeIntTypeKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension LargeIntTypeKey: Equatable {
- public static func == (lhs: LargeIntTypeKey, rhs: LargeIntTypeKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension LargeIntTypeKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
- public struct LocalDateTypeKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension LocalDateTypeKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension LocalDateTypeKey: Equatable {
- public static func == (lhs: LocalDateTypeKey, rhs: LocalDateTypeKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension LocalDateTypeKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
- public struct ScalarBoundaryKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension ScalarBoundaryKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension ScalarBoundaryKey: Equatable {
- public static func == (lhs: ScalarBoundaryKey, rhs: ScalarBoundaryKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension ScalarBoundaryKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
- public struct StandardScalarsKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension StandardScalarsKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension StandardScalarsKey: Equatable {
- public static func == (lhs: StandardScalarsKey, rhs: StandardScalarsKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension StandardScalarsKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
- public struct TestAutoIdKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension TestAutoIdKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension TestAutoIdKey: Equatable {
- public static func == (lhs: TestAutoIdKey, rhs: TestAutoIdKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension TestAutoIdKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
- public struct TestIdKey {
- public private(set) var id: UUID
- enum CodingKeys: String, CodingKey {
- case id
- }
- }
- @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
- extension TestIdKey: Codable {
- public init(from decoder: any Decoder) throws {
- var container = try decoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- id = try codecHelper.decode(UUID.self, forKey: .id, container: &container)
- }
- public func encode(to encoder: Encoder) throws {
- var container = encoder.container(keyedBy: CodingKeys.self)
- let codecHelper = CodecHelper<CodingKeys>()
- try codecHelper.encode(id, forKey: .id, container: &container)
- }
- }
- extension TestIdKey: Equatable {
- public static func == (lhs: TestIdKey, rhs: TestIdKey) -> Bool {
- if lhs.id != rhs.id {
- return false
- }
- return true
- }
- }
- extension TestIdKey: Hashable {
- public func hash(into hasher: inout Hasher) {
- hasher.combine(id)
- }
- }
|