1 // This file was automatically generated by protocompiler
3 // Compiled from C2Metric.proto
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
10 typedef NS_ENUM(int32_t, SECC2MPNetworkEvent_Trigger
) {
11 SECC2MPNetworkEvent_Trigger_none_trigger
= 0,
12 SECC2MPNetworkEvent_Trigger_user_default_trigger
= 1,
13 SECC2MPNetworkEvent_Trigger_frequency_trigger
= 2,
14 SECC2MPNetworkEvent_Trigger_response_header_trigger
= 4,
17 NS_INLINE NSString
*SECC2MPNetworkEvent_TriggerAsString(SECC2MPNetworkEvent_Trigger value
)
21 case SECC2MPNetworkEvent_Trigger_none_trigger
: return @
"none_trigger";
22 case SECC2MPNetworkEvent_Trigger_user_default_trigger
: return @
"user_default_trigger";
23 case SECC2MPNetworkEvent_Trigger_frequency_trigger
: return @
"frequency_trigger";
24 case SECC2MPNetworkEvent_Trigger_response_header_trigger
: return @
"response_header_trigger";
25 default: return [NSString stringWithFormat
:@
"(unknown: %i)", value
];
30 NS_INLINE SECC2MPNetworkEvent_Trigger
StringAsSECC2MPNetworkEvent_Trigger(NSString
*value
)
32 if ([value isEqualToString
:@
"none_trigger"]) return SECC2MPNetworkEvent_Trigger_none_trigger
;
33 if ([value isEqualToString
:@
"user_default_trigger"]) return SECC2MPNetworkEvent_Trigger_user_default_trigger
;
34 if ([value isEqualToString
:@
"frequency_trigger"]) return SECC2MPNetworkEvent_Trigger_frequency_trigger
;
35 if ([value isEqualToString
:@
"response_header_trigger"]) return SECC2MPNetworkEvent_Trigger_response_header_trigger
;
36 return SECC2MPNetworkEvent_Trigger_none_trigger
;
41 #define SECC2MPNETWORKEVENT_FUNCTION extern "C" __attribute__((visibility("hidden")))
43 #define SECC2MPNETWORKEVENT_FUNCTION extern __attribute__((visibility("hidden")))
46 __attribute__((visibility("hidden")))
47 @interface SECC2MPNetworkEvent
: PBCodable
<NSCopying
>
49 uint64_t _networkRequestBodyBytesSent
;
50 uint64_t _networkResponseBodyBytesReceived
;
51 uint64_t _networkStatusCode
;
52 uint64_t _reportFrequency
;
53 uint64_t _reportFrequencyBase
;
54 uint64_t _timestampC2Init
;
55 uint64_t _timestampC2Now
;
56 uint64_t _timestampC2Start
;
57 uint64_t _timestampDnsEnd
;
58 uint64_t _timestampDnsStart
;
59 uint64_t _timestampRequestEnd
;
60 uint64_t _timestampRequestStart
;
61 uint64_t _timestampResponseEnd
;
62 uint64_t _timestampResponseStart
;
63 uint64_t _timestampSslStart
;
64 uint64_t _timestampTcpEnd
;
65 uint64_t _timestampTcpStart
;
67 NSString
*_networkConnectionUuid
;
68 SECC2MPError
*_networkFatalError
;
69 NSString
*_networkHostname
;
70 NSString
*_networkInterfaceIdentifier
;
71 uint32_t _networkPreviousAttemptCount
;
72 NSString
*_networkProtocolName
;
73 NSString
*_networkRemoteAddresssAndPort
;
74 uint32_t _networkRequestHeaderSize
;
75 NSString
*_networkRequestUri
;
76 uint32_t _networkResponseHeaderSize
;
77 NSString
*_networkTaskDescription
;
78 NSString
*_optionsQualityOfService
;
79 NSString
*_optionsSourceApplicationBundleIdentifier
;
80 NSString
*_optionsSourceApplicationSecondaryIdentifier
;
81 uint32_t _optionsTimeoutIntervalForRequest
;
82 uint32_t _optionsTimeoutIntervalForResource
;
83 BOOL _networkConnectionReused
;
84 BOOL _optionsAllowExpensiveAccess
;
85 BOOL _optionsAllowPowerNapScheduling
;
86 BOOL _optionsAppleIdContext
;
87 BOOL _optionsOutOfProcess
;
88 BOOL _optionsOutOfProcessForceDiscretionary
;
89 BOOL _optionsTlsPinningRequired
;
91 int networkRequestBodyBytesSent
:1;
92 int networkResponseBodyBytesReceived
:1;
93 int networkStatusCode
:1;
94 int reportFrequency
:1;
95 int reportFrequencyBase
:1;
96 int timestampC2Init
:1;
98 int timestampC2Start
:1;
99 int timestampDnsEnd
:1;
100 int timestampDnsStart
:1;
101 int timestampRequestEnd
:1;
102 int timestampRequestStart
:1;
103 int timestampResponseEnd
:1;
104 int timestampResponseStart
:1;
105 int timestampSslStart
:1;
106 int timestampTcpEnd
:1;
107 int timestampTcpStart
:1;
109 int networkPreviousAttemptCount
:1;
110 int networkRequestHeaderSize
:1;
111 int networkResponseHeaderSize
:1;
112 int optionsTimeoutIntervalForRequest
:1;
113 int optionsTimeoutIntervalForResource
:1;
114 int networkConnectionReused
:1;
115 int optionsAllowExpensiveAccess
:1;
116 int optionsAllowPowerNapScheduling
:1;
117 int optionsAppleIdContext
:1;
118 int optionsOutOfProcess
:1;
119 int optionsOutOfProcessForceDiscretionary
:1;
120 int optionsTlsPinningRequired
:1;
125 @
property (nonatomic
) BOOL hasTriggers
;
126 /** Deprecated. Use Metric.triggers instead. */
127 @
property (nonatomic
) uint64_t triggers
;
129 @
property (nonatomic
) BOOL hasReportFrequency
;
130 /** Deprecated. Use Metric.report_frequency instead. */
131 @
property (nonatomic
) uint64_t reportFrequency
;
133 @
property (nonatomic
) BOOL hasReportFrequencyBase
;
134 /** Deprecated. Use Metric.report_frequency_base instead. */
135 @
property (nonatomic
) uint64_t reportFrequencyBase
;
137 @
property (nonatomic
, readonly
) BOOL hasNetworkTaskDescription
;
138 @
property (nonatomic
, retain
) NSString
*networkTaskDescription
;
140 @
property (nonatomic
, readonly
) BOOL hasNetworkHostname
;
141 @
property (nonatomic
, retain
) NSString
*networkHostname
;
143 @
property (nonatomic
, readonly
) BOOL hasNetworkRemoteAddresssAndPort
;
144 @
property (nonatomic
, retain
) NSString
*networkRemoteAddresssAndPort
;
146 @
property (nonatomic
, readonly
) BOOL hasNetworkConnectionUuid
;
147 @
property (nonatomic
, retain
) NSString
*networkConnectionUuid
;
149 @
property (nonatomic
) BOOL hasNetworkConnectionReused
;
150 @
property (nonatomic
) BOOL networkConnectionReused
;
152 @
property (nonatomic
, readonly
) BOOL hasNetworkInterfaceIdentifier
;
153 @
property (nonatomic
, retain
) NSString
*networkInterfaceIdentifier
;
155 @
property (nonatomic
, readonly
) BOOL hasNetworkProtocolName
;
156 @
property (nonatomic
, retain
) NSString
*networkProtocolName
;
158 @
property (nonatomic
) BOOL hasNetworkRequestHeaderSize
;
159 @
property (nonatomic
) uint32_t networkRequestHeaderSize
;
161 @
property (nonatomic
) BOOL hasNetworkRequestBodyBytesSent
;
162 @
property (nonatomic
) uint64_t networkRequestBodyBytesSent
;
164 @
property (nonatomic
) BOOL hasNetworkResponseHeaderSize
;
165 @
property (nonatomic
) uint32_t networkResponseHeaderSize
;
167 @
property (nonatomic
) BOOL hasNetworkResponseBodyBytesReceived
;
168 @
property (nonatomic
) uint64_t networkResponseBodyBytesReceived
;
170 @
property (nonatomic
) BOOL hasNetworkPreviousAttemptCount
;
171 @
property (nonatomic
) uint32_t networkPreviousAttemptCount
;
173 @
property (nonatomic
, readonly
) BOOL hasNetworkFatalError
;
174 @
property (nonatomic
, retain
) SECC2MPError
*networkFatalError
;
176 @
property (nonatomic
) BOOL hasNetworkStatusCode
;
177 @
property (nonatomic
) uint64_t networkStatusCode
;
179 @
property (nonatomic
, readonly
) BOOL hasNetworkRequestUri
;
180 @
property (nonatomic
, retain
) NSString
*networkRequestUri
;
182 @
property (nonatomic
) BOOL hasTimestampC2Init
;
183 @
property (nonatomic
) uint64_t timestampC2Init
;
185 @
property (nonatomic
) BOOL hasTimestampC2Start
;
186 @
property (nonatomic
) uint64_t timestampC2Start
;
188 @
property (nonatomic
) BOOL hasTimestampC2Now
;
189 @
property (nonatomic
) uint64_t timestampC2Now
;
191 @
property (nonatomic
) BOOL hasTimestampDnsStart
;
192 @
property (nonatomic
) uint64_t timestampDnsStart
;
194 @
property (nonatomic
) BOOL hasTimestampDnsEnd
;
195 @
property (nonatomic
) uint64_t timestampDnsEnd
;
197 @
property (nonatomic
) BOOL hasTimestampTcpStart
;
198 @
property (nonatomic
) uint64_t timestampTcpStart
;
200 @
property (nonatomic
) BOOL hasTimestampTcpEnd
;
201 @
property (nonatomic
) uint64_t timestampTcpEnd
;
203 @
property (nonatomic
) BOOL hasTimestampSslStart
;
204 @
property (nonatomic
) uint64_t timestampSslStart
;
206 @
property (nonatomic
) BOOL hasTimestampRequestStart
;
207 @
property (nonatomic
) uint64_t timestampRequestStart
;
209 @
property (nonatomic
) BOOL hasTimestampRequestEnd
;
210 @
property (nonatomic
) uint64_t timestampRequestEnd
;
212 @
property (nonatomic
) BOOL hasTimestampResponseStart
;
213 @
property (nonatomic
) uint64_t timestampResponseStart
;
215 @
property (nonatomic
) BOOL hasTimestampResponseEnd
;
216 @
property (nonatomic
) uint64_t timestampResponseEnd
;
218 @
property (nonatomic
, readonly
) BOOL hasOptionsQualityOfService
;
219 @
property (nonatomic
, retain
) NSString
*optionsQualityOfService
;
221 @
property (nonatomic
) BOOL hasOptionsOutOfProcess
;
222 @
property (nonatomic
) BOOL optionsOutOfProcess
;
224 @
property (nonatomic
) BOOL hasOptionsOutOfProcessForceDiscretionary
;
225 @
property (nonatomic
) BOOL optionsOutOfProcessForceDiscretionary
;
227 @
property (nonatomic
) BOOL hasOptionsAllowExpensiveAccess
;
228 @
property (nonatomic
) BOOL optionsAllowExpensiveAccess
;
230 @
property (nonatomic
) BOOL hasOptionsAllowPowerNapScheduling
;
231 @
property (nonatomic
) BOOL optionsAllowPowerNapScheduling
;
233 @
property (nonatomic
) BOOL hasOptionsTimeoutIntervalForRequest
;
234 @
property (nonatomic
) uint32_t optionsTimeoutIntervalForRequest
;
236 @
property (nonatomic
) BOOL hasOptionsTimeoutIntervalForResource
;
237 @
property (nonatomic
) uint32_t optionsTimeoutIntervalForResource
;
239 @
property (nonatomic
, readonly
) BOOL hasOptionsSourceApplicationBundleIdentifier
;
240 @
property (nonatomic
, retain
) NSString
*optionsSourceApplicationBundleIdentifier
;
242 @
property (nonatomic
, readonly
) BOOL hasOptionsSourceApplicationSecondaryIdentifier
;
243 @
property (nonatomic
, retain
) NSString
*optionsSourceApplicationSecondaryIdentifier
;
245 @
property (nonatomic
) BOOL hasOptionsAppleIdContext
;
246 @
property (nonatomic
) BOOL optionsAppleIdContext
;
248 @
property (nonatomic
) BOOL hasOptionsTlsPinningRequired
;
249 @
property (nonatomic
) BOOL optionsTlsPinningRequired
;
251 // Performs a shallow copy into other
252 - (void)copyTo
:(SECC2MPNetworkEvent
*)other
;
254 // Performs a deep merge from other into self
255 // If set in other, singular values in self are replaced in self
256 // Singular composite values are recursively merged
257 // Repeated values from other are appended to repeated values in self
258 - (void)mergeFrom
:(SECC2MPNetworkEvent
*)other
;
260 SECC2MPNETWORKEVENT_FUNCTION BOOL
SECC2MPNetworkEventReadFrom(__unsafe_unretained SECC2MPNetworkEvent
*self
, __unsafe_unretained PBDataReader
*reader
);