1 // This file was automatically generated by protocompiler
3 // Compiled from C2Metric.proto
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
8 @
class SECC2MPGenericEventMetric
;
10 typedef NS_ENUM(int32_t, SECC2MPGenericEvent_Type
) {
11 SECC2MPGenericEvent_Type_none
= 0,
12 SECC2MPGenericEvent_Type_cloudkit
= 101,
13 SECC2MPGenericEvent_Type_cloudkit_client
= 201,
14 SECC2MPGenericEvent_Type_server
= 301,
17 NS_INLINE NSString
*SECC2MPGenericEvent_TypeAsString(SECC2MPGenericEvent_Type value
)
21 case SECC2MPGenericEvent_Type_none
: return @
"none";
22 case SECC2MPGenericEvent_Type_cloudkit
: return @
"cloudkit";
23 case SECC2MPGenericEvent_Type_cloudkit_client
: return @
"cloudkit_client";
24 case SECC2MPGenericEvent_Type_server
: return @
"server";
25 default: return [NSString stringWithFormat
:@
"(unknown: %i)", value
];
30 NS_INLINE SECC2MPGenericEvent_Type
StringAsSECC2MPGenericEvent_Type(NSString
*value
)
32 if ([value isEqualToString
:@
"none"]) return SECC2MPGenericEvent_Type_none
;
33 if ([value isEqualToString
:@
"cloudkit"]) return SECC2MPGenericEvent_Type_cloudkit
;
34 if ([value isEqualToString
:@
"cloudkit_client"]) return SECC2MPGenericEvent_Type_cloudkit_client
;
35 if ([value isEqualToString
:@
"server"]) return SECC2MPGenericEvent_Type_server
;
36 return SECC2MPGenericEvent_Type_none
;
41 #define SECC2MPGENERICEVENT_FUNCTION extern "C" __attribute__((visibility("hidden")))
43 #define SECC2MPGENERICEVENT_FUNCTION extern __attribute__((visibility("hidden")))
46 __attribute__((visibility("hidden")))
47 @interface SECC2MPGenericEvent
: PBCodable
<NSCopying
>
49 uint64_t _timestampEnd
;
50 uint64_t _timestampStart
;
51 NSMutableArray
<SECC2MPGenericEventMetric
*> *_metrics
;
53 SECC2MPGenericEvent_Type _type
;
62 @
property (nonatomic
) BOOL hasType
;
63 @
property (nonatomic
) SECC2MPGenericEvent_Type type
;
64 - (NSString
*)typeAsString
:(SECC2MPGenericEvent_Type
)value
;
65 - (SECC2MPGenericEvent_Type
)StringAsType
:(NSString
*)str
;
67 @
property (nonatomic
, readonly
) BOOL hasName
;
68 @
property (nonatomic
, retain
) NSString
*name
;
70 @
property (nonatomic
) BOOL hasTimestampStart
;
71 @
property (nonatomic
) uint64_t timestampStart
;
73 @
property (nonatomic
) BOOL hasTimestampEnd
;
74 @
property (nonatomic
) uint64_t timestampEnd
;
76 @
property (nonatomic
, retain
) NSMutableArray
<SECC2MPGenericEventMetric
*> *metrics
;
78 - (void)addMetric
:(SECC2MPGenericEventMetric
*)i
;
79 - (NSUInteger
)metricsCount
;
80 - (SECC2MPGenericEventMetric
*)metricAtIndex
:(NSUInteger
)idx
;
83 // Performs a shallow copy into other
84 - (void)copyTo
:(SECC2MPGenericEvent
*)other
;
86 // Performs a deep merge from other into self
87 // If set in other, singular values in self are replaced in self
88 // Singular composite values are recursively merged
89 // Repeated values from other are appended to repeated values in self
90 - (void)mergeFrom
:(SECC2MPGenericEvent
*)other
;
92 SECC2MPGENERICEVENT_FUNCTION BOOL
SECC2MPGenericEventReadFrom(__unsafe_unretained SECC2MPGenericEvent
*self
, __unsafe_unretained PBDataReader
*reader
);