1 // This file was automatically generated by protocompiler
3 // Compiled from OTEscrowRecord.proto
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
8 @
class OTEscrowRecordMetadata
;
10 typedef NS_ENUM(int32_t, OTEscrowRecord_RecordStatus
) {
11 OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID
= 0,
12 OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID
= 1,
15 NS_INLINE NSString
*OTEscrowRecord_RecordStatusAsString(OTEscrowRecord_RecordStatus value
)
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
];
26 NS_INLINE OTEscrowRecord_RecordStatus
StringAsOTEscrowRecord_RecordStatus(NSString
*value
)
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
;
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,
39 NS_INLINE NSString
*OTEscrowRecord_RecoveryStatusAsString(OTEscrowRecord_RecoveryStatus value
)
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
];
51 NS_INLINE OTEscrowRecord_RecoveryStatus
StringAsOTEscrowRecord_RecoveryStatus(NSString
*value
)
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
;
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,
65 NS_INLINE NSString
*OTEscrowRecord_RecordViabilityAsString(OTEscrowRecord_RecordViability value
)
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
];
77 NS_INLINE OTEscrowRecord_RecordViability
StringAsOTEscrowRecord_RecordViability(NSString
*value
)
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
;
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,
91 NS_INLINE NSString
*OTEscrowRecord_SOSViabilityAsString(OTEscrowRecord_SOSViability value
)
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
];
101 #endif /* __OBJC__ */
103 NS_INLINE OTEscrowRecord_SOSViability
StringAsOTEscrowRecord_SOSViability(NSString
*value
)
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
;
110 #endif /* __OBJC__ */
113 #define OTESCROWRECORD_FUNCTION extern "C"
115 #define OTESCROWRECORD_FUNCTION extern
118 @interface OTEscrowRecord
: PBCodable
<NSCopying
>
120 uint64_t _coolOffEnd
;
121 uint64_t _creationDate
;
122 uint64_t _remainingAttempts
;
123 uint64_t _silentAttemptAllowed
;
124 OTEscrowRecordMetadata
*_escrowInformationMetadata
;
127 OTEscrowRecord_RecordStatus _recordStatus
;
128 OTEscrowRecord_RecordViability _recordViability
;
129 OTEscrowRecord_RecoveryStatus _recoveryStatus
;
130 NSString
*_serialNumber
;
131 OTEscrowRecord_SOSViability _viabilityStatus
;
135 int remainingAttempts
:1;
136 int silentAttemptAllowed
:1;
138 int recordViability
:1;
139 int recoveryStatus
:1;
140 int viabilityStatus
:1;
145 @
property (nonatomic
) BOOL hasCreationDate
;
146 @
property (nonatomic
) uint64_t creationDate
;
148 @
property (nonatomic
) BOOL hasRemainingAttempts
;
149 @
property (nonatomic
) uint64_t remainingAttempts
;
151 @
property (nonatomic
, readonly
) BOOL hasEscrowInformationMetadata
;
152 @
property (nonatomic
, retain
) OTEscrowRecordMetadata
*escrowInformationMetadata
;
154 @
property (nonatomic
, readonly
) BOOL hasLabel
;
155 @
property (nonatomic
, retain
) NSString
*label
;
157 @
property (nonatomic
) BOOL hasSilentAttemptAllowed
;
159 * optional reserved string reserved5 = 5;
160 * optional reserved string reserved6 = 6;
161 * optional reserved string reserved7 = 7;
162 * optional reserved string reserved8 = 8;
164 @
property (nonatomic
) uint64_t silentAttemptAllowed
;
166 @
property (nonatomic
) BOOL hasRecordStatus
;
167 @
property (nonatomic
) OTEscrowRecord_RecordStatus recordStatus
;
168 - (NSString
*)recordStatusAsString
:(OTEscrowRecord_RecordStatus
)value
;
169 - (OTEscrowRecord_RecordStatus
)StringAsRecordStatus
:(NSString
*)str
;
171 @
property (nonatomic
, readonly
) BOOL hasRecordId
;
172 @
property (nonatomic
, retain
) NSString
*recordId
;
174 @
property (nonatomic
) BOOL hasRecoveryStatus
;
175 @
property (nonatomic
) OTEscrowRecord_RecoveryStatus recoveryStatus
;
176 - (NSString
*)recoveryStatusAsString
:(OTEscrowRecord_RecoveryStatus
)value
;
177 - (OTEscrowRecord_RecoveryStatus
)StringAsRecoveryStatus
:(NSString
*)str
;
179 @
property (nonatomic
) BOOL hasCoolOffEnd
;
180 @
property (nonatomic
) uint64_t coolOffEnd
;
182 @
property (nonatomic
, readonly
) BOOL hasSerialNumber
;
183 @
property (nonatomic
, retain
) NSString
*serialNumber
;
185 @
property (nonatomic
) BOOL hasRecordViability
;
186 @
property (nonatomic
) OTEscrowRecord_RecordViability recordViability
;
187 - (NSString
*)recordViabilityAsString
:(OTEscrowRecord_RecordViability
)value
;
188 - (OTEscrowRecord_RecordViability
)StringAsRecordViability
:(NSString
*)str
;
190 @
property (nonatomic
) BOOL hasViabilityStatus
;
191 @
property (nonatomic
) OTEscrowRecord_SOSViability viabilityStatus
;
192 - (NSString
*)viabilityStatusAsString
:(OTEscrowRecord_SOSViability
)value
;
193 - (OTEscrowRecord_SOSViability
)StringAsViabilityStatus
:(NSString
*)str
;
195 // Performs a shallow copy into other
196 - (void)copyTo
:(OTEscrowRecord
*)other
;
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
;
204 OTESCROWRECORD_FUNCTION BOOL
OTEscrowRecordReadFrom(__unsafe_unretained OTEscrowRecord
*self
, __unsafe_unretained PBDataReader
*reader
);