added iOS source code
[wl-app.git] / iOS / Pods / FirebaseMessaging / Firebase / Messaging / Protos / GtalkCore.pbobjc.m
1 /*
2  * Copyright 2017 Google
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // Generated by the protocol buffer compiler.  DO NOT EDIT!
18 // source: buzz/mobile/proto/gtalk_core.proto
19
20 // This CPP symbol can be defined to use imports that match up to the framework
21 // imports needed when using CocoaPods.
22 #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
23  #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
24 #endif
25
26 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
27  #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
28 #else
29  #import "GPBProtocolBuffers_RuntimeSupport.h"
30 #endif
31
32  #import "GtalkCore.pbobjc.h"
33 // @@protoc_insertion_point(imports)
34
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
37
38 #pragma mark - GtalkGtalkCoreRoot
39
40 @implementation GtalkGtalkCoreRoot
41
42 // No extensions in the file and no imports, so no need to generate
43 // +extensionRegistry.
44
45 @end
46
47 #pragma mark - GtalkGtalkCoreRoot_FileDescriptor
48
49 static GPBFileDescriptor *GtalkGtalkCoreRoot_FileDescriptor(void) {
50   // This is called by +initialize so there is no need to worry
51   // about thread safety of the singleton.
52   static GPBFileDescriptor *descriptor = NULL;
53   if (!descriptor) {
54     GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
55     descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"mobilegtalk"
56                                                  objcPrefix:@"Gtalk"
57                                                      syntax:GPBFileSyntaxProto2];
58   }
59   return descriptor;
60 }
61
62 #pragma mark - GtalkHeartbeatPing
63
64 @implementation GtalkHeartbeatPing
65
66 @dynamic hasStreamId, streamId;
67 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
68 @dynamic hasStatus, status;
69 @dynamic hasCellTower, cellTower;
70 @dynamic hasIntervalMs, intervalMs;
71
72 typedef struct GtalkHeartbeatPing__storage_ {
73   uint32_t _has_storage_[1];
74   int32_t streamId;
75   int32_t lastStreamIdReceived;
76   int32_t intervalMs;
77   GtalkCellTower *cellTower;
78   int64_t status;
79 } GtalkHeartbeatPing__storage_;
80
81 // This method is threadsafe because it is initially called
82 // in +initialize for each subclass.
83 + (GPBDescriptor *)descriptor {
84   static GPBDescriptor *descriptor = nil;
85   if (!descriptor) {
86     static GPBMessageFieldDescription fields[] = {
87       {
88         .name = "streamId",
89         .dataTypeSpecific.className = NULL,
90         .number = GtalkHeartbeatPing_FieldNumber_StreamId,
91         .hasIndex = 0,
92         .offset = (uint32_t)offsetof(GtalkHeartbeatPing__storage_, streamId),
93         .flags = GPBFieldOptional,
94         .dataType = GPBDataTypeInt32,
95       },
96       {
97         .name = "lastStreamIdReceived",
98         .dataTypeSpecific.className = NULL,
99         .number = GtalkHeartbeatPing_FieldNumber_LastStreamIdReceived,
100         .hasIndex = 1,
101         .offset = (uint32_t)offsetof(GtalkHeartbeatPing__storage_, lastStreamIdReceived),
102         .flags = GPBFieldOptional,
103         .dataType = GPBDataTypeInt32,
104       },
105       {
106         .name = "status",
107         .dataTypeSpecific.className = NULL,
108         .number = GtalkHeartbeatPing_FieldNumber_Status,
109         .hasIndex = 2,
110         .offset = (uint32_t)offsetof(GtalkHeartbeatPing__storage_, status),
111         .flags = GPBFieldOptional,
112         .dataType = GPBDataTypeInt64,
113       },
114       {
115         .name = "cellTower",
116         .dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
117         .number = GtalkHeartbeatPing_FieldNumber_CellTower,
118         .hasIndex = 3,
119         .offset = (uint32_t)offsetof(GtalkHeartbeatPing__storage_, cellTower),
120         .flags = GPBFieldOptional,
121         .dataType = GPBDataTypeMessage,
122       },
123       {
124         .name = "intervalMs",
125         .dataTypeSpecific.className = NULL,
126         .number = GtalkHeartbeatPing_FieldNumber_IntervalMs,
127         .hasIndex = 4,
128         .offset = (uint32_t)offsetof(GtalkHeartbeatPing__storage_, intervalMs),
129         .flags = GPBFieldOptional,
130         .dataType = GPBDataTypeInt32,
131       },
132     };
133     GPBDescriptor *localDescriptor =
134         [GPBDescriptor allocDescriptorForClass:[GtalkHeartbeatPing class]
135                                      rootClass:[GtalkGtalkCoreRoot class]
136                                           file:GtalkGtalkCoreRoot_FileDescriptor()
137                                         fields:fields
138                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
139                                    storageSize:sizeof(GtalkHeartbeatPing__storage_)
140                                          flags:GPBDescriptorInitializationFlag_None];
141     NSAssert(descriptor == nil, @"Startup recursed!");
142     descriptor = localDescriptor;
143   }
144   return descriptor;
145 }
146
147 @end
148
149 #pragma mark - GtalkHeartbeatAck
150
151 @implementation GtalkHeartbeatAck
152
153 @dynamic hasStreamId, streamId;
154 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
155 @dynamic hasStatus, status;
156 @dynamic hasCellTower, cellTower;
157 @dynamic hasIntervalMs, intervalMs;
158
159 typedef struct GtalkHeartbeatAck__storage_ {
160   uint32_t _has_storage_[1];
161   int32_t streamId;
162   int32_t lastStreamIdReceived;
163   int32_t intervalMs;
164   GtalkCellTower *cellTower;
165   int64_t status;
166 } GtalkHeartbeatAck__storage_;
167
168 // This method is threadsafe because it is initially called
169 // in +initialize for each subclass.
170 + (GPBDescriptor *)descriptor {
171   static GPBDescriptor *descriptor = nil;
172   if (!descriptor) {
173     static GPBMessageFieldDescription fields[] = {
174       {
175         .name = "streamId",
176         .dataTypeSpecific.className = NULL,
177         .number = GtalkHeartbeatAck_FieldNumber_StreamId,
178         .hasIndex = 0,
179         .offset = (uint32_t)offsetof(GtalkHeartbeatAck__storage_, streamId),
180         .flags = GPBFieldOptional,
181         .dataType = GPBDataTypeInt32,
182       },
183       {
184         .name = "lastStreamIdReceived",
185         .dataTypeSpecific.className = NULL,
186         .number = GtalkHeartbeatAck_FieldNumber_LastStreamIdReceived,
187         .hasIndex = 1,
188         .offset = (uint32_t)offsetof(GtalkHeartbeatAck__storage_, lastStreamIdReceived),
189         .flags = GPBFieldOptional,
190         .dataType = GPBDataTypeInt32,
191       },
192       {
193         .name = "status",
194         .dataTypeSpecific.className = NULL,
195         .number = GtalkHeartbeatAck_FieldNumber_Status,
196         .hasIndex = 2,
197         .offset = (uint32_t)offsetof(GtalkHeartbeatAck__storage_, status),
198         .flags = GPBFieldOptional,
199         .dataType = GPBDataTypeInt64,
200       },
201       {
202         .name = "cellTower",
203         .dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
204         .number = GtalkHeartbeatAck_FieldNumber_CellTower,
205         .hasIndex = 3,
206         .offset = (uint32_t)offsetof(GtalkHeartbeatAck__storage_, cellTower),
207         .flags = GPBFieldOptional,
208         .dataType = GPBDataTypeMessage,
209       },
210       {
211         .name = "intervalMs",
212         .dataTypeSpecific.className = NULL,
213         .number = GtalkHeartbeatAck_FieldNumber_IntervalMs,
214         .hasIndex = 4,
215         .offset = (uint32_t)offsetof(GtalkHeartbeatAck__storage_, intervalMs),
216         .flags = GPBFieldOptional,
217         .dataType = GPBDataTypeInt32,
218       },
219     };
220     GPBDescriptor *localDescriptor =
221         [GPBDescriptor allocDescriptorForClass:[GtalkHeartbeatAck class]
222                                      rootClass:[GtalkGtalkCoreRoot class]
223                                           file:GtalkGtalkCoreRoot_FileDescriptor()
224                                         fields:fields
225                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
226                                    storageSize:sizeof(GtalkHeartbeatAck__storage_)
227                                          flags:GPBDescriptorInitializationFlag_None];
228     NSAssert(descriptor == nil, @"Startup recursed!");
229     descriptor = localDescriptor;
230   }
231   return descriptor;
232 }
233
234 @end
235
236 #pragma mark - GtalkErrorInfo
237
238 @implementation GtalkErrorInfo
239
240 @dynamic hasCode, code;
241 @dynamic hasMessage, message;
242 @dynamic hasType, type;
243 @dynamic hasExtension, extension;
244
245 typedef struct GtalkErrorInfo__storage_ {
246   uint32_t _has_storage_[1];
247   int32_t code;
248   NSString *message;
249   NSString *type;
250   GtalkExtension *extension;
251 } GtalkErrorInfo__storage_;
252
253 // This method is threadsafe because it is initially called
254 // in +initialize for each subclass.
255 + (GPBDescriptor *)descriptor {
256   static GPBDescriptor *descriptor = nil;
257   if (!descriptor) {
258     static GPBMessageFieldDescription fields[] = {
259       {
260         .name = "code",
261         .dataTypeSpecific.className = NULL,
262         .number = GtalkErrorInfo_FieldNumber_Code,
263         .hasIndex = 0,
264         .offset = (uint32_t)offsetof(GtalkErrorInfo__storage_, code),
265         .flags = GPBFieldRequired,
266         .dataType = GPBDataTypeInt32,
267       },
268       {
269         .name = "message",
270         .dataTypeSpecific.className = NULL,
271         .number = GtalkErrorInfo_FieldNumber_Message,
272         .hasIndex = 1,
273         .offset = (uint32_t)offsetof(GtalkErrorInfo__storage_, message),
274         .flags = GPBFieldOptional,
275         .dataType = GPBDataTypeString,
276       },
277       {
278         .name = "type",
279         .dataTypeSpecific.className = NULL,
280         .number = GtalkErrorInfo_FieldNumber_Type,
281         .hasIndex = 2,
282         .offset = (uint32_t)offsetof(GtalkErrorInfo__storage_, type),
283         .flags = GPBFieldOptional,
284         .dataType = GPBDataTypeString,
285       },
286       {
287         .name = "extension",
288         .dataTypeSpecific.className = GPBStringifySymbol(GtalkExtension),
289         .number = GtalkErrorInfo_FieldNumber_Extension,
290         .hasIndex = 3,
291         .offset = (uint32_t)offsetof(GtalkErrorInfo__storage_, extension),
292         .flags = GPBFieldOptional,
293         .dataType = GPBDataTypeMessage,
294       },
295     };
296     GPBDescriptor *localDescriptor =
297         [GPBDescriptor allocDescriptorForClass:[GtalkErrorInfo class]
298                                      rootClass:[GtalkGtalkCoreRoot class]
299                                           file:GtalkGtalkCoreRoot_FileDescriptor()
300                                         fields:fields
301                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
302                                    storageSize:sizeof(GtalkErrorInfo__storage_)
303                                          flags:GPBDescriptorInitializationFlag_None];
304     NSAssert(descriptor == nil, @"Startup recursed!");
305     descriptor = localDescriptor;
306   }
307   return descriptor;
308 }
309
310 @end
311
312 #pragma mark - GtalkSetting
313
314 @implementation GtalkSetting
315
316 @dynamic hasName, name;
317 @dynamic hasValue, value;
318
319 typedef struct GtalkSetting__storage_ {
320   uint32_t _has_storage_[1];
321   NSString *name;
322   NSString *value;
323 } GtalkSetting__storage_;
324
325 // This method is threadsafe because it is initially called
326 // in +initialize for each subclass.
327 + (GPBDescriptor *)descriptor {
328   static GPBDescriptor *descriptor = nil;
329   if (!descriptor) {
330     static GPBMessageFieldDescription fields[] = {
331       {
332         .name = "name",
333         .dataTypeSpecific.className = NULL,
334         .number = GtalkSetting_FieldNumber_Name,
335         .hasIndex = 0,
336         .offset = (uint32_t)offsetof(GtalkSetting__storage_, name),
337         .flags = GPBFieldRequired,
338         .dataType = GPBDataTypeString,
339       },
340       {
341         .name = "value",
342         .dataTypeSpecific.className = NULL,
343         .number = GtalkSetting_FieldNumber_Value,
344         .hasIndex = 1,
345         .offset = (uint32_t)offsetof(GtalkSetting__storage_, value),
346         .flags = GPBFieldRequired,
347         .dataType = GPBDataTypeString,
348       },
349     };
350     GPBDescriptor *localDescriptor =
351         [GPBDescriptor allocDescriptorForClass:[GtalkSetting class]
352                                      rootClass:[GtalkGtalkCoreRoot class]
353                                           file:GtalkGtalkCoreRoot_FileDescriptor()
354                                         fields:fields
355                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
356                                    storageSize:sizeof(GtalkSetting__storage_)
357                                          flags:GPBDescriptorInitializationFlag_None];
358     NSAssert(descriptor == nil, @"Startup recursed!");
359     descriptor = localDescriptor;
360   }
361   return descriptor;
362 }
363
364 @end
365
366 #pragma mark - GtalkHeartbeatStat
367
368 @implementation GtalkHeartbeatStat
369
370 @dynamic hasIp, ip;
371 @dynamic hasTimeout, timeout;
372 @dynamic hasIntervalMs, intervalMs;
373
374 typedef struct GtalkHeartbeatStat__storage_ {
375   uint32_t _has_storage_[1];
376   int32_t intervalMs;
377   NSString *ip;
378 } GtalkHeartbeatStat__storage_;
379
380 // This method is threadsafe because it is initially called
381 // in +initialize for each subclass.
382 + (GPBDescriptor *)descriptor {
383   static GPBDescriptor *descriptor = nil;
384   if (!descriptor) {
385     static GPBMessageFieldDescription fields[] = {
386       {
387         .name = "ip",
388         .dataTypeSpecific.className = NULL,
389         .number = GtalkHeartbeatStat_FieldNumber_Ip,
390         .hasIndex = 0,
391         .offset = (uint32_t)offsetof(GtalkHeartbeatStat__storage_, ip),
392         .flags = GPBFieldRequired,
393         .dataType = GPBDataTypeString,
394       },
395       {
396         .name = "timeout",
397         .dataTypeSpecific.className = NULL,
398         .number = GtalkHeartbeatStat_FieldNumber_Timeout,
399         .hasIndex = 1,
400         .offset = 2,  // Stored in _has_storage_ to save space.
401         .flags = GPBFieldRequired,
402         .dataType = GPBDataTypeBool,
403       },
404       {
405         .name = "intervalMs",
406         .dataTypeSpecific.className = NULL,
407         .number = GtalkHeartbeatStat_FieldNumber_IntervalMs,
408         .hasIndex = 3,
409         .offset = (uint32_t)offsetof(GtalkHeartbeatStat__storage_, intervalMs),
410         .flags = GPBFieldRequired,
411         .dataType = GPBDataTypeInt32,
412       },
413     };
414     GPBDescriptor *localDescriptor =
415         [GPBDescriptor allocDescriptorForClass:[GtalkHeartbeatStat class]
416                                      rootClass:[GtalkGtalkCoreRoot class]
417                                           file:GtalkGtalkCoreRoot_FileDescriptor()
418                                         fields:fields
419                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
420                                    storageSize:sizeof(GtalkHeartbeatStat__storage_)
421                                          flags:GPBDescriptorInitializationFlag_None];
422     NSAssert(descriptor == nil, @"Startup recursed!");
423     descriptor = localDescriptor;
424   }
425   return descriptor;
426 }
427
428 @end
429
430 #pragma mark - GtalkHeartbeatConfig
431
432 @implementation GtalkHeartbeatConfig
433
434 @dynamic hasUploadStat, uploadStat;
435 @dynamic hasIp, ip;
436 @dynamic hasIntervalMs, intervalMs;
437
438 typedef struct GtalkHeartbeatConfig__storage_ {
439   uint32_t _has_storage_[1];
440   int32_t intervalMs;
441   NSString *ip;
442 } GtalkHeartbeatConfig__storage_;
443
444 // This method is threadsafe because it is initially called
445 // in +initialize for each subclass.
446 + (GPBDescriptor *)descriptor {
447   static GPBDescriptor *descriptor = nil;
448   if (!descriptor) {
449     static GPBMessageFieldDescription fields[] = {
450       {
451         .name = "uploadStat",
452         .dataTypeSpecific.className = NULL,
453         .number = GtalkHeartbeatConfig_FieldNumber_UploadStat,
454         .hasIndex = 0,
455         .offset = 1,  // Stored in _has_storage_ to save space.
456         .flags = GPBFieldOptional,
457         .dataType = GPBDataTypeBool,
458       },
459       {
460         .name = "ip",
461         .dataTypeSpecific.className = NULL,
462         .number = GtalkHeartbeatConfig_FieldNumber_Ip,
463         .hasIndex = 2,
464         .offset = (uint32_t)offsetof(GtalkHeartbeatConfig__storage_, ip),
465         .flags = GPBFieldOptional,
466         .dataType = GPBDataTypeString,
467       },
468       {
469         .name = "intervalMs",
470         .dataTypeSpecific.className = NULL,
471         .number = GtalkHeartbeatConfig_FieldNumber_IntervalMs,
472         .hasIndex = 3,
473         .offset = (uint32_t)offsetof(GtalkHeartbeatConfig__storage_, intervalMs),
474         .flags = GPBFieldOptional,
475         .dataType = GPBDataTypeInt32,
476       },
477     };
478     GPBDescriptor *localDescriptor =
479         [GPBDescriptor allocDescriptorForClass:[GtalkHeartbeatConfig class]
480                                      rootClass:[GtalkGtalkCoreRoot class]
481                                           file:GtalkGtalkCoreRoot_FileDescriptor()
482                                         fields:fields
483                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
484                                    storageSize:sizeof(GtalkHeartbeatConfig__storage_)
485                                          flags:GPBDescriptorInitializationFlag_None];
486     NSAssert(descriptor == nil, @"Startup recursed!");
487     descriptor = localDescriptor;
488   }
489   return descriptor;
490 }
491
492 @end
493
494 #pragma mark - GtalkLoginRequest
495
496 @implementation GtalkLoginRequest
497
498 @dynamic hasId_p, id_p;
499 @dynamic hasDomain, domain;
500 @dynamic hasUser, user;
501 @dynamic hasResource, resource;
502 @dynamic hasAuthToken, authToken;
503 @dynamic hasDeviceId, deviceId;
504 @dynamic hasLastRmqId, lastRmqId;
505 @dynamic settingArray, settingArray_Count;
506 @dynamic receivedPersistentIdArray, receivedPersistentIdArray_Count;
507 @dynamic hasIncludeStreamIds, includeStreamIds;
508 @dynamic hasHeartbeatStat, heartbeatStat;
509 @dynamic hasUseRmq2, useRmq2;
510 @dynamic hasAccountId, accountId;
511 @dynamic hasAuthService, authService;
512 @dynamic hasNetworkType, networkType;
513 @dynamic hasStatus, status;
514 @dynamic hasTokenVersionInfo, tokenVersionInfo;
515 @dynamic hasCellTower, cellTower;
516 @dynamic hasGcmStartTimeMs, gcmStartTimeMs;
517 @dynamic clientEventArray, clientEventArray_Count;
518 @dynamic hasOnFallback, onFallback;
519 @dynamic hasNoPendingUpstream, noPendingUpstream;
520 @dynamic hasReconnectRequestId, reconnectRequestId;
521
522 typedef struct GtalkLoginRequest__storage_ {
523   uint32_t _has_storage_[1];
524   GtalkLoginRequest_AuthService authService;
525   int32_t networkType;
526   int32_t reconnectRequestId;
527   NSString *id_p;
528   NSString *domain;
529   NSString *user;
530   NSString *resource;
531   NSString *authToken;
532   NSString *deviceId;
533   NSMutableArray *settingArray;
534   NSMutableArray *receivedPersistentIdArray;
535   GtalkHeartbeatStat *heartbeatStat;
536   NSString *tokenVersionInfo;
537   GtalkCellTower *cellTower;
538   NSMutableArray *clientEventArray;
539   int64_t lastRmqId;
540   int64_t accountId;
541   int64_t status;
542   uint64_t gcmStartTimeMs;
543 } GtalkLoginRequest__storage_;
544
545 // This method is threadsafe because it is initially called
546 // in +initialize for each subclass.
547 + (GPBDescriptor *)descriptor {
548   static GPBDescriptor *descriptor = nil;
549   if (!descriptor) {
550     static GPBMessageFieldDescription fields[] = {
551       {
552         .name = "id_p",
553         .dataTypeSpecific.className = NULL,
554         .number = GtalkLoginRequest_FieldNumber_Id_p,
555         .hasIndex = 0,
556         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, id_p),
557         .flags = GPBFieldRequired,
558         .dataType = GPBDataTypeString,
559       },
560       {
561         .name = "domain",
562         .dataTypeSpecific.className = NULL,
563         .number = GtalkLoginRequest_FieldNumber_Domain,
564         .hasIndex = 1,
565         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, domain),
566         .flags = GPBFieldRequired,
567         .dataType = GPBDataTypeString,
568       },
569       {
570         .name = "user",
571         .dataTypeSpecific.className = NULL,
572         .number = GtalkLoginRequest_FieldNumber_User,
573         .hasIndex = 2,
574         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, user),
575         .flags = GPBFieldRequired,
576         .dataType = GPBDataTypeString,
577       },
578       {
579         .name = "resource",
580         .dataTypeSpecific.className = NULL,
581         .number = GtalkLoginRequest_FieldNumber_Resource,
582         .hasIndex = 3,
583         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, resource),
584         .flags = GPBFieldRequired,
585         .dataType = GPBDataTypeString,
586       },
587       {
588         .name = "authToken",
589         .dataTypeSpecific.className = NULL,
590         .number = GtalkLoginRequest_FieldNumber_AuthToken,
591         .hasIndex = 4,
592         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, authToken),
593         .flags = GPBFieldRequired,
594         .dataType = GPBDataTypeString,
595       },
596       {
597         .name = "deviceId",
598         .dataTypeSpecific.className = NULL,
599         .number = GtalkLoginRequest_FieldNumber_DeviceId,
600         .hasIndex = 5,
601         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, deviceId),
602         .flags = GPBFieldOptional,
603         .dataType = GPBDataTypeString,
604       },
605       {
606         .name = "lastRmqId",
607         .dataTypeSpecific.className = NULL,
608         .number = GtalkLoginRequest_FieldNumber_LastRmqId,
609         .hasIndex = 6,
610         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, lastRmqId),
611         .flags = GPBFieldOptional,
612         .dataType = GPBDataTypeInt64,
613       },
614       {
615         .name = "settingArray",
616         .dataTypeSpecific.className = GPBStringifySymbol(GtalkSetting),
617         .number = GtalkLoginRequest_FieldNumber_SettingArray,
618         .hasIndex = GPBNoHasBit,
619         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, settingArray),
620         .flags = GPBFieldRepeated,
621         .dataType = GPBDataTypeMessage,
622       },
623       {
624         .name = "receivedPersistentIdArray",
625         .dataTypeSpecific.className = NULL,
626         .number = GtalkLoginRequest_FieldNumber_ReceivedPersistentIdArray,
627         .hasIndex = GPBNoHasBit,
628         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, receivedPersistentIdArray),
629         .flags = GPBFieldRepeated,
630         .dataType = GPBDataTypeString,
631       },
632       {
633         .name = "includeStreamIds",
634         .dataTypeSpecific.className = NULL,
635         .number = GtalkLoginRequest_FieldNumber_IncludeStreamIds,
636         .hasIndex = 7,
637         .offset = 8,  // Stored in _has_storage_ to save space.
638         .flags = GPBFieldOptional,
639         .dataType = GPBDataTypeBool,
640       },
641       {
642         .name = "heartbeatStat",
643         .dataTypeSpecific.className = GPBStringifySymbol(GtalkHeartbeatStat),
644         .number = GtalkLoginRequest_FieldNumber_HeartbeatStat,
645         .hasIndex = 9,
646         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, heartbeatStat),
647         .flags = GPBFieldOptional,
648         .dataType = GPBDataTypeMessage,
649       },
650       {
651         .name = "useRmq2",
652         .dataTypeSpecific.className = NULL,
653         .number = GtalkLoginRequest_FieldNumber_UseRmq2,
654         .hasIndex = 10,
655         .offset = 11,  // Stored in _has_storage_ to save space.
656         .flags = GPBFieldOptional,
657         .dataType = GPBDataTypeBool,
658       },
659       {
660         .name = "accountId",
661         .dataTypeSpecific.className = NULL,
662         .number = GtalkLoginRequest_FieldNumber_AccountId,
663         .hasIndex = 12,
664         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, accountId),
665         .flags = GPBFieldOptional,
666         .dataType = GPBDataTypeInt64,
667       },
668       {
669         .name = "authService",
670         .dataTypeSpecific.enumDescFunc = GtalkLoginRequest_AuthService_EnumDescriptor,
671         .number = GtalkLoginRequest_FieldNumber_AuthService,
672         .hasIndex = 13,
673         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, authService),
674         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
675         .dataType = GPBDataTypeEnum,
676       },
677       {
678         .name = "networkType",
679         .dataTypeSpecific.className = NULL,
680         .number = GtalkLoginRequest_FieldNumber_NetworkType,
681         .hasIndex = 14,
682         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, networkType),
683         .flags = GPBFieldOptional,
684         .dataType = GPBDataTypeInt32,
685       },
686       {
687         .name = "status",
688         .dataTypeSpecific.className = NULL,
689         .number = GtalkLoginRequest_FieldNumber_Status,
690         .hasIndex = 15,
691         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, status),
692         .flags = GPBFieldOptional,
693         .dataType = GPBDataTypeInt64,
694       },
695       {
696         .name = "tokenVersionInfo",
697         .dataTypeSpecific.className = NULL,
698         .number = GtalkLoginRequest_FieldNumber_TokenVersionInfo,
699         .hasIndex = 16,
700         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, tokenVersionInfo),
701         .flags = GPBFieldOptional,
702         .dataType = GPBDataTypeString,
703       },
704       {
705         .name = "cellTower",
706         .dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
707         .number = GtalkLoginRequest_FieldNumber_CellTower,
708         .hasIndex = 17,
709         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, cellTower),
710         .flags = GPBFieldOptional,
711         .dataType = GPBDataTypeMessage,
712       },
713       {
714         .name = "gcmStartTimeMs",
715         .dataTypeSpecific.className = NULL,
716         .number = GtalkLoginRequest_FieldNumber_GcmStartTimeMs,
717         .hasIndex = 18,
718         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, gcmStartTimeMs),
719         .flags = GPBFieldOptional,
720         .dataType = GPBDataTypeUInt64,
721       },
722       {
723         .name = "clientEventArray",
724         .dataTypeSpecific.className = GPBStringifySymbol(GtalkClientEvent),
725         .number = GtalkLoginRequest_FieldNumber_ClientEventArray,
726         .hasIndex = GPBNoHasBit,
727         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, clientEventArray),
728         .flags = GPBFieldRepeated,
729         .dataType = GPBDataTypeMessage,
730       },
731       {
732         .name = "onFallback",
733         .dataTypeSpecific.className = NULL,
734         .number = GtalkLoginRequest_FieldNumber_OnFallback,
735         .hasIndex = 19,
736         .offset = 20,  // Stored in _has_storage_ to save space.
737         .flags = GPBFieldOptional,
738         .dataType = GPBDataTypeBool,
739       },
740       {
741         .name = "noPendingUpstream",
742         .dataTypeSpecific.className = NULL,
743         .number = GtalkLoginRequest_FieldNumber_NoPendingUpstream,
744         .hasIndex = 21,
745         .offset = 22,  // Stored in _has_storage_ to save space.
746         .flags = GPBFieldOptional,
747         .dataType = GPBDataTypeBool,
748       },
749       {
750         .name = "reconnectRequestId",
751         .dataTypeSpecific.className = NULL,
752         .number = GtalkLoginRequest_FieldNumber_ReconnectRequestId,
753         .hasIndex = 23,
754         .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, reconnectRequestId),
755         .flags = GPBFieldOptional,
756         .dataType = GPBDataTypeInt32,
757       },
758     };
759     GPBDescriptor *localDescriptor =
760         [GPBDescriptor allocDescriptorForClass:[GtalkLoginRequest class]
761                                      rootClass:[GtalkGtalkCoreRoot class]
762                                           file:GtalkGtalkCoreRoot_FileDescriptor()
763                                         fields:fields
764                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
765                                    storageSize:sizeof(GtalkLoginRequest__storage_)
766                                          flags:GPBDescriptorInitializationFlag_None];
767     NSAssert(descriptor == nil, @"Startup recursed!");
768     descriptor = localDescriptor;
769   }
770   return descriptor;
771 }
772
773 @end
774
775 #pragma mark - Enum GtalkLoginRequest_AuthService
776
777 GPBEnumDescriptor *GtalkLoginRequest_AuthService_EnumDescriptor(void) {
778   static GPBEnumDescriptor *descriptor = NULL;
779   if (!descriptor) {
780     static const char *valueNames =
781         "Mail\000AndroidCloudToDeviceMessage\000Android"
782         "Id\000";
783     static const int32_t values[] = {
784         GtalkLoginRequest_AuthService_Mail,
785         GtalkLoginRequest_AuthService_AndroidCloudToDeviceMessage,
786         GtalkLoginRequest_AuthService_AndroidId,
787     };
788     GPBEnumDescriptor *worker =
789         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkLoginRequest_AuthService)
790                                        valueNames:valueNames
791                                            values:values
792                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
793                                      enumVerifier:GtalkLoginRequest_AuthService_IsValidValue];
794     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
795       [worker release];
796     }
797   }
798   return descriptor;
799 }
800
801 BOOL GtalkLoginRequest_AuthService_IsValidValue(int32_t value__) {
802   switch (value__) {
803     case GtalkLoginRequest_AuthService_Mail:
804     case GtalkLoginRequest_AuthService_AndroidCloudToDeviceMessage:
805     case GtalkLoginRequest_AuthService_AndroidId:
806       return YES;
807     default:
808       return NO;
809   }
810 }
811
812 #pragma mark - GtalkLoginResponse
813
814 @implementation GtalkLoginResponse
815
816 @dynamic hasId_p, id_p;
817 @dynamic hasJid, jid;
818 @dynamic hasError, error;
819 @dynamic settingArray, settingArray_Count;
820 @dynamic hasStreamId, streamId;
821 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
822 @dynamic hasHeartbeatConfig, heartbeatConfig;
823 @dynamic hasServerTimestamp, serverTimestamp;
824
825 typedef struct GtalkLoginResponse__storage_ {
826   uint32_t _has_storage_[1];
827   int32_t streamId;
828   int32_t lastStreamIdReceived;
829   NSString *id_p;
830   NSString *jid;
831   GtalkErrorInfo *error;
832   NSMutableArray *settingArray;
833   GtalkHeartbeatConfig *heartbeatConfig;
834   int64_t serverTimestamp;
835 } GtalkLoginResponse__storage_;
836
837 // This method is threadsafe because it is initially called
838 // in +initialize for each subclass.
839 + (GPBDescriptor *)descriptor {
840   static GPBDescriptor *descriptor = nil;
841   if (!descriptor) {
842     static GPBMessageFieldDescription fields[] = {
843       {
844         .name = "id_p",
845         .dataTypeSpecific.className = NULL,
846         .number = GtalkLoginResponse_FieldNumber_Id_p,
847         .hasIndex = 0,
848         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, id_p),
849         .flags = GPBFieldRequired,
850         .dataType = GPBDataTypeString,
851       },
852       {
853         .name = "jid",
854         .dataTypeSpecific.className = NULL,
855         .number = GtalkLoginResponse_FieldNumber_Jid,
856         .hasIndex = 1,
857         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, jid),
858         .flags = GPBFieldOptional,
859         .dataType = GPBDataTypeString,
860       },
861       {
862         .name = "error",
863         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
864         .number = GtalkLoginResponse_FieldNumber_Error,
865         .hasIndex = 2,
866         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, error),
867         .flags = GPBFieldOptional,
868         .dataType = GPBDataTypeMessage,
869       },
870       {
871         .name = "settingArray",
872         .dataTypeSpecific.className = GPBStringifySymbol(GtalkSetting),
873         .number = GtalkLoginResponse_FieldNumber_SettingArray,
874         .hasIndex = GPBNoHasBit,
875         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, settingArray),
876         .flags = GPBFieldRepeated,
877         .dataType = GPBDataTypeMessage,
878       },
879       {
880         .name = "streamId",
881         .dataTypeSpecific.className = NULL,
882         .number = GtalkLoginResponse_FieldNumber_StreamId,
883         .hasIndex = 3,
884         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, streamId),
885         .flags = GPBFieldOptional,
886         .dataType = GPBDataTypeInt32,
887       },
888       {
889         .name = "lastStreamIdReceived",
890         .dataTypeSpecific.className = NULL,
891         .number = GtalkLoginResponse_FieldNumber_LastStreamIdReceived,
892         .hasIndex = 4,
893         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, lastStreamIdReceived),
894         .flags = GPBFieldOptional,
895         .dataType = GPBDataTypeInt32,
896       },
897       {
898         .name = "heartbeatConfig",
899         .dataTypeSpecific.className = GPBStringifySymbol(GtalkHeartbeatConfig),
900         .number = GtalkLoginResponse_FieldNumber_HeartbeatConfig,
901         .hasIndex = 5,
902         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, heartbeatConfig),
903         .flags = GPBFieldOptional,
904         .dataType = GPBDataTypeMessage,
905       },
906       {
907         .name = "serverTimestamp",
908         .dataTypeSpecific.className = NULL,
909         .number = GtalkLoginResponse_FieldNumber_ServerTimestamp,
910         .hasIndex = 6,
911         .offset = (uint32_t)offsetof(GtalkLoginResponse__storage_, serverTimestamp),
912         .flags = GPBFieldOptional,
913         .dataType = GPBDataTypeInt64,
914       },
915     };
916     GPBDescriptor *localDescriptor =
917         [GPBDescriptor allocDescriptorForClass:[GtalkLoginResponse class]
918                                      rootClass:[GtalkGtalkCoreRoot class]
919                                           file:GtalkGtalkCoreRoot_FileDescriptor()
920                                         fields:fields
921                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
922                                    storageSize:sizeof(GtalkLoginResponse__storage_)
923                                          flags:GPBDescriptorInitializationFlag_None];
924     NSAssert(descriptor == nil, @"Startup recursed!");
925     descriptor = localDescriptor;
926   }
927   return descriptor;
928 }
929
930 @end
931
932 #pragma mark - GtalkBindAccountRequest
933
934 @implementation GtalkBindAccountRequest
935
936 @dynamic hasId_p, id_p;
937 @dynamic hasDomain, domain;
938 @dynamic hasUser, user;
939 @dynamic hasResource, resource;
940 @dynamic hasAuthToken, authToken;
941 @dynamic hasPersistentId, persistentId;
942 @dynamic hasStreamId, streamId;
943 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
944 @dynamic hasAccountId, accountId;
945
946 typedef struct GtalkBindAccountRequest__storage_ {
947   uint32_t _has_storage_[1];
948   int32_t streamId;
949   int32_t lastStreamIdReceived;
950   NSString *id_p;
951   NSString *domain;
952   NSString *user;
953   NSString *resource;
954   NSString *authToken;
955   NSString *persistentId;
956   int64_t accountId;
957 } GtalkBindAccountRequest__storage_;
958
959 // This method is threadsafe because it is initially called
960 // in +initialize for each subclass.
961 + (GPBDescriptor *)descriptor {
962   static GPBDescriptor *descriptor = nil;
963   if (!descriptor) {
964     static GPBMessageFieldDescription fields[] = {
965       {
966         .name = "id_p",
967         .dataTypeSpecific.className = NULL,
968         .number = GtalkBindAccountRequest_FieldNumber_Id_p,
969         .hasIndex = 0,
970         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, id_p),
971         .flags = GPBFieldRequired,
972         .dataType = GPBDataTypeString,
973       },
974       {
975         .name = "domain",
976         .dataTypeSpecific.className = NULL,
977         .number = GtalkBindAccountRequest_FieldNumber_Domain,
978         .hasIndex = 1,
979         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, domain),
980         .flags = GPBFieldRequired,
981         .dataType = GPBDataTypeString,
982       },
983       {
984         .name = "user",
985         .dataTypeSpecific.className = NULL,
986         .number = GtalkBindAccountRequest_FieldNumber_User,
987         .hasIndex = 2,
988         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, user),
989         .flags = GPBFieldRequired,
990         .dataType = GPBDataTypeString,
991       },
992       {
993         .name = "resource",
994         .dataTypeSpecific.className = NULL,
995         .number = GtalkBindAccountRequest_FieldNumber_Resource,
996         .hasIndex = 3,
997         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, resource),
998         .flags = GPBFieldRequired,
999         .dataType = GPBDataTypeString,
1000       },
1001       {
1002         .name = "authToken",
1003         .dataTypeSpecific.className = NULL,
1004         .number = GtalkBindAccountRequest_FieldNumber_AuthToken,
1005         .hasIndex = 4,
1006         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, authToken),
1007         .flags = GPBFieldRequired,
1008         .dataType = GPBDataTypeString,
1009       },
1010       {
1011         .name = "persistentId",
1012         .dataTypeSpecific.className = NULL,
1013         .number = GtalkBindAccountRequest_FieldNumber_PersistentId,
1014         .hasIndex = 5,
1015         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, persistentId),
1016         .flags = GPBFieldOptional,
1017         .dataType = GPBDataTypeString,
1018       },
1019       {
1020         .name = "streamId",
1021         .dataTypeSpecific.className = NULL,
1022         .number = GtalkBindAccountRequest_FieldNumber_StreamId,
1023         .hasIndex = 6,
1024         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, streamId),
1025         .flags = GPBFieldOptional,
1026         .dataType = GPBDataTypeInt32,
1027       },
1028       {
1029         .name = "lastStreamIdReceived",
1030         .dataTypeSpecific.className = NULL,
1031         .number = GtalkBindAccountRequest_FieldNumber_LastStreamIdReceived,
1032         .hasIndex = 7,
1033         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, lastStreamIdReceived),
1034         .flags = GPBFieldOptional,
1035         .dataType = GPBDataTypeInt32,
1036       },
1037       {
1038         .name = "accountId",
1039         .dataTypeSpecific.className = NULL,
1040         .number = GtalkBindAccountRequest_FieldNumber_AccountId,
1041         .hasIndex = 8,
1042         .offset = (uint32_t)offsetof(GtalkBindAccountRequest__storage_, accountId),
1043         .flags = GPBFieldOptional,
1044         .dataType = GPBDataTypeInt64,
1045       },
1046     };
1047     GPBDescriptor *localDescriptor =
1048         [GPBDescriptor allocDescriptorForClass:[GtalkBindAccountRequest class]
1049                                      rootClass:[GtalkGtalkCoreRoot class]
1050                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1051                                         fields:fields
1052                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1053                                    storageSize:sizeof(GtalkBindAccountRequest__storage_)
1054                                          flags:GPBDescriptorInitializationFlag_None];
1055     NSAssert(descriptor == nil, @"Startup recursed!");
1056     descriptor = localDescriptor;
1057   }
1058   return descriptor;
1059 }
1060
1061 @end
1062
1063 #pragma mark - GtalkBindAccountResponse
1064
1065 @implementation GtalkBindAccountResponse
1066
1067 @dynamic hasId_p, id_p;
1068 @dynamic hasJid, jid;
1069 @dynamic hasError, error;
1070 @dynamic hasStreamId, streamId;
1071 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
1072
1073 typedef struct GtalkBindAccountResponse__storage_ {
1074   uint32_t _has_storage_[1];
1075   int32_t streamId;
1076   int32_t lastStreamIdReceived;
1077   NSString *id_p;
1078   NSString *jid;
1079   GtalkErrorInfo *error;
1080 } GtalkBindAccountResponse__storage_;
1081
1082 // This method is threadsafe because it is initially called
1083 // in +initialize for each subclass.
1084 + (GPBDescriptor *)descriptor {
1085   static GPBDescriptor *descriptor = nil;
1086   if (!descriptor) {
1087     static GPBMessageFieldDescription fields[] = {
1088       {
1089         .name = "id_p",
1090         .dataTypeSpecific.className = NULL,
1091         .number = GtalkBindAccountResponse_FieldNumber_Id_p,
1092         .hasIndex = 0,
1093         .offset = (uint32_t)offsetof(GtalkBindAccountResponse__storage_, id_p),
1094         .flags = GPBFieldRequired,
1095         .dataType = GPBDataTypeString,
1096       },
1097       {
1098         .name = "jid",
1099         .dataTypeSpecific.className = NULL,
1100         .number = GtalkBindAccountResponse_FieldNumber_Jid,
1101         .hasIndex = 1,
1102         .offset = (uint32_t)offsetof(GtalkBindAccountResponse__storage_, jid),
1103         .flags = GPBFieldOptional,
1104         .dataType = GPBDataTypeString,
1105       },
1106       {
1107         .name = "error",
1108         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
1109         .number = GtalkBindAccountResponse_FieldNumber_Error,
1110         .hasIndex = 2,
1111         .offset = (uint32_t)offsetof(GtalkBindAccountResponse__storage_, error),
1112         .flags = GPBFieldOptional,
1113         .dataType = GPBDataTypeMessage,
1114       },
1115       {
1116         .name = "streamId",
1117         .dataTypeSpecific.className = NULL,
1118         .number = GtalkBindAccountResponse_FieldNumber_StreamId,
1119         .hasIndex = 3,
1120         .offset = (uint32_t)offsetof(GtalkBindAccountResponse__storage_, streamId),
1121         .flags = GPBFieldOptional,
1122         .dataType = GPBDataTypeInt32,
1123       },
1124       {
1125         .name = "lastStreamIdReceived",
1126         .dataTypeSpecific.className = NULL,
1127         .number = GtalkBindAccountResponse_FieldNumber_LastStreamIdReceived,
1128         .hasIndex = 4,
1129         .offset = (uint32_t)offsetof(GtalkBindAccountResponse__storage_, lastStreamIdReceived),
1130         .flags = GPBFieldOptional,
1131         .dataType = GPBDataTypeInt32,
1132       },
1133     };
1134     GPBDescriptor *localDescriptor =
1135         [GPBDescriptor allocDescriptorForClass:[GtalkBindAccountResponse class]
1136                                      rootClass:[GtalkGtalkCoreRoot class]
1137                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1138                                         fields:fields
1139                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1140                                    storageSize:sizeof(GtalkBindAccountResponse__storage_)
1141                                          flags:GPBDescriptorInitializationFlag_None];
1142     NSAssert(descriptor == nil, @"Startup recursed!");
1143     descriptor = localDescriptor;
1144   }
1145   return descriptor;
1146 }
1147
1148 @end
1149
1150 #pragma mark - GtalkStreamErrorStanza
1151
1152 @implementation GtalkStreamErrorStanza
1153
1154 @dynamic hasType, type;
1155 @dynamic hasText, text;
1156
1157 typedef struct GtalkStreamErrorStanza__storage_ {
1158   uint32_t _has_storage_[1];
1159   NSString *type;
1160   NSString *text;
1161 } GtalkStreamErrorStanza__storage_;
1162
1163 // This method is threadsafe because it is initially called
1164 // in +initialize for each subclass.
1165 + (GPBDescriptor *)descriptor {
1166   static GPBDescriptor *descriptor = nil;
1167   if (!descriptor) {
1168     static GPBMessageFieldDescription fields[] = {
1169       {
1170         .name = "type",
1171         .dataTypeSpecific.className = NULL,
1172         .number = GtalkStreamErrorStanza_FieldNumber_Type,
1173         .hasIndex = 0,
1174         .offset = (uint32_t)offsetof(GtalkStreamErrorStanza__storage_, type),
1175         .flags = GPBFieldRequired,
1176         .dataType = GPBDataTypeString,
1177       },
1178       {
1179         .name = "text",
1180         .dataTypeSpecific.className = NULL,
1181         .number = GtalkStreamErrorStanza_FieldNumber_Text,
1182         .hasIndex = 1,
1183         .offset = (uint32_t)offsetof(GtalkStreamErrorStanza__storage_, text),
1184         .flags = GPBFieldOptional,
1185         .dataType = GPBDataTypeString,
1186       },
1187     };
1188     GPBDescriptor *localDescriptor =
1189         [GPBDescriptor allocDescriptorForClass:[GtalkStreamErrorStanza class]
1190                                      rootClass:[GtalkGtalkCoreRoot class]
1191                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1192                                         fields:fields
1193                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1194                                    storageSize:sizeof(GtalkStreamErrorStanza__storage_)
1195                                          flags:GPBDescriptorInitializationFlag_None];
1196     NSAssert(descriptor == nil, @"Startup recursed!");
1197     descriptor = localDescriptor;
1198   }
1199   return descriptor;
1200 }
1201
1202 @end
1203
1204 #pragma mark - GtalkClose
1205
1206 @implementation GtalkClose
1207
1208
1209 typedef struct GtalkClose__storage_ {
1210   uint32_t _has_storage_[1];
1211 } GtalkClose__storage_;
1212
1213 // This method is threadsafe because it is initially called
1214 // in +initialize for each subclass.
1215 + (GPBDescriptor *)descriptor {
1216   static GPBDescriptor *descriptor = nil;
1217   if (!descriptor) {
1218     GPBDescriptor *localDescriptor =
1219         [GPBDescriptor allocDescriptorForClass:[GtalkClose class]
1220                                      rootClass:[GtalkGtalkCoreRoot class]
1221                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1222                                         fields:NULL
1223                                     fieldCount:0
1224                                    storageSize:sizeof(GtalkClose__storage_)
1225                                          flags:GPBDescriptorInitializationFlag_None];
1226     NSAssert(descriptor == nil, @"Startup recursed!");
1227     descriptor = localDescriptor;
1228   }
1229   return descriptor;
1230 }
1231
1232 @end
1233
1234 #pragma mark - GtalkExtension
1235
1236 @implementation GtalkExtension
1237
1238 @dynamic hasId_p, id_p;
1239 @dynamic hasData_p, data_p;
1240
1241 typedef struct GtalkExtension__storage_ {
1242   uint32_t _has_storage_[1];
1243   int32_t id_p;
1244   NSString *data_p;
1245 } GtalkExtension__storage_;
1246
1247 // This method is threadsafe because it is initially called
1248 // in +initialize for each subclass.
1249 + (GPBDescriptor *)descriptor {
1250   static GPBDescriptor *descriptor = nil;
1251   if (!descriptor) {
1252     static GPBMessageFieldDescription fields[] = {
1253       {
1254         .name = "id_p",
1255         .dataTypeSpecific.className = NULL,
1256         .number = GtalkExtension_FieldNumber_Id_p,
1257         .hasIndex = 0,
1258         .offset = (uint32_t)offsetof(GtalkExtension__storage_, id_p),
1259         .flags = GPBFieldRequired,
1260         .dataType = GPBDataTypeInt32,
1261       },
1262       {
1263         .name = "data_p",
1264         .dataTypeSpecific.className = NULL,
1265         .number = GtalkExtension_FieldNumber_Data_p,
1266         .hasIndex = 1,
1267         .offset = (uint32_t)offsetof(GtalkExtension__storage_, data_p),
1268         .flags = GPBFieldRequired,
1269         .dataType = GPBDataTypeString,
1270       },
1271     };
1272     GPBDescriptor *localDescriptor =
1273         [GPBDescriptor allocDescriptorForClass:[GtalkExtension class]
1274                                      rootClass:[GtalkGtalkCoreRoot class]
1275                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1276                                         fields:fields
1277                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1278                                    storageSize:sizeof(GtalkExtension__storage_)
1279                                          flags:GPBDescriptorInitializationFlag_None];
1280     NSAssert(descriptor == nil, @"Startup recursed!");
1281     descriptor = localDescriptor;
1282   }
1283   return descriptor;
1284 }
1285
1286 @end
1287
1288 #pragma mark - GtalkMessageStanza
1289
1290 @implementation GtalkMessageStanza
1291
1292 @dynamic hasRmqId, rmqId;
1293 @dynamic hasType, type;
1294 @dynamic hasId_p, id_p;
1295 @dynamic hasFrom, from;
1296 @dynamic hasTo, to;
1297 @dynamic hasSubject, subject;
1298 @dynamic hasBody, body;
1299 @dynamic hasThread, thread;
1300 @dynamic hasError, error;
1301 @dynamic extensionArray, extensionArray_Count;
1302 @dynamic hasNosave, nosave;
1303 @dynamic hasTimestamp, timestamp;
1304 @dynamic hasPersistentId, persistentId;
1305 @dynamic hasStreamId, streamId;
1306 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
1307 @dynamic hasRead, read;
1308 @dynamic hasAccountId, accountId;
1309
1310 typedef struct GtalkMessageStanza__storage_ {
1311   uint32_t _has_storage_[1];
1312   GtalkMessageStanza_MessageType type;
1313   int32_t streamId;
1314   int32_t lastStreamIdReceived;
1315   NSString *id_p;
1316   NSString *from;
1317   NSString *to;
1318   NSString *subject;
1319   NSString *body;
1320   NSString *thread;
1321   GtalkErrorInfo *error;
1322   NSMutableArray *extensionArray;
1323   NSString *persistentId;
1324   int64_t rmqId;
1325   int64_t timestamp;
1326   int64_t accountId;
1327 } GtalkMessageStanza__storage_;
1328
1329 // This method is threadsafe because it is initially called
1330 // in +initialize for each subclass.
1331 + (GPBDescriptor *)descriptor {
1332   static GPBDescriptor *descriptor = nil;
1333   if (!descriptor) {
1334     static GPBMessageFieldDescription fields[] = {
1335       {
1336         .name = "rmqId",
1337         .dataTypeSpecific.className = NULL,
1338         .number = GtalkMessageStanza_FieldNumber_RmqId,
1339         .hasIndex = 0,
1340         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, rmqId),
1341         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
1342         .dataType = GPBDataTypeInt64,
1343       },
1344       {
1345         .name = "type",
1346         .dataTypeSpecific.enumDescFunc = GtalkMessageStanza_MessageType_EnumDescriptor,
1347         .number = GtalkMessageStanza_FieldNumber_Type,
1348         .hasIndex = 1,
1349         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, type),
1350         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
1351         .dataType = GPBDataTypeEnum,
1352       },
1353       {
1354         .name = "id_p",
1355         .dataTypeSpecific.className = NULL,
1356         .number = GtalkMessageStanza_FieldNumber_Id_p,
1357         .hasIndex = 2,
1358         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, id_p),
1359         .flags = GPBFieldOptional,
1360         .dataType = GPBDataTypeString,
1361       },
1362       {
1363         .name = "from",
1364         .dataTypeSpecific.className = NULL,
1365         .number = GtalkMessageStanza_FieldNumber_From,
1366         .hasIndex = 3,
1367         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, from),
1368         .flags = GPBFieldOptional,
1369         .dataType = GPBDataTypeString,
1370       },
1371       {
1372         .name = "to",
1373         .dataTypeSpecific.className = NULL,
1374         .number = GtalkMessageStanza_FieldNumber_To,
1375         .hasIndex = 4,
1376         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, to),
1377         .flags = GPBFieldOptional,
1378         .dataType = GPBDataTypeString,
1379       },
1380       {
1381         .name = "subject",
1382         .dataTypeSpecific.className = NULL,
1383         .number = GtalkMessageStanza_FieldNumber_Subject,
1384         .hasIndex = 5,
1385         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, subject),
1386         .flags = GPBFieldOptional,
1387         .dataType = GPBDataTypeString,
1388       },
1389       {
1390         .name = "body",
1391         .dataTypeSpecific.className = NULL,
1392         .number = GtalkMessageStanza_FieldNumber_Body,
1393         .hasIndex = 6,
1394         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, body),
1395         .flags = GPBFieldOptional,
1396         .dataType = GPBDataTypeString,
1397       },
1398       {
1399         .name = "thread",
1400         .dataTypeSpecific.className = NULL,
1401         .number = GtalkMessageStanza_FieldNumber_Thread,
1402         .hasIndex = 7,
1403         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, thread),
1404         .flags = GPBFieldOptional,
1405         .dataType = GPBDataTypeString,
1406       },
1407       {
1408         .name = "error",
1409         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
1410         .number = GtalkMessageStanza_FieldNumber_Error,
1411         .hasIndex = 8,
1412         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, error),
1413         .flags = GPBFieldOptional,
1414         .dataType = GPBDataTypeMessage,
1415       },
1416       {
1417         .name = "extensionArray",
1418         .dataTypeSpecific.className = GPBStringifySymbol(GtalkExtension),
1419         .number = GtalkMessageStanza_FieldNumber_ExtensionArray,
1420         .hasIndex = GPBNoHasBit,
1421         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, extensionArray),
1422         .flags = GPBFieldRepeated,
1423         .dataType = GPBDataTypeMessage,
1424       },
1425       {
1426         .name = "nosave",
1427         .dataTypeSpecific.className = NULL,
1428         .number = GtalkMessageStanza_FieldNumber_Nosave,
1429         .hasIndex = 9,
1430         .offset = 10,  // Stored in _has_storage_ to save space.
1431         .flags = GPBFieldOptional,
1432         .dataType = GPBDataTypeBool,
1433       },
1434       {
1435         .name = "timestamp",
1436         .dataTypeSpecific.className = NULL,
1437         .number = GtalkMessageStanza_FieldNumber_Timestamp,
1438         .hasIndex = 11,
1439         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, timestamp),
1440         .flags = GPBFieldOptional,
1441         .dataType = GPBDataTypeInt64,
1442       },
1443       {
1444         .name = "persistentId",
1445         .dataTypeSpecific.className = NULL,
1446         .number = GtalkMessageStanza_FieldNumber_PersistentId,
1447         .hasIndex = 12,
1448         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, persistentId),
1449         .flags = GPBFieldOptional,
1450         .dataType = GPBDataTypeString,
1451       },
1452       {
1453         .name = "streamId",
1454         .dataTypeSpecific.className = NULL,
1455         .number = GtalkMessageStanza_FieldNumber_StreamId,
1456         .hasIndex = 13,
1457         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, streamId),
1458         .flags = GPBFieldOptional,
1459         .dataType = GPBDataTypeInt32,
1460       },
1461       {
1462         .name = "lastStreamIdReceived",
1463         .dataTypeSpecific.className = NULL,
1464         .number = GtalkMessageStanza_FieldNumber_LastStreamIdReceived,
1465         .hasIndex = 14,
1466         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, lastStreamIdReceived),
1467         .flags = GPBFieldOptional,
1468         .dataType = GPBDataTypeInt32,
1469       },
1470       {
1471         .name = "read",
1472         .dataTypeSpecific.className = NULL,
1473         .number = GtalkMessageStanza_FieldNumber_Read,
1474         .hasIndex = 15,
1475         .offset = 16,  // Stored in _has_storage_ to save space.
1476         .flags = GPBFieldOptional,
1477         .dataType = GPBDataTypeBool,
1478       },
1479       {
1480         .name = "accountId",
1481         .dataTypeSpecific.className = NULL,
1482         .number = GtalkMessageStanza_FieldNumber_AccountId,
1483         .hasIndex = 17,
1484         .offset = (uint32_t)offsetof(GtalkMessageStanza__storage_, accountId),
1485         .flags = GPBFieldOptional,
1486         .dataType = GPBDataTypeInt64,
1487       },
1488     };
1489     GPBDescriptor *localDescriptor =
1490         [GPBDescriptor allocDescriptorForClass:[GtalkMessageStanza class]
1491                                      rootClass:[GtalkGtalkCoreRoot class]
1492                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1493                                         fields:fields
1494                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1495                                    storageSize:sizeof(GtalkMessageStanza__storage_)
1496                                          flags:GPBDescriptorInitializationFlag_None];
1497 #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
1498     static const char *extraTextFormatInfo =
1499         "\001\001\005\000";
1500     [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
1501 #endif  // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
1502     NSAssert(descriptor == nil, @"Startup recursed!");
1503     descriptor = localDescriptor;
1504   }
1505   return descriptor;
1506 }
1507
1508 @end
1509
1510 #pragma mark - Enum GtalkMessageStanza_MessageType
1511
1512 GPBEnumDescriptor *GtalkMessageStanza_MessageType_EnumDescriptor(void) {
1513   static GPBEnumDescriptor *descriptor = NULL;
1514   if (!descriptor) {
1515     static const char *valueNames =
1516         "Normal\000Chat\000Groupchat\000Headline\000Error\000";
1517     static const int32_t values[] = {
1518         GtalkMessageStanza_MessageType_Normal,
1519         GtalkMessageStanza_MessageType_Chat,
1520         GtalkMessageStanza_MessageType_Groupchat,
1521         GtalkMessageStanza_MessageType_Headline,
1522         GtalkMessageStanza_MessageType_Error,
1523     };
1524     GPBEnumDescriptor *worker =
1525         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkMessageStanza_MessageType)
1526                                        valueNames:valueNames
1527                                            values:values
1528                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
1529                                      enumVerifier:GtalkMessageStanza_MessageType_IsValidValue];
1530     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
1531       [worker release];
1532     }
1533   }
1534   return descriptor;
1535 }
1536
1537 BOOL GtalkMessageStanza_MessageType_IsValidValue(int32_t value__) {
1538   switch (value__) {
1539     case GtalkMessageStanza_MessageType_Normal:
1540     case GtalkMessageStanza_MessageType_Chat:
1541     case GtalkMessageStanza_MessageType_Groupchat:
1542     case GtalkMessageStanza_MessageType_Headline:
1543     case GtalkMessageStanza_MessageType_Error:
1544       return YES;
1545     default:
1546       return NO;
1547   }
1548 }
1549
1550 #pragma mark - GtalkPresenceStanza
1551
1552 @implementation GtalkPresenceStanza
1553
1554 @dynamic hasRmqId, rmqId;
1555 @dynamic hasType, type;
1556 @dynamic hasId_p, id_p;
1557 @dynamic hasFrom, from;
1558 @dynamic hasTo, to;
1559 @dynamic hasShow, show;
1560 @dynamic hasStatus, status;
1561 @dynamic hasPriority, priority;
1562 @dynamic hasError, error;
1563 @dynamic extensionArray, extensionArray_Count;
1564 @dynamic hasClient, client;
1565 @dynamic hasAvatarHash, avatarHash;
1566 @dynamic hasPersistentId, persistentId;
1567 @dynamic hasStreamId, streamId;
1568 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
1569 @dynamic hasCapabilitiesFlags, capabilitiesFlags;
1570 @dynamic hasAccountId, accountId;
1571
1572 typedef struct GtalkPresenceStanza__storage_ {
1573   uint32_t _has_storage_[1];
1574   GtalkPresenceStanza_PresenceType type;
1575   GtalkPresenceStanza_ShowType show;
1576   int32_t priority;
1577   GtalkPresenceStanza_ClientType client;
1578   int32_t streamId;
1579   int32_t lastStreamIdReceived;
1580   int32_t capabilitiesFlags;
1581   NSString *id_p;
1582   NSString *from;
1583   NSString *to;
1584   NSString *status;
1585   GtalkErrorInfo *error;
1586   NSMutableArray *extensionArray;
1587   NSString *avatarHash;
1588   NSString *persistentId;
1589   int64_t rmqId;
1590   int64_t accountId;
1591 } GtalkPresenceStanza__storage_;
1592
1593 // This method is threadsafe because it is initially called
1594 // in +initialize for each subclass.
1595 + (GPBDescriptor *)descriptor {
1596   static GPBDescriptor *descriptor = nil;
1597   if (!descriptor) {
1598     static GPBMessageFieldDescription fields[] = {
1599       {
1600         .name = "rmqId",
1601         .dataTypeSpecific.className = NULL,
1602         .number = GtalkPresenceStanza_FieldNumber_RmqId,
1603         .hasIndex = 0,
1604         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, rmqId),
1605         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
1606         .dataType = GPBDataTypeInt64,
1607       },
1608       {
1609         .name = "type",
1610         .dataTypeSpecific.enumDescFunc = GtalkPresenceStanza_PresenceType_EnumDescriptor,
1611         .number = GtalkPresenceStanza_FieldNumber_Type,
1612         .hasIndex = 1,
1613         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, type),
1614         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
1615         .dataType = GPBDataTypeEnum,
1616       },
1617       {
1618         .name = "id_p",
1619         .dataTypeSpecific.className = NULL,
1620         .number = GtalkPresenceStanza_FieldNumber_Id_p,
1621         .hasIndex = 2,
1622         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, id_p),
1623         .flags = GPBFieldOptional,
1624         .dataType = GPBDataTypeString,
1625       },
1626       {
1627         .name = "from",
1628         .dataTypeSpecific.className = NULL,
1629         .number = GtalkPresenceStanza_FieldNumber_From,
1630         .hasIndex = 3,
1631         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, from),
1632         .flags = GPBFieldOptional,
1633         .dataType = GPBDataTypeString,
1634       },
1635       {
1636         .name = "to",
1637         .dataTypeSpecific.className = NULL,
1638         .number = GtalkPresenceStanza_FieldNumber_To,
1639         .hasIndex = 4,
1640         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, to),
1641         .flags = GPBFieldOptional,
1642         .dataType = GPBDataTypeString,
1643       },
1644       {
1645         .name = "show",
1646         .dataTypeSpecific.enumDescFunc = GtalkPresenceStanza_ShowType_EnumDescriptor,
1647         .number = GtalkPresenceStanza_FieldNumber_Show,
1648         .hasIndex = 5,
1649         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, show),
1650         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
1651         .dataType = GPBDataTypeEnum,
1652       },
1653       {
1654         .name = "status",
1655         .dataTypeSpecific.className = NULL,
1656         .number = GtalkPresenceStanza_FieldNumber_Status,
1657         .hasIndex = 6,
1658         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, status),
1659         .flags = GPBFieldOptional,
1660         .dataType = GPBDataTypeString,
1661       },
1662       {
1663         .name = "priority",
1664         .dataTypeSpecific.className = NULL,
1665         .number = GtalkPresenceStanza_FieldNumber_Priority,
1666         .hasIndex = 7,
1667         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, priority),
1668         .flags = GPBFieldOptional,
1669         .dataType = GPBDataTypeInt32,
1670       },
1671       {
1672         .name = "error",
1673         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
1674         .number = GtalkPresenceStanza_FieldNumber_Error,
1675         .hasIndex = 8,
1676         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, error),
1677         .flags = GPBFieldOptional,
1678         .dataType = GPBDataTypeMessage,
1679       },
1680       {
1681         .name = "extensionArray",
1682         .dataTypeSpecific.className = GPBStringifySymbol(GtalkExtension),
1683         .number = GtalkPresenceStanza_FieldNumber_ExtensionArray,
1684         .hasIndex = GPBNoHasBit,
1685         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, extensionArray),
1686         .flags = GPBFieldRepeated,
1687         .dataType = GPBDataTypeMessage,
1688       },
1689       {
1690         .name = "client",
1691         .dataTypeSpecific.enumDescFunc = GtalkPresenceStanza_ClientType_EnumDescriptor,
1692         .number = GtalkPresenceStanza_FieldNumber_Client,
1693         .hasIndex = 9,
1694         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, client),
1695         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
1696         .dataType = GPBDataTypeEnum,
1697       },
1698       {
1699         .name = "avatarHash",
1700         .dataTypeSpecific.className = NULL,
1701         .number = GtalkPresenceStanza_FieldNumber_AvatarHash,
1702         .hasIndex = 10,
1703         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, avatarHash),
1704         .flags = GPBFieldOptional,
1705         .dataType = GPBDataTypeString,
1706       },
1707       {
1708         .name = "persistentId",
1709         .dataTypeSpecific.className = NULL,
1710         .number = GtalkPresenceStanza_FieldNumber_PersistentId,
1711         .hasIndex = 11,
1712         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, persistentId),
1713         .flags = GPBFieldOptional,
1714         .dataType = GPBDataTypeString,
1715       },
1716       {
1717         .name = "streamId",
1718         .dataTypeSpecific.className = NULL,
1719         .number = GtalkPresenceStanza_FieldNumber_StreamId,
1720         .hasIndex = 12,
1721         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, streamId),
1722         .flags = GPBFieldOptional,
1723         .dataType = GPBDataTypeInt32,
1724       },
1725       {
1726         .name = "lastStreamIdReceived",
1727         .dataTypeSpecific.className = NULL,
1728         .number = GtalkPresenceStanza_FieldNumber_LastStreamIdReceived,
1729         .hasIndex = 13,
1730         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, lastStreamIdReceived),
1731         .flags = GPBFieldOptional,
1732         .dataType = GPBDataTypeInt32,
1733       },
1734       {
1735         .name = "capabilitiesFlags",
1736         .dataTypeSpecific.className = NULL,
1737         .number = GtalkPresenceStanza_FieldNumber_CapabilitiesFlags,
1738         .hasIndex = 14,
1739         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, capabilitiesFlags),
1740         .flags = GPBFieldOptional,
1741         .dataType = GPBDataTypeInt32,
1742       },
1743       {
1744         .name = "accountId",
1745         .dataTypeSpecific.className = NULL,
1746         .number = GtalkPresenceStanza_FieldNumber_AccountId,
1747         .hasIndex = 15,
1748         .offset = (uint32_t)offsetof(GtalkPresenceStanza__storage_, accountId),
1749         .flags = GPBFieldOptional,
1750         .dataType = GPBDataTypeInt64,
1751       },
1752     };
1753     GPBDescriptor *localDescriptor =
1754         [GPBDescriptor allocDescriptorForClass:[GtalkPresenceStanza class]
1755                                      rootClass:[GtalkGtalkCoreRoot class]
1756                                           file:GtalkGtalkCoreRoot_FileDescriptor()
1757                                         fields:fields
1758                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
1759                                    storageSize:sizeof(GtalkPresenceStanza__storage_)
1760                                          flags:GPBDescriptorInitializationFlag_None];
1761 #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
1762     static const char *extraTextFormatInfo =
1763         "\001\001\005\000";
1764     [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
1765 #endif  // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
1766     NSAssert(descriptor == nil, @"Startup recursed!");
1767     descriptor = localDescriptor;
1768   }
1769   return descriptor;
1770 }
1771
1772 @end
1773
1774 #pragma mark - Enum GtalkPresenceStanza_PresenceType
1775
1776 GPBEnumDescriptor *GtalkPresenceStanza_PresenceType_EnumDescriptor(void) {
1777   static GPBEnumDescriptor *descriptor = NULL;
1778   if (!descriptor) {
1779     static const char *valueNames =
1780         "Unavailable\000Subscribe\000Subscribed\000Unsubsc"
1781         "ribe\000Unsubscribed\000Probe\000Error\000";
1782     static const int32_t values[] = {
1783         GtalkPresenceStanza_PresenceType_Unavailable,
1784         GtalkPresenceStanza_PresenceType_Subscribe,
1785         GtalkPresenceStanza_PresenceType_Subscribed,
1786         GtalkPresenceStanza_PresenceType_Unsubscribe,
1787         GtalkPresenceStanza_PresenceType_Unsubscribed,
1788         GtalkPresenceStanza_PresenceType_Probe,
1789         GtalkPresenceStanza_PresenceType_Error,
1790     };
1791     GPBEnumDescriptor *worker =
1792         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkPresenceStanza_PresenceType)
1793                                        valueNames:valueNames
1794                                            values:values
1795                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
1796                                      enumVerifier:GtalkPresenceStanza_PresenceType_IsValidValue];
1797     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
1798       [worker release];
1799     }
1800   }
1801   return descriptor;
1802 }
1803
1804 BOOL GtalkPresenceStanza_PresenceType_IsValidValue(int32_t value__) {
1805   switch (value__) {
1806     case GtalkPresenceStanza_PresenceType_Unavailable:
1807     case GtalkPresenceStanza_PresenceType_Subscribe:
1808     case GtalkPresenceStanza_PresenceType_Subscribed:
1809     case GtalkPresenceStanza_PresenceType_Unsubscribe:
1810     case GtalkPresenceStanza_PresenceType_Unsubscribed:
1811     case GtalkPresenceStanza_PresenceType_Probe:
1812     case GtalkPresenceStanza_PresenceType_Error:
1813       return YES;
1814     default:
1815       return NO;
1816   }
1817 }
1818
1819 #pragma mark - Enum GtalkPresenceStanza_ShowType
1820
1821 GPBEnumDescriptor *GtalkPresenceStanza_ShowType_EnumDescriptor(void) {
1822   static GPBEnumDescriptor *descriptor = NULL;
1823   if (!descriptor) {
1824     static const char *valueNames =
1825         "Away\000Chat\000Dnd\000Xa\000";
1826     static const int32_t values[] = {
1827         GtalkPresenceStanza_ShowType_Away,
1828         GtalkPresenceStanza_ShowType_Chat,
1829         GtalkPresenceStanza_ShowType_Dnd,
1830         GtalkPresenceStanza_ShowType_Xa,
1831     };
1832     GPBEnumDescriptor *worker =
1833         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkPresenceStanza_ShowType)
1834                                        valueNames:valueNames
1835                                            values:values
1836                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
1837                                      enumVerifier:GtalkPresenceStanza_ShowType_IsValidValue];
1838     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
1839       [worker release];
1840     }
1841   }
1842   return descriptor;
1843 }
1844
1845 BOOL GtalkPresenceStanza_ShowType_IsValidValue(int32_t value__) {
1846   switch (value__) {
1847     case GtalkPresenceStanza_ShowType_Away:
1848     case GtalkPresenceStanza_ShowType_Chat:
1849     case GtalkPresenceStanza_ShowType_Dnd:
1850     case GtalkPresenceStanza_ShowType_Xa:
1851       return YES;
1852     default:
1853       return NO;
1854   }
1855 }
1856
1857 #pragma mark - Enum GtalkPresenceStanza_ClientType
1858
1859 GPBEnumDescriptor *GtalkPresenceStanza_ClientType_EnumDescriptor(void) {
1860   static GPBEnumDescriptor *descriptor = NULL;
1861   if (!descriptor) {
1862     static const char *valueNames =
1863         "Mobile\000Android\000";
1864     static const int32_t values[] = {
1865         GtalkPresenceStanza_ClientType_Mobile,
1866         GtalkPresenceStanza_ClientType_Android,
1867     };
1868     GPBEnumDescriptor *worker =
1869         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkPresenceStanza_ClientType)
1870                                        valueNames:valueNames
1871                                            values:values
1872                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
1873                                      enumVerifier:GtalkPresenceStanza_ClientType_IsValidValue];
1874     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
1875       [worker release];
1876     }
1877   }
1878   return descriptor;
1879 }
1880
1881 BOOL GtalkPresenceStanza_ClientType_IsValidValue(int32_t value__) {
1882   switch (value__) {
1883     case GtalkPresenceStanza_ClientType_Mobile:
1884     case GtalkPresenceStanza_ClientType_Android:
1885       return YES;
1886     default:
1887       return NO;
1888   }
1889 }
1890
1891 #pragma mark - Enum GtalkPresenceStanza_CapabilitiesFlags
1892
1893 GPBEnumDescriptor *GtalkPresenceStanza_CapabilitiesFlags_EnumDescriptor(void) {
1894   static GPBEnumDescriptor *descriptor = NULL;
1895   if (!descriptor) {
1896     static const char *valueNames =
1897         "HasVoiceV1\000HasVideoV1\000HasCameraV1\000HasPmu"
1898         "cV1\000";
1899     static const int32_t values[] = {
1900         GtalkPresenceStanza_CapabilitiesFlags_HasVoiceV1,
1901         GtalkPresenceStanza_CapabilitiesFlags_HasVideoV1,
1902         GtalkPresenceStanza_CapabilitiesFlags_HasCameraV1,
1903         GtalkPresenceStanza_CapabilitiesFlags_HasPmucV1,
1904     };
1905     GPBEnumDescriptor *worker =
1906         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkPresenceStanza_CapabilitiesFlags)
1907                                        valueNames:valueNames
1908                                            values:values
1909                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
1910                                      enumVerifier:GtalkPresenceStanza_CapabilitiesFlags_IsValidValue];
1911     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
1912       [worker release];
1913     }
1914   }
1915   return descriptor;
1916 }
1917
1918 BOOL GtalkPresenceStanza_CapabilitiesFlags_IsValidValue(int32_t value__) {
1919   switch (value__) {
1920     case GtalkPresenceStanza_CapabilitiesFlags_HasVoiceV1:
1921     case GtalkPresenceStanza_CapabilitiesFlags_HasVideoV1:
1922     case GtalkPresenceStanza_CapabilitiesFlags_HasCameraV1:
1923     case GtalkPresenceStanza_CapabilitiesFlags_HasPmucV1:
1924       return YES;
1925     default:
1926       return NO;
1927   }
1928 }
1929
1930 #pragma mark - GtalkBatchPresenceStanza
1931
1932 @implementation GtalkBatchPresenceStanza
1933
1934 @dynamic hasId_p, id_p;
1935 @dynamic hasTo, to;
1936 @dynamic presenceArray, presenceArray_Count;
1937 @dynamic hasPersistentId, persistentId;
1938 @dynamic hasStreamId, streamId;
1939 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
1940 @dynamic hasAccountId, accountId;
1941 @dynamic hasType, type;
1942 @dynamic hasError, error;
1943
1944 typedef struct GtalkBatchPresenceStanza__storage_ {
1945   uint32_t _has_storage_[1];
1946   int32_t streamId;
1947   int32_t lastStreamIdReceived;
1948   GtalkBatchPresenceStanza_Type type;
1949   NSString *id_p;
1950   NSString *to;
1951   NSMutableArray *presenceArray;
1952   NSString *persistentId;
1953   GtalkErrorInfo *error;
1954   int64_t accountId;
1955 } GtalkBatchPresenceStanza__storage_;
1956
1957 // This method is threadsafe because it is initially called
1958 // in +initialize for each subclass.
1959 + (GPBDescriptor *)descriptor {
1960   static GPBDescriptor *descriptor = nil;
1961   if (!descriptor) {
1962     static GPBMessageFieldDescription fields[] = {
1963       {
1964         .name = "id_p",
1965         .dataTypeSpecific.className = NULL,
1966         .number = GtalkBatchPresenceStanza_FieldNumber_Id_p,
1967         .hasIndex = 0,
1968         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, id_p),
1969         .flags = GPBFieldOptional,
1970         .dataType = GPBDataTypeString,
1971       },
1972       {
1973         .name = "to",
1974         .dataTypeSpecific.className = NULL,
1975         .number = GtalkBatchPresenceStanza_FieldNumber_To,
1976         .hasIndex = 1,
1977         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, to),
1978         .flags = GPBFieldOptional,
1979         .dataType = GPBDataTypeString,
1980       },
1981       {
1982         .name = "presenceArray",
1983         .dataTypeSpecific.className = GPBStringifySymbol(GtalkPresenceStanza),
1984         .number = GtalkBatchPresenceStanza_FieldNumber_PresenceArray,
1985         .hasIndex = GPBNoHasBit,
1986         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, presenceArray),
1987         .flags = GPBFieldRepeated,
1988         .dataType = GPBDataTypeMessage,
1989       },
1990       {
1991         .name = "persistentId",
1992         .dataTypeSpecific.className = NULL,
1993         .number = GtalkBatchPresenceStanza_FieldNumber_PersistentId,
1994         .hasIndex = 2,
1995         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, persistentId),
1996         .flags = GPBFieldOptional,
1997         .dataType = GPBDataTypeString,
1998       },
1999       {
2000         .name = "streamId",
2001         .dataTypeSpecific.className = NULL,
2002         .number = GtalkBatchPresenceStanza_FieldNumber_StreamId,
2003         .hasIndex = 3,
2004         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, streamId),
2005         .flags = GPBFieldOptional,
2006         .dataType = GPBDataTypeInt32,
2007       },
2008       {
2009         .name = "lastStreamIdReceived",
2010         .dataTypeSpecific.className = NULL,
2011         .number = GtalkBatchPresenceStanza_FieldNumber_LastStreamIdReceived,
2012         .hasIndex = 4,
2013         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, lastStreamIdReceived),
2014         .flags = GPBFieldOptional,
2015         .dataType = GPBDataTypeInt32,
2016       },
2017       {
2018         .name = "accountId",
2019         .dataTypeSpecific.className = NULL,
2020         .number = GtalkBatchPresenceStanza_FieldNumber_AccountId,
2021         .hasIndex = 5,
2022         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, accountId),
2023         .flags = GPBFieldOptional,
2024         .dataType = GPBDataTypeInt64,
2025       },
2026       {
2027         .name = "type",
2028         .dataTypeSpecific.enumDescFunc = GtalkBatchPresenceStanza_Type_EnumDescriptor,
2029         .number = GtalkBatchPresenceStanza_FieldNumber_Type,
2030         .hasIndex = 6,
2031         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, type),
2032         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
2033         .dataType = GPBDataTypeEnum,
2034       },
2035       {
2036         .name = "error",
2037         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
2038         .number = GtalkBatchPresenceStanza_FieldNumber_Error,
2039         .hasIndex = 7,
2040         .offset = (uint32_t)offsetof(GtalkBatchPresenceStanza__storage_, error),
2041         .flags = GPBFieldOptional,
2042         .dataType = GPBDataTypeMessage,
2043       },
2044     };
2045     GPBDescriptor *localDescriptor =
2046         [GPBDescriptor allocDescriptorForClass:[GtalkBatchPresenceStanza class]
2047                                      rootClass:[GtalkGtalkCoreRoot class]
2048                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2049                                         fields:fields
2050                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2051                                    storageSize:sizeof(GtalkBatchPresenceStanza__storage_)
2052                                          flags:GPBDescriptorInitializationFlag_None];
2053     NSAssert(descriptor == nil, @"Startup recursed!");
2054     descriptor = localDescriptor;
2055   }
2056   return descriptor;
2057 }
2058
2059 @end
2060
2061 #pragma mark - Enum GtalkBatchPresenceStanza_Type
2062
2063 GPBEnumDescriptor *GtalkBatchPresenceStanza_Type_EnumDescriptor(void) {
2064   static GPBEnumDescriptor *descriptor = NULL;
2065   if (!descriptor) {
2066     static const char *valueNames =
2067         "Get\000Set\000";
2068     static const int32_t values[] = {
2069         GtalkBatchPresenceStanza_Type_Get,
2070         GtalkBatchPresenceStanza_Type_Set,
2071     };
2072     GPBEnumDescriptor *worker =
2073         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkBatchPresenceStanza_Type)
2074                                        valueNames:valueNames
2075                                            values:values
2076                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
2077                                      enumVerifier:GtalkBatchPresenceStanza_Type_IsValidValue];
2078     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
2079       [worker release];
2080     }
2081   }
2082   return descriptor;
2083 }
2084
2085 BOOL GtalkBatchPresenceStanza_Type_IsValidValue(int32_t value__) {
2086   switch (value__) {
2087     case GtalkBatchPresenceStanza_Type_Get:
2088     case GtalkBatchPresenceStanza_Type_Set:
2089       return YES;
2090     default:
2091       return NO;
2092   }
2093 }
2094
2095 #pragma mark - GtalkIqStanza
2096
2097 @implementation GtalkIqStanza
2098
2099 @dynamic hasRmqId, rmqId;
2100 @dynamic hasType, type;
2101 @dynamic hasId_p, id_p;
2102 @dynamic hasFrom, from;
2103 @dynamic hasTo, to;
2104 @dynamic hasError, error;
2105 @dynamic hasExtension, extension;
2106 @dynamic hasPersistentId, persistentId;
2107 @dynamic hasStreamId, streamId;
2108 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
2109 @dynamic hasAccountId, accountId;
2110 @dynamic hasStatus, status;
2111
2112 typedef struct GtalkIqStanza__storage_ {
2113   uint32_t _has_storage_[1];
2114   GtalkIqStanza_IqType type;
2115   int32_t streamId;
2116   int32_t lastStreamIdReceived;
2117   NSString *id_p;
2118   NSString *from;
2119   NSString *to;
2120   GtalkErrorInfo *error;
2121   GtalkExtension *extension;
2122   NSString *persistentId;
2123   int64_t rmqId;
2124   int64_t accountId;
2125   int64_t status;
2126 } GtalkIqStanza__storage_;
2127
2128 // This method is threadsafe because it is initially called
2129 // in +initialize for each subclass.
2130 + (GPBDescriptor *)descriptor {
2131   static GPBDescriptor *descriptor = nil;
2132   if (!descriptor) {
2133     static GPBMessageFieldDescription fields[] = {
2134       {
2135         .name = "rmqId",
2136         .dataTypeSpecific.className = NULL,
2137         .number = GtalkIqStanza_FieldNumber_RmqId,
2138         .hasIndex = 0,
2139         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, rmqId),
2140         .flags = GPBFieldOptional,
2141         .dataType = GPBDataTypeInt64,
2142       },
2143       {
2144         .name = "type",
2145         .dataTypeSpecific.enumDescFunc = GtalkIqStanza_IqType_EnumDescriptor,
2146         .number = GtalkIqStanza_FieldNumber_Type,
2147         .hasIndex = 1,
2148         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, type),
2149         .flags = (GPBFieldFlags)(GPBFieldRequired | GPBFieldHasEnumDescriptor),
2150         .dataType = GPBDataTypeEnum,
2151       },
2152       {
2153         .name = "id_p",
2154         .dataTypeSpecific.className = NULL,
2155         .number = GtalkIqStanza_FieldNumber_Id_p,
2156         .hasIndex = 2,
2157         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, id_p),
2158         .flags = GPBFieldRequired,
2159         .dataType = GPBDataTypeString,
2160       },
2161       {
2162         .name = "from",
2163         .dataTypeSpecific.className = NULL,
2164         .number = GtalkIqStanza_FieldNumber_From,
2165         .hasIndex = 3,
2166         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, from),
2167         .flags = GPBFieldOptional,
2168         .dataType = GPBDataTypeString,
2169       },
2170       {
2171         .name = "to",
2172         .dataTypeSpecific.className = NULL,
2173         .number = GtalkIqStanza_FieldNumber_To,
2174         .hasIndex = 4,
2175         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, to),
2176         .flags = GPBFieldOptional,
2177         .dataType = GPBDataTypeString,
2178       },
2179       {
2180         .name = "error",
2181         .dataTypeSpecific.className = GPBStringifySymbol(GtalkErrorInfo),
2182         .number = GtalkIqStanza_FieldNumber_Error,
2183         .hasIndex = 5,
2184         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, error),
2185         .flags = GPBFieldOptional,
2186         .dataType = GPBDataTypeMessage,
2187       },
2188       {
2189         .name = "extension",
2190         .dataTypeSpecific.className = GPBStringifySymbol(GtalkExtension),
2191         .number = GtalkIqStanza_FieldNumber_Extension,
2192         .hasIndex = 6,
2193         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, extension),
2194         .flags = GPBFieldOptional,
2195         .dataType = GPBDataTypeMessage,
2196       },
2197       {
2198         .name = "persistentId",
2199         .dataTypeSpecific.className = NULL,
2200         .number = GtalkIqStanza_FieldNumber_PersistentId,
2201         .hasIndex = 7,
2202         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, persistentId),
2203         .flags = GPBFieldOptional,
2204         .dataType = GPBDataTypeString,
2205       },
2206       {
2207         .name = "streamId",
2208         .dataTypeSpecific.className = NULL,
2209         .number = GtalkIqStanza_FieldNumber_StreamId,
2210         .hasIndex = 8,
2211         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, streamId),
2212         .flags = GPBFieldOptional,
2213         .dataType = GPBDataTypeInt32,
2214       },
2215       {
2216         .name = "lastStreamIdReceived",
2217         .dataTypeSpecific.className = NULL,
2218         .number = GtalkIqStanza_FieldNumber_LastStreamIdReceived,
2219         .hasIndex = 9,
2220         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, lastStreamIdReceived),
2221         .flags = GPBFieldOptional,
2222         .dataType = GPBDataTypeInt32,
2223       },
2224       {
2225         .name = "accountId",
2226         .dataTypeSpecific.className = NULL,
2227         .number = GtalkIqStanza_FieldNumber_AccountId,
2228         .hasIndex = 10,
2229         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, accountId),
2230         .flags = GPBFieldOptional,
2231         .dataType = GPBDataTypeInt64,
2232       },
2233       {
2234         .name = "status",
2235         .dataTypeSpecific.className = NULL,
2236         .number = GtalkIqStanza_FieldNumber_Status,
2237         .hasIndex = 11,
2238         .offset = (uint32_t)offsetof(GtalkIqStanza__storage_, status),
2239         .flags = GPBFieldOptional,
2240         .dataType = GPBDataTypeInt64,
2241       },
2242     };
2243     GPBDescriptor *localDescriptor =
2244         [GPBDescriptor allocDescriptorForClass:[GtalkIqStanza class]
2245                                      rootClass:[GtalkGtalkCoreRoot class]
2246                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2247                                         fields:fields
2248                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2249                                    storageSize:sizeof(GtalkIqStanza__storage_)
2250                                          flags:GPBDescriptorInitializationFlag_None];
2251     NSAssert(descriptor == nil, @"Startup recursed!");
2252     descriptor = localDescriptor;
2253   }
2254   return descriptor;
2255 }
2256
2257 @end
2258
2259 #pragma mark - Enum GtalkIqStanza_IqType
2260
2261 GPBEnumDescriptor *GtalkIqStanza_IqType_EnumDescriptor(void) {
2262   static GPBEnumDescriptor *descriptor = NULL;
2263   if (!descriptor) {
2264     static const char *valueNames =
2265         "Get\000Set\000Result\000Error\000";
2266     static const int32_t values[] = {
2267         GtalkIqStanza_IqType_Get,
2268         GtalkIqStanza_IqType_Set,
2269         GtalkIqStanza_IqType_Result,
2270         GtalkIqStanza_IqType_Error,
2271     };
2272     GPBEnumDescriptor *worker =
2273         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkIqStanza_IqType)
2274                                        valueNames:valueNames
2275                                            values:values
2276                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
2277                                      enumVerifier:GtalkIqStanza_IqType_IsValidValue];
2278     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
2279       [worker release];
2280     }
2281   }
2282   return descriptor;
2283 }
2284
2285 BOOL GtalkIqStanza_IqType_IsValidValue(int32_t value__) {
2286   switch (value__) {
2287     case GtalkIqStanza_IqType_Get:
2288     case GtalkIqStanza_IqType_Set:
2289     case GtalkIqStanza_IqType_Result:
2290     case GtalkIqStanza_IqType_Error:
2291       return YES;
2292     default:
2293       return NO;
2294   }
2295 }
2296
2297 #pragma mark - GtalkAppData
2298
2299 @implementation GtalkAppData
2300
2301 @dynamic hasKey, key;
2302 @dynamic hasValue, value;
2303
2304 typedef struct GtalkAppData__storage_ {
2305   uint32_t _has_storage_[1];
2306   NSString *key;
2307   NSString *value;
2308 } GtalkAppData__storage_;
2309
2310 // This method is threadsafe because it is initially called
2311 // in +initialize for each subclass.
2312 + (GPBDescriptor *)descriptor {
2313   static GPBDescriptor *descriptor = nil;
2314   if (!descriptor) {
2315     static GPBMessageFieldDescription fields[] = {
2316       {
2317         .name = "key",
2318         .dataTypeSpecific.className = NULL,
2319         .number = GtalkAppData_FieldNumber_Key,
2320         .hasIndex = 0,
2321         .offset = (uint32_t)offsetof(GtalkAppData__storage_, key),
2322         .flags = GPBFieldRequired,
2323         .dataType = GPBDataTypeString,
2324       },
2325       {
2326         .name = "value",
2327         .dataTypeSpecific.className = NULL,
2328         .number = GtalkAppData_FieldNumber_Value,
2329         .hasIndex = 1,
2330         .offset = (uint32_t)offsetof(GtalkAppData__storage_, value),
2331         .flags = GPBFieldRequired,
2332         .dataType = GPBDataTypeString,
2333       },
2334     };
2335     GPBDescriptor *localDescriptor =
2336         [GPBDescriptor allocDescriptorForClass:[GtalkAppData class]
2337                                      rootClass:[GtalkGtalkCoreRoot class]
2338                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2339                                         fields:fields
2340                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2341                                    storageSize:sizeof(GtalkAppData__storage_)
2342                                          flags:GPBDescriptorInitializationFlag_None];
2343     NSAssert(descriptor == nil, @"Startup recursed!");
2344     descriptor = localDescriptor;
2345   }
2346   return descriptor;
2347 }
2348
2349 @end
2350
2351 #pragma mark - GtalkDataMessageStanza
2352
2353 @implementation GtalkDataMessageStanza
2354
2355 @dynamic hasRmqId, rmqId;
2356 @dynamic hasId_p, id_p;
2357 @dynamic hasFrom, from;
2358 @dynamic hasTo, to;
2359 @dynamic hasCategory, category;
2360 @dynamic hasToken, token;
2361 @dynamic appDataArray, appDataArray_Count;
2362 @dynamic hasFromTrustedServer, fromTrustedServer;
2363 @dynamic hasPersistentId, persistentId;
2364 @dynamic hasStreamId, streamId;
2365 @dynamic hasLastStreamIdReceived, lastStreamIdReceived;
2366 @dynamic hasPermission, permission;
2367 @dynamic hasRegId, regId;
2368 @dynamic hasPkgSignature, pkgSignature;
2369 @dynamic hasClientId, clientId;
2370 @dynamic hasDeviceUserId, deviceUserId;
2371 @dynamic hasTtl, ttl;
2372 @dynamic hasSent, sent;
2373 @dynamic hasQueued, queued;
2374 @dynamic hasStatus, status;
2375 @dynamic hasRawData, rawData;
2376 @dynamic hasMaxDelay, maxDelay;
2377 @dynamic hasActualDelay, actualDelay;
2378 @dynamic hasImmediateAck, immediateAck;
2379 @dynamic hasDeliveryReceiptRequested, deliveryReceiptRequested;
2380 @dynamic hasExternalMessageId, externalMessageId;
2381 @dynamic hasFlags, flags;
2382 @dynamic hasCellTower, cellTower;
2383 @dynamic hasPriority, priority;
2384
2385 typedef struct GtalkDataMessageStanza__storage_ {
2386   uint32_t _has_storage_[1];
2387   int32_t streamId;
2388   int32_t lastStreamIdReceived;
2389   int32_t ttl;
2390   int32_t queued;
2391   int32_t maxDelay;
2392   int32_t actualDelay;
2393   int32_t priority;
2394   NSString *id_p;
2395   NSString *from;
2396   NSString *to;
2397   NSString *category;
2398   NSString *token;
2399   NSMutableArray *appDataArray;
2400   NSString *persistentId;
2401   NSString *permission;
2402   NSString *regId;
2403   NSString *pkgSignature;
2404   NSString *clientId;
2405   NSData *rawData;
2406   NSString *externalMessageId;
2407   GtalkCellTower *cellTower;
2408   int64_t rmqId;
2409   int64_t deviceUserId;
2410   int64_t sent;
2411   int64_t status;
2412   int64_t flags;
2413 } GtalkDataMessageStanza__storage_;
2414
2415 // This method is threadsafe because it is initially called
2416 // in +initialize for each subclass.
2417 + (GPBDescriptor *)descriptor {
2418   static GPBDescriptor *descriptor = nil;
2419   if (!descriptor) {
2420     static GPBMessageFieldDescription fields[] = {
2421       {
2422         .name = "rmqId",
2423         .dataTypeSpecific.className = NULL,
2424         .number = GtalkDataMessageStanza_FieldNumber_RmqId,
2425         .hasIndex = 0,
2426         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, rmqId),
2427         .flags = GPBFieldOptional,
2428         .dataType = GPBDataTypeInt64,
2429       },
2430       {
2431         .name = "id_p",
2432         .dataTypeSpecific.className = NULL,
2433         .number = GtalkDataMessageStanza_FieldNumber_Id_p,
2434         .hasIndex = 1,
2435         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, id_p),
2436         .flags = GPBFieldOptional,
2437         .dataType = GPBDataTypeString,
2438       },
2439       {
2440         .name = "from",
2441         .dataTypeSpecific.className = NULL,
2442         .number = GtalkDataMessageStanza_FieldNumber_From,
2443         .hasIndex = 2,
2444         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, from),
2445         .flags = GPBFieldRequired,
2446         .dataType = GPBDataTypeString,
2447       },
2448       {
2449         .name = "to",
2450         .dataTypeSpecific.className = NULL,
2451         .number = GtalkDataMessageStanza_FieldNumber_To,
2452         .hasIndex = 3,
2453         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, to),
2454         .flags = GPBFieldOptional,
2455         .dataType = GPBDataTypeString,
2456       },
2457       {
2458         .name = "category",
2459         .dataTypeSpecific.className = NULL,
2460         .number = GtalkDataMessageStanza_FieldNumber_Category,
2461         .hasIndex = 4,
2462         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, category),
2463         .flags = GPBFieldRequired,
2464         .dataType = GPBDataTypeString,
2465       },
2466       {
2467         .name = "token",
2468         .dataTypeSpecific.className = NULL,
2469         .number = GtalkDataMessageStanza_FieldNumber_Token,
2470         .hasIndex = 5,
2471         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, token),
2472         .flags = GPBFieldOptional,
2473         .dataType = GPBDataTypeString,
2474       },
2475       {
2476         .name = "appDataArray",
2477         .dataTypeSpecific.className = GPBStringifySymbol(GtalkAppData),
2478         .number = GtalkDataMessageStanza_FieldNumber_AppDataArray,
2479         .hasIndex = GPBNoHasBit,
2480         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, appDataArray),
2481         .flags = GPBFieldRepeated,
2482         .dataType = GPBDataTypeMessage,
2483       },
2484       {
2485         .name = "fromTrustedServer",
2486         .dataTypeSpecific.className = NULL,
2487         .number = GtalkDataMessageStanza_FieldNumber_FromTrustedServer,
2488         .hasIndex = 6,
2489         .offset = 7,  // Stored in _has_storage_ to save space.
2490         .flags = GPBFieldOptional,
2491         .dataType = GPBDataTypeBool,
2492       },
2493       {
2494         .name = "persistentId",
2495         .dataTypeSpecific.className = NULL,
2496         .number = GtalkDataMessageStanza_FieldNumber_PersistentId,
2497         .hasIndex = 8,
2498         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, persistentId),
2499         .flags = GPBFieldOptional,
2500         .dataType = GPBDataTypeString,
2501       },
2502       {
2503         .name = "streamId",
2504         .dataTypeSpecific.className = NULL,
2505         .number = GtalkDataMessageStanza_FieldNumber_StreamId,
2506         .hasIndex = 9,
2507         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, streamId),
2508         .flags = GPBFieldOptional,
2509         .dataType = GPBDataTypeInt32,
2510       },
2511       {
2512         .name = "lastStreamIdReceived",
2513         .dataTypeSpecific.className = NULL,
2514         .number = GtalkDataMessageStanza_FieldNumber_LastStreamIdReceived,
2515         .hasIndex = 10,
2516         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, lastStreamIdReceived),
2517         .flags = GPBFieldOptional,
2518         .dataType = GPBDataTypeInt32,
2519       },
2520       {
2521         .name = "permission",
2522         .dataTypeSpecific.className = NULL,
2523         .number = GtalkDataMessageStanza_FieldNumber_Permission,
2524         .hasIndex = 11,
2525         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, permission),
2526         .flags = GPBFieldOptional,
2527         .dataType = GPBDataTypeString,
2528       },
2529       {
2530         .name = "regId",
2531         .dataTypeSpecific.className = NULL,
2532         .number = GtalkDataMessageStanza_FieldNumber_RegId,
2533         .hasIndex = 12,
2534         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, regId),
2535         .flags = GPBFieldOptional,
2536         .dataType = GPBDataTypeString,
2537       },
2538       {
2539         .name = "pkgSignature",
2540         .dataTypeSpecific.className = NULL,
2541         .number = GtalkDataMessageStanza_FieldNumber_PkgSignature,
2542         .hasIndex = 13,
2543         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, pkgSignature),
2544         .flags = GPBFieldOptional,
2545         .dataType = GPBDataTypeString,
2546       },
2547       {
2548         .name = "clientId",
2549         .dataTypeSpecific.className = NULL,
2550         .number = GtalkDataMessageStanza_FieldNumber_ClientId,
2551         .hasIndex = 14,
2552         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, clientId),
2553         .flags = GPBFieldOptional,
2554         .dataType = GPBDataTypeString,
2555       },
2556       {
2557         .name = "deviceUserId",
2558         .dataTypeSpecific.className = NULL,
2559         .number = GtalkDataMessageStanza_FieldNumber_DeviceUserId,
2560         .hasIndex = 15,
2561         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, deviceUserId),
2562         .flags = GPBFieldOptional,
2563         .dataType = GPBDataTypeInt64,
2564       },
2565       {
2566         .name = "ttl",
2567         .dataTypeSpecific.className = NULL,
2568         .number = GtalkDataMessageStanza_FieldNumber_Ttl,
2569         .hasIndex = 16,
2570         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, ttl),
2571         .flags = GPBFieldOptional,
2572         .dataType = GPBDataTypeInt32,
2573       },
2574       {
2575         .name = "sent",
2576         .dataTypeSpecific.className = NULL,
2577         .number = GtalkDataMessageStanza_FieldNumber_Sent,
2578         .hasIndex = 17,
2579         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, sent),
2580         .flags = GPBFieldOptional,
2581         .dataType = GPBDataTypeInt64,
2582       },
2583       {
2584         .name = "queued",
2585         .dataTypeSpecific.className = NULL,
2586         .number = GtalkDataMessageStanza_FieldNumber_Queued,
2587         .hasIndex = 18,
2588         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, queued),
2589         .flags = GPBFieldOptional,
2590         .dataType = GPBDataTypeInt32,
2591       },
2592       {
2593         .name = "status",
2594         .dataTypeSpecific.className = NULL,
2595         .number = GtalkDataMessageStanza_FieldNumber_Status,
2596         .hasIndex = 19,
2597         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, status),
2598         .flags = GPBFieldOptional,
2599         .dataType = GPBDataTypeInt64,
2600       },
2601       {
2602         .name = "rawData",
2603         .dataTypeSpecific.className = NULL,
2604         .number = GtalkDataMessageStanza_FieldNumber_RawData,
2605         .hasIndex = 20,
2606         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, rawData),
2607         .flags = GPBFieldOptional,
2608         .dataType = GPBDataTypeBytes,
2609       },
2610       {
2611         .name = "maxDelay",
2612         .dataTypeSpecific.className = NULL,
2613         .number = GtalkDataMessageStanza_FieldNumber_MaxDelay,
2614         .hasIndex = 21,
2615         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, maxDelay),
2616         .flags = GPBFieldOptional,
2617         .dataType = GPBDataTypeInt32,
2618       },
2619       {
2620         .name = "actualDelay",
2621         .dataTypeSpecific.className = NULL,
2622         .number = GtalkDataMessageStanza_FieldNumber_ActualDelay,
2623         .hasIndex = 22,
2624         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, actualDelay),
2625         .flags = GPBFieldOptional,
2626         .dataType = GPBDataTypeInt32,
2627       },
2628       {
2629         .name = "immediateAck",
2630         .dataTypeSpecific.className = NULL,
2631         .number = GtalkDataMessageStanza_FieldNumber_ImmediateAck,
2632         .hasIndex = 23,
2633         .offset = 24,  // Stored in _has_storage_ to save space.
2634         .flags = GPBFieldOptional,
2635         .dataType = GPBDataTypeBool,
2636       },
2637       {
2638         .name = "deliveryReceiptRequested",
2639         .dataTypeSpecific.className = NULL,
2640         .number = GtalkDataMessageStanza_FieldNumber_DeliveryReceiptRequested,
2641         .hasIndex = 25,
2642         .offset = 26,  // Stored in _has_storage_ to save space.
2643         .flags = GPBFieldOptional,
2644         .dataType = GPBDataTypeBool,
2645       },
2646       {
2647         .name = "externalMessageId",
2648         .dataTypeSpecific.className = NULL,
2649         .number = GtalkDataMessageStanza_FieldNumber_ExternalMessageId,
2650         .hasIndex = 27,
2651         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, externalMessageId),
2652         .flags = GPBFieldOptional,
2653         .dataType = GPBDataTypeString,
2654       },
2655       {
2656         .name = "flags",
2657         .dataTypeSpecific.className = NULL,
2658         .number = GtalkDataMessageStanza_FieldNumber_Flags,
2659         .hasIndex = 28,
2660         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, flags),
2661         .flags = GPBFieldOptional,
2662         .dataType = GPBDataTypeInt64,
2663       },
2664       {
2665         .name = "cellTower",
2666         .dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
2667         .number = GtalkDataMessageStanza_FieldNumber_CellTower,
2668         .hasIndex = 29,
2669         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, cellTower),
2670         .flags = GPBFieldOptional,
2671         .dataType = GPBDataTypeMessage,
2672       },
2673       {
2674         .name = "priority",
2675         .dataTypeSpecific.className = NULL,
2676         .number = GtalkDataMessageStanza_FieldNumber_Priority,
2677         .hasIndex = 30,
2678         .offset = (uint32_t)offsetof(GtalkDataMessageStanza__storage_, priority),
2679         .flags = GPBFieldOptional,
2680         .dataType = GPBDataTypeInt32,
2681       },
2682     };
2683     GPBDescriptor *localDescriptor =
2684         [GPBDescriptor allocDescriptorForClass:[GtalkDataMessageStanza class]
2685                                      rootClass:[GtalkGtalkCoreRoot class]
2686                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2687                                         fields:fields
2688                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2689                                    storageSize:sizeof(GtalkDataMessageStanza__storage_)
2690                                          flags:GPBDescriptorInitializationFlag_None];
2691     NSAssert(descriptor == nil, @"Startup recursed!");
2692     descriptor = localDescriptor;
2693   }
2694   return descriptor;
2695 }
2696
2697 @end
2698
2699 #pragma mark - GtalkTalkMetadata
2700
2701 @implementation GtalkTalkMetadata
2702
2703 @dynamic hasForeground, foreground;
2704
2705 typedef struct GtalkTalkMetadata__storage_ {
2706   uint32_t _has_storage_[1];
2707 } GtalkTalkMetadata__storage_;
2708
2709 // This method is threadsafe because it is initially called
2710 // in +initialize for each subclass.
2711 + (GPBDescriptor *)descriptor {
2712   static GPBDescriptor *descriptor = nil;
2713   if (!descriptor) {
2714     static GPBMessageFieldDescription fields[] = {
2715       {
2716         .name = "foreground",
2717         .dataTypeSpecific.className = NULL,
2718         .number = GtalkTalkMetadata_FieldNumber_Foreground,
2719         .hasIndex = 0,
2720         .offset = 1,  // Stored in _has_storage_ to save space.
2721         .flags = GPBFieldOptional,
2722         .dataType = GPBDataTypeBool,
2723       },
2724     };
2725     GPBDescriptor *localDescriptor =
2726         [GPBDescriptor allocDescriptorForClass:[GtalkTalkMetadata class]
2727                                      rootClass:[GtalkGtalkCoreRoot class]
2728                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2729                                         fields:fields
2730                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2731                                    storageSize:sizeof(GtalkTalkMetadata__storage_)
2732                                          flags:GPBDescriptorInitializationFlag_None];
2733     NSAssert(descriptor == nil, @"Startup recursed!");
2734     descriptor = localDescriptor;
2735   }
2736   return descriptor;
2737 }
2738
2739 @end
2740
2741 #pragma mark - GtalkCellTower
2742
2743 #pragma clang diagnostic push
2744 #pragma clang diagnostic ignored "-Wdeprecated-implementations"
2745
2746 @implementation GtalkCellTower
2747
2748 @dynamic hasId_p, id_p;
2749 @dynamic hasKnownCongestionStatus, knownCongestionStatus;
2750
2751 typedef struct GtalkCellTower__storage_ {
2752   uint32_t _has_storage_[1];
2753   int32_t knownCongestionStatus;
2754   NSString *id_p;
2755 } GtalkCellTower__storage_;
2756
2757 // This method is threadsafe because it is initially called
2758 // in +initialize for each subclass.
2759 + (GPBDescriptor *)descriptor {
2760   static GPBDescriptor *descriptor = nil;
2761   if (!descriptor) {
2762     static GPBMessageFieldDescription fields[] = {
2763       {
2764         .name = "id_p",
2765         .dataTypeSpecific.className = NULL,
2766         .number = GtalkCellTower_FieldNumber_Id_p,
2767         .hasIndex = 0,
2768         .offset = (uint32_t)offsetof(GtalkCellTower__storage_, id_p),
2769         .flags = GPBFieldOptional,
2770         .dataType = GPBDataTypeString,
2771       },
2772       {
2773         .name = "knownCongestionStatus",
2774         .dataTypeSpecific.className = NULL,
2775         .number = GtalkCellTower_FieldNumber_KnownCongestionStatus,
2776         .hasIndex = 1,
2777         .offset = (uint32_t)offsetof(GtalkCellTower__storage_, knownCongestionStatus),
2778         .flags = GPBFieldOptional,
2779         .dataType = GPBDataTypeInt32,
2780       },
2781     };
2782     GPBDescriptor *localDescriptor =
2783         [GPBDescriptor allocDescriptorForClass:[GtalkCellTower class]
2784                                      rootClass:[GtalkGtalkCoreRoot class]
2785                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2786                                         fields:fields
2787                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2788                                    storageSize:sizeof(GtalkCellTower__storage_)
2789                                          flags:GPBDescriptorInitializationFlag_None];
2790     NSAssert(descriptor == nil, @"Startup recursed!");
2791     descriptor = localDescriptor;
2792   }
2793   return descriptor;
2794 }
2795
2796 @end
2797
2798 #pragma clang diagnostic pop
2799
2800 #pragma mark - GtalkClientEvent
2801
2802 @implementation GtalkClientEvent
2803
2804 @dynamic hasType, type;
2805 @dynamic hasNumberDiscardedEvents, numberDiscardedEvents;
2806 @dynamic hasNetworkType, networkType;
2807 @dynamic hasNetworkPort, networkPort;
2808 @dynamic hasTimeConnectionStartedMs, timeConnectionStartedMs;
2809 @dynamic hasTimeConnectionEndedMs, timeConnectionEndedMs;
2810 @dynamic hasErrorCode, errorCode;
2811 @dynamic hasTimeConnectionEstablishedMs, timeConnectionEstablishedMs;
2812 @dynamic hasMcsReconnectAction, mcsReconnectAction;
2813
2814 typedef struct GtalkClientEvent__storage_ {
2815   uint32_t _has_storage_[1];
2816   GtalkClientEvent_Type type;
2817   uint32_t numberDiscardedEvents;
2818   int32_t networkType;
2819   int32_t networkPort;
2820   int32_t errorCode;
2821   GtalkClientEvent_McsReconnectAction mcsReconnectAction;
2822   uint64_t timeConnectionStartedMs;
2823   uint64_t timeConnectionEndedMs;
2824   uint64_t timeConnectionEstablishedMs;
2825 } GtalkClientEvent__storage_;
2826
2827 // This method is threadsafe because it is initially called
2828 // in +initialize for each subclass.
2829 + (GPBDescriptor *)descriptor {
2830   static GPBDescriptor *descriptor = nil;
2831   if (!descriptor) {
2832     static GPBMessageFieldDescription fields[] = {
2833       {
2834         .name = "type",
2835         .dataTypeSpecific.enumDescFunc = GtalkClientEvent_Type_EnumDescriptor,
2836         .number = GtalkClientEvent_FieldNumber_Type,
2837         .hasIndex = 0,
2838         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, type),
2839         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
2840         .dataType = GPBDataTypeEnum,
2841       },
2842       {
2843         .name = "numberDiscardedEvents",
2844         .dataTypeSpecific.className = NULL,
2845         .number = GtalkClientEvent_FieldNumber_NumberDiscardedEvents,
2846         .hasIndex = 1,
2847         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, numberDiscardedEvents),
2848         .flags = GPBFieldOptional,
2849         .dataType = GPBDataTypeUInt32,
2850       },
2851       {
2852         .name = "networkType",
2853         .dataTypeSpecific.className = NULL,
2854         .number = GtalkClientEvent_FieldNumber_NetworkType,
2855         .hasIndex = 2,
2856         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, networkType),
2857         .flags = GPBFieldOptional,
2858         .dataType = GPBDataTypeInt32,
2859       },
2860       {
2861         .name = "networkPort",
2862         .dataTypeSpecific.className = NULL,
2863         .number = GtalkClientEvent_FieldNumber_NetworkPort,
2864         .hasIndex = 3,
2865         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, networkPort),
2866         .flags = GPBFieldOptional,
2867         .dataType = GPBDataTypeInt32,
2868       },
2869       {
2870         .name = "timeConnectionStartedMs",
2871         .dataTypeSpecific.className = NULL,
2872         .number = GtalkClientEvent_FieldNumber_TimeConnectionStartedMs,
2873         .hasIndex = 4,
2874         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, timeConnectionStartedMs),
2875         .flags = GPBFieldOptional,
2876         .dataType = GPBDataTypeUInt64,
2877       },
2878       {
2879         .name = "timeConnectionEndedMs",
2880         .dataTypeSpecific.className = NULL,
2881         .number = GtalkClientEvent_FieldNumber_TimeConnectionEndedMs,
2882         .hasIndex = 5,
2883         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, timeConnectionEndedMs),
2884         .flags = GPBFieldOptional,
2885         .dataType = GPBDataTypeUInt64,
2886       },
2887       {
2888         .name = "errorCode",
2889         .dataTypeSpecific.className = NULL,
2890         .number = GtalkClientEvent_FieldNumber_ErrorCode,
2891         .hasIndex = 6,
2892         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, errorCode),
2893         .flags = GPBFieldOptional,
2894         .dataType = GPBDataTypeInt32,
2895       },
2896       {
2897         .name = "timeConnectionEstablishedMs",
2898         .dataTypeSpecific.className = NULL,
2899         .number = GtalkClientEvent_FieldNumber_TimeConnectionEstablishedMs,
2900         .hasIndex = 7,
2901         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, timeConnectionEstablishedMs),
2902         .flags = GPBFieldOptional,
2903         .dataType = GPBDataTypeUInt64,
2904       },
2905       {
2906         .name = "mcsReconnectAction",
2907         .dataTypeSpecific.enumDescFunc = GtalkClientEvent_McsReconnectAction_EnumDescriptor,
2908         .number = GtalkClientEvent_FieldNumber_McsReconnectAction,
2909         .hasIndex = 8,
2910         .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, mcsReconnectAction),
2911         .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
2912         .dataType = GPBDataTypeEnum,
2913       },
2914     };
2915     GPBDescriptor *localDescriptor =
2916         [GPBDescriptor allocDescriptorForClass:[GtalkClientEvent class]
2917                                      rootClass:[GtalkGtalkCoreRoot class]
2918                                           file:GtalkGtalkCoreRoot_FileDescriptor()
2919                                         fields:fields
2920                                     fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
2921                                    storageSize:sizeof(GtalkClientEvent__storage_)
2922                                          flags:GPBDescriptorInitializationFlag_None];
2923     NSAssert(descriptor == nil, @"Startup recursed!");
2924     descriptor = localDescriptor;
2925   }
2926   return descriptor;
2927 }
2928
2929 @end
2930
2931 #pragma mark - Enum GtalkClientEvent_Type
2932
2933 GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void) {
2934   static GPBEnumDescriptor *descriptor = NULL;
2935   if (!descriptor) {
2936     static const char *valueNames =
2937         "Unknown\000DiscardedEvents\000FailedConnection"
2938         "\000SuccessfulConnection\000McsReconnectReques"
2939         "t\000FailedSocketCreationMcsReconnect\000McsRe"
2940         "connectLimited\000";
2941     static const int32_t values[] = {
2942         GtalkClientEvent_Type_Unknown,
2943         GtalkClientEvent_Type_DiscardedEvents,
2944         GtalkClientEvent_Type_FailedConnection,
2945         GtalkClientEvent_Type_SuccessfulConnection,
2946         GtalkClientEvent_Type_McsReconnectRequest,
2947         GtalkClientEvent_Type_FailedSocketCreationMcsReconnect,
2948         GtalkClientEvent_Type_McsReconnectLimited,
2949     };
2950     GPBEnumDescriptor *worker =
2951         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_Type)
2952                                        valueNames:valueNames
2953                                            values:values
2954                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
2955                                      enumVerifier:GtalkClientEvent_Type_IsValidValue];
2956     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
2957       [worker release];
2958     }
2959   }
2960   return descriptor;
2961 }
2962
2963 BOOL GtalkClientEvent_Type_IsValidValue(int32_t value__) {
2964   switch (value__) {
2965     case GtalkClientEvent_Type_Unknown:
2966     case GtalkClientEvent_Type_DiscardedEvents:
2967     case GtalkClientEvent_Type_FailedConnection:
2968     case GtalkClientEvent_Type_SuccessfulConnection:
2969     case GtalkClientEvent_Type_McsReconnectRequest:
2970     case GtalkClientEvent_Type_FailedSocketCreationMcsReconnect:
2971     case GtalkClientEvent_Type_McsReconnectLimited:
2972       return YES;
2973     default:
2974       return NO;
2975   }
2976 }
2977
2978 #pragma mark - Enum GtalkClientEvent_McsReconnectAction
2979
2980 GPBEnumDescriptor *GtalkClientEvent_McsReconnectAction_EnumDescriptor(void) {
2981   static GPBEnumDescriptor *descriptor = NULL;
2982   if (!descriptor) {
2983     static const char *valueNames =
2984         "None\000NotConnected\000TooSoon\000";
2985     static const int32_t values[] = {
2986         GtalkClientEvent_McsReconnectAction_None,
2987         GtalkClientEvent_McsReconnectAction_NotConnected,
2988         GtalkClientEvent_McsReconnectAction_TooSoon,
2989     };
2990     GPBEnumDescriptor *worker =
2991         [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_McsReconnectAction)
2992                                        valueNames:valueNames
2993                                            values:values
2994                                             count:(uint32_t)(sizeof(values) / sizeof(int32_t))
2995                                      enumVerifier:GtalkClientEvent_McsReconnectAction_IsValidValue];
2996     if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
2997       [worker release];
2998     }
2999   }
3000   return descriptor;
3001 }
3002
3003 BOOL GtalkClientEvent_McsReconnectAction_IsValidValue(int32_t value__) {
3004   switch (value__) {
3005     case GtalkClientEvent_McsReconnectAction_None:
3006     case GtalkClientEvent_McsReconnectAction_NotConnected:
3007     case GtalkClientEvent_McsReconnectAction_TooSoon:
3008       return YES;
3009     default:
3010       return NO;
3011   }
3012 }
3013
3014
3015 #pragma clang diagnostic pop
3016
3017 // @@protoc_insertion_point(global_scope)