]> git.saurik.com Git - apple/security.git/blob - keychain/ot/proto/generated_source/OTEscrowRecord.h
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / ot / proto / generated_source / OTEscrowRecord.h
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from OTEscrowRecord.proto
4
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
7
8 @class OTEscrowRecordMetadata;
9
10 typedef NS_ENUM(int32_t, OTEscrowRecord_RecordStatus) {
11 OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID = 0,
12 OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID = 1,
13 };
14 #ifdef __OBJC__
15 NS_INLINE NSString *OTEscrowRecord_RecordStatusAsString(OTEscrowRecord_RecordStatus value)
16 {
17 switch (value)
18 {
19 case OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID: return @"RECORD_STATUS_VALID";
20 case OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID: return @"RECORD_STATUS_INVALID";
21 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
22 }
23 }
24 #endif /* __OBJC__ */
25 #ifdef __OBJC__
26 NS_INLINE OTEscrowRecord_RecordStatus StringAsOTEscrowRecord_RecordStatus(NSString *value)
27 {
28 if ([value isEqualToString:@"RECORD_STATUS_VALID"]) return OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID;
29 if ([value isEqualToString:@"RECORD_STATUS_INVALID"]) return OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID;
30 return OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID;
31 }
32 #endif /* __OBJC__ */
33 typedef NS_ENUM(int32_t, OTEscrowRecord_RecoveryStatus) {
34 OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID = 0,
35 OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED = 1,
36 OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED = 2,
37 };
38 #ifdef __OBJC__
39 NS_INLINE NSString *OTEscrowRecord_RecoveryStatusAsString(OTEscrowRecord_RecoveryStatus value)
40 {
41 switch (value)
42 {
43 case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID: return @"RECOVERY_STATUS_VALID";
44 case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED: return @"RECOVERY_STATUS_SOFT_LIMIT_REACHED";
45 case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED: return @"RECOVERY_STATUS_HARD_LIMIT_REACHED";
46 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
47 }
48 }
49 #endif /* __OBJC__ */
50 #ifdef __OBJC__
51 NS_INLINE OTEscrowRecord_RecoveryStatus StringAsOTEscrowRecord_RecoveryStatus(NSString *value)
52 {
53 if ([value isEqualToString:@"RECOVERY_STATUS_VALID"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID;
54 if ([value isEqualToString:@"RECOVERY_STATUS_SOFT_LIMIT_REACHED"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED;
55 if ([value isEqualToString:@"RECOVERY_STATUS_HARD_LIMIT_REACHED"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED;
56 return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID;
57 }
58 #endif /* __OBJC__ */
59 typedef NS_ENUM(int32_t, OTEscrowRecord_RecordViability) {
60 OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE = 0,
61 OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE = 1,
62 OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY = 2,
63 };
64 #ifdef __OBJC__
65 NS_INLINE NSString *OTEscrowRecord_RecordViabilityAsString(OTEscrowRecord_RecordViability value)
66 {
67 switch (value)
68 {
69 case OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE: return @"RECORD_VIABILITY_FULLY_VIABLE";
70 case OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE: return @"RECORD_VIABILITY_PARTIALLY_VIABLE";
71 case OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY: return @"RECORD_VIABILITY_LEGACY";
72 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
73 }
74 }
75 #endif /* __OBJC__ */
76 #ifdef __OBJC__
77 NS_INLINE OTEscrowRecord_RecordViability StringAsOTEscrowRecord_RecordViability(NSString *value)
78 {
79 if ([value isEqualToString:@"RECORD_VIABILITY_FULLY_VIABLE"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE;
80 if ([value isEqualToString:@"RECORD_VIABILITY_PARTIALLY_VIABLE"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE;
81 if ([value isEqualToString:@"RECORD_VIABILITY_LEGACY"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY;
82 return OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE;
83 }
84 #endif /* __OBJC__ */
85 typedef NS_ENUM(int32_t, OTEscrowRecord_SOSViability) {
86 OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN = 0,
87 OTEscrowRecord_SOSViability_SOS_VIABLE = 1,
88 OTEscrowRecord_SOSViability_SOS_NOT_VIABLE = 2,
89 };
90 #ifdef __OBJC__
91 NS_INLINE NSString *OTEscrowRecord_SOSViabilityAsString(OTEscrowRecord_SOSViability value)
92 {
93 switch (value)
94 {
95 case OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN: return @"SOS_VIABLE_UNKNOWN";
96 case OTEscrowRecord_SOSViability_SOS_VIABLE: return @"SOS_VIABLE";
97 case OTEscrowRecord_SOSViability_SOS_NOT_VIABLE: return @"SOS_NOT_VIABLE";
98 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
99 }
100 }
101 #endif /* __OBJC__ */
102 #ifdef __OBJC__
103 NS_INLINE OTEscrowRecord_SOSViability StringAsOTEscrowRecord_SOSViability(NSString *value)
104 {
105 if ([value isEqualToString:@"SOS_VIABLE_UNKNOWN"]) return OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN;
106 if ([value isEqualToString:@"SOS_VIABLE"]) return OTEscrowRecord_SOSViability_SOS_VIABLE;
107 if ([value isEqualToString:@"SOS_NOT_VIABLE"]) return OTEscrowRecord_SOSViability_SOS_NOT_VIABLE;
108 return OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN;
109 }
110 #endif /* __OBJC__ */
111
112 #ifdef __cplusplus
113 #define OTESCROWRECORD_FUNCTION extern "C"
114 #else
115 #define OTESCROWRECORD_FUNCTION extern
116 #endif
117
118 @interface OTEscrowRecord : PBCodable <NSCopying>
119 {
120 uint64_t _coolOffEnd;
121 uint64_t _creationDate;
122 uint64_t _remainingAttempts;
123 uint64_t _silentAttemptAllowed;
124 OTEscrowRecordMetadata *_escrowInformationMetadata;
125 NSString *_label;
126 NSString *_recordId;
127 OTEscrowRecord_RecordStatus _recordStatus;
128 OTEscrowRecord_RecordViability _recordViability;
129 OTEscrowRecord_RecoveryStatus _recoveryStatus;
130 NSString *_serialNumber;
131 OTEscrowRecord_SOSViability _viabilityStatus;
132 struct {
133 int coolOffEnd:1;
134 int creationDate:1;
135 int remainingAttempts:1;
136 int silentAttemptAllowed:1;
137 int recordStatus:1;
138 int recordViability:1;
139 int recoveryStatus:1;
140 int viabilityStatus:1;
141 } _has;
142 }
143
144
145 @property (nonatomic) BOOL hasCreationDate;
146 @property (nonatomic) uint64_t creationDate;
147
148 @property (nonatomic) BOOL hasRemainingAttempts;
149 @property (nonatomic) uint64_t remainingAttempts;
150
151 @property (nonatomic, readonly) BOOL hasEscrowInformationMetadata;
152 @property (nonatomic, retain) OTEscrowRecordMetadata *escrowInformationMetadata;
153
154 @property (nonatomic, readonly) BOOL hasLabel;
155 @property (nonatomic, retain) NSString *label;
156
157 @property (nonatomic) BOOL hasSilentAttemptAllowed;
158 /**
159 * optional reserved string reserved5 = 5;
160 * optional reserved string reserved6 = 6;
161 * optional reserved string reserved7 = 7;
162 * optional reserved string reserved8 = 8;
163 */
164 @property (nonatomic) uint64_t silentAttemptAllowed;
165
166 @property (nonatomic) BOOL hasRecordStatus;
167 @property (nonatomic) OTEscrowRecord_RecordStatus recordStatus;
168 - (NSString *)recordStatusAsString:(OTEscrowRecord_RecordStatus)value;
169 - (OTEscrowRecord_RecordStatus)StringAsRecordStatus:(NSString *)str;
170
171 @property (nonatomic, readonly) BOOL hasRecordId;
172 @property (nonatomic, retain) NSString *recordId;
173
174 @property (nonatomic) BOOL hasRecoveryStatus;
175 @property (nonatomic) OTEscrowRecord_RecoveryStatus recoveryStatus;
176 - (NSString *)recoveryStatusAsString:(OTEscrowRecord_RecoveryStatus)value;
177 - (OTEscrowRecord_RecoveryStatus)StringAsRecoveryStatus:(NSString *)str;
178
179 @property (nonatomic) BOOL hasCoolOffEnd;
180 @property (nonatomic) uint64_t coolOffEnd;
181
182 @property (nonatomic, readonly) BOOL hasSerialNumber;
183 @property (nonatomic, retain) NSString *serialNumber;
184
185 @property (nonatomic) BOOL hasRecordViability;
186 @property (nonatomic) OTEscrowRecord_RecordViability recordViability;
187 - (NSString *)recordViabilityAsString:(OTEscrowRecord_RecordViability)value;
188 - (OTEscrowRecord_RecordViability)StringAsRecordViability:(NSString *)str;
189
190 @property (nonatomic) BOOL hasViabilityStatus;
191 @property (nonatomic) OTEscrowRecord_SOSViability viabilityStatus;
192 - (NSString *)viabilityStatusAsString:(OTEscrowRecord_SOSViability)value;
193 - (OTEscrowRecord_SOSViability)StringAsViabilityStatus:(NSString *)str;
194
195 // Performs a shallow copy into other
196 - (void)copyTo:(OTEscrowRecord *)other;
197
198 // Performs a deep merge from other into self
199 // If set in other, singular values in self are replaced in self
200 // Singular composite values are recursively merged
201 // Repeated values from other are appended to repeated values in self
202 - (void)mergeFrom:(OTEscrowRecord *)other;
203
204 OTESCROWRECORD_FUNCTION BOOL OTEscrowRecordReadFrom(__unsafe_unretained OTEscrowRecord *self, __unsafe_unretained PBDataReader *reader);
205
206 @end
207