]> git.saurik.com Git - apple/security.git/blob - keychain/analytics/C2Metric/SECC2MPNetworkEvent.m
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / analytics / C2Metric / SECC2MPNetworkEvent.m
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from C2Metric.proto
4
5 #import "SECC2MPNetworkEvent.h"
6 #import <ProtocolBuffer/PBConstants.h>
7 #import <ProtocolBuffer/PBHashUtil.h>
8 #import <ProtocolBuffer/PBDataReader.h>
9
10 #import "SECC2MPError.h"
11
12 #if !__has_feature(objc_arc)
13 # 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.
14 #endif
15
16 @implementation SECC2MPNetworkEvent
17
18 @synthesize triggers = _triggers;
19 - (void)setTriggers:(uint64_t)v
20 {
21 _has.triggers = YES;
22 _triggers = v;
23 }
24 - (void)setHasTriggers:(BOOL)f
25 {
26 _has.triggers = f;
27 }
28 - (BOOL)hasTriggers
29 {
30 return _has.triggers;
31 }
32 @synthesize reportFrequency = _reportFrequency;
33 - (void)setReportFrequency:(uint64_t)v
34 {
35 _has.reportFrequency = YES;
36 _reportFrequency = v;
37 }
38 - (void)setHasReportFrequency:(BOOL)f
39 {
40 _has.reportFrequency = f;
41 }
42 - (BOOL)hasReportFrequency
43 {
44 return _has.reportFrequency;
45 }
46 @synthesize reportFrequencyBase = _reportFrequencyBase;
47 - (void)setReportFrequencyBase:(uint64_t)v
48 {
49 _has.reportFrequencyBase = YES;
50 _reportFrequencyBase = v;
51 }
52 - (void)setHasReportFrequencyBase:(BOOL)f
53 {
54 _has.reportFrequencyBase = f;
55 }
56 - (BOOL)hasReportFrequencyBase
57 {
58 return _has.reportFrequencyBase;
59 }
60 - (BOOL)hasNetworkTaskDescription
61 {
62 return _networkTaskDescription != nil;
63 }
64 @synthesize networkTaskDescription = _networkTaskDescription;
65 - (BOOL)hasNetworkHostname
66 {
67 return _networkHostname != nil;
68 }
69 @synthesize networkHostname = _networkHostname;
70 - (BOOL)hasNetworkRemoteAddresssAndPort
71 {
72 return _networkRemoteAddresssAndPort != nil;
73 }
74 @synthesize networkRemoteAddresssAndPort = _networkRemoteAddresssAndPort;
75 - (BOOL)hasNetworkConnectionUuid
76 {
77 return _networkConnectionUuid != nil;
78 }
79 @synthesize networkConnectionUuid = _networkConnectionUuid;
80 @synthesize networkConnectionReused = _networkConnectionReused;
81 - (void)setNetworkConnectionReused:(BOOL)v
82 {
83 _has.networkConnectionReused = YES;
84 _networkConnectionReused = v;
85 }
86 - (void)setHasNetworkConnectionReused:(BOOL)f
87 {
88 _has.networkConnectionReused = f;
89 }
90 - (BOOL)hasNetworkConnectionReused
91 {
92 return _has.networkConnectionReused;
93 }
94 - (BOOL)hasNetworkInterfaceIdentifier
95 {
96 return _networkInterfaceIdentifier != nil;
97 }
98 @synthesize networkInterfaceIdentifier = _networkInterfaceIdentifier;
99 - (BOOL)hasNetworkProtocolName
100 {
101 return _networkProtocolName != nil;
102 }
103 @synthesize networkProtocolName = _networkProtocolName;
104 @synthesize networkRequestHeaderSize = _networkRequestHeaderSize;
105 - (void)setNetworkRequestHeaderSize:(uint32_t)v
106 {
107 _has.networkRequestHeaderSize = YES;
108 _networkRequestHeaderSize = v;
109 }
110 - (void)setHasNetworkRequestHeaderSize:(BOOL)f
111 {
112 _has.networkRequestHeaderSize = f;
113 }
114 - (BOOL)hasNetworkRequestHeaderSize
115 {
116 return _has.networkRequestHeaderSize;
117 }
118 @synthesize networkRequestBodyBytesSent = _networkRequestBodyBytesSent;
119 - (void)setNetworkRequestBodyBytesSent:(uint64_t)v
120 {
121 _has.networkRequestBodyBytesSent = YES;
122 _networkRequestBodyBytesSent = v;
123 }
124 - (void)setHasNetworkRequestBodyBytesSent:(BOOL)f
125 {
126 _has.networkRequestBodyBytesSent = f;
127 }
128 - (BOOL)hasNetworkRequestBodyBytesSent
129 {
130 return _has.networkRequestBodyBytesSent;
131 }
132 @synthesize networkResponseHeaderSize = _networkResponseHeaderSize;
133 - (void)setNetworkResponseHeaderSize:(uint32_t)v
134 {
135 _has.networkResponseHeaderSize = YES;
136 _networkResponseHeaderSize = v;
137 }
138 - (void)setHasNetworkResponseHeaderSize:(BOOL)f
139 {
140 _has.networkResponseHeaderSize = f;
141 }
142 - (BOOL)hasNetworkResponseHeaderSize
143 {
144 return _has.networkResponseHeaderSize;
145 }
146 @synthesize networkResponseBodyBytesReceived = _networkResponseBodyBytesReceived;
147 - (void)setNetworkResponseBodyBytesReceived:(uint64_t)v
148 {
149 _has.networkResponseBodyBytesReceived = YES;
150 _networkResponseBodyBytesReceived = v;
151 }
152 - (void)setHasNetworkResponseBodyBytesReceived:(BOOL)f
153 {
154 _has.networkResponseBodyBytesReceived = f;
155 }
156 - (BOOL)hasNetworkResponseBodyBytesReceived
157 {
158 return _has.networkResponseBodyBytesReceived;
159 }
160 @synthesize networkPreviousAttemptCount = _networkPreviousAttemptCount;
161 - (void)setNetworkPreviousAttemptCount:(uint32_t)v
162 {
163 _has.networkPreviousAttemptCount = YES;
164 _networkPreviousAttemptCount = v;
165 }
166 - (void)setHasNetworkPreviousAttemptCount:(BOOL)f
167 {
168 _has.networkPreviousAttemptCount = f;
169 }
170 - (BOOL)hasNetworkPreviousAttemptCount
171 {
172 return _has.networkPreviousAttemptCount;
173 }
174 - (BOOL)hasNetworkFatalError
175 {
176 return _networkFatalError != nil;
177 }
178 @synthesize networkFatalError = _networkFatalError;
179 @synthesize networkStatusCode = _networkStatusCode;
180 - (void)setNetworkStatusCode:(uint64_t)v
181 {
182 _has.networkStatusCode = YES;
183 _networkStatusCode = v;
184 }
185 - (void)setHasNetworkStatusCode:(BOOL)f
186 {
187 _has.networkStatusCode = f;
188 }
189 - (BOOL)hasNetworkStatusCode
190 {
191 return _has.networkStatusCode;
192 }
193 - (BOOL)hasNetworkRequestUri
194 {
195 return _networkRequestUri != nil;
196 }
197 @synthesize networkRequestUri = _networkRequestUri;
198 @synthesize timestampC2Init = _timestampC2Init;
199 - (void)setTimestampC2Init:(uint64_t)v
200 {
201 _has.timestampC2Init = YES;
202 _timestampC2Init = v;
203 }
204 - (void)setHasTimestampC2Init:(BOOL)f
205 {
206 _has.timestampC2Init = f;
207 }
208 - (BOOL)hasTimestampC2Init
209 {
210 return _has.timestampC2Init;
211 }
212 @synthesize timestampC2Start = _timestampC2Start;
213 - (void)setTimestampC2Start:(uint64_t)v
214 {
215 _has.timestampC2Start = YES;
216 _timestampC2Start = v;
217 }
218 - (void)setHasTimestampC2Start:(BOOL)f
219 {
220 _has.timestampC2Start = f;
221 }
222 - (BOOL)hasTimestampC2Start
223 {
224 return _has.timestampC2Start;
225 }
226 @synthesize timestampC2Now = _timestampC2Now;
227 - (void)setTimestampC2Now:(uint64_t)v
228 {
229 _has.timestampC2Now = YES;
230 _timestampC2Now = v;
231 }
232 - (void)setHasTimestampC2Now:(BOOL)f
233 {
234 _has.timestampC2Now = f;
235 }
236 - (BOOL)hasTimestampC2Now
237 {
238 return _has.timestampC2Now;
239 }
240 @synthesize timestampDnsStart = _timestampDnsStart;
241 - (void)setTimestampDnsStart:(uint64_t)v
242 {
243 _has.timestampDnsStart = YES;
244 _timestampDnsStart = v;
245 }
246 - (void)setHasTimestampDnsStart:(BOOL)f
247 {
248 _has.timestampDnsStart = f;
249 }
250 - (BOOL)hasTimestampDnsStart
251 {
252 return _has.timestampDnsStart;
253 }
254 @synthesize timestampDnsEnd = _timestampDnsEnd;
255 - (void)setTimestampDnsEnd:(uint64_t)v
256 {
257 _has.timestampDnsEnd = YES;
258 _timestampDnsEnd = v;
259 }
260 - (void)setHasTimestampDnsEnd:(BOOL)f
261 {
262 _has.timestampDnsEnd = f;
263 }
264 - (BOOL)hasTimestampDnsEnd
265 {
266 return _has.timestampDnsEnd;
267 }
268 @synthesize timestampTcpStart = _timestampTcpStart;
269 - (void)setTimestampTcpStart:(uint64_t)v
270 {
271 _has.timestampTcpStart = YES;
272 _timestampTcpStart = v;
273 }
274 - (void)setHasTimestampTcpStart:(BOOL)f
275 {
276 _has.timestampTcpStart = f;
277 }
278 - (BOOL)hasTimestampTcpStart
279 {
280 return _has.timestampTcpStart;
281 }
282 @synthesize timestampTcpEnd = _timestampTcpEnd;
283 - (void)setTimestampTcpEnd:(uint64_t)v
284 {
285 _has.timestampTcpEnd = YES;
286 _timestampTcpEnd = v;
287 }
288 - (void)setHasTimestampTcpEnd:(BOOL)f
289 {
290 _has.timestampTcpEnd = f;
291 }
292 - (BOOL)hasTimestampTcpEnd
293 {
294 return _has.timestampTcpEnd;
295 }
296 @synthesize timestampSslStart = _timestampSslStart;
297 - (void)setTimestampSslStart:(uint64_t)v
298 {
299 _has.timestampSslStart = YES;
300 _timestampSslStart = v;
301 }
302 - (void)setHasTimestampSslStart:(BOOL)f
303 {
304 _has.timestampSslStart = f;
305 }
306 - (BOOL)hasTimestampSslStart
307 {
308 return _has.timestampSslStart;
309 }
310 @synthesize timestampRequestStart = _timestampRequestStart;
311 - (void)setTimestampRequestStart:(uint64_t)v
312 {
313 _has.timestampRequestStart = YES;
314 _timestampRequestStart = v;
315 }
316 - (void)setHasTimestampRequestStart:(BOOL)f
317 {
318 _has.timestampRequestStart = f;
319 }
320 - (BOOL)hasTimestampRequestStart
321 {
322 return _has.timestampRequestStart;
323 }
324 @synthesize timestampRequestEnd = _timestampRequestEnd;
325 - (void)setTimestampRequestEnd:(uint64_t)v
326 {
327 _has.timestampRequestEnd = YES;
328 _timestampRequestEnd = v;
329 }
330 - (void)setHasTimestampRequestEnd:(BOOL)f
331 {
332 _has.timestampRequestEnd = f;
333 }
334 - (BOOL)hasTimestampRequestEnd
335 {
336 return _has.timestampRequestEnd;
337 }
338 @synthesize timestampResponseStart = _timestampResponseStart;
339 - (void)setTimestampResponseStart:(uint64_t)v
340 {
341 _has.timestampResponseStart = YES;
342 _timestampResponseStart = v;
343 }
344 - (void)setHasTimestampResponseStart:(BOOL)f
345 {
346 _has.timestampResponseStart = f;
347 }
348 - (BOOL)hasTimestampResponseStart
349 {
350 return _has.timestampResponseStart;
351 }
352 @synthesize timestampResponseEnd = _timestampResponseEnd;
353 - (void)setTimestampResponseEnd:(uint64_t)v
354 {
355 _has.timestampResponseEnd = YES;
356 _timestampResponseEnd = v;
357 }
358 - (void)setHasTimestampResponseEnd:(BOOL)f
359 {
360 _has.timestampResponseEnd = f;
361 }
362 - (BOOL)hasTimestampResponseEnd
363 {
364 return _has.timestampResponseEnd;
365 }
366 - (BOOL)hasOptionsQualityOfService
367 {
368 return _optionsQualityOfService != nil;
369 }
370 @synthesize optionsQualityOfService = _optionsQualityOfService;
371 @synthesize optionsOutOfProcess = _optionsOutOfProcess;
372 - (void)setOptionsOutOfProcess:(BOOL)v
373 {
374 _has.optionsOutOfProcess = YES;
375 _optionsOutOfProcess = v;
376 }
377 - (void)setHasOptionsOutOfProcess:(BOOL)f
378 {
379 _has.optionsOutOfProcess = f;
380 }
381 - (BOOL)hasOptionsOutOfProcess
382 {
383 return _has.optionsOutOfProcess;
384 }
385 @synthesize optionsOutOfProcessForceDiscretionary = _optionsOutOfProcessForceDiscretionary;
386 - (void)setOptionsOutOfProcessForceDiscretionary:(BOOL)v
387 {
388 _has.optionsOutOfProcessForceDiscretionary = YES;
389 _optionsOutOfProcessForceDiscretionary = v;
390 }
391 - (void)setHasOptionsOutOfProcessForceDiscretionary:(BOOL)f
392 {
393 _has.optionsOutOfProcessForceDiscretionary = f;
394 }
395 - (BOOL)hasOptionsOutOfProcessForceDiscretionary
396 {
397 return _has.optionsOutOfProcessForceDiscretionary;
398 }
399 @synthesize optionsAllowExpensiveAccess = _optionsAllowExpensiveAccess;
400 - (void)setOptionsAllowExpensiveAccess:(BOOL)v
401 {
402 _has.optionsAllowExpensiveAccess = YES;
403 _optionsAllowExpensiveAccess = v;
404 }
405 - (void)setHasOptionsAllowExpensiveAccess:(BOOL)f
406 {
407 _has.optionsAllowExpensiveAccess = f;
408 }
409 - (BOOL)hasOptionsAllowExpensiveAccess
410 {
411 return _has.optionsAllowExpensiveAccess;
412 }
413 @synthesize optionsAllowPowerNapScheduling = _optionsAllowPowerNapScheduling;
414 - (void)setOptionsAllowPowerNapScheduling:(BOOL)v
415 {
416 _has.optionsAllowPowerNapScheduling = YES;
417 _optionsAllowPowerNapScheduling = v;
418 }
419 - (void)setHasOptionsAllowPowerNapScheduling:(BOOL)f
420 {
421 _has.optionsAllowPowerNapScheduling = f;
422 }
423 - (BOOL)hasOptionsAllowPowerNapScheduling
424 {
425 return _has.optionsAllowPowerNapScheduling;
426 }
427 @synthesize optionsTimeoutIntervalForRequest = _optionsTimeoutIntervalForRequest;
428 - (void)setOptionsTimeoutIntervalForRequest:(uint32_t)v
429 {
430 _has.optionsTimeoutIntervalForRequest = YES;
431 _optionsTimeoutIntervalForRequest = v;
432 }
433 - (void)setHasOptionsTimeoutIntervalForRequest:(BOOL)f
434 {
435 _has.optionsTimeoutIntervalForRequest = f;
436 }
437 - (BOOL)hasOptionsTimeoutIntervalForRequest
438 {
439 return _has.optionsTimeoutIntervalForRequest;
440 }
441 @synthesize optionsTimeoutIntervalForResource = _optionsTimeoutIntervalForResource;
442 - (void)setOptionsTimeoutIntervalForResource:(uint32_t)v
443 {
444 _has.optionsTimeoutIntervalForResource = YES;
445 _optionsTimeoutIntervalForResource = v;
446 }
447 - (void)setHasOptionsTimeoutIntervalForResource:(BOOL)f
448 {
449 _has.optionsTimeoutIntervalForResource = f;
450 }
451 - (BOOL)hasOptionsTimeoutIntervalForResource
452 {
453 return _has.optionsTimeoutIntervalForResource;
454 }
455 - (BOOL)hasOptionsSourceApplicationBundleIdentifier
456 {
457 return _optionsSourceApplicationBundleIdentifier != nil;
458 }
459 @synthesize optionsSourceApplicationBundleIdentifier = _optionsSourceApplicationBundleIdentifier;
460 - (BOOL)hasOptionsSourceApplicationSecondaryIdentifier
461 {
462 return _optionsSourceApplicationSecondaryIdentifier != nil;
463 }
464 @synthesize optionsSourceApplicationSecondaryIdentifier = _optionsSourceApplicationSecondaryIdentifier;
465 @synthesize optionsAppleIdContext = _optionsAppleIdContext;
466 - (void)setOptionsAppleIdContext:(BOOL)v
467 {
468 _has.optionsAppleIdContext = YES;
469 _optionsAppleIdContext = v;
470 }
471 - (void)setHasOptionsAppleIdContext:(BOOL)f
472 {
473 _has.optionsAppleIdContext = f;
474 }
475 - (BOOL)hasOptionsAppleIdContext
476 {
477 return _has.optionsAppleIdContext;
478 }
479 @synthesize optionsTlsPinningRequired = _optionsTlsPinningRequired;
480 - (void)setOptionsTlsPinningRequired:(BOOL)v
481 {
482 _has.optionsTlsPinningRequired = YES;
483 _optionsTlsPinningRequired = v;
484 }
485 - (void)setHasOptionsTlsPinningRequired:(BOOL)f
486 {
487 _has.optionsTlsPinningRequired = f;
488 }
489 - (BOOL)hasOptionsTlsPinningRequired
490 {
491 return _has.optionsTlsPinningRequired;
492 }
493
494 - (NSString *)description
495 {
496 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
497 }
498
499 - (NSDictionary *)dictionaryRepresentation
500 {
501 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
502 if (self->_has.triggers)
503 {
504 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_triggers] forKey:@"triggers"];
505 }
506 if (self->_has.reportFrequency)
507 {
508 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_reportFrequency] forKey:@"report_frequency"];
509 }
510 if (self->_has.reportFrequencyBase)
511 {
512 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_reportFrequencyBase] forKey:@"report_frequency_base"];
513 }
514 if (self->_networkTaskDescription)
515 {
516 [dict setObject:self->_networkTaskDescription forKey:@"network_task_description"];
517 }
518 if (self->_networkHostname)
519 {
520 [dict setObject:self->_networkHostname forKey:@"network_hostname"];
521 }
522 if (self->_networkRemoteAddresssAndPort)
523 {
524 [dict setObject:self->_networkRemoteAddresssAndPort forKey:@"network_remote_addresss_and_port"];
525 }
526 if (self->_networkConnectionUuid)
527 {
528 [dict setObject:self->_networkConnectionUuid forKey:@"network_connection_uuid"];
529 }
530 if (self->_has.networkConnectionReused)
531 {
532 [dict setObject:[NSNumber numberWithBool:self->_networkConnectionReused] forKey:@"network_connection_reused"];
533 }
534 if (self->_networkInterfaceIdentifier)
535 {
536 [dict setObject:self->_networkInterfaceIdentifier forKey:@"network_interface_identifier"];
537 }
538 if (self->_networkProtocolName)
539 {
540 [dict setObject:self->_networkProtocolName forKey:@"network_protocol_name"];
541 }
542 if (self->_has.networkRequestHeaderSize)
543 {
544 [dict setObject:[NSNumber numberWithUnsignedInt:self->_networkRequestHeaderSize] forKey:@"network_request_header_size"];
545 }
546 if (self->_has.networkRequestBodyBytesSent)
547 {
548 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_networkRequestBodyBytesSent] forKey:@"network_request_body_bytes_sent"];
549 }
550 if (self->_has.networkResponseHeaderSize)
551 {
552 [dict setObject:[NSNumber numberWithUnsignedInt:self->_networkResponseHeaderSize] forKey:@"network_response_header_size"];
553 }
554 if (self->_has.networkResponseBodyBytesReceived)
555 {
556 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_networkResponseBodyBytesReceived] forKey:@"network_response_body_bytes_received"];
557 }
558 if (self->_has.networkPreviousAttemptCount)
559 {
560 [dict setObject:[NSNumber numberWithUnsignedInt:self->_networkPreviousAttemptCount] forKey:@"network_previous_attempt_count"];
561 }
562 if (self->_networkFatalError)
563 {
564 [dict setObject:[_networkFatalError dictionaryRepresentation] forKey:@"network_fatal_error"];
565 }
566 if (self->_has.networkStatusCode)
567 {
568 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_networkStatusCode] forKey:@"network_status_code"];
569 }
570 if (self->_networkRequestUri)
571 {
572 [dict setObject:self->_networkRequestUri forKey:@"network_request_uri"];
573 }
574 if (self->_has.timestampC2Init)
575 {
576 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampC2Init] forKey:@"timestamp_c2_init"];
577 }
578 if (self->_has.timestampC2Start)
579 {
580 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampC2Start] forKey:@"timestamp_c2_start"];
581 }
582 if (self->_has.timestampC2Now)
583 {
584 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampC2Now] forKey:@"timestamp_c2_now"];
585 }
586 if (self->_has.timestampDnsStart)
587 {
588 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampDnsStart] forKey:@"timestamp_dns_start"];
589 }
590 if (self->_has.timestampDnsEnd)
591 {
592 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampDnsEnd] forKey:@"timestamp_dns_end"];
593 }
594 if (self->_has.timestampTcpStart)
595 {
596 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampTcpStart] forKey:@"timestamp_tcp_start"];
597 }
598 if (self->_has.timestampTcpEnd)
599 {
600 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampTcpEnd] forKey:@"timestamp_tcp_end"];
601 }
602 if (self->_has.timestampSslStart)
603 {
604 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampSslStart] forKey:@"timestamp_ssl_start"];
605 }
606 if (self->_has.timestampRequestStart)
607 {
608 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampRequestStart] forKey:@"timestamp_request_start"];
609 }
610 if (self->_has.timestampRequestEnd)
611 {
612 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampRequestEnd] forKey:@"timestamp_request_end"];
613 }
614 if (self->_has.timestampResponseStart)
615 {
616 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampResponseStart] forKey:@"timestamp_response_start"];
617 }
618 if (self->_has.timestampResponseEnd)
619 {
620 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestampResponseEnd] forKey:@"timestamp_response_end"];
621 }
622 if (self->_optionsQualityOfService)
623 {
624 [dict setObject:self->_optionsQualityOfService forKey:@"options_quality_of_service"];
625 }
626 if (self->_has.optionsOutOfProcess)
627 {
628 [dict setObject:[NSNumber numberWithBool:self->_optionsOutOfProcess] forKey:@"options_out_of_process"];
629 }
630 if (self->_has.optionsOutOfProcessForceDiscretionary)
631 {
632 [dict setObject:[NSNumber numberWithBool:self->_optionsOutOfProcessForceDiscretionary] forKey:@"options_out_of_process_force_discretionary"];
633 }
634 if (self->_has.optionsAllowExpensiveAccess)
635 {
636 [dict setObject:[NSNumber numberWithBool:self->_optionsAllowExpensiveAccess] forKey:@"options_allow_expensive_access"];
637 }
638 if (self->_has.optionsAllowPowerNapScheduling)
639 {
640 [dict setObject:[NSNumber numberWithBool:self->_optionsAllowPowerNapScheduling] forKey:@"options_allow_power_nap_scheduling"];
641 }
642 if (self->_has.optionsTimeoutIntervalForRequest)
643 {
644 [dict setObject:[NSNumber numberWithUnsignedInt:self->_optionsTimeoutIntervalForRequest] forKey:@"options_timeout_interval_for_request"];
645 }
646 if (self->_has.optionsTimeoutIntervalForResource)
647 {
648 [dict setObject:[NSNumber numberWithUnsignedInt:self->_optionsTimeoutIntervalForResource] forKey:@"options_timeout_interval_for_resource"];
649 }
650 if (self->_optionsSourceApplicationBundleIdentifier)
651 {
652 [dict setObject:self->_optionsSourceApplicationBundleIdentifier forKey:@"options_source_application_bundle_identifier"];
653 }
654 if (self->_optionsSourceApplicationSecondaryIdentifier)
655 {
656 [dict setObject:self->_optionsSourceApplicationSecondaryIdentifier forKey:@"options_source_application_secondary_identifier"];
657 }
658 if (self->_has.optionsAppleIdContext)
659 {
660 [dict setObject:[NSNumber numberWithBool:self->_optionsAppleIdContext] forKey:@"options_apple_id_context"];
661 }
662 if (self->_has.optionsTlsPinningRequired)
663 {
664 [dict setObject:[NSNumber numberWithBool:self->_optionsTlsPinningRequired] forKey:@"options_tls_pinning_required"];
665 }
666 return dict;
667 }
668
669 BOOL SECC2MPNetworkEventReadFrom(__unsafe_unretained SECC2MPNetworkEvent *self, __unsafe_unretained PBDataReader *reader) {
670 while (PBReaderHasMoreData(reader)) {
671 uint32_t tag = 0;
672 uint8_t aType = 0;
673
674 PBReaderReadTag32AndType(reader, &tag, &aType);
675
676 if (PBReaderHasError(reader))
677 break;
678
679 if (aType == TYPE_END_GROUP) {
680 break;
681 }
682
683 switch (tag) {
684
685 case 1 /* triggers */:
686 {
687 self->_has.triggers = YES;
688 self->_triggers = PBReaderReadUint64(reader);
689 }
690 break;
691 case 2 /* reportFrequency */:
692 {
693 self->_has.reportFrequency = YES;
694 self->_reportFrequency = PBReaderReadUint64(reader);
695 }
696 break;
697 case 3 /* reportFrequencyBase */:
698 {
699 self->_has.reportFrequencyBase = YES;
700 self->_reportFrequencyBase = PBReaderReadUint64(reader);
701 }
702 break;
703 case 101 /* networkTaskDescription */:
704 {
705 NSString *new_networkTaskDescription = PBReaderReadString(reader);
706 self->_networkTaskDescription = new_networkTaskDescription;
707 }
708 break;
709 case 102 /* networkHostname */:
710 {
711 NSString *new_networkHostname = PBReaderReadString(reader);
712 self->_networkHostname = new_networkHostname;
713 }
714 break;
715 case 103 /* networkRemoteAddresssAndPort */:
716 {
717 NSString *new_networkRemoteAddresssAndPort = PBReaderReadString(reader);
718 self->_networkRemoteAddresssAndPort = new_networkRemoteAddresssAndPort;
719 }
720 break;
721 case 104 /* networkConnectionUuid */:
722 {
723 NSString *new_networkConnectionUuid = PBReaderReadString(reader);
724 self->_networkConnectionUuid = new_networkConnectionUuid;
725 }
726 break;
727 case 105 /* networkConnectionReused */:
728 {
729 self->_has.networkConnectionReused = YES;
730 self->_networkConnectionReused = PBReaderReadBOOL(reader);
731 }
732 break;
733 case 106 /* networkInterfaceIdentifier */:
734 {
735 NSString *new_networkInterfaceIdentifier = PBReaderReadString(reader);
736 self->_networkInterfaceIdentifier = new_networkInterfaceIdentifier;
737 }
738 break;
739 case 107 /* networkProtocolName */:
740 {
741 NSString *new_networkProtocolName = PBReaderReadString(reader);
742 self->_networkProtocolName = new_networkProtocolName;
743 }
744 break;
745 case 108 /* networkRequestHeaderSize */:
746 {
747 self->_has.networkRequestHeaderSize = YES;
748 self->_networkRequestHeaderSize = PBReaderReadUint32(reader);
749 }
750 break;
751 case 109 /* networkRequestBodyBytesSent */:
752 {
753 self->_has.networkRequestBodyBytesSent = YES;
754 self->_networkRequestBodyBytesSent = PBReaderReadUint64(reader);
755 }
756 break;
757 case 110 /* networkResponseHeaderSize */:
758 {
759 self->_has.networkResponseHeaderSize = YES;
760 self->_networkResponseHeaderSize = PBReaderReadUint32(reader);
761 }
762 break;
763 case 111 /* networkResponseBodyBytesReceived */:
764 {
765 self->_has.networkResponseBodyBytesReceived = YES;
766 self->_networkResponseBodyBytesReceived = PBReaderReadUint64(reader);
767 }
768 break;
769 case 112 /* networkPreviousAttemptCount */:
770 {
771 self->_has.networkPreviousAttemptCount = YES;
772 self->_networkPreviousAttemptCount = PBReaderReadUint32(reader);
773 }
774 break;
775 case 113 /* networkFatalError */:
776 {
777 SECC2MPError *new_networkFatalError = [[SECC2MPError alloc] init];
778 self->_networkFatalError = new_networkFatalError;
779 PBDataReaderMark mark_networkFatalError;
780 BOOL markError = !PBReaderPlaceMark(reader, &mark_networkFatalError);
781 if (markError)
782 {
783 return NO;
784 }
785 BOOL inError = !SECC2MPErrorReadFrom(new_networkFatalError, reader);
786 if (inError)
787 {
788 return NO;
789 }
790 PBReaderRecallMark(reader, &mark_networkFatalError);
791 }
792 break;
793 case 114 /* networkStatusCode */:
794 {
795 self->_has.networkStatusCode = YES;
796 self->_networkStatusCode = PBReaderReadUint64(reader);
797 }
798 break;
799 case 115 /* networkRequestUri */:
800 {
801 NSString *new_networkRequestUri = PBReaderReadString(reader);
802 self->_networkRequestUri = new_networkRequestUri;
803 }
804 break;
805 case 201 /* timestampC2Init */:
806 {
807 self->_has.timestampC2Init = YES;
808 self->_timestampC2Init = PBReaderReadUint64(reader);
809 }
810 break;
811 case 202 /* timestampC2Start */:
812 {
813 self->_has.timestampC2Start = YES;
814 self->_timestampC2Start = PBReaderReadUint64(reader);
815 }
816 break;
817 case 203 /* timestampC2Now */:
818 {
819 self->_has.timestampC2Now = YES;
820 self->_timestampC2Now = PBReaderReadUint64(reader);
821 }
822 break;
823 case 204 /* timestampDnsStart */:
824 {
825 self->_has.timestampDnsStart = YES;
826 self->_timestampDnsStart = PBReaderReadUint64(reader);
827 }
828 break;
829 case 205 /* timestampDnsEnd */:
830 {
831 self->_has.timestampDnsEnd = YES;
832 self->_timestampDnsEnd = PBReaderReadUint64(reader);
833 }
834 break;
835 case 206 /* timestampTcpStart */:
836 {
837 self->_has.timestampTcpStart = YES;
838 self->_timestampTcpStart = PBReaderReadUint64(reader);
839 }
840 break;
841 case 207 /* timestampTcpEnd */:
842 {
843 self->_has.timestampTcpEnd = YES;
844 self->_timestampTcpEnd = PBReaderReadUint64(reader);
845 }
846 break;
847 case 208 /* timestampSslStart */:
848 {
849 self->_has.timestampSslStart = YES;
850 self->_timestampSslStart = PBReaderReadUint64(reader);
851 }
852 break;
853 case 209 /* timestampRequestStart */:
854 {
855 self->_has.timestampRequestStart = YES;
856 self->_timestampRequestStart = PBReaderReadUint64(reader);
857 }
858 break;
859 case 210 /* timestampRequestEnd */:
860 {
861 self->_has.timestampRequestEnd = YES;
862 self->_timestampRequestEnd = PBReaderReadUint64(reader);
863 }
864 break;
865 case 211 /* timestampResponseStart */:
866 {
867 self->_has.timestampResponseStart = YES;
868 self->_timestampResponseStart = PBReaderReadUint64(reader);
869 }
870 break;
871 case 212 /* timestampResponseEnd */:
872 {
873 self->_has.timestampResponseEnd = YES;
874 self->_timestampResponseEnd = PBReaderReadUint64(reader);
875 }
876 break;
877 case 301 /* optionsQualityOfService */:
878 {
879 NSString *new_optionsQualityOfService = PBReaderReadString(reader);
880 self->_optionsQualityOfService = new_optionsQualityOfService;
881 }
882 break;
883 case 302 /* optionsOutOfProcess */:
884 {
885 self->_has.optionsOutOfProcess = YES;
886 self->_optionsOutOfProcess = PBReaderReadBOOL(reader);
887 }
888 break;
889 case 303 /* optionsOutOfProcessForceDiscretionary */:
890 {
891 self->_has.optionsOutOfProcessForceDiscretionary = YES;
892 self->_optionsOutOfProcessForceDiscretionary = PBReaderReadBOOL(reader);
893 }
894 break;
895 case 304 /* optionsAllowExpensiveAccess */:
896 {
897 self->_has.optionsAllowExpensiveAccess = YES;
898 self->_optionsAllowExpensiveAccess = PBReaderReadBOOL(reader);
899 }
900 break;
901 case 305 /* optionsAllowPowerNapScheduling */:
902 {
903 self->_has.optionsAllowPowerNapScheduling = YES;
904 self->_optionsAllowPowerNapScheduling = PBReaderReadBOOL(reader);
905 }
906 break;
907 case 306 /* optionsTimeoutIntervalForRequest */:
908 {
909 self->_has.optionsTimeoutIntervalForRequest = YES;
910 self->_optionsTimeoutIntervalForRequest = PBReaderReadUint32(reader);
911 }
912 break;
913 case 307 /* optionsTimeoutIntervalForResource */:
914 {
915 self->_has.optionsTimeoutIntervalForResource = YES;
916 self->_optionsTimeoutIntervalForResource = PBReaderReadUint32(reader);
917 }
918 break;
919 case 308 /* optionsSourceApplicationBundleIdentifier */:
920 {
921 NSString *new_optionsSourceApplicationBundleIdentifier = PBReaderReadString(reader);
922 self->_optionsSourceApplicationBundleIdentifier = new_optionsSourceApplicationBundleIdentifier;
923 }
924 break;
925 case 309 /* optionsSourceApplicationSecondaryIdentifier */:
926 {
927 NSString *new_optionsSourceApplicationSecondaryIdentifier = PBReaderReadString(reader);
928 self->_optionsSourceApplicationSecondaryIdentifier = new_optionsSourceApplicationSecondaryIdentifier;
929 }
930 break;
931 case 310 /* optionsAppleIdContext */:
932 {
933 self->_has.optionsAppleIdContext = YES;
934 self->_optionsAppleIdContext = PBReaderReadBOOL(reader);
935 }
936 break;
937 case 311 /* optionsTlsPinningRequired */:
938 {
939 self->_has.optionsTlsPinningRequired = YES;
940 self->_optionsTlsPinningRequired = PBReaderReadBOOL(reader);
941 }
942 break;
943 default:
944 if (!PBReaderSkipValueWithTag(reader, tag, aType))
945 return NO;
946 break;
947 }
948 }
949 return !PBReaderHasError(reader);
950 }
951
952 - (BOOL)readFrom:(PBDataReader *)reader
953 {
954 return SECC2MPNetworkEventReadFrom(self, reader);
955 }
956 - (void)writeTo:(PBDataWriter *)writer
957 {
958 /* triggers */
959 {
960 if (self->_has.triggers)
961 {
962 PBDataWriterWriteUint64Field(writer, self->_triggers, 1);
963 }
964 }
965 /* reportFrequency */
966 {
967 if (self->_has.reportFrequency)
968 {
969 PBDataWriterWriteUint64Field(writer, self->_reportFrequency, 2);
970 }
971 }
972 /* reportFrequencyBase */
973 {
974 if (self->_has.reportFrequencyBase)
975 {
976 PBDataWriterWriteUint64Field(writer, self->_reportFrequencyBase, 3);
977 }
978 }
979 /* networkTaskDescription */
980 {
981 if (self->_networkTaskDescription)
982 {
983 PBDataWriterWriteStringField(writer, self->_networkTaskDescription, 101);
984 }
985 }
986 /* networkHostname */
987 {
988 if (self->_networkHostname)
989 {
990 PBDataWriterWriteStringField(writer, self->_networkHostname, 102);
991 }
992 }
993 /* networkRemoteAddresssAndPort */
994 {
995 if (self->_networkRemoteAddresssAndPort)
996 {
997 PBDataWriterWriteStringField(writer, self->_networkRemoteAddresssAndPort, 103);
998 }
999 }
1000 /* networkConnectionUuid */
1001 {
1002 if (self->_networkConnectionUuid)
1003 {
1004 PBDataWriterWriteStringField(writer, self->_networkConnectionUuid, 104);
1005 }
1006 }
1007 /* networkConnectionReused */
1008 {
1009 if (self->_has.networkConnectionReused)
1010 {
1011 PBDataWriterWriteBOOLField(writer, self->_networkConnectionReused, 105);
1012 }
1013 }
1014 /* networkInterfaceIdentifier */
1015 {
1016 if (self->_networkInterfaceIdentifier)
1017 {
1018 PBDataWriterWriteStringField(writer, self->_networkInterfaceIdentifier, 106);
1019 }
1020 }
1021 /* networkProtocolName */
1022 {
1023 if (self->_networkProtocolName)
1024 {
1025 PBDataWriterWriteStringField(writer, self->_networkProtocolName, 107);
1026 }
1027 }
1028 /* networkRequestHeaderSize */
1029 {
1030 if (self->_has.networkRequestHeaderSize)
1031 {
1032 PBDataWriterWriteUint32Field(writer, self->_networkRequestHeaderSize, 108);
1033 }
1034 }
1035 /* networkRequestBodyBytesSent */
1036 {
1037 if (self->_has.networkRequestBodyBytesSent)
1038 {
1039 PBDataWriterWriteUint64Field(writer, self->_networkRequestBodyBytesSent, 109);
1040 }
1041 }
1042 /* networkResponseHeaderSize */
1043 {
1044 if (self->_has.networkResponseHeaderSize)
1045 {
1046 PBDataWriterWriteUint32Field(writer, self->_networkResponseHeaderSize, 110);
1047 }
1048 }
1049 /* networkResponseBodyBytesReceived */
1050 {
1051 if (self->_has.networkResponseBodyBytesReceived)
1052 {
1053 PBDataWriterWriteUint64Field(writer, self->_networkResponseBodyBytesReceived, 111);
1054 }
1055 }
1056 /* networkPreviousAttemptCount */
1057 {
1058 if (self->_has.networkPreviousAttemptCount)
1059 {
1060 PBDataWriterWriteUint32Field(writer, self->_networkPreviousAttemptCount, 112);
1061 }
1062 }
1063 /* networkFatalError */
1064 {
1065 if (self->_networkFatalError != nil)
1066 {
1067 PBDataWriterWriteSubmessage(writer, self->_networkFatalError, 113);
1068 }
1069 }
1070 /* networkStatusCode */
1071 {
1072 if (self->_has.networkStatusCode)
1073 {
1074 PBDataWriterWriteUint64Field(writer, self->_networkStatusCode, 114);
1075 }
1076 }
1077 /* networkRequestUri */
1078 {
1079 if (self->_networkRequestUri)
1080 {
1081 PBDataWriterWriteStringField(writer, self->_networkRequestUri, 115);
1082 }
1083 }
1084 /* timestampC2Init */
1085 {
1086 if (self->_has.timestampC2Init)
1087 {
1088 PBDataWriterWriteUint64Field(writer, self->_timestampC2Init, 201);
1089 }
1090 }
1091 /* timestampC2Start */
1092 {
1093 if (self->_has.timestampC2Start)
1094 {
1095 PBDataWriterWriteUint64Field(writer, self->_timestampC2Start, 202);
1096 }
1097 }
1098 /* timestampC2Now */
1099 {
1100 if (self->_has.timestampC2Now)
1101 {
1102 PBDataWriterWriteUint64Field(writer, self->_timestampC2Now, 203);
1103 }
1104 }
1105 /* timestampDnsStart */
1106 {
1107 if (self->_has.timestampDnsStart)
1108 {
1109 PBDataWriterWriteUint64Field(writer, self->_timestampDnsStart, 204);
1110 }
1111 }
1112 /* timestampDnsEnd */
1113 {
1114 if (self->_has.timestampDnsEnd)
1115 {
1116 PBDataWriterWriteUint64Field(writer, self->_timestampDnsEnd, 205);
1117 }
1118 }
1119 /* timestampTcpStart */
1120 {
1121 if (self->_has.timestampTcpStart)
1122 {
1123 PBDataWriterWriteUint64Field(writer, self->_timestampTcpStart, 206);
1124 }
1125 }
1126 /* timestampTcpEnd */
1127 {
1128 if (self->_has.timestampTcpEnd)
1129 {
1130 PBDataWriterWriteUint64Field(writer, self->_timestampTcpEnd, 207);
1131 }
1132 }
1133 /* timestampSslStart */
1134 {
1135 if (self->_has.timestampSslStart)
1136 {
1137 PBDataWriterWriteUint64Field(writer, self->_timestampSslStart, 208);
1138 }
1139 }
1140 /* timestampRequestStart */
1141 {
1142 if (self->_has.timestampRequestStart)
1143 {
1144 PBDataWriterWriteUint64Field(writer, self->_timestampRequestStart, 209);
1145 }
1146 }
1147 /* timestampRequestEnd */
1148 {
1149 if (self->_has.timestampRequestEnd)
1150 {
1151 PBDataWriterWriteUint64Field(writer, self->_timestampRequestEnd, 210);
1152 }
1153 }
1154 /* timestampResponseStart */
1155 {
1156 if (self->_has.timestampResponseStart)
1157 {
1158 PBDataWriterWriteUint64Field(writer, self->_timestampResponseStart, 211);
1159 }
1160 }
1161 /* timestampResponseEnd */
1162 {
1163 if (self->_has.timestampResponseEnd)
1164 {
1165 PBDataWriterWriteUint64Field(writer, self->_timestampResponseEnd, 212);
1166 }
1167 }
1168 /* optionsQualityOfService */
1169 {
1170 if (self->_optionsQualityOfService)
1171 {
1172 PBDataWriterWriteStringField(writer, self->_optionsQualityOfService, 301);
1173 }
1174 }
1175 /* optionsOutOfProcess */
1176 {
1177 if (self->_has.optionsOutOfProcess)
1178 {
1179 PBDataWriterWriteBOOLField(writer, self->_optionsOutOfProcess, 302);
1180 }
1181 }
1182 /* optionsOutOfProcessForceDiscretionary */
1183 {
1184 if (self->_has.optionsOutOfProcessForceDiscretionary)
1185 {
1186 PBDataWriterWriteBOOLField(writer, self->_optionsOutOfProcessForceDiscretionary, 303);
1187 }
1188 }
1189 /* optionsAllowExpensiveAccess */
1190 {
1191 if (self->_has.optionsAllowExpensiveAccess)
1192 {
1193 PBDataWriterWriteBOOLField(writer, self->_optionsAllowExpensiveAccess, 304);
1194 }
1195 }
1196 /* optionsAllowPowerNapScheduling */
1197 {
1198 if (self->_has.optionsAllowPowerNapScheduling)
1199 {
1200 PBDataWriterWriteBOOLField(writer, self->_optionsAllowPowerNapScheduling, 305);
1201 }
1202 }
1203 /* optionsTimeoutIntervalForRequest */
1204 {
1205 if (self->_has.optionsTimeoutIntervalForRequest)
1206 {
1207 PBDataWriterWriteUint32Field(writer, self->_optionsTimeoutIntervalForRequest, 306);
1208 }
1209 }
1210 /* optionsTimeoutIntervalForResource */
1211 {
1212 if (self->_has.optionsTimeoutIntervalForResource)
1213 {
1214 PBDataWriterWriteUint32Field(writer, self->_optionsTimeoutIntervalForResource, 307);
1215 }
1216 }
1217 /* optionsSourceApplicationBundleIdentifier */
1218 {
1219 if (self->_optionsSourceApplicationBundleIdentifier)
1220 {
1221 PBDataWriterWriteStringField(writer, self->_optionsSourceApplicationBundleIdentifier, 308);
1222 }
1223 }
1224 /* optionsSourceApplicationSecondaryIdentifier */
1225 {
1226 if (self->_optionsSourceApplicationSecondaryIdentifier)
1227 {
1228 PBDataWriterWriteStringField(writer, self->_optionsSourceApplicationSecondaryIdentifier, 309);
1229 }
1230 }
1231 /* optionsAppleIdContext */
1232 {
1233 if (self->_has.optionsAppleIdContext)
1234 {
1235 PBDataWriterWriteBOOLField(writer, self->_optionsAppleIdContext, 310);
1236 }
1237 }
1238 /* optionsTlsPinningRequired */
1239 {
1240 if (self->_has.optionsTlsPinningRequired)
1241 {
1242 PBDataWriterWriteBOOLField(writer, self->_optionsTlsPinningRequired, 311);
1243 }
1244 }
1245 }
1246
1247 - (void)copyTo:(SECC2MPNetworkEvent *)other
1248 {
1249 if (self->_has.triggers)
1250 {
1251 other->_triggers = _triggers;
1252 other->_has.triggers = YES;
1253 }
1254 if (self->_has.reportFrequency)
1255 {
1256 other->_reportFrequency = _reportFrequency;
1257 other->_has.reportFrequency = YES;
1258 }
1259 if (self->_has.reportFrequencyBase)
1260 {
1261 other->_reportFrequencyBase = _reportFrequencyBase;
1262 other->_has.reportFrequencyBase = YES;
1263 }
1264 if (_networkTaskDescription)
1265 {
1266 other.networkTaskDescription = _networkTaskDescription;
1267 }
1268 if (_networkHostname)
1269 {
1270 other.networkHostname = _networkHostname;
1271 }
1272 if (_networkRemoteAddresssAndPort)
1273 {
1274 other.networkRemoteAddresssAndPort = _networkRemoteAddresssAndPort;
1275 }
1276 if (_networkConnectionUuid)
1277 {
1278 other.networkConnectionUuid = _networkConnectionUuid;
1279 }
1280 if (self->_has.networkConnectionReused)
1281 {
1282 other->_networkConnectionReused = _networkConnectionReused;
1283 other->_has.networkConnectionReused = YES;
1284 }
1285 if (_networkInterfaceIdentifier)
1286 {
1287 other.networkInterfaceIdentifier = _networkInterfaceIdentifier;
1288 }
1289 if (_networkProtocolName)
1290 {
1291 other.networkProtocolName = _networkProtocolName;
1292 }
1293 if (self->_has.networkRequestHeaderSize)
1294 {
1295 other->_networkRequestHeaderSize = _networkRequestHeaderSize;
1296 other->_has.networkRequestHeaderSize = YES;
1297 }
1298 if (self->_has.networkRequestBodyBytesSent)
1299 {
1300 other->_networkRequestBodyBytesSent = _networkRequestBodyBytesSent;
1301 other->_has.networkRequestBodyBytesSent = YES;
1302 }
1303 if (self->_has.networkResponseHeaderSize)
1304 {
1305 other->_networkResponseHeaderSize = _networkResponseHeaderSize;
1306 other->_has.networkResponseHeaderSize = YES;
1307 }
1308 if (self->_has.networkResponseBodyBytesReceived)
1309 {
1310 other->_networkResponseBodyBytesReceived = _networkResponseBodyBytesReceived;
1311 other->_has.networkResponseBodyBytesReceived = YES;
1312 }
1313 if (self->_has.networkPreviousAttemptCount)
1314 {
1315 other->_networkPreviousAttemptCount = _networkPreviousAttemptCount;
1316 other->_has.networkPreviousAttemptCount = YES;
1317 }
1318 if (_networkFatalError)
1319 {
1320 other.networkFatalError = _networkFatalError;
1321 }
1322 if (self->_has.networkStatusCode)
1323 {
1324 other->_networkStatusCode = _networkStatusCode;
1325 other->_has.networkStatusCode = YES;
1326 }
1327 if (_networkRequestUri)
1328 {
1329 other.networkRequestUri = _networkRequestUri;
1330 }
1331 if (self->_has.timestampC2Init)
1332 {
1333 other->_timestampC2Init = _timestampC2Init;
1334 other->_has.timestampC2Init = YES;
1335 }
1336 if (self->_has.timestampC2Start)
1337 {
1338 other->_timestampC2Start = _timestampC2Start;
1339 other->_has.timestampC2Start = YES;
1340 }
1341 if (self->_has.timestampC2Now)
1342 {
1343 other->_timestampC2Now = _timestampC2Now;
1344 other->_has.timestampC2Now = YES;
1345 }
1346 if (self->_has.timestampDnsStart)
1347 {
1348 other->_timestampDnsStart = _timestampDnsStart;
1349 other->_has.timestampDnsStart = YES;
1350 }
1351 if (self->_has.timestampDnsEnd)
1352 {
1353 other->_timestampDnsEnd = _timestampDnsEnd;
1354 other->_has.timestampDnsEnd = YES;
1355 }
1356 if (self->_has.timestampTcpStart)
1357 {
1358 other->_timestampTcpStart = _timestampTcpStart;
1359 other->_has.timestampTcpStart = YES;
1360 }
1361 if (self->_has.timestampTcpEnd)
1362 {
1363 other->_timestampTcpEnd = _timestampTcpEnd;
1364 other->_has.timestampTcpEnd = YES;
1365 }
1366 if (self->_has.timestampSslStart)
1367 {
1368 other->_timestampSslStart = _timestampSslStart;
1369 other->_has.timestampSslStart = YES;
1370 }
1371 if (self->_has.timestampRequestStart)
1372 {
1373 other->_timestampRequestStart = _timestampRequestStart;
1374 other->_has.timestampRequestStart = YES;
1375 }
1376 if (self->_has.timestampRequestEnd)
1377 {
1378 other->_timestampRequestEnd = _timestampRequestEnd;
1379 other->_has.timestampRequestEnd = YES;
1380 }
1381 if (self->_has.timestampResponseStart)
1382 {
1383 other->_timestampResponseStart = _timestampResponseStart;
1384 other->_has.timestampResponseStart = YES;
1385 }
1386 if (self->_has.timestampResponseEnd)
1387 {
1388 other->_timestampResponseEnd = _timestampResponseEnd;
1389 other->_has.timestampResponseEnd = YES;
1390 }
1391 if (_optionsQualityOfService)
1392 {
1393 other.optionsQualityOfService = _optionsQualityOfService;
1394 }
1395 if (self->_has.optionsOutOfProcess)
1396 {
1397 other->_optionsOutOfProcess = _optionsOutOfProcess;
1398 other->_has.optionsOutOfProcess = YES;
1399 }
1400 if (self->_has.optionsOutOfProcessForceDiscretionary)
1401 {
1402 other->_optionsOutOfProcessForceDiscretionary = _optionsOutOfProcessForceDiscretionary;
1403 other->_has.optionsOutOfProcessForceDiscretionary = YES;
1404 }
1405 if (self->_has.optionsAllowExpensiveAccess)
1406 {
1407 other->_optionsAllowExpensiveAccess = _optionsAllowExpensiveAccess;
1408 other->_has.optionsAllowExpensiveAccess = YES;
1409 }
1410 if (self->_has.optionsAllowPowerNapScheduling)
1411 {
1412 other->_optionsAllowPowerNapScheduling = _optionsAllowPowerNapScheduling;
1413 other->_has.optionsAllowPowerNapScheduling = YES;
1414 }
1415 if (self->_has.optionsTimeoutIntervalForRequest)
1416 {
1417 other->_optionsTimeoutIntervalForRequest = _optionsTimeoutIntervalForRequest;
1418 other->_has.optionsTimeoutIntervalForRequest = YES;
1419 }
1420 if (self->_has.optionsTimeoutIntervalForResource)
1421 {
1422 other->_optionsTimeoutIntervalForResource = _optionsTimeoutIntervalForResource;
1423 other->_has.optionsTimeoutIntervalForResource = YES;
1424 }
1425 if (_optionsSourceApplicationBundleIdentifier)
1426 {
1427 other.optionsSourceApplicationBundleIdentifier = _optionsSourceApplicationBundleIdentifier;
1428 }
1429 if (_optionsSourceApplicationSecondaryIdentifier)
1430 {
1431 other.optionsSourceApplicationSecondaryIdentifier = _optionsSourceApplicationSecondaryIdentifier;
1432 }
1433 if (self->_has.optionsAppleIdContext)
1434 {
1435 other->_optionsAppleIdContext = _optionsAppleIdContext;
1436 other->_has.optionsAppleIdContext = YES;
1437 }
1438 if (self->_has.optionsTlsPinningRequired)
1439 {
1440 other->_optionsTlsPinningRequired = _optionsTlsPinningRequired;
1441 other->_has.optionsTlsPinningRequired = YES;
1442 }
1443 }
1444
1445 - (id)copyWithZone:(NSZone *)zone
1446 {
1447 SECC2MPNetworkEvent *copy = [[[self class] allocWithZone:zone] init];
1448 if (self->_has.triggers)
1449 {
1450 copy->_triggers = _triggers;
1451 copy->_has.triggers = YES;
1452 }
1453 if (self->_has.reportFrequency)
1454 {
1455 copy->_reportFrequency = _reportFrequency;
1456 copy->_has.reportFrequency = YES;
1457 }
1458 if (self->_has.reportFrequencyBase)
1459 {
1460 copy->_reportFrequencyBase = _reportFrequencyBase;
1461 copy->_has.reportFrequencyBase = YES;
1462 }
1463 copy->_networkTaskDescription = [_networkTaskDescription copyWithZone:zone];
1464 copy->_networkHostname = [_networkHostname copyWithZone:zone];
1465 copy->_networkRemoteAddresssAndPort = [_networkRemoteAddresssAndPort copyWithZone:zone];
1466 copy->_networkConnectionUuid = [_networkConnectionUuid copyWithZone:zone];
1467 if (self->_has.networkConnectionReused)
1468 {
1469 copy->_networkConnectionReused = _networkConnectionReused;
1470 copy->_has.networkConnectionReused = YES;
1471 }
1472 copy->_networkInterfaceIdentifier = [_networkInterfaceIdentifier copyWithZone:zone];
1473 copy->_networkProtocolName = [_networkProtocolName copyWithZone:zone];
1474 if (self->_has.networkRequestHeaderSize)
1475 {
1476 copy->_networkRequestHeaderSize = _networkRequestHeaderSize;
1477 copy->_has.networkRequestHeaderSize = YES;
1478 }
1479 if (self->_has.networkRequestBodyBytesSent)
1480 {
1481 copy->_networkRequestBodyBytesSent = _networkRequestBodyBytesSent;
1482 copy->_has.networkRequestBodyBytesSent = YES;
1483 }
1484 if (self->_has.networkResponseHeaderSize)
1485 {
1486 copy->_networkResponseHeaderSize = _networkResponseHeaderSize;
1487 copy->_has.networkResponseHeaderSize = YES;
1488 }
1489 if (self->_has.networkResponseBodyBytesReceived)
1490 {
1491 copy->_networkResponseBodyBytesReceived = _networkResponseBodyBytesReceived;
1492 copy->_has.networkResponseBodyBytesReceived = YES;
1493 }
1494 if (self->_has.networkPreviousAttemptCount)
1495 {
1496 copy->_networkPreviousAttemptCount = _networkPreviousAttemptCount;
1497 copy->_has.networkPreviousAttemptCount = YES;
1498 }
1499 copy->_networkFatalError = [_networkFatalError copyWithZone:zone];
1500 if (self->_has.networkStatusCode)
1501 {
1502 copy->_networkStatusCode = _networkStatusCode;
1503 copy->_has.networkStatusCode = YES;
1504 }
1505 copy->_networkRequestUri = [_networkRequestUri copyWithZone:zone];
1506 if (self->_has.timestampC2Init)
1507 {
1508 copy->_timestampC2Init = _timestampC2Init;
1509 copy->_has.timestampC2Init = YES;
1510 }
1511 if (self->_has.timestampC2Start)
1512 {
1513 copy->_timestampC2Start = _timestampC2Start;
1514 copy->_has.timestampC2Start = YES;
1515 }
1516 if (self->_has.timestampC2Now)
1517 {
1518 copy->_timestampC2Now = _timestampC2Now;
1519 copy->_has.timestampC2Now = YES;
1520 }
1521 if (self->_has.timestampDnsStart)
1522 {
1523 copy->_timestampDnsStart = _timestampDnsStart;
1524 copy->_has.timestampDnsStart = YES;
1525 }
1526 if (self->_has.timestampDnsEnd)
1527 {
1528 copy->_timestampDnsEnd = _timestampDnsEnd;
1529 copy->_has.timestampDnsEnd = YES;
1530 }
1531 if (self->_has.timestampTcpStart)
1532 {
1533 copy->_timestampTcpStart = _timestampTcpStart;
1534 copy->_has.timestampTcpStart = YES;
1535 }
1536 if (self->_has.timestampTcpEnd)
1537 {
1538 copy->_timestampTcpEnd = _timestampTcpEnd;
1539 copy->_has.timestampTcpEnd = YES;
1540 }
1541 if (self->_has.timestampSslStart)
1542 {
1543 copy->_timestampSslStart = _timestampSslStart;
1544 copy->_has.timestampSslStart = YES;
1545 }
1546 if (self->_has.timestampRequestStart)
1547 {
1548 copy->_timestampRequestStart = _timestampRequestStart;
1549 copy->_has.timestampRequestStart = YES;
1550 }
1551 if (self->_has.timestampRequestEnd)
1552 {
1553 copy->_timestampRequestEnd = _timestampRequestEnd;
1554 copy->_has.timestampRequestEnd = YES;
1555 }
1556 if (self->_has.timestampResponseStart)
1557 {
1558 copy->_timestampResponseStart = _timestampResponseStart;
1559 copy->_has.timestampResponseStart = YES;
1560 }
1561 if (self->_has.timestampResponseEnd)
1562 {
1563 copy->_timestampResponseEnd = _timestampResponseEnd;
1564 copy->_has.timestampResponseEnd = YES;
1565 }
1566 copy->_optionsQualityOfService = [_optionsQualityOfService copyWithZone:zone];
1567 if (self->_has.optionsOutOfProcess)
1568 {
1569 copy->_optionsOutOfProcess = _optionsOutOfProcess;
1570 copy->_has.optionsOutOfProcess = YES;
1571 }
1572 if (self->_has.optionsOutOfProcessForceDiscretionary)
1573 {
1574 copy->_optionsOutOfProcessForceDiscretionary = _optionsOutOfProcessForceDiscretionary;
1575 copy->_has.optionsOutOfProcessForceDiscretionary = YES;
1576 }
1577 if (self->_has.optionsAllowExpensiveAccess)
1578 {
1579 copy->_optionsAllowExpensiveAccess = _optionsAllowExpensiveAccess;
1580 copy->_has.optionsAllowExpensiveAccess = YES;
1581 }
1582 if (self->_has.optionsAllowPowerNapScheduling)
1583 {
1584 copy->_optionsAllowPowerNapScheduling = _optionsAllowPowerNapScheduling;
1585 copy->_has.optionsAllowPowerNapScheduling = YES;
1586 }
1587 if (self->_has.optionsTimeoutIntervalForRequest)
1588 {
1589 copy->_optionsTimeoutIntervalForRequest = _optionsTimeoutIntervalForRequest;
1590 copy->_has.optionsTimeoutIntervalForRequest = YES;
1591 }
1592 if (self->_has.optionsTimeoutIntervalForResource)
1593 {
1594 copy->_optionsTimeoutIntervalForResource = _optionsTimeoutIntervalForResource;
1595 copy->_has.optionsTimeoutIntervalForResource = YES;
1596 }
1597 copy->_optionsSourceApplicationBundleIdentifier = [_optionsSourceApplicationBundleIdentifier copyWithZone:zone];
1598 copy->_optionsSourceApplicationSecondaryIdentifier = [_optionsSourceApplicationSecondaryIdentifier copyWithZone:zone];
1599 if (self->_has.optionsAppleIdContext)
1600 {
1601 copy->_optionsAppleIdContext = _optionsAppleIdContext;
1602 copy->_has.optionsAppleIdContext = YES;
1603 }
1604 if (self->_has.optionsTlsPinningRequired)
1605 {
1606 copy->_optionsTlsPinningRequired = _optionsTlsPinningRequired;
1607 copy->_has.optionsTlsPinningRequired = YES;
1608 }
1609 return copy;
1610 }
1611
1612 - (BOOL)isEqual:(id)object
1613 {
1614 SECC2MPNetworkEvent *other = (SECC2MPNetworkEvent *)object;
1615 return [other isMemberOfClass:[self class]]
1616 &&
1617 ((self->_has.triggers && other->_has.triggers && self->_triggers == other->_triggers) || (!self->_has.triggers && !other->_has.triggers))
1618 &&
1619 ((self->_has.reportFrequency && other->_has.reportFrequency && self->_reportFrequency == other->_reportFrequency) || (!self->_has.reportFrequency && !other->_has.reportFrequency))
1620 &&
1621 ((self->_has.reportFrequencyBase && other->_has.reportFrequencyBase && self->_reportFrequencyBase == other->_reportFrequencyBase) || (!self->_has.reportFrequencyBase && !other->_has.reportFrequencyBase))
1622 &&
1623 ((!self->_networkTaskDescription && !other->_networkTaskDescription) || [self->_networkTaskDescription isEqual:other->_networkTaskDescription])
1624 &&
1625 ((!self->_networkHostname && !other->_networkHostname) || [self->_networkHostname isEqual:other->_networkHostname])
1626 &&
1627 ((!self->_networkRemoteAddresssAndPort && !other->_networkRemoteAddresssAndPort) || [self->_networkRemoteAddresssAndPort isEqual:other->_networkRemoteAddresssAndPort])
1628 &&
1629 ((!self->_networkConnectionUuid && !other->_networkConnectionUuid) || [self->_networkConnectionUuid isEqual:other->_networkConnectionUuid])
1630 &&
1631 ((self->_has.networkConnectionReused && other->_has.networkConnectionReused && ((self->_networkConnectionReused && other->_networkConnectionReused) || (!self->_networkConnectionReused && !other->_networkConnectionReused))) || (!self->_has.networkConnectionReused && !other->_has.networkConnectionReused))
1632 &&
1633 ((!self->_networkInterfaceIdentifier && !other->_networkInterfaceIdentifier) || [self->_networkInterfaceIdentifier isEqual:other->_networkInterfaceIdentifier])
1634 &&
1635 ((!self->_networkProtocolName && !other->_networkProtocolName) || [self->_networkProtocolName isEqual:other->_networkProtocolName])
1636 &&
1637 ((self->_has.networkRequestHeaderSize && other->_has.networkRequestHeaderSize && self->_networkRequestHeaderSize == other->_networkRequestHeaderSize) || (!self->_has.networkRequestHeaderSize && !other->_has.networkRequestHeaderSize))
1638 &&
1639 ((self->_has.networkRequestBodyBytesSent && other->_has.networkRequestBodyBytesSent && self->_networkRequestBodyBytesSent == other->_networkRequestBodyBytesSent) || (!self->_has.networkRequestBodyBytesSent && !other->_has.networkRequestBodyBytesSent))
1640 &&
1641 ((self->_has.networkResponseHeaderSize && other->_has.networkResponseHeaderSize && self->_networkResponseHeaderSize == other->_networkResponseHeaderSize) || (!self->_has.networkResponseHeaderSize && !other->_has.networkResponseHeaderSize))
1642 &&
1643 ((self->_has.networkResponseBodyBytesReceived && other->_has.networkResponseBodyBytesReceived && self->_networkResponseBodyBytesReceived == other->_networkResponseBodyBytesReceived) || (!self->_has.networkResponseBodyBytesReceived && !other->_has.networkResponseBodyBytesReceived))
1644 &&
1645 ((self->_has.networkPreviousAttemptCount && other->_has.networkPreviousAttemptCount && self->_networkPreviousAttemptCount == other->_networkPreviousAttemptCount) || (!self->_has.networkPreviousAttemptCount && !other->_has.networkPreviousAttemptCount))
1646 &&
1647 ((!self->_networkFatalError && !other->_networkFatalError) || [self->_networkFatalError isEqual:other->_networkFatalError])
1648 &&
1649 ((self->_has.networkStatusCode && other->_has.networkStatusCode && self->_networkStatusCode == other->_networkStatusCode) || (!self->_has.networkStatusCode && !other->_has.networkStatusCode))
1650 &&
1651 ((!self->_networkRequestUri && !other->_networkRequestUri) || [self->_networkRequestUri isEqual:other->_networkRequestUri])
1652 &&
1653 ((self->_has.timestampC2Init && other->_has.timestampC2Init && self->_timestampC2Init == other->_timestampC2Init) || (!self->_has.timestampC2Init && !other->_has.timestampC2Init))
1654 &&
1655 ((self->_has.timestampC2Start && other->_has.timestampC2Start && self->_timestampC2Start == other->_timestampC2Start) || (!self->_has.timestampC2Start && !other->_has.timestampC2Start))
1656 &&
1657 ((self->_has.timestampC2Now && other->_has.timestampC2Now && self->_timestampC2Now == other->_timestampC2Now) || (!self->_has.timestampC2Now && !other->_has.timestampC2Now))
1658 &&
1659 ((self->_has.timestampDnsStart && other->_has.timestampDnsStart && self->_timestampDnsStart == other->_timestampDnsStart) || (!self->_has.timestampDnsStart && !other->_has.timestampDnsStart))
1660 &&
1661 ((self->_has.timestampDnsEnd && other->_has.timestampDnsEnd && self->_timestampDnsEnd == other->_timestampDnsEnd) || (!self->_has.timestampDnsEnd && !other->_has.timestampDnsEnd))
1662 &&
1663 ((self->_has.timestampTcpStart && other->_has.timestampTcpStart && self->_timestampTcpStart == other->_timestampTcpStart) || (!self->_has.timestampTcpStart && !other->_has.timestampTcpStart))
1664 &&
1665 ((self->_has.timestampTcpEnd && other->_has.timestampTcpEnd && self->_timestampTcpEnd == other->_timestampTcpEnd) || (!self->_has.timestampTcpEnd && !other->_has.timestampTcpEnd))
1666 &&
1667 ((self->_has.timestampSslStart && other->_has.timestampSslStart && self->_timestampSslStart == other->_timestampSslStart) || (!self->_has.timestampSslStart && !other->_has.timestampSslStart))
1668 &&
1669 ((self->_has.timestampRequestStart && other->_has.timestampRequestStart && self->_timestampRequestStart == other->_timestampRequestStart) || (!self->_has.timestampRequestStart && !other->_has.timestampRequestStart))
1670 &&
1671 ((self->_has.timestampRequestEnd && other->_has.timestampRequestEnd && self->_timestampRequestEnd == other->_timestampRequestEnd) || (!self->_has.timestampRequestEnd && !other->_has.timestampRequestEnd))
1672 &&
1673 ((self->_has.timestampResponseStart && other->_has.timestampResponseStart && self->_timestampResponseStart == other->_timestampResponseStart) || (!self->_has.timestampResponseStart && !other->_has.timestampResponseStart))
1674 &&
1675 ((self->_has.timestampResponseEnd && other->_has.timestampResponseEnd && self->_timestampResponseEnd == other->_timestampResponseEnd) || (!self->_has.timestampResponseEnd && !other->_has.timestampResponseEnd))
1676 &&
1677 ((!self->_optionsQualityOfService && !other->_optionsQualityOfService) || [self->_optionsQualityOfService isEqual:other->_optionsQualityOfService])
1678 &&
1679 ((self->_has.optionsOutOfProcess && other->_has.optionsOutOfProcess && ((self->_optionsOutOfProcess && other->_optionsOutOfProcess) || (!self->_optionsOutOfProcess && !other->_optionsOutOfProcess))) || (!self->_has.optionsOutOfProcess && !other->_has.optionsOutOfProcess))
1680 &&
1681 ((self->_has.optionsOutOfProcessForceDiscretionary && other->_has.optionsOutOfProcessForceDiscretionary && ((self->_optionsOutOfProcessForceDiscretionary && other->_optionsOutOfProcessForceDiscretionary) || (!self->_optionsOutOfProcessForceDiscretionary && !other->_optionsOutOfProcessForceDiscretionary))) || (!self->_has.optionsOutOfProcessForceDiscretionary && !other->_has.optionsOutOfProcessForceDiscretionary))
1682 &&
1683 ((self->_has.optionsAllowExpensiveAccess && other->_has.optionsAllowExpensiveAccess && ((self->_optionsAllowExpensiveAccess && other->_optionsAllowExpensiveAccess) || (!self->_optionsAllowExpensiveAccess && !other->_optionsAllowExpensiveAccess))) || (!self->_has.optionsAllowExpensiveAccess && !other->_has.optionsAllowExpensiveAccess))
1684 &&
1685 ((self->_has.optionsAllowPowerNapScheduling && other->_has.optionsAllowPowerNapScheduling && ((self->_optionsAllowPowerNapScheduling && other->_optionsAllowPowerNapScheduling) || (!self->_optionsAllowPowerNapScheduling && !other->_optionsAllowPowerNapScheduling))) || (!self->_has.optionsAllowPowerNapScheduling && !other->_has.optionsAllowPowerNapScheduling))
1686 &&
1687 ((self->_has.optionsTimeoutIntervalForRequest && other->_has.optionsTimeoutIntervalForRequest && self->_optionsTimeoutIntervalForRequest == other->_optionsTimeoutIntervalForRequest) || (!self->_has.optionsTimeoutIntervalForRequest && !other->_has.optionsTimeoutIntervalForRequest))
1688 &&
1689 ((self->_has.optionsTimeoutIntervalForResource && other->_has.optionsTimeoutIntervalForResource && self->_optionsTimeoutIntervalForResource == other->_optionsTimeoutIntervalForResource) || (!self->_has.optionsTimeoutIntervalForResource && !other->_has.optionsTimeoutIntervalForResource))
1690 &&
1691 ((!self->_optionsSourceApplicationBundleIdentifier && !other->_optionsSourceApplicationBundleIdentifier) || [self->_optionsSourceApplicationBundleIdentifier isEqual:other->_optionsSourceApplicationBundleIdentifier])
1692 &&
1693 ((!self->_optionsSourceApplicationSecondaryIdentifier && !other->_optionsSourceApplicationSecondaryIdentifier) || [self->_optionsSourceApplicationSecondaryIdentifier isEqual:other->_optionsSourceApplicationSecondaryIdentifier])
1694 &&
1695 ((self->_has.optionsAppleIdContext && other->_has.optionsAppleIdContext && ((self->_optionsAppleIdContext && other->_optionsAppleIdContext) || (!self->_optionsAppleIdContext && !other->_optionsAppleIdContext))) || (!self->_has.optionsAppleIdContext && !other->_has.optionsAppleIdContext))
1696 &&
1697 ((self->_has.optionsTlsPinningRequired && other->_has.optionsTlsPinningRequired && ((self->_optionsTlsPinningRequired && other->_optionsTlsPinningRequired) || (!self->_optionsTlsPinningRequired && !other->_optionsTlsPinningRequired))) || (!self->_has.optionsTlsPinningRequired && !other->_has.optionsTlsPinningRequired))
1698 ;
1699 }
1700
1701 - (NSUInteger)hash
1702 {
1703 return 0
1704 ^
1705 (self->_has.triggers ? PBHashInt((NSUInteger)self->_triggers) : 0)
1706 ^
1707 (self->_has.reportFrequency ? PBHashInt((NSUInteger)self->_reportFrequency) : 0)
1708 ^
1709 (self->_has.reportFrequencyBase ? PBHashInt((NSUInteger)self->_reportFrequencyBase) : 0)
1710 ^
1711 [self->_networkTaskDescription hash]
1712 ^
1713 [self->_networkHostname hash]
1714 ^
1715 [self->_networkRemoteAddresssAndPort hash]
1716 ^
1717 [self->_networkConnectionUuid hash]
1718 ^
1719 (self->_has.networkConnectionReused ? PBHashInt((NSUInteger)self->_networkConnectionReused) : 0)
1720 ^
1721 [self->_networkInterfaceIdentifier hash]
1722 ^
1723 [self->_networkProtocolName hash]
1724 ^
1725 (self->_has.networkRequestHeaderSize ? PBHashInt((NSUInteger)self->_networkRequestHeaderSize) : 0)
1726 ^
1727 (self->_has.networkRequestBodyBytesSent ? PBHashInt((NSUInteger)self->_networkRequestBodyBytesSent) : 0)
1728 ^
1729 (self->_has.networkResponseHeaderSize ? PBHashInt((NSUInteger)self->_networkResponseHeaderSize) : 0)
1730 ^
1731 (self->_has.networkResponseBodyBytesReceived ? PBHashInt((NSUInteger)self->_networkResponseBodyBytesReceived) : 0)
1732 ^
1733 (self->_has.networkPreviousAttemptCount ? PBHashInt((NSUInteger)self->_networkPreviousAttemptCount) : 0)
1734 ^
1735 [self->_networkFatalError hash]
1736 ^
1737 (self->_has.networkStatusCode ? PBHashInt((NSUInteger)self->_networkStatusCode) : 0)
1738 ^
1739 [self->_networkRequestUri hash]
1740 ^
1741 (self->_has.timestampC2Init ? PBHashInt((NSUInteger)self->_timestampC2Init) : 0)
1742 ^
1743 (self->_has.timestampC2Start ? PBHashInt((NSUInteger)self->_timestampC2Start) : 0)
1744 ^
1745 (self->_has.timestampC2Now ? PBHashInt((NSUInteger)self->_timestampC2Now) : 0)
1746 ^
1747 (self->_has.timestampDnsStart ? PBHashInt((NSUInteger)self->_timestampDnsStart) : 0)
1748 ^
1749 (self->_has.timestampDnsEnd ? PBHashInt((NSUInteger)self->_timestampDnsEnd) : 0)
1750 ^
1751 (self->_has.timestampTcpStart ? PBHashInt((NSUInteger)self->_timestampTcpStart) : 0)
1752 ^
1753 (self->_has.timestampTcpEnd ? PBHashInt((NSUInteger)self->_timestampTcpEnd) : 0)
1754 ^
1755 (self->_has.timestampSslStart ? PBHashInt((NSUInteger)self->_timestampSslStart) : 0)
1756 ^
1757 (self->_has.timestampRequestStart ? PBHashInt((NSUInteger)self->_timestampRequestStart) : 0)
1758 ^
1759 (self->_has.timestampRequestEnd ? PBHashInt((NSUInteger)self->_timestampRequestEnd) : 0)
1760 ^
1761 (self->_has.timestampResponseStart ? PBHashInt((NSUInteger)self->_timestampResponseStart) : 0)
1762 ^
1763 (self->_has.timestampResponseEnd ? PBHashInt((NSUInteger)self->_timestampResponseEnd) : 0)
1764 ^
1765 [self->_optionsQualityOfService hash]
1766 ^
1767 (self->_has.optionsOutOfProcess ? PBHashInt((NSUInteger)self->_optionsOutOfProcess) : 0)
1768 ^
1769 (self->_has.optionsOutOfProcessForceDiscretionary ? PBHashInt((NSUInteger)self->_optionsOutOfProcessForceDiscretionary) : 0)
1770 ^
1771 (self->_has.optionsAllowExpensiveAccess ? PBHashInt((NSUInteger)self->_optionsAllowExpensiveAccess) : 0)
1772 ^
1773 (self->_has.optionsAllowPowerNapScheduling ? PBHashInt((NSUInteger)self->_optionsAllowPowerNapScheduling) : 0)
1774 ^
1775 (self->_has.optionsTimeoutIntervalForRequest ? PBHashInt((NSUInteger)self->_optionsTimeoutIntervalForRequest) : 0)
1776 ^
1777 (self->_has.optionsTimeoutIntervalForResource ? PBHashInt((NSUInteger)self->_optionsTimeoutIntervalForResource) : 0)
1778 ^
1779 [self->_optionsSourceApplicationBundleIdentifier hash]
1780 ^
1781 [self->_optionsSourceApplicationSecondaryIdentifier hash]
1782 ^
1783 (self->_has.optionsAppleIdContext ? PBHashInt((NSUInteger)self->_optionsAppleIdContext) : 0)
1784 ^
1785 (self->_has.optionsTlsPinningRequired ? PBHashInt((NSUInteger)self->_optionsTlsPinningRequired) : 0)
1786 ;
1787 }
1788
1789 - (void)mergeFrom:(SECC2MPNetworkEvent *)other
1790 {
1791 if (other->_has.triggers)
1792 {
1793 self->_triggers = other->_triggers;
1794 self->_has.triggers = YES;
1795 }
1796 if (other->_has.reportFrequency)
1797 {
1798 self->_reportFrequency = other->_reportFrequency;
1799 self->_has.reportFrequency = YES;
1800 }
1801 if (other->_has.reportFrequencyBase)
1802 {
1803 self->_reportFrequencyBase = other->_reportFrequencyBase;
1804 self->_has.reportFrequencyBase = YES;
1805 }
1806 if (other->_networkTaskDescription)
1807 {
1808 [self setNetworkTaskDescription:other->_networkTaskDescription];
1809 }
1810 if (other->_networkHostname)
1811 {
1812 [self setNetworkHostname:other->_networkHostname];
1813 }
1814 if (other->_networkRemoteAddresssAndPort)
1815 {
1816 [self setNetworkRemoteAddresssAndPort:other->_networkRemoteAddresssAndPort];
1817 }
1818 if (other->_networkConnectionUuid)
1819 {
1820 [self setNetworkConnectionUuid:other->_networkConnectionUuid];
1821 }
1822 if (other->_has.networkConnectionReused)
1823 {
1824 self->_networkConnectionReused = other->_networkConnectionReused;
1825 self->_has.networkConnectionReused = YES;
1826 }
1827 if (other->_networkInterfaceIdentifier)
1828 {
1829 [self setNetworkInterfaceIdentifier:other->_networkInterfaceIdentifier];
1830 }
1831 if (other->_networkProtocolName)
1832 {
1833 [self setNetworkProtocolName:other->_networkProtocolName];
1834 }
1835 if (other->_has.networkRequestHeaderSize)
1836 {
1837 self->_networkRequestHeaderSize = other->_networkRequestHeaderSize;
1838 self->_has.networkRequestHeaderSize = YES;
1839 }
1840 if (other->_has.networkRequestBodyBytesSent)
1841 {
1842 self->_networkRequestBodyBytesSent = other->_networkRequestBodyBytesSent;
1843 self->_has.networkRequestBodyBytesSent = YES;
1844 }
1845 if (other->_has.networkResponseHeaderSize)
1846 {
1847 self->_networkResponseHeaderSize = other->_networkResponseHeaderSize;
1848 self->_has.networkResponseHeaderSize = YES;
1849 }
1850 if (other->_has.networkResponseBodyBytesReceived)
1851 {
1852 self->_networkResponseBodyBytesReceived = other->_networkResponseBodyBytesReceived;
1853 self->_has.networkResponseBodyBytesReceived = YES;
1854 }
1855 if (other->_has.networkPreviousAttemptCount)
1856 {
1857 self->_networkPreviousAttemptCount = other->_networkPreviousAttemptCount;
1858 self->_has.networkPreviousAttemptCount = YES;
1859 }
1860 if (self->_networkFatalError && other->_networkFatalError)
1861 {
1862 [self->_networkFatalError mergeFrom:other->_networkFatalError];
1863 }
1864 else if (!self->_networkFatalError && other->_networkFatalError)
1865 {
1866 [self setNetworkFatalError:other->_networkFatalError];
1867 }
1868 if (other->_has.networkStatusCode)
1869 {
1870 self->_networkStatusCode = other->_networkStatusCode;
1871 self->_has.networkStatusCode = YES;
1872 }
1873 if (other->_networkRequestUri)
1874 {
1875 [self setNetworkRequestUri:other->_networkRequestUri];
1876 }
1877 if (other->_has.timestampC2Init)
1878 {
1879 self->_timestampC2Init = other->_timestampC2Init;
1880 self->_has.timestampC2Init = YES;
1881 }
1882 if (other->_has.timestampC2Start)
1883 {
1884 self->_timestampC2Start = other->_timestampC2Start;
1885 self->_has.timestampC2Start = YES;
1886 }
1887 if (other->_has.timestampC2Now)
1888 {
1889 self->_timestampC2Now = other->_timestampC2Now;
1890 self->_has.timestampC2Now = YES;
1891 }
1892 if (other->_has.timestampDnsStart)
1893 {
1894 self->_timestampDnsStart = other->_timestampDnsStart;
1895 self->_has.timestampDnsStart = YES;
1896 }
1897 if (other->_has.timestampDnsEnd)
1898 {
1899 self->_timestampDnsEnd = other->_timestampDnsEnd;
1900 self->_has.timestampDnsEnd = YES;
1901 }
1902 if (other->_has.timestampTcpStart)
1903 {
1904 self->_timestampTcpStart = other->_timestampTcpStart;
1905 self->_has.timestampTcpStart = YES;
1906 }
1907 if (other->_has.timestampTcpEnd)
1908 {
1909 self->_timestampTcpEnd = other->_timestampTcpEnd;
1910 self->_has.timestampTcpEnd = YES;
1911 }
1912 if (other->_has.timestampSslStart)
1913 {
1914 self->_timestampSslStart = other->_timestampSslStart;
1915 self->_has.timestampSslStart = YES;
1916 }
1917 if (other->_has.timestampRequestStart)
1918 {
1919 self->_timestampRequestStart = other->_timestampRequestStart;
1920 self->_has.timestampRequestStart = YES;
1921 }
1922 if (other->_has.timestampRequestEnd)
1923 {
1924 self->_timestampRequestEnd = other->_timestampRequestEnd;
1925 self->_has.timestampRequestEnd = YES;
1926 }
1927 if (other->_has.timestampResponseStart)
1928 {
1929 self->_timestampResponseStart = other->_timestampResponseStart;
1930 self->_has.timestampResponseStart = YES;
1931 }
1932 if (other->_has.timestampResponseEnd)
1933 {
1934 self->_timestampResponseEnd = other->_timestampResponseEnd;
1935 self->_has.timestampResponseEnd = YES;
1936 }
1937 if (other->_optionsQualityOfService)
1938 {
1939 [self setOptionsQualityOfService:other->_optionsQualityOfService];
1940 }
1941 if (other->_has.optionsOutOfProcess)
1942 {
1943 self->_optionsOutOfProcess = other->_optionsOutOfProcess;
1944 self->_has.optionsOutOfProcess = YES;
1945 }
1946 if (other->_has.optionsOutOfProcessForceDiscretionary)
1947 {
1948 self->_optionsOutOfProcessForceDiscretionary = other->_optionsOutOfProcessForceDiscretionary;
1949 self->_has.optionsOutOfProcessForceDiscretionary = YES;
1950 }
1951 if (other->_has.optionsAllowExpensiveAccess)
1952 {
1953 self->_optionsAllowExpensiveAccess = other->_optionsAllowExpensiveAccess;
1954 self->_has.optionsAllowExpensiveAccess = YES;
1955 }
1956 if (other->_has.optionsAllowPowerNapScheduling)
1957 {
1958 self->_optionsAllowPowerNapScheduling = other->_optionsAllowPowerNapScheduling;
1959 self->_has.optionsAllowPowerNapScheduling = YES;
1960 }
1961 if (other->_has.optionsTimeoutIntervalForRequest)
1962 {
1963 self->_optionsTimeoutIntervalForRequest = other->_optionsTimeoutIntervalForRequest;
1964 self->_has.optionsTimeoutIntervalForRequest = YES;
1965 }
1966 if (other->_has.optionsTimeoutIntervalForResource)
1967 {
1968 self->_optionsTimeoutIntervalForResource = other->_optionsTimeoutIntervalForResource;
1969 self->_has.optionsTimeoutIntervalForResource = YES;
1970 }
1971 if (other->_optionsSourceApplicationBundleIdentifier)
1972 {
1973 [self setOptionsSourceApplicationBundleIdentifier:other->_optionsSourceApplicationBundleIdentifier];
1974 }
1975 if (other->_optionsSourceApplicationSecondaryIdentifier)
1976 {
1977 [self setOptionsSourceApplicationSecondaryIdentifier:other->_optionsSourceApplicationSecondaryIdentifier];
1978 }
1979 if (other->_has.optionsAppleIdContext)
1980 {
1981 self->_optionsAppleIdContext = other->_optionsAppleIdContext;
1982 self->_has.optionsAppleIdContext = YES;
1983 }
1984 if (other->_has.optionsTlsPinningRequired)
1985 {
1986 self->_optionsTlsPinningRequired = other->_optionsTlsPinningRequired;
1987 self->_has.optionsTlsPinningRequired = YES;
1988 }
1989 }
1990
1991 @end
1992