123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119 |
- // _____ _
- // |_ _| |_ _ _ ___ ___ _ __ __ _
- // | | | ' \| '_/ -_) -_) ' \/ _` |_
- // |_| |_||_|_| \___\___|_|_|_\__,_(_)
- //
- // Threema iOS Client
- // Copyright (c) 2020 Threema GmbH
- //
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU Affero General Public License, version 3,
- // as published by the Free Software Foundation.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU Affero General Public License for more details.
- //
- // You should have received a copy of the GNU Affero General Public License
- // along with this program. If not, see <https://www.gnu.org/licenses/>.
- import Foundation
- import SwiftProtobuf
- // If the compiler emits an error on this type, it is because this file
- // was generated by a version of the `protoc` Swift plug-in that is
- // incompatible with the version of SwiftProtobuf to which you are linking.
- // Please ensure that you are building against the same version of the API
- // that was used to generate this file.
- fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- /// Message type as defined by the Chat Server Protocol.
- enum D2d_MessageType: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Invalid message type
- case invalid // = 0
- /// Text message
- case text // = 1
- /// Image message (deprecated, use `FILE_MESSAGE`)
- case image // = 2
- /// Location message
- case location // = 16
- /// Audio message (deprecated, use `FILE_MESSAGE`)
- case audio // = 20
- /// Video message (deprecated, use `FILE_MESSAGE`)
- case video // = 19
- /// File message
- case file // = 23
- /// Create a poll
- case pollCreate // = 21
- /// Cast a vote on a poll
- case pollVote // = 22
- /// Call offer
- case callOffer // = 96
- /// Call answer
- case callAnswer // = 97
- /// Call ICE Candidate
- case callIceCandidate // = 98
- /// Call hangup
- case callHangup // = 99
- /// Call ringing
- case callRinging // = 100
- /// Call missed
- case callMissed // = 101
- /// Delivery receipt
- case deliveryReceipt // = 128
- /// Typing indicator
- case typingIndicator // = 144
- /// Set profile picture of a contact
- case contactSetProfilePicture // = 24
- /// Delete profile picture of a contact
- case contactDeleteProfilePicture // = 25
- /// Request profile picture of a contact
- case contactRequestProfilePicture // = 26
- /// Create a group
- case groupCreate // = 74
- /// Rename a group
- case groupRename // = 75
- /// Leave a group
- case groupLeave // = 76
- /// Set a group's profile picture
- case groupSetProfilePicture // = 80
- /// Delete a group's profile picture
- case groupDeleteProfilePicture // = 84
- /// Request group synchronisation
- case groupRequestSync // = 81
- /// Group text message
- case groupText // = 65
- /// Group location message
- case groupLocation // = 66
- /// Group image message
- case groupImage // = 67
- /// Group audio message
- case groupAudio // = 69
- /// Group video message
- case groupVideo // = 68
- /// Group file message
- case groupFile // = 70
- /// Create a group poll
- case groupPollCreate // = 82
- /// Cast a vote on a group poll
- case groupPollVote // = 83
- case UNRECOGNIZED(Int)
- init() {
- self = .invalid
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .invalid
- case 1: self = .text
- case 2: self = .image
- case 16: self = .location
- case 19: self = .video
- case 20: self = .audio
- case 21: self = .pollCreate
- case 22: self = .pollVote
- case 23: self = .file
- case 24: self = .contactSetProfilePicture
- case 25: self = .contactDeleteProfilePicture
- case 26: self = .contactRequestProfilePicture
- case 65: self = .groupText
- case 66: self = .groupLocation
- case 67: self = .groupImage
- case 68: self = .groupVideo
- case 69: self = .groupAudio
- case 70: self = .groupFile
- case 74: self = .groupCreate
- case 75: self = .groupRename
- case 76: self = .groupLeave
- case 80: self = .groupSetProfilePicture
- case 81: self = .groupRequestSync
- case 82: self = .groupPollCreate
- case 83: self = .groupPollVote
- case 84: self = .groupDeleteProfilePicture
- case 96: self = .callOffer
- case 97: self = .callAnswer
- case 98: self = .callIceCandidate
- case 99: self = .callHangup
- case 100: self = .callRinging
- case 101: self = .callMissed
- case 128: self = .deliveryReceipt
- case 144: self = .typingIndicator
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .invalid: return 0
- case .text: return 1
- case .image: return 2
- case .location: return 16
- case .video: return 19
- case .audio: return 20
- case .pollCreate: return 21
- case .pollVote: return 22
- case .file: return 23
- case .contactSetProfilePicture: return 24
- case .contactDeleteProfilePicture: return 25
- case .contactRequestProfilePicture: return 26
- case .groupText: return 65
- case .groupLocation: return 66
- case .groupImage: return 67
- case .groupVideo: return 68
- case .groupAudio: return 69
- case .groupFile: return 70
- case .groupCreate: return 74
- case .groupRename: return 75
- case .groupLeave: return 76
- case .groupSetProfilePicture: return 80
- case .groupRequestSync: return 81
- case .groupPollCreate: return 82
- case .groupPollVote: return 83
- case .groupDeleteProfilePicture: return 84
- case .callOffer: return 96
- case .callAnswer: return 97
- case .callIceCandidate: return 98
- case .callHangup: return 99
- case .callRinging: return 100
- case .callMissed: return 101
- case .deliveryReceipt: return 128
- case .typingIndicator: return 144
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- #if swift(>=4.2)
- extension D2d_MessageType: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MessageType] = [
- .invalid,
- .text,
- .image,
- .location,
- .audio,
- .video,
- .file,
- .pollCreate,
- .pollVote,
- .callOffer,
- .callAnswer,
- .callIceCandidate,
- .callHangup,
- .callRinging,
- .callMissed,
- .deliveryReceipt,
- .typingIndicator,
- .contactSetProfilePicture,
- .contactDeleteProfilePicture,
- .contactRequestProfilePicture,
- .groupCreate,
- .groupRename,
- .groupLeave,
- .groupSetProfilePicture,
- .groupDeleteProfilePicture,
- .groupRequestSync,
- .groupText,
- .groupLocation,
- .groupImage,
- .groupAudio,
- .groupVideo,
- .groupFile,
- .groupPollCreate,
- .groupPollVote,
- ]
- }
- #endif // swift(>=4.2)
- /// Initial data sent to a device that wants to participate in the device
- /// group (i.e. a new device to be added by the user).
- struct D2d_InitialData {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Threema Safe Backup
- var backup: Safe_Backup {
- get {return _backup ?? Safe_Backup()}
- set {_backup = newValue}
- }
- /// Returns true if `backup` has been explicitly set.
- var hasBackup: Bool {return self._backup != nil}
- /// Clears the value of `backup`. Subsequent reads from it will return its default value.
- mutating func clearBackup() {self._backup = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _backup: Safe_Backup? = nil
- }
- /// Data shared across all devices and transmitted during the handshake.
- struct D2d_SharedDeviceData {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Random amount of padding, ignored by the receiver
- var padding: Data = SwiftProtobuf.Internal.emptyData
- /// MDM parameters to be applied on all devices
- var mdmParameters: D2d_MdmParameters {
- get {return _mdmParameters ?? D2d_MdmParameters()}
- set {_mdmParameters = newValue}
- }
- /// Returns true if `mdmParameters` has been explicitly set.
- var hasMdmParameters: Bool {return self._mdmParameters != nil}
- /// Clears the value of `mdmParameters`. Subsequent reads from it will return its default value.
- mutating func clearMdmParameters() {self._mdmParameters = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _mdmParameters: D2d_MdmParameters? = nil
- }
- /// Metadata about a device, determined by the device itself.
- struct D2d_DeviceInfo {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Random amount of padding, ignored by the receiver
- var padding: Data = SwiftProtobuf.Internal.emptyData
- var platform: D2d_DeviceInfo.Platform = .unspecified
- /// App version
- var appVersion: String = String()
- /// Device description (smartphone model / browser)
- var description_p: String = String()
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Platform
- enum Platform: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Unknown platform
- case unspecified // = 0
- /// Android
- case android // = 1
- /// Apple iOS
- case ios // = 2
- /// Web application
- case web // = 3
- case UNRECOGNIZED(Int)
- init() {
- self = .unspecified
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unspecified
- case 1: self = .android
- case 2: self = .ios
- case 3: self = .web
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .unspecified: return 0
- case .android: return 1
- case .ios: return 2
- case .web: return 3
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- init() {}
- }
- #if swift(>=4.2)
- extension D2d_DeviceInfo.Platform: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_DeviceInfo.Platform] = [
- .unspecified,
- .android,
- .ios,
- .web,
- ]
- }
- #endif // swift(>=4.2)
- /// A transaction scope. Used in the d2m transaction messages.
- struct D2d_TransactionScope {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var scope: D2d_TransactionScope.Scope = .userProfileSync
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum Scope: SwiftProtobuf.Enum {
- typealias RawValue = Int
- case userProfileSync // = 0
- case contactSync // = 1
- case groupSync // = 2
- case distributionListSync // = 3
- case settingsSync // = 4
- case UNRECOGNIZED(Int)
- init() {
- self = .userProfileSync
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .userProfileSync
- case 1: self = .contactSync
- case 2: self = .groupSync
- case 3: self = .distributionListSync
- case 4: self = .settingsSync
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .userProfileSync: return 0
- case .contactSync: return 1
- case .groupSync: return 2
- case .distributionListSync: return 3
- case .settingsSync: return 4
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- init() {}
- }
- #if swift(>=4.2)
- extension D2d_TransactionScope.Scope: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_TransactionScope.Scope] = [
- .userProfileSync,
- .contactSync,
- .groupSync,
- .distributionListSync,
- .settingsSync,
- ]
- }
- #endif // swift(>=4.2)
- /// Root message
- struct D2d_Envelope {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Random amount of padding, ignored by the receiver
- var padding: Data = SwiftProtobuf.Internal.emptyData
- /// The enveloped reflected message
- var content: D2d_Envelope.OneOf_Content? = nil
- var outgoingMessage: D2d_OutgoingMessage {
- get {
- if case .outgoingMessage(let v)? = content {return v}
- return D2d_OutgoingMessage()
- }
- set {content = .outgoingMessage(newValue)}
- }
- var incomingMessage: D2d_IncomingMessage {
- get {
- if case .incomingMessage(let v)? = content {return v}
- return D2d_IncomingMessage()
- }
- set {content = .incomingMessage(newValue)}
- }
- var userProfileSync: D2d_UserProfileSync {
- get {
- if case .userProfileSync(let v)? = content {return v}
- return D2d_UserProfileSync()
- }
- set {content = .userProfileSync(newValue)}
- }
- var contactSync: D2d_ContactSync {
- get {
- if case .contactSync(let v)? = content {return v}
- return D2d_ContactSync()
- }
- set {content = .contactSync(newValue)}
- }
- var groupSync: D2d_GroupSync {
- get {
- if case .groupSync(let v)? = content {return v}
- return D2d_GroupSync()
- }
- set {content = .groupSync(newValue)}
- }
- var distributionListSync: D2d_DistributionListSync {
- get {
- if case .distributionListSync(let v)? = content {return v}
- return D2d_DistributionListSync()
- }
- set {content = .distributionListSync(newValue)}
- }
- var settingsSync: D2d_SettingsSync {
- get {
- if case .settingsSync(let v)? = content {return v}
- return D2d_SettingsSync()
- }
- set {content = .settingsSync(newValue)}
- }
- var mdmParameters: D2d_MdmParameters {
- get {
- if case .mdmParameters(let v)? = content {return v}
- return D2d_MdmParameters()
- }
- set {content = .mdmParameters(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// The enveloped reflected message
- enum OneOf_Content: Equatable {
- case outgoingMessage(D2d_OutgoingMessage)
- case incomingMessage(D2d_IncomingMessage)
- case userProfileSync(D2d_UserProfileSync)
- case contactSync(D2d_ContactSync)
- case groupSync(D2d_GroupSync)
- case distributionListSync(D2d_DistributionListSync)
- case settingsSync(D2d_SettingsSync)
- case mdmParameters(D2d_MdmParameters)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_Envelope.OneOf_Content, rhs: D2d_Envelope.OneOf_Content) -> Bool {
- switch (lhs, rhs) {
- case (.outgoingMessage(let l), .outgoingMessage(let r)): return l == r
- case (.incomingMessage(let l), .incomingMessage(let r)): return l == r
- case (.userProfileSync(let l), .userProfileSync(let r)): return l == r
- case (.contactSync(let l), .contactSync(let r)): return l == r
- case (.groupSync(let l), .groupSync(let r)): return l == r
- case (.distributionListSync(let l), .distributionListSync(let r)): return l == r
- case (.settingsSync(let l), .settingsSync(let r)): return l == r
- case (.mdmParameters(let l), .mdmParameters(let r)): return l == r
- default: return false
- }
- }
- #endif
- }
- init() {}
- }
- /// Mobile device management parameters shared across Threema Work devices.
- ///
- /// More detailed parameter information is available here:
- /// https://work.threema.ch/en/docs/mdm_configuration
- struct D2d_MdmParameters {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Username required for activation of the app
- /// References: `th_license_username`
- var licenseUsername: OneOf_LicenseUsername? {
- get {return _storage._licenseUsername}
- set {_uniqueStorage()._licenseUsername = newValue}
- }
- var licenseUsernameValue: String {
- get {
- if case .licenseUsernameValue(let v)? = _storage._licenseUsername {return v}
- return String()
- }
- set {_uniqueStorage()._licenseUsername = .licenseUsernameValue(newValue)}
- }
- /// Password required for activation of the app
- /// References: `th_license_password`
- var licensePassword: OneOf_LicensePassword? {
- get {return _storage._licensePassword}
- set {_uniqueStorage()._licensePassword = newValue}
- }
- var licensePasswordValue: String {
- get {
- if case .licensePasswordValue(let v)? = _storage._licensePassword {return v}
- return String()
- }
- set {_uniqueStorage()._licensePassword = .licensePasswordValue(newValue)}
- }
- /// Nickname to be used
- /// References: `th_nickname`
- var nickname: OneOf_Nickname? {
- get {return _storage._nickname}
- set {_uniqueStorage()._nickname = newValue}
- }
- var nicknameValue: String {
- get {
- if case .nicknameValue(let v)? = _storage._nickname {return v}
- return String()
- }
- set {_uniqueStorage()._nickname = .nicknameValue(newValue)}
- }
- /// First name of the user
- /// References: `th_firstname`
- var firstName: OneOf_FirstName? {
- get {return _storage._firstName}
- set {_uniqueStorage()._firstName = newValue}
- }
- var firstNameValue: String {
- get {
- if case .firstNameValue(let v)? = _storage._firstName {return v}
- return String()
- }
- set {_uniqueStorage()._firstName = .firstNameValue(newValue)}
- }
- /// Last name of the user
- /// References: `th_lastname`
- var lastName: OneOf_LastName? {
- get {return _storage._lastName}
- set {_uniqueStorage()._lastName = newValue}
- }
- var lastNameValue: String {
- get {
- if case .lastNameValue(let v)? = _storage._lastName {return v}
- return String()
- }
- set {_uniqueStorage()._lastName = .lastNameValue(newValue)}
- }
- /// Customer specific identifier
- /// References: `th_csi`
- var customerSpecificID: OneOf_CustomerSpecificID? {
- get {return _storage._customerSpecificID}
- set {_uniqueStorage()._customerSpecificID = newValue}
- }
- var customerSpecificIDValue: String {
- get {
- if case .customerSpecificIDValue(let v)? = _storage._customerSpecificID {return v}
- return String()
- }
- set {_uniqueStorage()._customerSpecificID = .customerSpecificIDValue(newValue)}
- }
- /// User category
- /// References: `th_category`
- var category: OneOf_Category? {
- get {return _storage._category}
- set {_uniqueStorage()._category = newValue}
- }
- var categoryValue: String {
- get {
- if case .categoryValue(let v)? = _storage._category {return v}
- return String()
- }
- set {_uniqueStorage()._category = .categoryValue(newValue)}
- }
- /// Email address linked to the ID
- /// References: `th_linked_email`
- var linkedEmail: OneOf_LinkedEmail? {
- get {return _storage._linkedEmail}
- set {_uniqueStorage()._linkedEmail = newValue}
- }
- var linkedEmailValue: String {
- get {
- if case .linkedEmailValue(let v)? = _storage._linkedEmail {return v}
- return String()
- }
- set {_uniqueStorage()._linkedEmail = .linkedEmailValue(newValue)}
- }
- /// Phone number linked to the ID
- /// References: `th_linked_phone`
- var linkedPhone: OneOf_LinkedPhone? {
- get {return _storage._linkedPhone}
- set {_uniqueStorage()._linkedPhone = newValue}
- }
- var linkedPhoneValue: String {
- get {
- if case .linkedPhoneValue(let v)? = _storage._linkedPhone {return v}
- return String()
- }
- set {_uniqueStorage()._linkedPhone = .linkedPhoneValue(newValue)}
- }
- /// Restore a Threema ID
- /// References: `th_id_backup`
- var identityRestore: OneOf_IdentityRestore? {
- get {return _storage._identityRestore}
- set {_uniqueStorage()._identityRestore = newValue}
- }
- var identityRestoreValue: String {
- get {
- if case .identityRestoreValue(let v)? = _storage._identityRestore {return v}
- return String()
- }
- set {_uniqueStorage()._identityRestore = .identityRestoreValue(newValue)}
- }
- /// Password for restoring a Threema ID
- /// References: `th_id_backup_password`
- var identityRestorePassword: OneOf_IdentityRestorePassword? {
- get {return _storage._identityRestorePassword}
- set {_uniqueStorage()._identityRestorePassword = newValue}
- }
- var identityRestorePasswordValue: String {
- get {
- if case .identityRestorePasswordValue(let v)? = _storage._identityRestorePassword {return v}
- return String()
- }
- set {_uniqueStorage()._identityRestorePassword = .identityRestorePasswordValue(newValue)}
- }
- var threemaSafePolicy: D2d_MdmParameters.ThreemaSafePolicy {
- get {return _storage._threemaSafePolicy}
- set {_uniqueStorage()._threemaSafePolicy = newValue}
- }
- /// Threema Safe password (predefined)
- /// References: `th_safe_password`
- var threemaSafePassword: OneOf_ThreemaSafePassword? {
- get {return _storage._threemaSafePassword}
- set {_uniqueStorage()._threemaSafePassword = newValue}
- }
- var threemaSafePasswordValue: String {
- get {
- if case .threemaSafePasswordValue(let v)? = _storage._threemaSafePassword {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafePassword = .threemaSafePasswordValue(newValue)}
- }
- /// Threema Safe password pattern
- /// References: `th_safe_password_pattern`
- var threemaSafePasswordPattern: OneOf_ThreemaSafePasswordPattern? {
- get {return _storage._threemaSafePasswordPattern}
- set {_uniqueStorage()._threemaSafePasswordPattern = newValue}
- }
- var threemaSafePasswordPatternValue: String {
- get {
- if case .threemaSafePasswordPatternValue(let v)? = _storage._threemaSafePasswordPattern {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafePasswordPattern = .threemaSafePasswordPatternValue(newValue)}
- }
- /// Threema Safe password pattern error (mismatch) message
- /// References: `th_safe_password_message`
- var threemaSafePasswordPatternErrorMessage: OneOf_ThreemaSafePasswordPatternErrorMessage? {
- get {return _storage._threemaSafePasswordPatternErrorMessage}
- set {_uniqueStorage()._threemaSafePasswordPatternErrorMessage = newValue}
- }
- var threemaSafePasswordPatternErrorMessageValue: String {
- get {
- if case .threemaSafePasswordPatternErrorMessageValue(let v)? = _storage._threemaSafePasswordPatternErrorMessage {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafePasswordPatternErrorMessage = .threemaSafePasswordPatternErrorMessageValue(newValue)}
- }
- /// Threema Safe server URL
- /// References: `th_safe_server_url`
- var threemaSafeServerURL: OneOf_ThreemaSafeServerURL? {
- get {return _storage._threemaSafeServerURL}
- set {_uniqueStorage()._threemaSafeServerURL = newValue}
- }
- var threemaSafeServerURLValue: String {
- get {
- if case .threemaSafeServerURLValue(let v)? = _storage._threemaSafeServerURL {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafeServerURL = .threemaSafeServerURLValue(newValue)}
- }
- /// Threema Safe server username for authentication
- /// References: `th_safe_server_username`
- var threemaSafeServerUsername: OneOf_ThreemaSafeServerUsername? {
- get {return _storage._threemaSafeServerUsername}
- set {_uniqueStorage()._threemaSafeServerUsername = newValue}
- }
- var threemaSafeServerUsernameValue: String {
- get {
- if case .threemaSafeServerUsernameValue(let v)? = _storage._threemaSafeServerUsername {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafeServerUsername = .threemaSafeServerUsernameValue(newValue)}
- }
- /// Threema Safe server password for authentication
- /// References: `th_safe_server_password`
- var threemaSafeServerPassword: OneOf_ThreemaSafeServerPassword? {
- get {return _storage._threemaSafeServerPassword}
- set {_uniqueStorage()._threemaSafeServerPassword = newValue}
- }
- var threemaSafeServerPasswordValue: String {
- get {
- if case .threemaSafeServerPasswordValue(let v)? = _storage._threemaSafeServerPassword {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafeServerPassword = .threemaSafeServerPasswordValue(newValue)}
- }
- var threemaSafeRestorePolicy: D2d_MdmParameters.ThreemaSafeRestorePolicy {
- get {return _storage._threemaSafeRestorePolicy}
- set {_uniqueStorage()._threemaSafeRestorePolicy = newValue}
- }
- /// Threema ID to be restored from Threema Safe
- /// References: `th_safe_restore_id`
- var threemaSafeRestoreIdentity: OneOf_ThreemaSafeRestoreIdentity? {
- get {return _storage._threemaSafeRestoreIdentity}
- set {_uniqueStorage()._threemaSafeRestoreIdentity = newValue}
- }
- var threemaSafeRestoreIdentityValue: String {
- get {
- if case .threemaSafeRestoreIdentityValue(let v)? = _storage._threemaSafeRestoreIdentity {return v}
- return String()
- }
- set {_uniqueStorage()._threemaSafeRestoreIdentity = .threemaSafeRestoreIdentityValue(newValue)}
- }
- var overridePolicy: D2d_MdmParameters.OverridePolicy {
- get {return _storage._overridePolicy}
- set {_uniqueStorage()._overridePolicy = newValue}
- }
- var contactSyncPolicy: D2d_MdmParameters.ContactSyncPolicy {
- get {return _storage._contactSyncPolicy}
- set {_uniqueStorage()._contactSyncPolicy = newValue}
- }
- var inactiveIdentityDisplayPolicy: D2d_MdmParameters.InactiveIdentityDisplayPolicy {
- get {return _storage._inactiveIdentityDisplayPolicy}
- set {_uniqueStorage()._inactiveIdentityDisplayPolicy = newValue}
- }
- var unknownContactPolicy: D2d_MdmParameters.UnknownContactPolicy {
- get {return _storage._unknownContactPolicy}
- set {_uniqueStorage()._unknownContactPolicy = newValue}
- }
- var autoSaveMediaPolicy: D2d_MdmParameters.AutoSaveMediaPolicy {
- get {return _storage._autoSaveMediaPolicy}
- set {_uniqueStorage()._autoSaveMediaPolicy = newValue}
- }
- var screenshotPolicy: D2d_MdmParameters.ScreenshotPolicy {
- get {return _storage._screenshotPolicy}
- set {_uniqueStorage()._screenshotPolicy = newValue}
- }
- var addContactPolicy: D2d_MdmParameters.AddContactPolicy {
- get {return _storage._addContactPolicy}
- set {_uniqueStorage()._addContactPolicy = newValue}
- }
- var chatExportPolicy: D2d_MdmParameters.ChatExportPolicy {
- get {return _storage._chatExportPolicy}
- set {_uniqueStorage()._chatExportPolicy = newValue}
- }
- var backupPolicy: D2d_MdmParameters.BackupPolicy {
- get {return _storage._backupPolicy}
- set {_uniqueStorage()._backupPolicy = newValue}
- }
- var identityExportPolicy: D2d_MdmParameters.IdentityExportPolicy {
- get {return _storage._identityExportPolicy}
- set {_uniqueStorage()._identityExportPolicy = newValue}
- }
- var dataBackupPolicy: D2d_MdmParameters.DataBackupPolicy {
- get {return _storage._dataBackupPolicy}
- set {_uniqueStorage()._dataBackupPolicy = newValue}
- }
- var systemBackupPolicy: D2d_MdmParameters.SystemBackupPolicy {
- get {return _storage._systemBackupPolicy}
- set {_uniqueStorage()._systemBackupPolicy = newValue}
- }
- var messagePreviewPolicy: D2d_MdmParameters.MessagePreviewPolicy {
- get {return _storage._messagePreviewPolicy}
- set {_uniqueStorage()._messagePreviewPolicy = newValue}
- }
- var profilePictureSharePolicy: D2d_MdmParameters.ProfilePictureSharePolicy {
- get {return _storage._profilePictureSharePolicy}
- set {_uniqueStorage()._profilePictureSharePolicy = newValue}
- }
- var callPolicy: D2d_MdmParameters.CallPolicy {
- get {return _storage._callPolicy}
- set {_uniqueStorage()._callPolicy = newValue}
- }
- var setupWizardPolicy: D2d_MdmParameters.SetupWizardPolicy {
- get {return _storage._setupWizardPolicy}
- set {_uniqueStorage()._setupWizardPolicy = newValue}
- }
- var createGroupPolicy: D2d_MdmParameters.CreateGroupPolicy {
- get {return _storage._createGroupPolicy}
- set {_uniqueStorage()._createGroupPolicy = newValue}
- }
- var shareMediaPolicy: D2d_MdmParameters.ShareMediaPolicy {
- get {return _storage._shareMediaPolicy}
- set {_uniqueStorage()._shareMediaPolicy = newValue}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Username required for activation of the app
- /// References: `th_license_username`
- enum OneOf_LicenseUsername: Equatable {
- case licenseUsernameValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_LicenseUsername, rhs: D2d_MdmParameters.OneOf_LicenseUsername) -> Bool {
- switch (lhs, rhs) {
- case (.licenseUsernameValue(let l), .licenseUsernameValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Password required for activation of the app
- /// References: `th_license_password`
- enum OneOf_LicensePassword: Equatable {
- case licensePasswordValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_LicensePassword, rhs: D2d_MdmParameters.OneOf_LicensePassword) -> Bool {
- switch (lhs, rhs) {
- case (.licensePasswordValue(let l), .licensePasswordValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Nickname to be used
- /// References: `th_nickname`
- enum OneOf_Nickname: Equatable {
- case nicknameValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_Nickname, rhs: D2d_MdmParameters.OneOf_Nickname) -> Bool {
- switch (lhs, rhs) {
- case (.nicknameValue(let l), .nicknameValue(let r)): return l == r
- }
- }
- #endif
- }
- /// First name of the user
- /// References: `th_firstname`
- enum OneOf_FirstName: Equatable {
- case firstNameValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_FirstName, rhs: D2d_MdmParameters.OneOf_FirstName) -> Bool {
- switch (lhs, rhs) {
- case (.firstNameValue(let l), .firstNameValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Last name of the user
- /// References: `th_lastname`
- enum OneOf_LastName: Equatable {
- case lastNameValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_LastName, rhs: D2d_MdmParameters.OneOf_LastName) -> Bool {
- switch (lhs, rhs) {
- case (.lastNameValue(let l), .lastNameValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Customer specific identifier
- /// References: `th_csi`
- enum OneOf_CustomerSpecificID: Equatable {
- case customerSpecificIDValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_CustomerSpecificID, rhs: D2d_MdmParameters.OneOf_CustomerSpecificID) -> Bool {
- switch (lhs, rhs) {
- case (.customerSpecificIDValue(let l), .customerSpecificIDValue(let r)): return l == r
- }
- }
- #endif
- }
- /// User category
- /// References: `th_category`
- enum OneOf_Category: Equatable {
- case categoryValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_Category, rhs: D2d_MdmParameters.OneOf_Category) -> Bool {
- switch (lhs, rhs) {
- case (.categoryValue(let l), .categoryValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Email address linked to the ID
- /// References: `th_linked_email`
- enum OneOf_LinkedEmail: Equatable {
- case linkedEmailValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_LinkedEmail, rhs: D2d_MdmParameters.OneOf_LinkedEmail) -> Bool {
- switch (lhs, rhs) {
- case (.linkedEmailValue(let l), .linkedEmailValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Phone number linked to the ID
- /// References: `th_linked_phone`
- enum OneOf_LinkedPhone: Equatable {
- case linkedPhoneValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_LinkedPhone, rhs: D2d_MdmParameters.OneOf_LinkedPhone) -> Bool {
- switch (lhs, rhs) {
- case (.linkedPhoneValue(let l), .linkedPhoneValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Restore a Threema ID
- /// References: `th_id_backup`
- enum OneOf_IdentityRestore: Equatable {
- case identityRestoreValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_IdentityRestore, rhs: D2d_MdmParameters.OneOf_IdentityRestore) -> Bool {
- switch (lhs, rhs) {
- case (.identityRestoreValue(let l), .identityRestoreValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Password for restoring a Threema ID
- /// References: `th_id_backup_password`
- enum OneOf_IdentityRestorePassword: Equatable {
- case identityRestorePasswordValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_IdentityRestorePassword, rhs: D2d_MdmParameters.OneOf_IdentityRestorePassword) -> Bool {
- switch (lhs, rhs) {
- case (.identityRestorePasswordValue(let l), .identityRestorePasswordValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe password (predefined)
- /// References: `th_safe_password`
- enum OneOf_ThreemaSafePassword: Equatable {
- case threemaSafePasswordValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePassword, rhs: D2d_MdmParameters.OneOf_ThreemaSafePassword) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafePasswordValue(let l), .threemaSafePasswordValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe password pattern
- /// References: `th_safe_password_pattern`
- enum OneOf_ThreemaSafePasswordPattern: Equatable {
- case threemaSafePasswordPatternValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern, rhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafePasswordPatternValue(let l), .threemaSafePasswordPatternValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe password pattern error (mismatch) message
- /// References: `th_safe_password_message`
- enum OneOf_ThreemaSafePasswordPatternErrorMessage: Equatable {
- case threemaSafePasswordPatternErrorMessageValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage, rhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafePasswordPatternErrorMessageValue(let l), .threemaSafePasswordPatternErrorMessageValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe server URL
- /// References: `th_safe_server_url`
- enum OneOf_ThreemaSafeServerURL: Equatable {
- case threemaSafeServerURLValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerURL, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerURL) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafeServerURLValue(let l), .threemaSafeServerURLValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe server username for authentication
- /// References: `th_safe_server_username`
- enum OneOf_ThreemaSafeServerUsername: Equatable {
- case threemaSafeServerUsernameValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafeServerUsernameValue(let l), .threemaSafeServerUsernameValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe server password for authentication
- /// References: `th_safe_server_password`
- enum OneOf_ThreemaSafeServerPassword: Equatable {
- case threemaSafeServerPasswordValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafeServerPasswordValue(let l), .threemaSafeServerPasswordValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema ID to be restored from Threema Safe
- /// References: `th_safe_restore_id`
- enum OneOf_ThreemaSafeRestoreIdentity: Equatable {
- case threemaSafeRestoreIdentityValue(String)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity, rhs: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity) -> Bool {
- switch (lhs, rhs) {
- case (.threemaSafeRestoreIdentityValue(let l), .threemaSafeRestoreIdentityValue(let r)): return l == r
- }
- }
- #endif
- }
- /// Threema Safe configuration
- /// References: `th_safe_enable`
- enum ThreemaSafePolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Configurable by the user
- case safeOptional // = 0
- /// Forcibly enabled
- case safeMandatory // = 1
- /// Forcibly disabled
- case safeDisabled // = 2
- case UNRECOGNIZED(Int)
- init() {
- self = .safeOptional
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .safeOptional
- case 1: self = .safeMandatory
- case 2: self = .safeDisabled
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .safeOptional: return 0
- case .safeMandatory: return 1
- case .safeDisabled: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Restore policy for restoring from a Threema Safe backup
- /// References: `th_safe_restore_enable`
- enum ThreemaSafeRestorePolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Choosable by the user
- case safeRestoreOptional // = 0
- /// Automatic restore
- case safeRestoreMandatory // = 1
- /// Forcibly disabled
- case safeRestoreDisabled // = 2
- case UNRECOGNIZED(Int)
- init() {
- self = .safeRestoreOptional
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .safeRestoreOptional
- case 1: self = .safeRestoreMandatory
- case 2: self = .safeRestoreDisabled
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .safeRestoreOptional: return 0
- case .safeRestoreMandatory: return 1
- case .safeRestoreDisabled: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Override policy in regards to MDM parameters (profile, settings, ...)
- /// References: `th_readonly_profile`
- enum OverridePolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allows the user to override some of the MDM parameter presets
- case loose // = 0
- /// The user may not override any MDM parameter presets
- case strict // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .loose
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .loose
- case 1: self = .strict
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .loose: return 0
- case .strict: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Contact synchronisation policy
- /// References: `th_contact_sync`
- enum ContactSyncPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Not synced
- case notSynced // = 0
- /// Synced
- case sync // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .notSynced
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .notSynced
- case 1: self = .sync
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .notSynced: return 0
- case .sync: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Inactive Threema ID display policy
- /// References: `th_hide_inactive_ids`
- enum InactiveIdentityDisplayPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Show inactive IDs
- case showInactive // = 0
- /// Hide inactive IDs
- case hideInactive // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .showInactive
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .showInactive
- case 1: self = .hideInactive
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .showInactive: return 0
- case .hideInactive: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Unknown contacts policy
- /// References: `th_block_unknown`
- enum UnknownContactPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allowed to contact the user
- case allowUnknown // = 0
- /// Will be blocked by the user
- case blockUnknown // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowUnknown
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowUnknown
- case 1: self = .blockUnknown
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowUnknown: return 0
- case .blockUnknown: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Auto-save media policy
- /// References: `th_disable_save_to_gallery`
- enum AutoSaveMediaPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow auto-saving, configurable by the user
- case allowAutoSave // = 0
- /// Deny auto-saving
- case denyAutoSave // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowAutoSave
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowAutoSave
- case 1: self = .denyAutoSave
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowAutoSave: return 0
- case .denyAutoSave: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Screenshot policy
- /// References: `th_disable_screenshots`
- enum ScreenshotPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow taking screenshots
- case allowScreenshot // = 0
- /// Deny taking screenshots, if possible
- case denyScreenshot // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowScreenshot
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowScreenshot
- case 1: self = .denyScreenshot
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowScreenshot: return 0
- case .denyScreenshot: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Add contact policy
- /// References: `th_disable_add_contact`
- enum AddContactPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow manually adding contacts
- case allowAddContact // = 0
- /// Deny manually adding contacts
- case denyAddContact // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowAddContact
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowAddContact
- case 1: self = .denyAddContact
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowAddContact: return 0
- case .denyAddContact: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Chat export policy
- /// References: `th_disable_export`
- enum ChatExportPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow exporting chats
- case allowChatExport // = 0
- /// Deny exporting of chats
- case denyChatExport // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowChatExport
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowChatExport
- case 1: self = .denyChatExport
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowChatExport: return 0
- case .denyChatExport: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Backup policy
- /// References: `th_disable_backups`
- enum BackupPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Generally allow backups to be made
- case allowBackup // = 0
- /// Deny creating backups
- case denyBackup // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowBackup
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowBackup
- case 1: self = .denyBackup
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowBackup: return 0
- case .denyBackup: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Threema ID export policy
- /// References: `th_disable_id_export`
- enum IdentityExportPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow exporting of the Threema ID
- case allowIdentityExport // = 0
- /// Deny exporting of the Threema ID
- case denyIdentityExport // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowIdentityExport
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowIdentityExport
- case 1: self = .denyIdentityExport
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowIdentityExport: return 0
- case .denyIdentityExport: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Data backup policy
- /// References: `th_disable_data_backups`
- enum DataBackupPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow creating data backups
- case allowDataBackup // = 0
- /// Deny creating data backups
- case denyDataBackup // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowDataBackup
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowDataBackup
- case 1: self = .denyDataBackup
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowDataBackup: return 0
- case .denyDataBackup: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// System backup policy
- /// References: `th_disable_system_backups`
- enum SystemBackupPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// The system may include app data
- case allowSystemBackup // = 0
- /// The system is denied from including app data
- case denySystemBackup // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowSystemBackup
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowSystemBackup
- case 1: self = .denySystemBackup
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowSystemBackup: return 0
- case .denySystemBackup: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Message preview (in notifications)
- /// References: `th_disable_message_preview`
- enum MessagePreviewPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow showing a message preview
- case allowPreview // = 0
- /// Deny showing a message preview
- case denyPreview // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowPreview
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowPreview
- case 1: self = .denyPreview
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowPreview: return 0
- case .denyPreview: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Profile picture sharing policy
- /// References: `th_disable_send_profile_picture`
- enum ProfilePictureSharePolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow the profile picture to be shared with contacts
- case allowShare // = 0
- /// Denied from sharing the profile picture with contacts
- case denyShare // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowShare
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowShare
- case 1: self = .denyShare
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowShare: return 0
- case .denyShare: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Threema Call policy
- /// References: `th_disable_calls`
- enum CallPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow creating/receiving Threema Calls
- case allowCall // = 0
- /// Denied from creating/receiving any Threema Calls
- case denyCall // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowCall
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowCall
- case 1: self = .denyCall
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowCall: return 0
- case .denyCall: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Setup wizard policy
- /// References: `th_skip_wizard`
- enum SetupWizardPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Show the setup wizard
- case showWizard // = 0
- /// Skip the setup wizard (restores an ID or a backup and sets up the
- /// profile automatically).
- case skipWizard // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .showWizard
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .showWizard
- case 1: self = .skipWizard
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .showWizard: return 0
- case .skipWizard: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Group creation policy
- /// References: `th_disable_create_group`
- enum CreateGroupPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow manually creating groups
- case allowCreateGroup // = 0
- /// Deny manually creating groups
- case denyCreateGroup // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowCreateGroup
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowCreateGroup
- case 1: self = .denyCreateGroup
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowCreateGroup: return 0
- case .denyCreateGroup: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- /// Share media policy
- /// References: `th_disable_share_media`
- enum ShareMediaPolicy: SwiftProtobuf.Enum {
- typealias RawValue = Int
- /// Allow unrestricted sharing of media
- case allowShareMedia // = 0
- /// Deny sharing of media outside of Threema, if possible
- case denyOutsideApp // = 1
- case UNRECOGNIZED(Int)
- init() {
- self = .allowShareMedia
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .allowShareMedia
- case 1: self = .denyOutsideApp
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .allowShareMedia: return 0
- case .denyOutsideApp: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
- }
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- #if swift(>=4.2)
- extension D2d_MdmParameters.ThreemaSafePolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ThreemaSafePolicy] = [
- .safeOptional,
- .safeMandatory,
- .safeDisabled,
- ]
- }
- extension D2d_MdmParameters.ThreemaSafeRestorePolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ThreemaSafeRestorePolicy] = [
- .safeRestoreOptional,
- .safeRestoreMandatory,
- .safeRestoreDisabled,
- ]
- }
- extension D2d_MdmParameters.OverridePolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.OverridePolicy] = [
- .loose,
- .strict,
- ]
- }
- extension D2d_MdmParameters.ContactSyncPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ContactSyncPolicy] = [
- .notSynced,
- .sync,
- ]
- }
- extension D2d_MdmParameters.InactiveIdentityDisplayPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.InactiveIdentityDisplayPolicy] = [
- .showInactive,
- .hideInactive,
- ]
- }
- extension D2d_MdmParameters.UnknownContactPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.UnknownContactPolicy] = [
- .allowUnknown,
- .blockUnknown,
- ]
- }
- extension D2d_MdmParameters.AutoSaveMediaPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.AutoSaveMediaPolicy] = [
- .allowAutoSave,
- .denyAutoSave,
- ]
- }
- extension D2d_MdmParameters.ScreenshotPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ScreenshotPolicy] = [
- .allowScreenshot,
- .denyScreenshot,
- ]
- }
- extension D2d_MdmParameters.AddContactPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.AddContactPolicy] = [
- .allowAddContact,
- .denyAddContact,
- ]
- }
- extension D2d_MdmParameters.ChatExportPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ChatExportPolicy] = [
- .allowChatExport,
- .denyChatExport,
- ]
- }
- extension D2d_MdmParameters.BackupPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.BackupPolicy] = [
- .allowBackup,
- .denyBackup,
- ]
- }
- extension D2d_MdmParameters.IdentityExportPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.IdentityExportPolicy] = [
- .allowIdentityExport,
- .denyIdentityExport,
- ]
- }
- extension D2d_MdmParameters.DataBackupPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.DataBackupPolicy] = [
- .allowDataBackup,
- .denyDataBackup,
- ]
- }
- extension D2d_MdmParameters.SystemBackupPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.SystemBackupPolicy] = [
- .allowSystemBackup,
- .denySystemBackup,
- ]
- }
- extension D2d_MdmParameters.MessagePreviewPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.MessagePreviewPolicy] = [
- .allowPreview,
- .denyPreview,
- ]
- }
- extension D2d_MdmParameters.ProfilePictureSharePolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ProfilePictureSharePolicy] = [
- .allowShare,
- .denyShare,
- ]
- }
- extension D2d_MdmParameters.CallPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.CallPolicy] = [
- .allowCall,
- .denyCall,
- ]
- }
- extension D2d_MdmParameters.SetupWizardPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.SetupWizardPolicy] = [
- .showWizard,
- .skipWizard,
- ]
- }
- extension D2d_MdmParameters.CreateGroupPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.CreateGroupPolicy] = [
- .allowCreateGroup,
- .denyCreateGroup,
- ]
- }
- extension D2d_MdmParameters.ShareMediaPolicy: CaseIterable {
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static var allCases: [D2d_MdmParameters.ShareMediaPolicy] = [
- .allowShareMedia,
- .denyOutsideApp,
- ]
- }
- #endif // swift(>=4.2)
- /// A message receiver can be a single user or a group.
- struct D2d_MessageReceiver {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The recipient's Threema ID or a group identity.
- var receiver: D2d_MessageReceiver.OneOf_Receiver? = nil
- var identity: String {
- get {
- if case .identity(let v)? = receiver {return v}
- return String()
- }
- set {receiver = .identity(newValue)}
- }
- var group: Common_GroupIdentity {
- get {
- if case .group(let v)? = receiver {return v}
- return Common_GroupIdentity()
- }
- set {receiver = .group(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// The recipient's Threema ID or a group identity.
- enum OneOf_Receiver: Equatable {
- case identity(String)
- case group(Common_GroupIdentity)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_MessageReceiver.OneOf_Receiver, rhs: D2d_MessageReceiver.OneOf_Receiver) -> Bool {
- switch (lhs, rhs) {
- case (.identity(let l), .identity(let r)): return l == r
- case (.group(let l), .group(let r)): return l == r
- default: return false
- }
- }
- #endif
- }
- init() {}
- }
- /// An outgoing message, reflected to other devices.
- struct D2d_OutgoingMessage {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Recipient of the enclosed message.
- ///
- /// Note: If the receiver is a group identity, group and group creator id of
- /// the enclosed message must match the values of the supplied group
- /// identity. Otherwise, the message must be considered invalid.
- var receiver: D2d_MessageReceiver {
- get {return _receiver ?? D2d_MessageReceiver()}
- set {_receiver = newValue}
- }
- /// Returns true if `receiver` has been explicitly set.
- var hasReceiver: Bool {return self._receiver != nil}
- /// Clears the value of `receiver`. Subsequent reads from it will return its default value.
- mutating func clearReceiver() {self._receiver = nil}
- /// Unique ID of the enclosed message
- var messageID: UInt64 = 0
- /// Unix-ish timestamp in milliseconds for when the message has been created
- var createdAt: UInt64 = 0
- /// Enclosed message's type
- var type: D2d_MessageType = .invalid
- /// The message's body as defined for `Message` (0x01/0x02) of the Chat
- /// Server Protocol.
- var body: Data = SwiftProtobuf.Internal.emptyData
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _receiver: D2d_MessageReceiver? = nil
- }
- /// An outgoing message has been delivered to the chat server.
- ///
- /// Note: This indicates that the message has been successfully stored in the
- /// message queue of the server. It does NOT indicate that the message has
- /// been delivered to the intended receiver.
- struct D2d_OutgoingMessageDelivered {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Recipient of the delivered message.
- var receiver: D2d_MessageReceiver {
- get {return _receiver ?? D2d_MessageReceiver()}
- set {_receiver = newValue}
- }
- /// Returns true if `receiver` has been explicitly set.
- var hasReceiver: Bool {return self._receiver != nil}
- /// Clears the value of `receiver`. Subsequent reads from it will return its default value.
- mutating func clearReceiver() {self._receiver = nil}
- /// Unique ID of the delivered message
- var messageID: UInt64 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _receiver: D2d_MessageReceiver? = nil
- }
- /// An incoming message, reflected to other devices.
- struct D2d_IncomingMessage {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Sender's Threema ID
- var senderIdentity: String = String()
- /// Sender's public nickname
- var senderNickname: String = String()
- /// Unique ID of the enclosed message
- var messageID: UInt64 = 0
- /// Unix-ish timestamp in milliseconds for when the message has been created
- var createdAt: UInt64 = 0
- /// Enclosed message's type
- var type: D2d_MessageType = .invalid
- /// The message's body as defined for `Message` (0x01/0x02) of the Chat
- /// Server Protocol.
- var body: Data = SwiftProtobuf.Internal.emptyData
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- /// User profile synchronisation message.
- struct D2d_UserProfileSync {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Synchronisation type
- var action: D2d_UserProfileSync.OneOf_Action? = nil
- var set: D2d_UserProfileSync.Set {
- get {
- if case .set(let v)? = action {return v}
- return D2d_UserProfileSync.Set()
- }
- set {action = .set(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Synchronisation type
- enum OneOf_Action: Equatable {
- case set(D2d_UserProfileSync.Set)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_UserProfileSync.OneOf_Action, rhs: D2d_UserProfileSync.OneOf_Action) -> Bool {
- switch (lhs, rhs) {
- case (.set(let l), .set(let r)): return l == r
- }
- }
- #endif
- }
- /// Update the user's profile
- struct Set {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var userProfile: Safe_UserProfile {
- get {return _userProfile ?? Safe_UserProfile()}
- set {_userProfile = newValue}
- }
- /// Returns true if `userProfile` has been explicitly set.
- var hasUserProfile: Bool {return self._userProfile != nil}
- /// Clears the value of `userProfile`. Subsequent reads from it will return its default value.
- mutating func clearUserProfile() {self._userProfile = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _userProfile: Safe_UserProfile? = nil
- }
- init() {}
- }
- /// Contact synchronisation message.
- struct D2d_ContactSync {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Synchronisation type
- var action: D2d_ContactSync.OneOf_Action? = nil
- var set: D2d_ContactSync.Set {
- get {
- if case .set(let v)? = action {return v}
- return D2d_ContactSync.Set()
- }
- set {action = .set(newValue)}
- }
- var delete: D2d_ContactSync.Delete {
- get {
- if case .delete(let v)? = action {return v}
- return D2d_ContactSync.Delete()
- }
- set {action = .delete(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Synchronisation type
- enum OneOf_Action: Equatable {
- case set(D2d_ContactSync.Set)
- case delete(D2d_ContactSync.Delete)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_ContactSync.OneOf_Action, rhs: D2d_ContactSync.OneOf_Action) -> Bool {
- switch (lhs, rhs) {
- case (.set(let l), .set(let r)): return l == r
- case (.delete(let l), .delete(let r)): return l == r
- default: return false
- }
- }
- #endif
- }
- /// Set a Threema contact
- struct Set {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var contact: Safe_Contact {
- get {return _contact ?? Safe_Contact()}
- set {_contact = newValue}
- }
- /// Returns true if `contact` has been explicitly set.
- var hasContact: Bool {return self._contact != nil}
- /// Clears the value of `contact`. Subsequent reads from it will return its default value.
- mutating func clearContact() {self._contact = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _contact: Safe_Contact? = nil
- }
- /// Delete a Threema contact
- struct Delete {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var deleteIdentity: String = String()
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- init() {}
- }
- /// Group synchronisation message.
- struct D2d_GroupSync {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Synchronisation type
- var action: D2d_GroupSync.OneOf_Action? = nil
- var set: D2d_GroupSync.Set {
- get {
- if case .set(let v)? = action {return v}
- return D2d_GroupSync.Set()
- }
- set {action = .set(newValue)}
- }
- var delete: D2d_GroupSync.Delete {
- get {
- if case .delete(let v)? = action {return v}
- return D2d_GroupSync.Delete()
- }
- set {action = .delete(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Synchronisation type
- enum OneOf_Action: Equatable {
- case set(D2d_GroupSync.Set)
- case delete(D2d_GroupSync.Delete)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_GroupSync.OneOf_Action, rhs: D2d_GroupSync.OneOf_Action) -> Bool {
- switch (lhs, rhs) {
- case (.set(let l), .set(let r)): return l == r
- case (.delete(let l), .delete(let r)): return l == r
- default: return false
- }
- }
- #endif
- }
- /// Set a group
- struct Set {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var group: Safe_Group {
- get {return _group ?? Safe_Group()}
- set {_group = newValue}
- }
- /// Returns true if `group` has been explicitly set.
- var hasGroup: Bool {return self._group != nil}
- /// Clears the value of `group`. Subsequent reads from it will return its default value.
- mutating func clearGroup() {self._group = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _group: Safe_Group? = nil
- }
- /// Delete a group
- struct Delete {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Unique group identity
- var groupIdentity: Common_GroupIdentity {
- get {return _groupIdentity ?? Common_GroupIdentity()}
- set {_groupIdentity = newValue}
- }
- /// Returns true if `groupIdentity` has been explicitly set.
- var hasGroupIdentity: Bool {return self._groupIdentity != nil}
- /// Clears the value of `groupIdentity`. Subsequent reads from it will return its default value.
- mutating func clearGroupIdentity() {self._groupIdentity = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _groupIdentity: Common_GroupIdentity? = nil
- }
- init() {}
- }
- /// Distribution list synchronisation message.
- struct D2d_DistributionListSync {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Synchronisation type
- var action: D2d_DistributionListSync.OneOf_Action? = nil
- var set: D2d_DistributionListSync.Set {
- get {
- if case .set(let v)? = action {return v}
- return D2d_DistributionListSync.Set()
- }
- set {action = .set(newValue)}
- }
- var delete: D2d_DistributionListSync.Delete {
- get {
- if case .delete(let v)? = action {return v}
- return D2d_DistributionListSync.Delete()
- }
- set {action = .delete(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Synchronisation type
- enum OneOf_Action: Equatable {
- case set(D2d_DistributionListSync.Set)
- case delete(D2d_DistributionListSync.Delete)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_DistributionListSync.OneOf_Action, rhs: D2d_DistributionListSync.OneOf_Action) -> Bool {
- switch (lhs, rhs) {
- case (.set(let l), .set(let r)): return l == r
- case (.delete(let l), .delete(let r)): return l == r
- default: return false
- }
- }
- #endif
- }
- /// Set a distribution list
- struct Set {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var distributionList: Safe_DistributionList {
- get {return _distributionList ?? Safe_DistributionList()}
- set {_distributionList = newValue}
- }
- /// Returns true if `distributionList` has been explicitly set.
- var hasDistributionList: Bool {return self._distributionList != nil}
- /// Clears the value of `distributionList`. Subsequent reads from it will return its default value.
- mutating func clearDistributionList() {self._distributionList = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _distributionList: Safe_DistributionList? = nil
- }
- /// Delete a group
- struct Delete {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Unique ID of the distribution list
- var distributionListID: UInt64 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- init() {}
- }
- /// Settings synchronisation message.
- struct D2d_SettingsSync {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Synchronisation type
- var action: D2d_SettingsSync.OneOf_Action? = nil
- var set: D2d_SettingsSync.Set {
- get {
- if case .set(let v)? = action {return v}
- return D2d_SettingsSync.Set()
- }
- set {action = .set(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- /// Synchronisation type
- enum OneOf_Action: Equatable {
- case set(D2d_SettingsSync.Set)
- #if !swift(>=4.1)
- static func ==(lhs: D2d_SettingsSync.OneOf_Action, rhs: D2d_SettingsSync.OneOf_Action) -> Bool {
- switch (lhs, rhs) {
- case (.set(let l), .set(let r)): return l == r
- }
- }
- #endif
- }
- /// Apply settings
- struct Set {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var settings: Safe_Settings {
- get {return _settings ?? Safe_Settings()}
- set {_settings = newValue}
- }
- /// Returns true if `settings` has been explicitly set.
- var hasSettings: Bool {return self._settings != nil}
- /// Clears the value of `settings`. Subsequent reads from it will return its default value.
- mutating func clearSettings() {self._settings = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _settings: Safe_Settings? = nil
- }
- init() {}
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "d2d"
- extension D2d_MessageType: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "INVALID"),
- 1: .same(proto: "TEXT"),
- 2: .same(proto: "IMAGE"),
- 16: .same(proto: "LOCATION"),
- 19: .same(proto: "VIDEO"),
- 20: .same(proto: "AUDIO"),
- 21: .same(proto: "POLL_CREATE"),
- 22: .same(proto: "POLL_VOTE"),
- 23: .same(proto: "FILE"),
- 24: .same(proto: "CONTACT_SET_PROFILE_PICTURE"),
- 25: .same(proto: "CONTACT_DELETE_PROFILE_PICTURE"),
- 26: .same(proto: "CONTACT_REQUEST_PROFILE_PICTURE"),
- 65: .same(proto: "GROUP_TEXT"),
- 66: .same(proto: "GROUP_LOCATION"),
- 67: .same(proto: "GROUP_IMAGE"),
- 68: .same(proto: "GROUP_VIDEO"),
- 69: .same(proto: "GROUP_AUDIO"),
- 70: .same(proto: "GROUP_FILE"),
- 74: .same(proto: "GROUP_CREATE"),
- 75: .same(proto: "GROUP_RENAME"),
- 76: .same(proto: "GROUP_LEAVE"),
- 80: .same(proto: "GROUP_SET_PROFILE_PICTURE"),
- 81: .same(proto: "GROUP_REQUEST_SYNC"),
- 82: .same(proto: "GROUP_POLL_CREATE"),
- 83: .same(proto: "GROUP_POLL_VOTE"),
- 84: .same(proto: "GROUP_DELETE_PROFILE_PICTURE"),
- 96: .same(proto: "CALL_OFFER"),
- 97: .same(proto: "CALL_ANSWER"),
- 98: .same(proto: "CALL_ICE_CANDIDATE"),
- 99: .same(proto: "CALL_HANGUP"),
- 100: .same(proto: "CALL_RINGING"),
- 101: .same(proto: "CALL_MISSED"),
- 128: .same(proto: "DELIVERY_RECEIPT"),
- 144: .same(proto: "TYPING_INDICATOR"),
- ]
- }
- extension D2d_InitialData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".InitialData"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "backup"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._backup)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._backup {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_InitialData, rhs: D2d_InitialData) -> Bool {
- if lhs._backup != rhs._backup {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_SharedDeviceData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".SharedDeviceData"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "padding"),
- 2: .standard(proto: "mdm_parameters"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularBytesField(value: &self.padding)
- case 2: try decoder.decodeSingularMessageField(value: &self._mdmParameters)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.padding.isEmpty {
- try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1)
- }
- if let v = self._mdmParameters {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_SharedDeviceData, rhs: D2d_SharedDeviceData) -> Bool {
- if lhs.padding != rhs.padding {return false}
- if lhs._mdmParameters != rhs._mdmParameters {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_DeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".DeviceInfo"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "padding"),
- 2: .same(proto: "platform"),
- 3: .standard(proto: "app_version"),
- 4: .same(proto: "description"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularBytesField(value: &self.padding)
- case 2: try decoder.decodeSingularEnumField(value: &self.platform)
- case 3: try decoder.decodeSingularStringField(value: &self.appVersion)
- case 4: try decoder.decodeSingularStringField(value: &self.description_p)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.padding.isEmpty {
- try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1)
- }
- if self.platform != .unspecified {
- try visitor.visitSingularEnumField(value: self.platform, fieldNumber: 2)
- }
- if !self.appVersion.isEmpty {
- try visitor.visitSingularStringField(value: self.appVersion, fieldNumber: 3)
- }
- if !self.description_p.isEmpty {
- try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_DeviceInfo, rhs: D2d_DeviceInfo) -> Bool {
- if lhs.padding != rhs.padding {return false}
- if lhs.platform != rhs.platform {return false}
- if lhs.appVersion != rhs.appVersion {return false}
- if lhs.description_p != rhs.description_p {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_DeviceInfo.Platform: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "UNSPECIFIED"),
- 1: .same(proto: "ANDROID"),
- 2: .same(proto: "IOS"),
- 3: .same(proto: "WEB"),
- ]
- }
- extension D2d_TransactionScope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TransactionScope"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "scope"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularEnumField(value: &self.scope)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.scope != .userProfileSync {
- try visitor.visitSingularEnumField(value: self.scope, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_TransactionScope, rhs: D2d_TransactionScope) -> Bool {
- if lhs.scope != rhs.scope {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_TransactionScope.Scope: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "USER_PROFILE_SYNC"),
- 1: .same(proto: "CONTACT_SYNC"),
- 2: .same(proto: "GROUP_SYNC"),
- 3: .same(proto: "DISTRIBUTION_LIST_SYNC"),
- 4: .same(proto: "SETTINGS_SYNC"),
- ]
- }
- extension D2d_Envelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".Envelope"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "padding"),
- 2: .standard(proto: "outgoing_message"),
- 3: .standard(proto: "incoming_message"),
- 4: .standard(proto: "user_profile_sync"),
- 5: .standard(proto: "contact_sync"),
- 6: .standard(proto: "group_sync"),
- 7: .standard(proto: "distribution_list_sync"),
- 8: .standard(proto: "settings_sync"),
- 9999: .standard(proto: "mdm_parameters"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularBytesField(value: &self.padding)
- case 2:
- var v: D2d_OutgoingMessage?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .outgoingMessage(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .outgoingMessage(v)}
- case 3:
- var v: D2d_IncomingMessage?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .incomingMessage(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .incomingMessage(v)}
- case 4:
- var v: D2d_UserProfileSync?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .userProfileSync(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .userProfileSync(v)}
- case 5:
- var v: D2d_ContactSync?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .contactSync(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .contactSync(v)}
- case 6:
- var v: D2d_GroupSync?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .groupSync(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .groupSync(v)}
- case 7:
- var v: D2d_DistributionListSync?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .distributionListSync(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .distributionListSync(v)}
- case 8:
- var v: D2d_SettingsSync?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .settingsSync(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .settingsSync(v)}
- case 9999:
- var v: D2d_MdmParameters?
- if let current = self.content {
- try decoder.handleConflictingOneOf()
- if case .mdmParameters(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.content = .mdmParameters(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.padding.isEmpty {
- try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1)
- }
- switch self.content {
- case .outgoingMessage(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- case .incomingMessage(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- case .userProfileSync(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- case .contactSync(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
- case .groupSync(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
- case .distributionListSync(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
- case .settingsSync(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
- case .mdmParameters(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 9999)
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_Envelope, rhs: D2d_Envelope) -> Bool {
- if lhs.padding != rhs.padding {return false}
- if lhs.content != rhs.content {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_MdmParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".MdmParameters"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "license_username_value"),
- 2: .standard(proto: "license_password_value"),
- 3: .standard(proto: "nickname_value"),
- 4: .standard(proto: "first_name_value"),
- 5: .standard(proto: "last_name_value"),
- 6: .standard(proto: "customer_specific_id_value"),
- 7: .standard(proto: "category_value"),
- 8: .standard(proto: "linked_email_value"),
- 9: .standard(proto: "linked_phone_value"),
- 10: .standard(proto: "identity_restore_value"),
- 11: .standard(proto: "identity_restore_password_value"),
- 12: .standard(proto: "threema_safe_policy"),
- 13: .standard(proto: "threema_safe_password_value"),
- 14: .standard(proto: "threema_safe_password_pattern_value"),
- 15: .standard(proto: "threema_safe_password_pattern_error_message_value"),
- 16: .standard(proto: "threema_safe_server_url_value"),
- 17: .standard(proto: "threema_safe_server_username_value"),
- 18: .standard(proto: "threema_safe_server_password_value"),
- 19: .standard(proto: "threema_safe_restore_policy"),
- 20: .standard(proto: "threema_safe_restore_identity_value"),
- 21: .standard(proto: "override_policy"),
- 22: .standard(proto: "contact_sync_policy"),
- 23: .standard(proto: "inactive_identity_display_policy"),
- 24: .standard(proto: "unknown_contact_policy"),
- 25: .standard(proto: "auto_save_media_policy"),
- 26: .standard(proto: "screenshot_policy"),
- 27: .standard(proto: "add_contact_policy"),
- 28: .standard(proto: "chat_export_policy"),
- 29: .standard(proto: "backup_policy"),
- 30: .standard(proto: "identity_export_policy"),
- 31: .standard(proto: "data_backup_policy"),
- 32: .standard(proto: "system_backup_policy"),
- 33: .standard(proto: "message_preview_policy"),
- 34: .standard(proto: "profile_picture_share_policy"),
- 35: .standard(proto: "call_policy"),
- 36: .standard(proto: "setup_wizard_policy"),
- 37: .standard(proto: "create_group_policy"),
- 38: .standard(proto: "share_media_policy"),
- ]
- fileprivate class _StorageClass {
- var _licenseUsername: D2d_MdmParameters.OneOf_LicenseUsername?
- var _licensePassword: D2d_MdmParameters.OneOf_LicensePassword?
- var _nickname: D2d_MdmParameters.OneOf_Nickname?
- var _firstName: D2d_MdmParameters.OneOf_FirstName?
- var _lastName: D2d_MdmParameters.OneOf_LastName?
- var _customerSpecificID: D2d_MdmParameters.OneOf_CustomerSpecificID?
- var _category: D2d_MdmParameters.OneOf_Category?
- var _linkedEmail: D2d_MdmParameters.OneOf_LinkedEmail?
- var _linkedPhone: D2d_MdmParameters.OneOf_LinkedPhone?
- var _identityRestore: D2d_MdmParameters.OneOf_IdentityRestore?
- var _identityRestorePassword: D2d_MdmParameters.OneOf_IdentityRestorePassword?
- var _threemaSafePolicy: D2d_MdmParameters.ThreemaSafePolicy = .safeOptional
- var _threemaSafePassword: D2d_MdmParameters.OneOf_ThreemaSafePassword?
- var _threemaSafePasswordPattern: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern?
- var _threemaSafePasswordPatternErrorMessage: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage?
- var _threemaSafeServerURL: D2d_MdmParameters.OneOf_ThreemaSafeServerURL?
- var _threemaSafeServerUsername: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername?
- var _threemaSafeServerPassword: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword?
- var _threemaSafeRestorePolicy: D2d_MdmParameters.ThreemaSafeRestorePolicy = .safeRestoreOptional
- var _threemaSafeRestoreIdentity: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity?
- var _overridePolicy: D2d_MdmParameters.OverridePolicy = .loose
- var _contactSyncPolicy: D2d_MdmParameters.ContactSyncPolicy = .notSynced
- var _inactiveIdentityDisplayPolicy: D2d_MdmParameters.InactiveIdentityDisplayPolicy = .showInactive
- var _unknownContactPolicy: D2d_MdmParameters.UnknownContactPolicy = .allowUnknown
- var _autoSaveMediaPolicy: D2d_MdmParameters.AutoSaveMediaPolicy = .allowAutoSave
- var _screenshotPolicy: D2d_MdmParameters.ScreenshotPolicy = .allowScreenshot
- var _addContactPolicy: D2d_MdmParameters.AddContactPolicy = .allowAddContact
- var _chatExportPolicy: D2d_MdmParameters.ChatExportPolicy = .allowChatExport
- var _backupPolicy: D2d_MdmParameters.BackupPolicy = .allowBackup
- var _identityExportPolicy: D2d_MdmParameters.IdentityExportPolicy = .allowIdentityExport
- var _dataBackupPolicy: D2d_MdmParameters.DataBackupPolicy = .allowDataBackup
- var _systemBackupPolicy: D2d_MdmParameters.SystemBackupPolicy = .allowSystemBackup
- var _messagePreviewPolicy: D2d_MdmParameters.MessagePreviewPolicy = .allowPreview
- var _profilePictureSharePolicy: D2d_MdmParameters.ProfilePictureSharePolicy = .allowShare
- var _callPolicy: D2d_MdmParameters.CallPolicy = .allowCall
- var _setupWizardPolicy: D2d_MdmParameters.SetupWizardPolicy = .showWizard
- var _createGroupPolicy: D2d_MdmParameters.CreateGroupPolicy = .allowCreateGroup
- var _shareMediaPolicy: D2d_MdmParameters.ShareMediaPolicy = .allowShareMedia
- static let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _licenseUsername = source._licenseUsername
- _licensePassword = source._licensePassword
- _nickname = source._nickname
- _firstName = source._firstName
- _lastName = source._lastName
- _customerSpecificID = source._customerSpecificID
- _category = source._category
- _linkedEmail = source._linkedEmail
- _linkedPhone = source._linkedPhone
- _identityRestore = source._identityRestore
- _identityRestorePassword = source._identityRestorePassword
- _threemaSafePolicy = source._threemaSafePolicy
- _threemaSafePassword = source._threemaSafePassword
- _threemaSafePasswordPattern = source._threemaSafePasswordPattern
- _threemaSafePasswordPatternErrorMessage = source._threemaSafePasswordPatternErrorMessage
- _threemaSafeServerURL = source._threemaSafeServerURL
- _threemaSafeServerUsername = source._threemaSafeServerUsername
- _threemaSafeServerPassword = source._threemaSafeServerPassword
- _threemaSafeRestorePolicy = source._threemaSafeRestorePolicy
- _threemaSafeRestoreIdentity = source._threemaSafeRestoreIdentity
- _overridePolicy = source._overridePolicy
- _contactSyncPolicy = source._contactSyncPolicy
- _inactiveIdentityDisplayPolicy = source._inactiveIdentityDisplayPolicy
- _unknownContactPolicy = source._unknownContactPolicy
- _autoSaveMediaPolicy = source._autoSaveMediaPolicy
- _screenshotPolicy = source._screenshotPolicy
- _addContactPolicy = source._addContactPolicy
- _chatExportPolicy = source._chatExportPolicy
- _backupPolicy = source._backupPolicy
- _identityExportPolicy = source._identityExportPolicy
- _dataBackupPolicy = source._dataBackupPolicy
- _systemBackupPolicy = source._systemBackupPolicy
- _messagePreviewPolicy = source._messagePreviewPolicy
- _profilePictureSharePolicy = source._profilePictureSharePolicy
- _callPolicy = source._callPolicy
- _setupWizardPolicy = source._setupWizardPolicy
- _createGroupPolicy = source._createGroupPolicy
- _shareMediaPolicy = source._shareMediaPolicy
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- if _storage._licenseUsername != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._licenseUsername = .licenseUsernameValue(v)}
- case 2:
- if _storage._licensePassword != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._licensePassword = .licensePasswordValue(v)}
- case 3:
- if _storage._nickname != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._nickname = .nicknameValue(v)}
- case 4:
- if _storage._firstName != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._firstName = .firstNameValue(v)}
- case 5:
- if _storage._lastName != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._lastName = .lastNameValue(v)}
- case 6:
- if _storage._customerSpecificID != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._customerSpecificID = .customerSpecificIDValue(v)}
- case 7:
- if _storage._category != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._category = .categoryValue(v)}
- case 8:
- if _storage._linkedEmail != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._linkedEmail = .linkedEmailValue(v)}
- case 9:
- if _storage._linkedPhone != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._linkedPhone = .linkedPhoneValue(v)}
- case 10:
- if _storage._identityRestore != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._identityRestore = .identityRestoreValue(v)}
- case 11:
- if _storage._identityRestorePassword != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._identityRestorePassword = .identityRestorePasswordValue(v)}
- case 12: try decoder.decodeSingularEnumField(value: &_storage._threemaSafePolicy)
- case 13:
- if _storage._threemaSafePassword != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafePassword = .threemaSafePasswordValue(v)}
- case 14:
- if _storage._threemaSafePasswordPattern != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafePasswordPattern = .threemaSafePasswordPatternValue(v)}
- case 15:
- if _storage._threemaSafePasswordPatternErrorMessage != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafePasswordPatternErrorMessage = .threemaSafePasswordPatternErrorMessageValue(v)}
- case 16:
- if _storage._threemaSafeServerURL != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafeServerURL = .threemaSafeServerURLValue(v)}
- case 17:
- if _storage._threemaSafeServerUsername != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafeServerUsername = .threemaSafeServerUsernameValue(v)}
- case 18:
- if _storage._threemaSafeServerPassword != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafeServerPassword = .threemaSafeServerPasswordValue(v)}
- case 19: try decoder.decodeSingularEnumField(value: &_storage._threemaSafeRestorePolicy)
- case 20:
- if _storage._threemaSafeRestoreIdentity != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {_storage._threemaSafeRestoreIdentity = .threemaSafeRestoreIdentityValue(v)}
- case 21: try decoder.decodeSingularEnumField(value: &_storage._overridePolicy)
- case 22: try decoder.decodeSingularEnumField(value: &_storage._contactSyncPolicy)
- case 23: try decoder.decodeSingularEnumField(value: &_storage._inactiveIdentityDisplayPolicy)
- case 24: try decoder.decodeSingularEnumField(value: &_storage._unknownContactPolicy)
- case 25: try decoder.decodeSingularEnumField(value: &_storage._autoSaveMediaPolicy)
- case 26: try decoder.decodeSingularEnumField(value: &_storage._screenshotPolicy)
- case 27: try decoder.decodeSingularEnumField(value: &_storage._addContactPolicy)
- case 28: try decoder.decodeSingularEnumField(value: &_storage._chatExportPolicy)
- case 29: try decoder.decodeSingularEnumField(value: &_storage._backupPolicy)
- case 30: try decoder.decodeSingularEnumField(value: &_storage._identityExportPolicy)
- case 31: try decoder.decodeSingularEnumField(value: &_storage._dataBackupPolicy)
- case 32: try decoder.decodeSingularEnumField(value: &_storage._systemBackupPolicy)
- case 33: try decoder.decodeSingularEnumField(value: &_storage._messagePreviewPolicy)
- case 34: try decoder.decodeSingularEnumField(value: &_storage._profilePictureSharePolicy)
- case 35: try decoder.decodeSingularEnumField(value: &_storage._callPolicy)
- case 36: try decoder.decodeSingularEnumField(value: &_storage._setupWizardPolicy)
- case 37: try decoder.decodeSingularEnumField(value: &_storage._createGroupPolicy)
- case 38: try decoder.decodeSingularEnumField(value: &_storage._shareMediaPolicy)
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if case .licenseUsernameValue(let v)? = _storage._licenseUsername {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- }
- if case .licensePasswordValue(let v)? = _storage._licensePassword {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- }
- if case .nicknameValue(let v)? = _storage._nickname {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- }
- if case .firstNameValue(let v)? = _storage._firstName {
- try visitor.visitSingularStringField(value: v, fieldNumber: 4)
- }
- if case .lastNameValue(let v)? = _storage._lastName {
- try visitor.visitSingularStringField(value: v, fieldNumber: 5)
- }
- if case .customerSpecificIDValue(let v)? = _storage._customerSpecificID {
- try visitor.visitSingularStringField(value: v, fieldNumber: 6)
- }
- if case .categoryValue(let v)? = _storage._category {
- try visitor.visitSingularStringField(value: v, fieldNumber: 7)
- }
- if case .linkedEmailValue(let v)? = _storage._linkedEmail {
- try visitor.visitSingularStringField(value: v, fieldNumber: 8)
- }
- if case .linkedPhoneValue(let v)? = _storage._linkedPhone {
- try visitor.visitSingularStringField(value: v, fieldNumber: 9)
- }
- if case .identityRestoreValue(let v)? = _storage._identityRestore {
- try visitor.visitSingularStringField(value: v, fieldNumber: 10)
- }
- if case .identityRestorePasswordValue(let v)? = _storage._identityRestorePassword {
- try visitor.visitSingularStringField(value: v, fieldNumber: 11)
- }
- if _storage._threemaSafePolicy != .safeOptional {
- try visitor.visitSingularEnumField(value: _storage._threemaSafePolicy, fieldNumber: 12)
- }
- if case .threemaSafePasswordValue(let v)? = _storage._threemaSafePassword {
- try visitor.visitSingularStringField(value: v, fieldNumber: 13)
- }
- if case .threemaSafePasswordPatternValue(let v)? = _storage._threemaSafePasswordPattern {
- try visitor.visitSingularStringField(value: v, fieldNumber: 14)
- }
- if case .threemaSafePasswordPatternErrorMessageValue(let v)? = _storage._threemaSafePasswordPatternErrorMessage {
- try visitor.visitSingularStringField(value: v, fieldNumber: 15)
- }
- if case .threemaSafeServerURLValue(let v)? = _storage._threemaSafeServerURL {
- try visitor.visitSingularStringField(value: v, fieldNumber: 16)
- }
- if case .threemaSafeServerUsernameValue(let v)? = _storage._threemaSafeServerUsername {
- try visitor.visitSingularStringField(value: v, fieldNumber: 17)
- }
- if case .threemaSafeServerPasswordValue(let v)? = _storage._threemaSafeServerPassword {
- try visitor.visitSingularStringField(value: v, fieldNumber: 18)
- }
- if _storage._threemaSafeRestorePolicy != .safeRestoreOptional {
- try visitor.visitSingularEnumField(value: _storage._threemaSafeRestorePolicy, fieldNumber: 19)
- }
- if case .threemaSafeRestoreIdentityValue(let v)? = _storage._threemaSafeRestoreIdentity {
- try visitor.visitSingularStringField(value: v, fieldNumber: 20)
- }
- if _storage._overridePolicy != .loose {
- try visitor.visitSingularEnumField(value: _storage._overridePolicy, fieldNumber: 21)
- }
- if _storage._contactSyncPolicy != .notSynced {
- try visitor.visitSingularEnumField(value: _storage._contactSyncPolicy, fieldNumber: 22)
- }
- if _storage._inactiveIdentityDisplayPolicy != .showInactive {
- try visitor.visitSingularEnumField(value: _storage._inactiveIdentityDisplayPolicy, fieldNumber: 23)
- }
- if _storage._unknownContactPolicy != .allowUnknown {
- try visitor.visitSingularEnumField(value: _storage._unknownContactPolicy, fieldNumber: 24)
- }
- if _storage._autoSaveMediaPolicy != .allowAutoSave {
- try visitor.visitSingularEnumField(value: _storage._autoSaveMediaPolicy, fieldNumber: 25)
- }
- if _storage._screenshotPolicy != .allowScreenshot {
- try visitor.visitSingularEnumField(value: _storage._screenshotPolicy, fieldNumber: 26)
- }
- if _storage._addContactPolicy != .allowAddContact {
- try visitor.visitSingularEnumField(value: _storage._addContactPolicy, fieldNumber: 27)
- }
- if _storage._chatExportPolicy != .allowChatExport {
- try visitor.visitSingularEnumField(value: _storage._chatExportPolicy, fieldNumber: 28)
- }
- if _storage._backupPolicy != .allowBackup {
- try visitor.visitSingularEnumField(value: _storage._backupPolicy, fieldNumber: 29)
- }
- if _storage._identityExportPolicy != .allowIdentityExport {
- try visitor.visitSingularEnumField(value: _storage._identityExportPolicy, fieldNumber: 30)
- }
- if _storage._dataBackupPolicy != .allowDataBackup {
- try visitor.visitSingularEnumField(value: _storage._dataBackupPolicy, fieldNumber: 31)
- }
- if _storage._systemBackupPolicy != .allowSystemBackup {
- try visitor.visitSingularEnumField(value: _storage._systemBackupPolicy, fieldNumber: 32)
- }
- if _storage._messagePreviewPolicy != .allowPreview {
- try visitor.visitSingularEnumField(value: _storage._messagePreviewPolicy, fieldNumber: 33)
- }
- if _storage._profilePictureSharePolicy != .allowShare {
- try visitor.visitSingularEnumField(value: _storage._profilePictureSharePolicy, fieldNumber: 34)
- }
- if _storage._callPolicy != .allowCall {
- try visitor.visitSingularEnumField(value: _storage._callPolicy, fieldNumber: 35)
- }
- if _storage._setupWizardPolicy != .showWizard {
- try visitor.visitSingularEnumField(value: _storage._setupWizardPolicy, fieldNumber: 36)
- }
- if _storage._createGroupPolicy != .allowCreateGroup {
- try visitor.visitSingularEnumField(value: _storage._createGroupPolicy, fieldNumber: 37)
- }
- if _storage._shareMediaPolicy != .allowShareMedia {
- try visitor.visitSingularEnumField(value: _storage._shareMediaPolicy, fieldNumber: 38)
- }
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_MdmParameters, rhs: D2d_MdmParameters) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._licenseUsername != rhs_storage._licenseUsername {return false}
- if _storage._licensePassword != rhs_storage._licensePassword {return false}
- if _storage._nickname != rhs_storage._nickname {return false}
- if _storage._firstName != rhs_storage._firstName {return false}
- if _storage._lastName != rhs_storage._lastName {return false}
- if _storage._customerSpecificID != rhs_storage._customerSpecificID {return false}
- if _storage._category != rhs_storage._category {return false}
- if _storage._linkedEmail != rhs_storage._linkedEmail {return false}
- if _storage._linkedPhone != rhs_storage._linkedPhone {return false}
- if _storage._identityRestore != rhs_storage._identityRestore {return false}
- if _storage._identityRestorePassword != rhs_storage._identityRestorePassword {return false}
- if _storage._threemaSafePolicy != rhs_storage._threemaSafePolicy {return false}
- if _storage._threemaSafePassword != rhs_storage._threemaSafePassword {return false}
- if _storage._threemaSafePasswordPattern != rhs_storage._threemaSafePasswordPattern {return false}
- if _storage._threemaSafePasswordPatternErrorMessage != rhs_storage._threemaSafePasswordPatternErrorMessage {return false}
- if _storage._threemaSafeServerURL != rhs_storage._threemaSafeServerURL {return false}
- if _storage._threemaSafeServerUsername != rhs_storage._threemaSafeServerUsername {return false}
- if _storage._threemaSafeServerPassword != rhs_storage._threemaSafeServerPassword {return false}
- if _storage._threemaSafeRestorePolicy != rhs_storage._threemaSafeRestorePolicy {return false}
- if _storage._threemaSafeRestoreIdentity != rhs_storage._threemaSafeRestoreIdentity {return false}
- if _storage._overridePolicy != rhs_storage._overridePolicy {return false}
- if _storage._contactSyncPolicy != rhs_storage._contactSyncPolicy {return false}
- if _storage._inactiveIdentityDisplayPolicy != rhs_storage._inactiveIdentityDisplayPolicy {return false}
- if _storage._unknownContactPolicy != rhs_storage._unknownContactPolicy {return false}
- if _storage._autoSaveMediaPolicy != rhs_storage._autoSaveMediaPolicy {return false}
- if _storage._screenshotPolicy != rhs_storage._screenshotPolicy {return false}
- if _storage._addContactPolicy != rhs_storage._addContactPolicy {return false}
- if _storage._chatExportPolicy != rhs_storage._chatExportPolicy {return false}
- if _storage._backupPolicy != rhs_storage._backupPolicy {return false}
- if _storage._identityExportPolicy != rhs_storage._identityExportPolicy {return false}
- if _storage._dataBackupPolicy != rhs_storage._dataBackupPolicy {return false}
- if _storage._systemBackupPolicy != rhs_storage._systemBackupPolicy {return false}
- if _storage._messagePreviewPolicy != rhs_storage._messagePreviewPolicy {return false}
- if _storage._profilePictureSharePolicy != rhs_storage._profilePictureSharePolicy {return false}
- if _storage._callPolicy != rhs_storage._callPolicy {return false}
- if _storage._setupWizardPolicy != rhs_storage._setupWizardPolicy {return false}
- if _storage._createGroupPolicy != rhs_storage._createGroupPolicy {return false}
- if _storage._shareMediaPolicy != rhs_storage._shareMediaPolicy {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_MdmParameters.ThreemaSafePolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "SAFE_OPTIONAL"),
- 1: .same(proto: "SAFE_MANDATORY"),
- 2: .same(proto: "SAFE_DISABLED"),
- ]
- }
- extension D2d_MdmParameters.ThreemaSafeRestorePolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "SAFE_RESTORE_OPTIONAL"),
- 1: .same(proto: "SAFE_RESTORE_MANDATORY"),
- 2: .same(proto: "SAFE_RESTORE_DISABLED"),
- ]
- }
- extension D2d_MdmParameters.OverridePolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "LOOSE"),
- 1: .same(proto: "STRICT"),
- ]
- }
- extension D2d_MdmParameters.ContactSyncPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "NOT_SYNCED"),
- 1: .same(proto: "SYNC"),
- ]
- }
- extension D2d_MdmParameters.InactiveIdentityDisplayPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "SHOW_INACTIVE"),
- 1: .same(proto: "HIDE_INACTIVE"),
- ]
- }
- extension D2d_MdmParameters.UnknownContactPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_UNKNOWN"),
- 1: .same(proto: "BLOCK_UNKNOWN"),
- ]
- }
- extension D2d_MdmParameters.AutoSaveMediaPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_AUTO_SAVE"),
- 1: .same(proto: "DENY_AUTO_SAVE"),
- ]
- }
- extension D2d_MdmParameters.ScreenshotPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_SCREENSHOT"),
- 1: .same(proto: "DENY_SCREENSHOT"),
- ]
- }
- extension D2d_MdmParameters.AddContactPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_ADD_CONTACT"),
- 1: .same(proto: "DENY_ADD_CONTACT"),
- ]
- }
- extension D2d_MdmParameters.ChatExportPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_CHAT_EXPORT"),
- 1: .same(proto: "DENY_CHAT_EXPORT"),
- ]
- }
- extension D2d_MdmParameters.BackupPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_BACKUP"),
- 1: .same(proto: "DENY_BACKUP"),
- ]
- }
- extension D2d_MdmParameters.IdentityExportPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_IDENTITY_EXPORT"),
- 1: .same(proto: "DENY_IDENTITY_EXPORT"),
- ]
- }
- extension D2d_MdmParameters.DataBackupPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_DATA_BACKUP"),
- 1: .same(proto: "DENY_DATA_BACKUP"),
- ]
- }
- extension D2d_MdmParameters.SystemBackupPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_SYSTEM_BACKUP"),
- 1: .same(proto: "DENY_SYSTEM_BACKUP"),
- ]
- }
- extension D2d_MdmParameters.MessagePreviewPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_PREVIEW"),
- 1: .same(proto: "DENY_PREVIEW"),
- ]
- }
- extension D2d_MdmParameters.ProfilePictureSharePolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_SHARE"),
- 1: .same(proto: "DENY_SHARE"),
- ]
- }
- extension D2d_MdmParameters.CallPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_CALL"),
- 1: .same(proto: "DENY_CALL"),
- ]
- }
- extension D2d_MdmParameters.SetupWizardPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "SHOW_WIZARD"),
- 1: .same(proto: "SKIP_WIZARD"),
- ]
- }
- extension D2d_MdmParameters.CreateGroupPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_CREATE_GROUP"),
- 1: .same(proto: "DENY_CREATE_GROUP"),
- ]
- }
- extension D2d_MdmParameters.ShareMediaPolicy: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "ALLOW_SHARE_MEDIA"),
- 1: .same(proto: "DENY_OUTSIDE_APP"),
- ]
- }
- extension D2d_MessageReceiver: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".MessageReceiver"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "identity"),
- 2: .same(proto: "group"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- if self.receiver != nil {try decoder.handleConflictingOneOf()}
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {self.receiver = .identity(v)}
- case 2:
- var v: Common_GroupIdentity?
- if let current = self.receiver {
- try decoder.handleConflictingOneOf()
- if case .group(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.receiver = .group(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- switch self.receiver {
- case .identity(let v)?:
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- case .group(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_MessageReceiver, rhs: D2d_MessageReceiver) -> Bool {
- if lhs.receiver != rhs.receiver {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_OutgoingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".OutgoingMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "receiver"),
- 2: .standard(proto: "message_id"),
- 3: .standard(proto: "created_at"),
- 4: .same(proto: "type"),
- 5: .same(proto: "body"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._receiver)
- case 2: try decoder.decodeSingularFixed64Field(value: &self.messageID)
- case 3: try decoder.decodeSingularUInt64Field(value: &self.createdAt)
- case 4: try decoder.decodeSingularEnumField(value: &self.type)
- case 5: try decoder.decodeSingularBytesField(value: &self.body)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._receiver {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- if self.messageID != 0 {
- try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 2)
- }
- if self.createdAt != 0 {
- try visitor.visitSingularUInt64Field(value: self.createdAt, fieldNumber: 3)
- }
- if self.type != .invalid {
- try visitor.visitSingularEnumField(value: self.type, fieldNumber: 4)
- }
- if !self.body.isEmpty {
- try visitor.visitSingularBytesField(value: self.body, fieldNumber: 5)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_OutgoingMessage, rhs: D2d_OutgoingMessage) -> Bool {
- if lhs._receiver != rhs._receiver {return false}
- if lhs.messageID != rhs.messageID {return false}
- if lhs.createdAt != rhs.createdAt {return false}
- if lhs.type != rhs.type {return false}
- if lhs.body != rhs.body {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_OutgoingMessageDelivered: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".OutgoingMessageDelivered"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "receiver"),
- 2: .standard(proto: "message_id"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._receiver)
- case 2: try decoder.decodeSingularFixed64Field(value: &self.messageID)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._receiver {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- if self.messageID != 0 {
- try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_OutgoingMessageDelivered, rhs: D2d_OutgoingMessageDelivered) -> Bool {
- if lhs._receiver != rhs._receiver {return false}
- if lhs.messageID != rhs.messageID {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_IncomingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".IncomingMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "sender_identity"),
- 2: .standard(proto: "sender_nickname"),
- 3: .standard(proto: "message_id"),
- 4: .standard(proto: "created_at"),
- 5: .same(proto: "type"),
- 6: .same(proto: "body"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularStringField(value: &self.senderIdentity)
- case 2: try decoder.decodeSingularStringField(value: &self.senderNickname)
- case 3: try decoder.decodeSingularFixed64Field(value: &self.messageID)
- case 4: try decoder.decodeSingularUInt64Field(value: &self.createdAt)
- case 5: try decoder.decodeSingularEnumField(value: &self.type)
- case 6: try decoder.decodeSingularBytesField(value: &self.body)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.senderIdentity.isEmpty {
- try visitor.visitSingularStringField(value: self.senderIdentity, fieldNumber: 1)
- }
- if !self.senderNickname.isEmpty {
- try visitor.visitSingularStringField(value: self.senderNickname, fieldNumber: 2)
- }
- if self.messageID != 0 {
- try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 3)
- }
- if self.createdAt != 0 {
- try visitor.visitSingularUInt64Field(value: self.createdAt, fieldNumber: 4)
- }
- if self.type != .invalid {
- try visitor.visitSingularEnumField(value: self.type, fieldNumber: 5)
- }
- if !self.body.isEmpty {
- try visitor.visitSingularBytesField(value: self.body, fieldNumber: 6)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_IncomingMessage, rhs: D2d_IncomingMessage) -> Bool {
- if lhs.senderIdentity != rhs.senderIdentity {return false}
- if lhs.senderNickname != rhs.senderNickname {return false}
- if lhs.messageID != rhs.messageID {return false}
- if lhs.createdAt != rhs.createdAt {return false}
- if lhs.type != rhs.type {return false}
- if lhs.body != rhs.body {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_UserProfileSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".UserProfileSync"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "set"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- var v: D2d_UserProfileSync.Set?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .set(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .set(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if case .set(let v)? = self.action {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_UserProfileSync, rhs: D2d_UserProfileSync) -> Bool {
- if lhs.action != rhs.action {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_UserProfileSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_UserProfileSync.protoMessageName + ".Set"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "user_profile"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._userProfile)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._userProfile {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_UserProfileSync.Set, rhs: D2d_UserProfileSync.Set) -> Bool {
- if lhs._userProfile != rhs._userProfile {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_ContactSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ContactSync"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "set"),
- 2: .same(proto: "delete"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- var v: D2d_ContactSync.Set?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .set(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .set(v)}
- case 2:
- var v: D2d_ContactSync.Delete?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .delete(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .delete(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- switch self.action {
- case .set(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- case .delete(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_ContactSync, rhs: D2d_ContactSync) -> Bool {
- if lhs.action != rhs.action {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_ContactSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_ContactSync.protoMessageName + ".Set"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "contact"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._contact)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._contact {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_ContactSync.Set, rhs: D2d_ContactSync.Set) -> Bool {
- if lhs._contact != rhs._contact {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_ContactSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_ContactSync.protoMessageName + ".Delete"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "delete_identity"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularStringField(value: &self.deleteIdentity)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.deleteIdentity.isEmpty {
- try visitor.visitSingularStringField(value: self.deleteIdentity, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_ContactSync.Delete, rhs: D2d_ContactSync.Delete) -> Bool {
- if lhs.deleteIdentity != rhs.deleteIdentity {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_GroupSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".GroupSync"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "set"),
- 2: .same(proto: "delete"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- var v: D2d_GroupSync.Set?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .set(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .set(v)}
- case 2:
- var v: D2d_GroupSync.Delete?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .delete(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .delete(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- switch self.action {
- case .set(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- case .delete(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_GroupSync, rhs: D2d_GroupSync) -> Bool {
- if lhs.action != rhs.action {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_GroupSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_GroupSync.protoMessageName + ".Set"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "group"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._group)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._group {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_GroupSync.Set, rhs: D2d_GroupSync.Set) -> Bool {
- if lhs._group != rhs._group {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_GroupSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_GroupSync.protoMessageName + ".Delete"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "group_identity"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._groupIdentity)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._groupIdentity {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_GroupSync.Delete, rhs: D2d_GroupSync.Delete) -> Bool {
- if lhs._groupIdentity != rhs._groupIdentity {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_DistributionListSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".DistributionListSync"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "set"),
- 2: .same(proto: "delete"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- var v: D2d_DistributionListSync.Set?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .set(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .set(v)}
- case 2:
- var v: D2d_DistributionListSync.Delete?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .delete(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .delete(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- switch self.action {
- case .set(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- case .delete(let v)?:
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_DistributionListSync, rhs: D2d_DistributionListSync) -> Bool {
- if lhs.action != rhs.action {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_DistributionListSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_DistributionListSync.protoMessageName + ".Set"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "distribution_list"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._distributionList)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._distributionList {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_DistributionListSync.Set, rhs: D2d_DistributionListSync.Set) -> Bool {
- if lhs._distributionList != rhs._distributionList {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_DistributionListSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_DistributionListSync.protoMessageName + ".Delete"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "distribution_list_id"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularFixed64Field(value: &self.distributionListID)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.distributionListID != 0 {
- try visitor.visitSingularFixed64Field(value: self.distributionListID, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_DistributionListSync.Delete, rhs: D2d_DistributionListSync.Delete) -> Bool {
- if lhs.distributionListID != rhs.distributionListID {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_SettingsSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".SettingsSync"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "set"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1:
- var v: D2d_SettingsSync.Set?
- if let current = self.action {
- try decoder.handleConflictingOneOf()
- if case .set(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {self.action = .set(v)}
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if case .set(let v)? = self.action {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_SettingsSync, rhs: D2d_SettingsSync) -> Bool {
- if lhs.action != rhs.action {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension D2d_SettingsSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = D2d_SettingsSync.protoMessageName + ".Set"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "settings"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- switch fieldNumber {
- case 1: try decoder.decodeSingularMessageField(value: &self._settings)
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if let v = self._settings {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: D2d_SettingsSync.Set, rhs: D2d_SettingsSync.Set) -> Bool {
- if lhs._settings != rhs._settings {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|