Sources/OphanThrift/significantsite.swift (110 lines of code) (raw):

/** * Autogenerated by Thrift Compiler (0.21.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ import Foundation import Thrift public enum SignificantSite : TEnum { case guardian case guardian_email case guardian_push case google case twitter case facebook case reddit case drudge_report case outbrain case tumblr case pinterest case digg case stumbleupon case flipboard case linkedin case bing case spotlight case we_chat case whats_app case apple_news case in_shorts case upday case smart_news case news_break case instagram case threads case yahoo case duckduckgo public static func read(from proto: TProtocol) throws -> SignificantSite { let raw: Int32 = try proto.read() let new = SignificantSite(rawValue: raw) if let unwrapped = new { return unwrapped } else { throw TProtocolError(error: .invalidData, message: "Invalid enum value (\(raw)) for \(SignificantSite.self)") } } public init() { self = .guardian } public var rawValue: Int32 { switch self { case .guardian: return 0 case .guardian_email: return 1 case .guardian_push: return 15 case .google: return 2 case .twitter: return 3 case .facebook: return 4 case .reddit: return 5 case .drudge_report: return 6 case .outbrain: return 7 case .tumblr: return 8 case .pinterest: return 9 case .digg: return 10 case .stumbleupon: return 11 case .flipboard: return 12 case .linkedin: return 13 case .bing: return 14 case .spotlight: return 16 case .we_chat: return 17 case .whats_app: return 18 case .apple_news: return 19 case .in_shorts: return 20 case .upday: return 21 case .smart_news: return 22 case .news_break: return 23 case .instagram: return 24 case .threads: return 25 case .yahoo: return 26 case .duckduckgo: return 27 } } public init?(rawValue: Int32) { switch rawValue { case 0: self = .guardian case 1: self = .guardian_email case 15: self = .guardian_push case 2: self = .google case 3: self = .twitter case 4: self = .facebook case 5: self = .reddit case 6: self = .drudge_report case 7: self = .outbrain case 8: self = .tumblr case 9: self = .pinterest case 10: self = .digg case 11: self = .stumbleupon case 12: self = .flipboard case 13: self = .linkedin case 14: self = .bing case 16: self = .spotlight case 17: self = .we_chat case 18: self = .whats_app case 19: self = .apple_news case 20: self = .in_shorts case 21: self = .upday case 22: self = .smart_news case 23: self = .news_break case 24: self = .instagram case 25: self = .threads case 26: self = .yahoo case 27: self = .duckduckgo default: return nil } } }