|
16 | 16 |
|
17 | 17 | #import <Foundation/Foundation.h>
|
18 | 18 |
|
| 19 | +#import "GDLLogClock.h" |
| 20 | +#import "GDLLogProto.h" |
| 21 | + |
| 22 | +NS_ASSUME_NONNULL_BEGIN |
| 23 | + |
| 24 | +/** The different possible log quality of service specifiers. High values indicate high priority. */ |
| 25 | +typedef NS_ENUM(NSInteger, GDLLogQoS) { |
| 26 | + /** The QoS tier wasn't set, and won't ever be sent. */ |
| 27 | + GDLLogQoSUnknown = 0, |
| 28 | + |
| 29 | + /** This log is internal telemetry data that should not be sent on its own if possible. */ |
| 30 | + GDLLogQoSTelemetry = 1, |
| 31 | + |
| 32 | + /** This log should be sent, but in a batch only roughly once per day. */ |
| 33 | + GDLLogQoSDaily = 2, |
| 34 | + |
| 35 | + /** This log should be sent when requested by the uploader. */ |
| 36 | + GDLLogQosDefault = 3, |
| 37 | + |
| 38 | + /** This log should be sent immediately along with any other data that can be batched. */ |
| 39 | + GDLLogQoSFast = 4 |
| 40 | +}; |
| 41 | + |
19 | 42 | @interface GDLLogEvent : NSObject
|
20 | 43 |
|
| 44 | +/** The log map identifier, to allow backends to map the extension property to a proto. */ |
| 45 | +@property(readonly, nonatomic) NSString *logMapID; |
| 46 | + |
| 47 | +/** The log object itself, encapsulated in the transport of your choice, as long as it implements |
| 48 | + * the GDLLogProto protocol. */ |
| 49 | +@property(nonatomic) id<GDLLogProto> extension; |
| 50 | + |
| 51 | +/** The quality of service tier this log belongs to. */ |
| 52 | +@property(nonatomic) GDLLogQoS qosTier; |
| 53 | + |
| 54 | +/** The clock snapshot at the time of logging. */ |
| 55 | +@property(nonatomic) GDLLogClockSnapshot clockSnapshot; |
| 56 | + |
| 57 | +// Please use the designated initializer. |
| 58 | +- (instancetype)init NS_UNAVAILABLE; |
| 59 | + |
| 60 | +/** Initializes an instance using the given logMapID. |
| 61 | + * |
| 62 | + * @param logMapID The log map identifier. |
| 63 | + * @return An instance of this class. |
| 64 | + */ |
| 65 | +- (instancetype)initWithLogMapID:(NSString *)logMapID NS_DESIGNATED_INITIALIZER; |
| 66 | + |
21 | 67 | @end
|
| 68 | + |
| 69 | +NS_ASSUME_NONNULL_END |
0 commit comments