]> git.saurik.com Git - apple/security.git/blob - keychain/ot/proto/generated_source/OTEscrowAuthenticationInformation.m
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / ot / proto / generated_source / OTEscrowAuthenticationInformation.m
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from OTCDPRecoveryInformation.proto
4
5 #import "OTEscrowAuthenticationInformation.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 OTEscrowAuthenticationInformation
15
16 - (BOOL)hasAuthenticationPassword
17 {
18 return _authenticationPassword != nil;
19 }
20 @synthesize authenticationPassword = _authenticationPassword;
21 - (BOOL)hasAuthenticationDsid
22 {
23 return _authenticationDsid != nil;
24 }
25 @synthesize authenticationDsid = _authenticationDsid;
26 - (BOOL)hasAuthenticationAppleid
27 {
28 return _authenticationAppleid != nil;
29 }
30 @synthesize authenticationAppleid = _authenticationAppleid;
31 - (BOOL)hasFmipUuid
32 {
33 return _fmipUuid != nil;
34 }
35 @synthesize fmipUuid = _fmipUuid;
36 @synthesize fmipRecovery = _fmipRecovery;
37 - (void)setFmipRecovery:(BOOL)v
38 {
39 _has.fmipRecovery = YES;
40 _fmipRecovery = v;
41 }
42 - (void)setHasFmipRecovery:(BOOL)f
43 {
44 _has.fmipRecovery = f;
45 }
46 - (BOOL)hasFmipRecovery
47 {
48 return _has.fmipRecovery != 0;
49 }
50 @synthesize idmsRecovery = _idmsRecovery;
51 - (void)setIdmsRecovery:(BOOL)v
52 {
53 _has.idmsRecovery = YES;
54 _idmsRecovery = v;
55 }
56 - (void)setHasIdmsRecovery:(BOOL)f
57 {
58 _has.idmsRecovery = f;
59 }
60 - (BOOL)hasIdmsRecovery
61 {
62 return _has.idmsRecovery != 0;
63 }
64 - (BOOL)hasAuthenticationAuthToken
65 {
66 return _authenticationAuthToken != nil;
67 }
68 @synthesize authenticationAuthToken = _authenticationAuthToken;
69 - (BOOL)hasAuthenticationEscrowproxyUrl
70 {
71 return _authenticationEscrowproxyUrl != nil;
72 }
73 @synthesize authenticationEscrowproxyUrl = _authenticationEscrowproxyUrl;
74 - (BOOL)hasAuthenticationIcloudEnvironment
75 {
76 return _authenticationIcloudEnvironment != nil;
77 }
78 @synthesize authenticationIcloudEnvironment = _authenticationIcloudEnvironment;
79
80 - (NSString *)description
81 {
82 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
83 }
84
85 - (NSDictionary *)dictionaryRepresentation
86 {
87 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
88 if (self->_authenticationPassword)
89 {
90 [dict setObject:self->_authenticationPassword forKey:@"authentication_password"];
91 }
92 if (self->_authenticationDsid)
93 {
94 [dict setObject:self->_authenticationDsid forKey:@"authentication_dsid"];
95 }
96 if (self->_authenticationAppleid)
97 {
98 [dict setObject:self->_authenticationAppleid forKey:@"authentication_appleid"];
99 }
100 if (self->_fmipUuid)
101 {
102 [dict setObject:self->_fmipUuid forKey:@"fmip_uuid"];
103 }
104 if (self->_has.fmipRecovery)
105 {
106 [dict setObject:[NSNumber numberWithBool:self->_fmipRecovery] forKey:@"fmip_recovery"];
107 }
108 if (self->_has.idmsRecovery)
109 {
110 [dict setObject:[NSNumber numberWithBool:self->_idmsRecovery] forKey:@"idms_recovery"];
111 }
112 if (self->_authenticationAuthToken)
113 {
114 [dict setObject:self->_authenticationAuthToken forKey:@"authentication_auth_token"];
115 }
116 if (self->_authenticationEscrowproxyUrl)
117 {
118 [dict setObject:self->_authenticationEscrowproxyUrl forKey:@"authentication_escrowproxy_url"];
119 }
120 if (self->_authenticationIcloudEnvironment)
121 {
122 [dict setObject:self->_authenticationIcloudEnvironment forKey:@"authentication_icloud_environment"];
123 }
124 return dict;
125 }
126
127 BOOL OTEscrowAuthenticationInformationReadFrom(__unsafe_unretained OTEscrowAuthenticationInformation *self, __unsafe_unretained PBDataReader *reader) {
128 while (PBReaderHasMoreData(reader)) {
129 uint32_t tag = 0;
130 uint8_t aType = 0;
131
132 PBReaderReadTag32AndType(reader, &tag, &aType);
133
134 if (PBReaderHasError(reader))
135 break;
136
137 if (aType == TYPE_END_GROUP) {
138 break;
139 }
140
141 switch (tag) {
142
143 case 1 /* authenticationPassword */:
144 {
145 NSString *new_authenticationPassword = PBReaderReadString(reader);
146 self->_authenticationPassword = new_authenticationPassword;
147 }
148 break;
149 case 2 /* authenticationDsid */:
150 {
151 NSString *new_authenticationDsid = PBReaderReadString(reader);
152 self->_authenticationDsid = new_authenticationDsid;
153 }
154 break;
155 case 3 /* authenticationAppleid */:
156 {
157 NSString *new_authenticationAppleid = PBReaderReadString(reader);
158 self->_authenticationAppleid = new_authenticationAppleid;
159 }
160 break;
161 case 4 /* fmipUuid */:
162 {
163 NSString *new_fmipUuid = PBReaderReadString(reader);
164 self->_fmipUuid = new_fmipUuid;
165 }
166 break;
167 case 5 /* fmipRecovery */:
168 {
169 self->_has.fmipRecovery = YES;
170 self->_fmipRecovery = PBReaderReadBOOL(reader);
171 }
172 break;
173 case 6 /* idmsRecovery */:
174 {
175 self->_has.idmsRecovery = YES;
176 self->_idmsRecovery = PBReaderReadBOOL(reader);
177 }
178 break;
179 case 7 /* authenticationAuthToken */:
180 {
181 NSString *new_authenticationAuthToken = PBReaderReadString(reader);
182 self->_authenticationAuthToken = new_authenticationAuthToken;
183 }
184 break;
185 case 8 /* authenticationEscrowproxyUrl */:
186 {
187 NSString *new_authenticationEscrowproxyUrl = PBReaderReadString(reader);
188 self->_authenticationEscrowproxyUrl = new_authenticationEscrowproxyUrl;
189 }
190 break;
191 case 9 /* authenticationIcloudEnvironment */:
192 {
193 NSString *new_authenticationIcloudEnvironment = PBReaderReadString(reader);
194 self->_authenticationIcloudEnvironment = new_authenticationIcloudEnvironment;
195 }
196 break;
197 default:
198 if (!PBReaderSkipValueWithTag(reader, tag, aType))
199 return NO;
200 break;
201 }
202 }
203 return !PBReaderHasError(reader);
204 }
205
206 - (BOOL)readFrom:(PBDataReader *)reader
207 {
208 return OTEscrowAuthenticationInformationReadFrom(self, reader);
209 }
210 - (void)writeTo:(PBDataWriter *)writer
211 {
212 /* authenticationPassword */
213 {
214 if (self->_authenticationPassword)
215 {
216 PBDataWriterWriteStringField(writer, self->_authenticationPassword, 1);
217 }
218 }
219 /* authenticationDsid */
220 {
221 if (self->_authenticationDsid)
222 {
223 PBDataWriterWriteStringField(writer, self->_authenticationDsid, 2);
224 }
225 }
226 /* authenticationAppleid */
227 {
228 if (self->_authenticationAppleid)
229 {
230 PBDataWriterWriteStringField(writer, self->_authenticationAppleid, 3);
231 }
232 }
233 /* fmipUuid */
234 {
235 if (self->_fmipUuid)
236 {
237 PBDataWriterWriteStringField(writer, self->_fmipUuid, 4);
238 }
239 }
240 /* fmipRecovery */
241 {
242 if (self->_has.fmipRecovery)
243 {
244 PBDataWriterWriteBOOLField(writer, self->_fmipRecovery, 5);
245 }
246 }
247 /* idmsRecovery */
248 {
249 if (self->_has.idmsRecovery)
250 {
251 PBDataWriterWriteBOOLField(writer, self->_idmsRecovery, 6);
252 }
253 }
254 /* authenticationAuthToken */
255 {
256 if (self->_authenticationAuthToken)
257 {
258 PBDataWriterWriteStringField(writer, self->_authenticationAuthToken, 7);
259 }
260 }
261 /* authenticationEscrowproxyUrl */
262 {
263 if (self->_authenticationEscrowproxyUrl)
264 {
265 PBDataWriterWriteStringField(writer, self->_authenticationEscrowproxyUrl, 8);
266 }
267 }
268 /* authenticationIcloudEnvironment */
269 {
270 if (self->_authenticationIcloudEnvironment)
271 {
272 PBDataWriterWriteStringField(writer, self->_authenticationIcloudEnvironment, 9);
273 }
274 }
275 }
276
277 - (void)copyTo:(OTEscrowAuthenticationInformation *)other
278 {
279 if (_authenticationPassword)
280 {
281 other.authenticationPassword = _authenticationPassword;
282 }
283 if (_authenticationDsid)
284 {
285 other.authenticationDsid = _authenticationDsid;
286 }
287 if (_authenticationAppleid)
288 {
289 other.authenticationAppleid = _authenticationAppleid;
290 }
291 if (_fmipUuid)
292 {
293 other.fmipUuid = _fmipUuid;
294 }
295 if (self->_has.fmipRecovery)
296 {
297 other->_fmipRecovery = _fmipRecovery;
298 other->_has.fmipRecovery = YES;
299 }
300 if (self->_has.idmsRecovery)
301 {
302 other->_idmsRecovery = _idmsRecovery;
303 other->_has.idmsRecovery = YES;
304 }
305 if (_authenticationAuthToken)
306 {
307 other.authenticationAuthToken = _authenticationAuthToken;
308 }
309 if (_authenticationEscrowproxyUrl)
310 {
311 other.authenticationEscrowproxyUrl = _authenticationEscrowproxyUrl;
312 }
313 if (_authenticationIcloudEnvironment)
314 {
315 other.authenticationIcloudEnvironment = _authenticationIcloudEnvironment;
316 }
317 }
318
319 - (id)copyWithZone:(NSZone *)zone
320 {
321 OTEscrowAuthenticationInformation *copy = [[[self class] allocWithZone:zone] init];
322 copy->_authenticationPassword = [_authenticationPassword copyWithZone:zone];
323 copy->_authenticationDsid = [_authenticationDsid copyWithZone:zone];
324 copy->_authenticationAppleid = [_authenticationAppleid copyWithZone:zone];
325 copy->_fmipUuid = [_fmipUuid copyWithZone:zone];
326 if (self->_has.fmipRecovery)
327 {
328 copy->_fmipRecovery = _fmipRecovery;
329 copy->_has.fmipRecovery = YES;
330 }
331 if (self->_has.idmsRecovery)
332 {
333 copy->_idmsRecovery = _idmsRecovery;
334 copy->_has.idmsRecovery = YES;
335 }
336 copy->_authenticationAuthToken = [_authenticationAuthToken copyWithZone:zone];
337 copy->_authenticationEscrowproxyUrl = [_authenticationEscrowproxyUrl copyWithZone:zone];
338 copy->_authenticationIcloudEnvironment = [_authenticationIcloudEnvironment copyWithZone:zone];
339 return copy;
340 }
341
342 - (BOOL)isEqual:(id)object
343 {
344 OTEscrowAuthenticationInformation *other = (OTEscrowAuthenticationInformation *)object;
345 return [other isMemberOfClass:[self class]]
346 &&
347 ((!self->_authenticationPassword && !other->_authenticationPassword) || [self->_authenticationPassword isEqual:other->_authenticationPassword])
348 &&
349 ((!self->_authenticationDsid && !other->_authenticationDsid) || [self->_authenticationDsid isEqual:other->_authenticationDsid])
350 &&
351 ((!self->_authenticationAppleid && !other->_authenticationAppleid) || [self->_authenticationAppleid isEqual:other->_authenticationAppleid])
352 &&
353 ((!self->_fmipUuid && !other->_fmipUuid) || [self->_fmipUuid isEqual:other->_fmipUuid])
354 &&
355 ((self->_has.fmipRecovery && other->_has.fmipRecovery && ((self->_fmipRecovery && other->_fmipRecovery) || (!self->_fmipRecovery && !other->_fmipRecovery))) || (!self->_has.fmipRecovery && !other->_has.fmipRecovery))
356 &&
357 ((self->_has.idmsRecovery && other->_has.idmsRecovery && ((self->_idmsRecovery && other->_idmsRecovery) || (!self->_idmsRecovery && !other->_idmsRecovery))) || (!self->_has.idmsRecovery && !other->_has.idmsRecovery))
358 &&
359 ((!self->_authenticationAuthToken && !other->_authenticationAuthToken) || [self->_authenticationAuthToken isEqual:other->_authenticationAuthToken])
360 &&
361 ((!self->_authenticationEscrowproxyUrl && !other->_authenticationEscrowproxyUrl) || [self->_authenticationEscrowproxyUrl isEqual:other->_authenticationEscrowproxyUrl])
362 &&
363 ((!self->_authenticationIcloudEnvironment && !other->_authenticationIcloudEnvironment) || [self->_authenticationIcloudEnvironment isEqual:other->_authenticationIcloudEnvironment])
364 ;
365 }
366
367 - (NSUInteger)hash
368 {
369 return 0
370 ^
371 [self->_authenticationPassword hash]
372 ^
373 [self->_authenticationDsid hash]
374 ^
375 [self->_authenticationAppleid hash]
376 ^
377 [self->_fmipUuid hash]
378 ^
379 (self->_has.fmipRecovery ? PBHashInt((NSUInteger)self->_fmipRecovery) : 0)
380 ^
381 (self->_has.idmsRecovery ? PBHashInt((NSUInteger)self->_idmsRecovery) : 0)
382 ^
383 [self->_authenticationAuthToken hash]
384 ^
385 [self->_authenticationEscrowproxyUrl hash]
386 ^
387 [self->_authenticationIcloudEnvironment hash]
388 ;
389 }
390
391 - (void)mergeFrom:(OTEscrowAuthenticationInformation *)other
392 {
393 if (other->_authenticationPassword)
394 {
395 [self setAuthenticationPassword:other->_authenticationPassword];
396 }
397 if (other->_authenticationDsid)
398 {
399 [self setAuthenticationDsid:other->_authenticationDsid];
400 }
401 if (other->_authenticationAppleid)
402 {
403 [self setAuthenticationAppleid:other->_authenticationAppleid];
404 }
405 if (other->_fmipUuid)
406 {
407 [self setFmipUuid:other->_fmipUuid];
408 }
409 if (other->_has.fmipRecovery)
410 {
411 self->_fmipRecovery = other->_fmipRecovery;
412 self->_has.fmipRecovery = YES;
413 }
414 if (other->_has.idmsRecovery)
415 {
416 self->_idmsRecovery = other->_idmsRecovery;
417 self->_has.idmsRecovery = YES;
418 }
419 if (other->_authenticationAuthToken)
420 {
421 [self setAuthenticationAuthToken:other->_authenticationAuthToken];
422 }
423 if (other->_authenticationEscrowproxyUrl)
424 {
425 [self setAuthenticationEscrowproxyUrl:other->_authenticationEscrowproxyUrl];
426 }
427 if (other->_authenticationIcloudEnvironment)
428 {
429 [self setAuthenticationIcloudEnvironment:other->_authenticationIcloudEnvironment];
430 }
431 }
432
433 @end
434