]> git.saurik.com Git - apple/security.git/blob - keychain/escrowrequest/generated_source/SecEscrowPendingRecord.m
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / escrowrequest / generated_source / SecEscrowPendingRecord.m
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from SecEscrowPendingRecord.proto
4
5 #import "SecEscrowPendingRecord.h"
6 #import <ProtocolBuffer/PBConstants.h>
7 #import <ProtocolBuffer/PBHashUtil.h>
8 #import <ProtocolBuffer/PBDataReader.h>
9
10 #if !__has_feature(objc_arc)
11 # error This generated file depends on ARC but it is not enabled; turn on ARC, or use 'objc_use_arc' option to generate non-ARC code.
12 #endif
13
14 @implementation SecEscrowPendingRecord
15
16 - (BOOL)hasUuid
17 {
18 return _uuid != nil;
19 }
20 @synthesize uuid = _uuid;
21 @synthesize certCached = _certCached;
22 - (void)setCertCached:(BOOL)v
23 {
24 _has.certCached = YES;
25 _certCached = v;
26 }
27 - (void)setHasCertCached:(BOOL)f
28 {
29 _has.certCached = f;
30 }
31 - (BOOL)hasCertCached
32 {
33 return _has.certCached;
34 }
35 - (BOOL)hasSerializedPrerecord
36 {
37 return _serializedPrerecord != nil;
38 }
39 @synthesize serializedPrerecord = _serializedPrerecord;
40 @synthesize lastCloudServicesTriggerTime = _lastCloudServicesTriggerTime;
41 - (void)setLastCloudServicesTriggerTime:(uint64_t)v
42 {
43 _has.lastCloudServicesTriggerTime = YES;
44 _lastCloudServicesTriggerTime = v;
45 }
46 - (void)setHasLastCloudServicesTriggerTime:(BOOL)f
47 {
48 _has.lastCloudServicesTriggerTime = f;
49 }
50 - (BOOL)hasLastCloudServicesTriggerTime
51 {
52 return _has.lastCloudServicesTriggerTime;
53 }
54 @synthesize lastEscrowAttemptTime = _lastEscrowAttemptTime;
55 - (void)setLastEscrowAttemptTime:(uint64_t)v
56 {
57 _has.lastEscrowAttemptTime = YES;
58 _lastEscrowAttemptTime = v;
59 }
60 - (void)setHasLastEscrowAttemptTime:(BOOL)f
61 {
62 _has.lastEscrowAttemptTime = f;
63 }
64 - (BOOL)hasLastEscrowAttemptTime
65 {
66 return _has.lastEscrowAttemptTime;
67 }
68 @synthesize uploadCompleted = _uploadCompleted;
69 - (void)setUploadCompleted:(BOOL)v
70 {
71 _has.uploadCompleted = YES;
72 _uploadCompleted = v;
73 }
74 - (void)setHasUploadCompleted:(BOOL)f
75 {
76 _has.uploadCompleted = f;
77 }
78 - (BOOL)hasUploadCompleted
79 {
80 return _has.uploadCompleted;
81 }
82 @synthesize uploadRetries = _uploadRetries;
83 - (void)setUploadRetries:(uint64_t)v
84 {
85 _has.uploadRetries = YES;
86 _uploadRetries = v;
87 }
88 - (void)setHasUploadRetries:(BOOL)f
89 {
90 _has.uploadRetries = f;
91 }
92 - (BOOL)hasUploadRetries
93 {
94 return _has.uploadRetries;
95 }
96 - (BOOL)hasAltDSID
97 {
98 return _altDSID != nil;
99 }
100 @synthesize altDSID = _altDSID;
101 @synthesize triggerRequestTime = _triggerRequestTime;
102 - (void)setTriggerRequestTime:(uint64_t)v
103 {
104 _has.triggerRequestTime = YES;
105 _triggerRequestTime = v;
106 }
107 - (void)setHasTriggerRequestTime:(BOOL)f
108 {
109 _has.triggerRequestTime = f;
110 }
111 - (BOOL)hasTriggerRequestTime
112 {
113 return _has.triggerRequestTime;
114 }
115
116 - (NSString *)description
117 {
118 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
119 }
120
121 - (NSDictionary *)dictionaryRepresentation
122 {
123 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
124 if (self->_uuid)
125 {
126 [dict setObject:self->_uuid forKey:@"uuid"];
127 }
128 if (self->_has.certCached)
129 {
130 [dict setObject:[NSNumber numberWithBool:self->_certCached] forKey:@"certCached"];
131 }
132 if (self->_serializedPrerecord)
133 {
134 [dict setObject:self->_serializedPrerecord forKey:@"serializedPrerecord"];
135 }
136 if (self->_has.lastCloudServicesTriggerTime)
137 {
138 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_lastCloudServicesTriggerTime] forKey:@"lastCloudServicesTriggerTime"];
139 }
140 if (self->_has.lastEscrowAttemptTime)
141 {
142 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_lastEscrowAttemptTime] forKey:@"lastEscrowAttemptTime"];
143 }
144 if (self->_has.uploadCompleted)
145 {
146 [dict setObject:[NSNumber numberWithBool:self->_uploadCompleted] forKey:@"uploadCompleted"];
147 }
148 if (self->_has.uploadRetries)
149 {
150 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_uploadRetries] forKey:@"uploadRetries"];
151 }
152 if (self->_altDSID)
153 {
154 [dict setObject:self->_altDSID forKey:@"altDSID"];
155 }
156 if (self->_has.triggerRequestTime)
157 {
158 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_triggerRequestTime] forKey:@"triggerRequestTime"];
159 }
160 return dict;
161 }
162
163 BOOL SecEscrowPendingRecordReadFrom(__unsafe_unretained SecEscrowPendingRecord *self, __unsafe_unretained PBDataReader *reader) {
164 while (PBReaderHasMoreData(reader)) {
165 uint32_t tag = 0;
166 uint8_t aType = 0;
167
168 PBReaderReadTag32AndType(reader, &tag, &aType);
169
170 if (PBReaderHasError(reader))
171 break;
172
173 if (aType == TYPE_END_GROUP) {
174 break;
175 }
176
177 switch (tag) {
178
179 case 1 /* uuid */:
180 {
181 NSString *new_uuid = PBReaderReadString(reader);
182 self->_uuid = new_uuid;
183 }
184 break;
185 case 2 /* certCached */:
186 {
187 self->_has.certCached = YES;
188 self->_certCached = PBReaderReadBOOL(reader);
189 }
190 break;
191 case 3 /* serializedPrerecord */:
192 {
193 NSData *new_serializedPrerecord = PBReaderReadData(reader);
194 self->_serializedPrerecord = new_serializedPrerecord;
195 }
196 break;
197 case 4 /* lastCloudServicesTriggerTime */:
198 {
199 self->_has.lastCloudServicesTriggerTime = YES;
200 self->_lastCloudServicesTriggerTime = PBReaderReadUint64(reader);
201 }
202 break;
203 case 5 /* lastEscrowAttemptTime */:
204 {
205 self->_has.lastEscrowAttemptTime = YES;
206 self->_lastEscrowAttemptTime = PBReaderReadUint64(reader);
207 }
208 break;
209 case 6 /* uploadCompleted */:
210 {
211 self->_has.uploadCompleted = YES;
212 self->_uploadCompleted = PBReaderReadBOOL(reader);
213 }
214 break;
215 case 7 /* uploadRetries */:
216 {
217 self->_has.uploadRetries = YES;
218 self->_uploadRetries = PBReaderReadUint64(reader);
219 }
220 break;
221 case 8 /* altDSID */:
222 {
223 NSString *new_altDSID = PBReaderReadString(reader);
224 self->_altDSID = new_altDSID;
225 }
226 break;
227 case 9 /* triggerRequestTime */:
228 {
229 self->_has.triggerRequestTime = YES;
230 self->_triggerRequestTime = PBReaderReadUint64(reader);
231 }
232 break;
233 default:
234 if (!PBReaderSkipValueWithTag(reader, tag, aType))
235 return NO;
236 break;
237 }
238 }
239 return !PBReaderHasError(reader);
240 }
241
242 - (BOOL)readFrom:(PBDataReader *)reader
243 {
244 return SecEscrowPendingRecordReadFrom(self, reader);
245 }
246 - (void)writeTo:(PBDataWriter *)writer
247 {
248 /* uuid */
249 {
250 if (self->_uuid)
251 {
252 PBDataWriterWriteStringField(writer, self->_uuid, 1);
253 }
254 }
255 /* certCached */
256 {
257 if (self->_has.certCached)
258 {
259 PBDataWriterWriteBOOLField(writer, self->_certCached, 2);
260 }
261 }
262 /* serializedPrerecord */
263 {
264 if (self->_serializedPrerecord)
265 {
266 PBDataWriterWriteDataField(writer, self->_serializedPrerecord, 3);
267 }
268 }
269 /* lastCloudServicesTriggerTime */
270 {
271 if (self->_has.lastCloudServicesTriggerTime)
272 {
273 PBDataWriterWriteUint64Field(writer, self->_lastCloudServicesTriggerTime, 4);
274 }
275 }
276 /* lastEscrowAttemptTime */
277 {
278 if (self->_has.lastEscrowAttemptTime)
279 {
280 PBDataWriterWriteUint64Field(writer, self->_lastEscrowAttemptTime, 5);
281 }
282 }
283 /* uploadCompleted */
284 {
285 if (self->_has.uploadCompleted)
286 {
287 PBDataWriterWriteBOOLField(writer, self->_uploadCompleted, 6);
288 }
289 }
290 /* uploadRetries */
291 {
292 if (self->_has.uploadRetries)
293 {
294 PBDataWriterWriteUint64Field(writer, self->_uploadRetries, 7);
295 }
296 }
297 /* altDSID */
298 {
299 if (self->_altDSID)
300 {
301 PBDataWriterWriteStringField(writer, self->_altDSID, 8);
302 }
303 }
304 /* triggerRequestTime */
305 {
306 if (self->_has.triggerRequestTime)
307 {
308 PBDataWriterWriteUint64Field(writer, self->_triggerRequestTime, 9);
309 }
310 }
311 }
312
313 - (void)copyTo:(SecEscrowPendingRecord *)other
314 {
315 if (_uuid)
316 {
317 other.uuid = _uuid;
318 }
319 if (self->_has.certCached)
320 {
321 other->_certCached = _certCached;
322 other->_has.certCached = YES;
323 }
324 if (_serializedPrerecord)
325 {
326 other.serializedPrerecord = _serializedPrerecord;
327 }
328 if (self->_has.lastCloudServicesTriggerTime)
329 {
330 other->_lastCloudServicesTriggerTime = _lastCloudServicesTriggerTime;
331 other->_has.lastCloudServicesTriggerTime = YES;
332 }
333 if (self->_has.lastEscrowAttemptTime)
334 {
335 other->_lastEscrowAttemptTime = _lastEscrowAttemptTime;
336 other->_has.lastEscrowAttemptTime = YES;
337 }
338 if (self->_has.uploadCompleted)
339 {
340 other->_uploadCompleted = _uploadCompleted;
341 other->_has.uploadCompleted = YES;
342 }
343 if (self->_has.uploadRetries)
344 {
345 other->_uploadRetries = _uploadRetries;
346 other->_has.uploadRetries = YES;
347 }
348 if (_altDSID)
349 {
350 other.altDSID = _altDSID;
351 }
352 if (self->_has.triggerRequestTime)
353 {
354 other->_triggerRequestTime = _triggerRequestTime;
355 other->_has.triggerRequestTime = YES;
356 }
357 }
358
359 - (id)copyWithZone:(NSZone *)zone
360 {
361 SecEscrowPendingRecord *copy = [[[self class] allocWithZone:zone] init];
362 copy->_uuid = [_uuid copyWithZone:zone];
363 if (self->_has.certCached)
364 {
365 copy->_certCached = _certCached;
366 copy->_has.certCached = YES;
367 }
368 copy->_serializedPrerecord = [_serializedPrerecord copyWithZone:zone];
369 if (self->_has.lastCloudServicesTriggerTime)
370 {
371 copy->_lastCloudServicesTriggerTime = _lastCloudServicesTriggerTime;
372 copy->_has.lastCloudServicesTriggerTime = YES;
373 }
374 if (self->_has.lastEscrowAttemptTime)
375 {
376 copy->_lastEscrowAttemptTime = _lastEscrowAttemptTime;
377 copy->_has.lastEscrowAttemptTime = YES;
378 }
379 if (self->_has.uploadCompleted)
380 {
381 copy->_uploadCompleted = _uploadCompleted;
382 copy->_has.uploadCompleted = YES;
383 }
384 if (self->_has.uploadRetries)
385 {
386 copy->_uploadRetries = _uploadRetries;
387 copy->_has.uploadRetries = YES;
388 }
389 copy->_altDSID = [_altDSID copyWithZone:zone];
390 if (self->_has.triggerRequestTime)
391 {
392 copy->_triggerRequestTime = _triggerRequestTime;
393 copy->_has.triggerRequestTime = YES;
394 }
395 return copy;
396 }
397
398 - (BOOL)isEqual:(id)object
399 {
400 SecEscrowPendingRecord *other = (SecEscrowPendingRecord *)object;
401 return [other isMemberOfClass:[self class]]
402 &&
403 ((!self->_uuid && !other->_uuid) || [self->_uuid isEqual:other->_uuid])
404 &&
405 ((self->_has.certCached && other->_has.certCached && ((self->_certCached && other->_certCached) || (!self->_certCached && !other->_certCached))) || (!self->_has.certCached && !other->_has.certCached))
406 &&
407 ((!self->_serializedPrerecord && !other->_serializedPrerecord) || [self->_serializedPrerecord isEqual:other->_serializedPrerecord])
408 &&
409 ((self->_has.lastCloudServicesTriggerTime && other->_has.lastCloudServicesTriggerTime && self->_lastCloudServicesTriggerTime == other->_lastCloudServicesTriggerTime) || (!self->_has.lastCloudServicesTriggerTime && !other->_has.lastCloudServicesTriggerTime))
410 &&
411 ((self->_has.lastEscrowAttemptTime && other->_has.lastEscrowAttemptTime && self->_lastEscrowAttemptTime == other->_lastEscrowAttemptTime) || (!self->_has.lastEscrowAttemptTime && !other->_has.lastEscrowAttemptTime))
412 &&
413 ((self->_has.uploadCompleted && other->_has.uploadCompleted && ((self->_uploadCompleted && other->_uploadCompleted) || (!self->_uploadCompleted && !other->_uploadCompleted))) || (!self->_has.uploadCompleted && !other->_has.uploadCompleted))
414 &&
415 ((self->_has.uploadRetries && other->_has.uploadRetries && self->_uploadRetries == other->_uploadRetries) || (!self->_has.uploadRetries && !other->_has.uploadRetries))
416 &&
417 ((!self->_altDSID && !other->_altDSID) || [self->_altDSID isEqual:other->_altDSID])
418 &&
419 ((self->_has.triggerRequestTime && other->_has.triggerRequestTime && self->_triggerRequestTime == other->_triggerRequestTime) || (!self->_has.triggerRequestTime && !other->_has.triggerRequestTime))
420 ;
421 }
422
423 - (NSUInteger)hash
424 {
425 return 0
426 ^
427 [self->_uuid hash]
428 ^
429 (self->_has.certCached ? PBHashInt((NSUInteger)self->_certCached) : 0)
430 ^
431 [self->_serializedPrerecord hash]
432 ^
433 (self->_has.lastCloudServicesTriggerTime ? PBHashInt((NSUInteger)self->_lastCloudServicesTriggerTime) : 0)
434 ^
435 (self->_has.lastEscrowAttemptTime ? PBHashInt((NSUInteger)self->_lastEscrowAttemptTime) : 0)
436 ^
437 (self->_has.uploadCompleted ? PBHashInt((NSUInteger)self->_uploadCompleted) : 0)
438 ^
439 (self->_has.uploadRetries ? PBHashInt((NSUInteger)self->_uploadRetries) : 0)
440 ^
441 [self->_altDSID hash]
442 ^
443 (self->_has.triggerRequestTime ? PBHashInt((NSUInteger)self->_triggerRequestTime) : 0)
444 ;
445 }
446
447 - (void)mergeFrom:(SecEscrowPendingRecord *)other
448 {
449 if (other->_uuid)
450 {
451 [self setUuid:other->_uuid];
452 }
453 if (other->_has.certCached)
454 {
455 self->_certCached = other->_certCached;
456 self->_has.certCached = YES;
457 }
458 if (other->_serializedPrerecord)
459 {
460 [self setSerializedPrerecord:other->_serializedPrerecord];
461 }
462 if (other->_has.lastCloudServicesTriggerTime)
463 {
464 self->_lastCloudServicesTriggerTime = other->_lastCloudServicesTriggerTime;
465 self->_has.lastCloudServicesTriggerTime = YES;
466 }
467 if (other->_has.lastEscrowAttemptTime)
468 {
469 self->_lastEscrowAttemptTime = other->_lastEscrowAttemptTime;
470 self->_has.lastEscrowAttemptTime = YES;
471 }
472 if (other->_has.uploadCompleted)
473 {
474 self->_uploadCompleted = other->_uploadCompleted;
475 self->_has.uploadCompleted = YES;
476 }
477 if (other->_has.uploadRetries)
478 {
479 self->_uploadRetries = other->_uploadRetries;
480 self->_has.uploadRetries = YES;
481 }
482 if (other->_altDSID)
483 {
484 [self setAltDSID:other->_altDSID];
485 }
486 if (other->_has.triggerRequestTime)
487 {
488 self->_triggerRequestTime = other->_triggerRequestTime;
489 self->_has.triggerRequestTime = YES;
490 }
491 }
492
493 @end
494