SECC2MPGenericEvent.h   [plain text]


// This file was automatically generated by protocompiler
// DO NOT EDIT!
// Compiled from C2Metric.proto

#import <Foundation/Foundation.h>
#import <ProtocolBuffer/PBCodable.h>

@class SECC2MPGenericEventMetric;

typedef NS_ENUM(int32_t, SECC2MPGenericEvent_Type) {
    SECC2MPGenericEvent_Type_none = 0,
    SECC2MPGenericEvent_Type_cloudkit = 101,
    SECC2MPGenericEvent_Type_cloudkit_client = 201,
    SECC2MPGenericEvent_Type_server = 301,
};
#ifdef __OBJC__
NS_INLINE NSString *SECC2MPGenericEvent_TypeAsString(SECC2MPGenericEvent_Type value)
{
    switch (value)
    {
        case SECC2MPGenericEvent_Type_none: return @"none";
        case SECC2MPGenericEvent_Type_cloudkit: return @"cloudkit";
        case SECC2MPGenericEvent_Type_cloudkit_client: return @"cloudkit_client";
        case SECC2MPGenericEvent_Type_server: return @"server";
        default: return [NSString stringWithFormat:@"(unknown: %i)", value];
    }
}
#endif /* __OBJC__ */
#ifdef __OBJC__
NS_INLINE SECC2MPGenericEvent_Type StringAsSECC2MPGenericEvent_Type(NSString *value)
{
    if ([value isEqualToString:@"none"]) return SECC2MPGenericEvent_Type_none;
    if ([value isEqualToString:@"cloudkit"]) return SECC2MPGenericEvent_Type_cloudkit;
    if ([value isEqualToString:@"cloudkit_client"]) return SECC2MPGenericEvent_Type_cloudkit_client;
    if ([value isEqualToString:@"server"]) return SECC2MPGenericEvent_Type_server;
    return SECC2MPGenericEvent_Type_none;
}
#endif /* __OBJC__ */

#ifdef __cplusplus
#define SECC2MPGENERICEVENT_FUNCTION extern "C" __attribute__((visibility("hidden")))
#else
#define SECC2MPGENERICEVENT_FUNCTION extern __attribute__((visibility("hidden")))
#endif

__attribute__((visibility("hidden")))
@interface SECC2MPGenericEvent : PBCodable <NSCopying>
{
    uint64_t _timestampEnd;
    uint64_t _timestampStart;
    NSMutableArray<SECC2MPGenericEventMetric *> *_metrics;
    NSString *_name;
    SECC2MPGenericEvent_Type _type;
    struct {
        int timestampEnd:1;
        int timestampStart:1;
        int type:1;
    } _has;
}


@property (nonatomic) BOOL hasType;
@property (nonatomic) SECC2MPGenericEvent_Type type;
- (NSString *)typeAsString:(SECC2MPGenericEvent_Type)value;
- (SECC2MPGenericEvent_Type)StringAsType:(NSString *)str;

@property (nonatomic, readonly) BOOL hasName;
@property (nonatomic, retain) NSString *name;

@property (nonatomic) BOOL hasTimestampStart;
@property (nonatomic) uint64_t timestampStart;

@property (nonatomic) BOOL hasTimestampEnd;
@property (nonatomic) uint64_t timestampEnd;

@property (nonatomic, retain) NSMutableArray<SECC2MPGenericEventMetric *> *metrics;
- (void)clearMetrics;
- (void)addMetric:(SECC2MPGenericEventMetric *)i;
- (NSUInteger)metricsCount;
- (SECC2MPGenericEventMetric *)metricAtIndex:(NSUInteger)idx;
+ (Class)metricType;

// Performs a shallow copy into other
- (void)copyTo:(SECC2MPGenericEvent *)other;

// Performs a deep merge from other into self
// If set in other, singular values in self are replaced in self
// Singular composite values are recursively merged
// Repeated values from other are appended to repeated values in self
- (void)mergeFrom:(SECC2MPGenericEvent *)other;

SECC2MPGENERICEVENT_FUNCTION BOOL SECC2MPGenericEventReadFrom(__unsafe_unretained SECC2MPGenericEvent *self, __unsafe_unretained PBDataReader *reader);

@end