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

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

@class OTEscrowRecordMetadata;

typedef NS_ENUM(int32_t, OTEscrowRecord_RecordStatus) {
    OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID = 0,
    OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID = 1,
};
#ifdef __OBJC__
NS_INLINE NSString *OTEscrowRecord_RecordStatusAsString(OTEscrowRecord_RecordStatus value)
{
    switch (value)
    {
        case OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID: return @"RECORD_STATUS_VALID";
        case OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID: return @"RECORD_STATUS_INVALID";
        default: return [NSString stringWithFormat:@"(unknown: %i)", value];
    }
}
#endif /* __OBJC__ */
#ifdef __OBJC__
NS_INLINE OTEscrowRecord_RecordStatus StringAsOTEscrowRecord_RecordStatus(NSString *value)
{
    if ([value isEqualToString:@"RECORD_STATUS_VALID"]) return OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID;
    if ([value isEqualToString:@"RECORD_STATUS_INVALID"]) return OTEscrowRecord_RecordStatus_RECORD_STATUS_INVALID;
    return OTEscrowRecord_RecordStatus_RECORD_STATUS_VALID;
}
#endif /* __OBJC__ */
typedef NS_ENUM(int32_t, OTEscrowRecord_RecoveryStatus) {
    OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID = 0,
    OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED = 1,
    OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED = 2,
};
#ifdef __OBJC__
NS_INLINE NSString *OTEscrowRecord_RecoveryStatusAsString(OTEscrowRecord_RecoveryStatus value)
{
    switch (value)
    {
        case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID: return @"RECOVERY_STATUS_VALID";
        case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED: return @"RECOVERY_STATUS_SOFT_LIMIT_REACHED";
        case OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED: return @"RECOVERY_STATUS_HARD_LIMIT_REACHED";
        default: return [NSString stringWithFormat:@"(unknown: %i)", value];
    }
}
#endif /* __OBJC__ */
#ifdef __OBJC__
NS_INLINE OTEscrowRecord_RecoveryStatus StringAsOTEscrowRecord_RecoveryStatus(NSString *value)
{
    if ([value isEqualToString:@"RECOVERY_STATUS_VALID"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID;
    if ([value isEqualToString:@"RECOVERY_STATUS_SOFT_LIMIT_REACHED"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_SOFT_LIMIT_REACHED;
    if ([value isEqualToString:@"RECOVERY_STATUS_HARD_LIMIT_REACHED"]) return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_HARD_LIMIT_REACHED;
    return OTEscrowRecord_RecoveryStatus_RECOVERY_STATUS_VALID;
}
#endif /* __OBJC__ */
typedef NS_ENUM(int32_t, OTEscrowRecord_RecordViability) {
    OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE = 0,
    OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE = 1,
    OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY = 2,
};
#ifdef __OBJC__
NS_INLINE NSString *OTEscrowRecord_RecordViabilityAsString(OTEscrowRecord_RecordViability value)
{
    switch (value)
    {
        case OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE: return @"RECORD_VIABILITY_FULLY_VIABLE";
        case OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE: return @"RECORD_VIABILITY_PARTIALLY_VIABLE";
        case OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY: return @"RECORD_VIABILITY_LEGACY";
        default: return [NSString stringWithFormat:@"(unknown: %i)", value];
    }
}
#endif /* __OBJC__ */
#ifdef __OBJC__
NS_INLINE OTEscrowRecord_RecordViability StringAsOTEscrowRecord_RecordViability(NSString *value)
{
    if ([value isEqualToString:@"RECORD_VIABILITY_FULLY_VIABLE"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE;
    if ([value isEqualToString:@"RECORD_VIABILITY_PARTIALLY_VIABLE"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_PARTIALLY_VIABLE;
    if ([value isEqualToString:@"RECORD_VIABILITY_LEGACY"]) return OTEscrowRecord_RecordViability_RECORD_VIABILITY_LEGACY;
    return OTEscrowRecord_RecordViability_RECORD_VIABILITY_FULLY_VIABLE;
}
#endif /* __OBJC__ */
typedef NS_ENUM(int32_t, OTEscrowRecord_SOSViability) {
    OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN = 0,
    OTEscrowRecord_SOSViability_SOS_VIABLE = 1,
    OTEscrowRecord_SOSViability_SOS_NOT_VIABLE = 2,
};
#ifdef __OBJC__
NS_INLINE NSString *OTEscrowRecord_SOSViabilityAsString(OTEscrowRecord_SOSViability value)
{
    switch (value)
    {
        case OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN: return @"SOS_VIABLE_UNKNOWN";
        case OTEscrowRecord_SOSViability_SOS_VIABLE: return @"SOS_VIABLE";
        case OTEscrowRecord_SOSViability_SOS_NOT_VIABLE: return @"SOS_NOT_VIABLE";
        default: return [NSString stringWithFormat:@"(unknown: %i)", value];
    }
}
#endif /* __OBJC__ */
#ifdef __OBJC__
NS_INLINE OTEscrowRecord_SOSViability StringAsOTEscrowRecord_SOSViability(NSString *value)
{
    if ([value isEqualToString:@"SOS_VIABLE_UNKNOWN"]) return OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN;
    if ([value isEqualToString:@"SOS_VIABLE"]) return OTEscrowRecord_SOSViability_SOS_VIABLE;
    if ([value isEqualToString:@"SOS_NOT_VIABLE"]) return OTEscrowRecord_SOSViability_SOS_NOT_VIABLE;
    return OTEscrowRecord_SOSViability_SOS_VIABLE_UNKNOWN;
}
#endif /* __OBJC__ */

#ifdef __cplusplus
#define OTESCROWRECORD_FUNCTION extern "C"
#else
#define OTESCROWRECORD_FUNCTION extern
#endif

@interface OTEscrowRecord : PBCodable <NSCopying>
{
    uint64_t _coolOffEnd;
    uint64_t _creationDate;
    uint64_t _remainingAttempts;
    uint64_t _silentAttemptAllowed;
    OTEscrowRecordMetadata *_escrowInformationMetadata;
    NSString *_label;
    NSString *_recordId;
    OTEscrowRecord_RecordStatus _recordStatus;
    OTEscrowRecord_RecordViability _recordViability;
    OTEscrowRecord_RecoveryStatus _recoveryStatus;
    NSString *_serialNumber;
    OTEscrowRecord_SOSViability _viabilityStatus;
    struct {
        int coolOffEnd:1;
        int creationDate:1;
        int remainingAttempts:1;
        int silentAttemptAllowed:1;
        int recordStatus:1;
        int recordViability:1;
        int recoveryStatus:1;
        int viabilityStatus:1;
    } _has;
}


@property (nonatomic) BOOL hasCreationDate;
@property (nonatomic) uint64_t creationDate;

@property (nonatomic) BOOL hasRemainingAttempts;
@property (nonatomic) uint64_t remainingAttempts;

@property (nonatomic, readonly) BOOL hasEscrowInformationMetadata;
@property (nonatomic, retain) OTEscrowRecordMetadata *escrowInformationMetadata;

@property (nonatomic, readonly) BOOL hasLabel;
@property (nonatomic, retain) NSString *label;

@property (nonatomic) BOOL hasSilentAttemptAllowed;
/**
 * optional reserved string reserved5 = 5;
 * optional reserved string reserved6 = 6;
 * optional reserved string reserved7 = 7;
 * optional reserved string reserved8 = 8;
 */
@property (nonatomic) uint64_t silentAttemptAllowed;

@property (nonatomic) BOOL hasRecordStatus;
@property (nonatomic) OTEscrowRecord_RecordStatus recordStatus;
- (NSString *)recordStatusAsString:(OTEscrowRecord_RecordStatus)value;
- (OTEscrowRecord_RecordStatus)StringAsRecordStatus:(NSString *)str;

@property (nonatomic, readonly) BOOL hasRecordId;
@property (nonatomic, retain) NSString *recordId;

@property (nonatomic) BOOL hasRecoveryStatus;
@property (nonatomic) OTEscrowRecord_RecoveryStatus recoveryStatus;
- (NSString *)recoveryStatusAsString:(OTEscrowRecord_RecoveryStatus)value;
- (OTEscrowRecord_RecoveryStatus)StringAsRecoveryStatus:(NSString *)str;

@property (nonatomic) BOOL hasCoolOffEnd;
@property (nonatomic) uint64_t coolOffEnd;

@property (nonatomic, readonly) BOOL hasSerialNumber;
@property (nonatomic, retain) NSString *serialNumber;

@property (nonatomic) BOOL hasRecordViability;
@property (nonatomic) OTEscrowRecord_RecordViability recordViability;
- (NSString *)recordViabilityAsString:(OTEscrowRecord_RecordViability)value;
- (OTEscrowRecord_RecordViability)StringAsRecordViability:(NSString *)str;

@property (nonatomic) BOOL hasViabilityStatus;
@property (nonatomic) OTEscrowRecord_SOSViability viabilityStatus;
- (NSString *)viabilityStatusAsString:(OTEscrowRecord_SOSViability)value;
- (OTEscrowRecord_SOSViability)StringAsViabilityStatus:(NSString *)str;

// Performs a shallow copy into other
- (void)copyTo:(OTEscrowRecord *)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:(OTEscrowRecord *)other;

OTESCROWRECORD_FUNCTION BOOL OTEscrowRecordReadFrom(__unsafe_unretained OTEscrowRecord *self, __unsafe_unretained PBDataReader *reader);

@end

