1 // This file was automatically generated by protocompiler
5 #import <TargetConditionals.h>
8 #import "AWDKeychainSOSKeychainBackupFailed.h"
9 #import <ProtocolBuffer/PBConstants.h>
10 #import <ProtocolBuffer/PBHashUtil.h>
11 #import <ProtocolBuffer/PBDataReader.h>
13 #if !__has_feature(objc_arc)
14 # error This generated file depends on ARC but it is not enabled; turn on ARC, or use 'objc_use_arc' option to generate non-ARC code.
17 @implementation AWDKeychainSOSKeychainBackupFailed
19 @synthesize timestamp = _timestamp;
20 - (void)setTimestamp:(uint64_t)v
25 - (void)setHasTimestamp:(BOOL)f
31 return _has.timestamp;
34 - (NSString *)description
36 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
39 - (NSDictionary *)dictionaryRepresentation
41 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
42 if (self->_has.timestamp)
44 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestamp] forKey:@"timestamp"];
49 BOOL AWDKeychainSOSKeychainBackupFailedReadFrom(__unsafe_unretained AWDKeychainSOSKeychainBackupFailed *self, __unsafe_unretained PBDataReader *reader) {
50 while (PBReaderHasMoreData(reader)) {
54 PBReaderReadTag32AndType(reader, &tag, &aType);
56 if (PBReaderHasError(reader))
59 if (aType == TYPE_END_GROUP) {
65 case 1 /* timestamp */:
67 self->_has.timestamp = YES;
68 self->_timestamp = PBReaderReadUint64(reader);
72 if (!PBReaderSkipValueWithTag(reader, tag, aType))
77 return !PBReaderHasError(reader);
80 - (BOOL)readFrom:(PBDataReader *)reader
82 return AWDKeychainSOSKeychainBackupFailedReadFrom(self, reader);
84 - (void)writeTo:(PBDataWriter *)writer
88 if (self->_has.timestamp)
90 PBDataWriterWriteUint64Field(writer, self->_timestamp, 1);
95 - (void)copyTo:(AWDKeychainSOSKeychainBackupFailed *)other
97 if (self->_has.timestamp)
99 other->_timestamp = _timestamp;
100 other->_has.timestamp = YES;
104 - (id)copyWithZone:(NSZone *)zone
106 AWDKeychainSOSKeychainBackupFailed *copy = [[[self class] allocWithZone:zone] init];
107 if (self->_has.timestamp)
109 copy->_timestamp = _timestamp;
110 copy->_has.timestamp = YES;
115 - (BOOL)isEqual:(id)object
117 AWDKeychainSOSKeychainBackupFailed *other = (AWDKeychainSOSKeychainBackupFailed *)object;
118 return [other isMemberOfClass:[self class]]
120 ((self->_has.timestamp && other->_has.timestamp && self->_timestamp == other->_timestamp) || (!self->_has.timestamp && !other->_has.timestamp))
128 (self->_has.timestamp ? PBHashInt((NSUInteger)self->_timestamp) : 0)
132 - (void)mergeFrom:(AWDKeychainSOSKeychainBackupFailed *)other
134 if (other->_has.timestamp)
136 self->_timestamp = other->_timestamp;
137 self->_has.timestamp = YES;