1 // This file was automatically generated by protocompiler
5 #import <TargetConditionals.h>
8 #import "AWDKeychainSecDbMarkedCorrupt.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 AWDKeychainSecDbMarkedCorrupt
19 @synthesize timestamp = _timestamp;
20 - (void)setTimestamp:(uint64_t)v
25 - (void)setHasTimestamp:(BOOL)f
31 return _has.timestamp;
33 @synthesize reason = _reason;
34 - (void)setReason:(uint32_t)v
39 - (void)setHasReason:(BOOL)f
47 @synthesize sqlitecode = _sqlitecode;
48 - (void)setSqlitecode:(uint32_t)v
50 _has.sqlitecode = YES;
53 - (void)setHasSqlitecode:(BOOL)f
59 return _has.sqlitecode;
62 - (NSString *)description
64 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
67 - (NSDictionary *)dictionaryRepresentation
69 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
70 if (self->_has.timestamp)
72 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestamp] forKey:@"timestamp"];
74 if (self->_has.reason)
76 [dict setObject:[NSNumber numberWithUnsignedInt:self->_reason] forKey:@"reason"];
78 if (self->_has.sqlitecode)
80 [dict setObject:[NSNumber numberWithUnsignedInt:self->_sqlitecode] forKey:@"sqlitecode"];
85 BOOL AWDKeychainSecDbMarkedCorruptReadFrom(__unsafe_unretained AWDKeychainSecDbMarkedCorrupt *self, __unsafe_unretained PBDataReader *reader) {
86 while (PBReaderHasMoreData(reader)) {
90 PBReaderReadTag32AndType(reader, &tag, &aType);
92 if (PBReaderHasError(reader))
95 if (aType == TYPE_END_GROUP) {
101 case 1 /* timestamp */:
103 self->_has.timestamp = YES;
104 self->_timestamp = PBReaderReadUint64(reader);
109 self->_has.reason = YES;
110 self->_reason = PBReaderReadUint32(reader);
113 case 3 /* sqlitecode */:
115 self->_has.sqlitecode = YES;
116 self->_sqlitecode = PBReaderReadUint32(reader);
120 if (!PBReaderSkipValueWithTag(reader, tag, aType))
125 return !PBReaderHasError(reader);
128 - (BOOL)readFrom:(PBDataReader *)reader
130 return AWDKeychainSecDbMarkedCorruptReadFrom(self, reader);
132 - (void)writeTo:(PBDataWriter *)writer
136 if (self->_has.timestamp)
138 PBDataWriterWriteUint64Field(writer, self->_timestamp, 1);
143 if (self->_has.reason)
145 PBDataWriterWriteUint32Field(writer, self->_reason, 2);
150 if (self->_has.sqlitecode)
152 PBDataWriterWriteUint32Field(writer, self->_sqlitecode, 3);
157 - (void)copyTo:(AWDKeychainSecDbMarkedCorrupt *)other
159 if (self->_has.timestamp)
161 other->_timestamp = _timestamp;
162 other->_has.timestamp = YES;
164 if (self->_has.reason)
166 other->_reason = _reason;
167 other->_has.reason = YES;
169 if (self->_has.sqlitecode)
171 other->_sqlitecode = _sqlitecode;
172 other->_has.sqlitecode = YES;
176 - (id)copyWithZone:(NSZone *)zone
178 AWDKeychainSecDbMarkedCorrupt *copy = [[[self class] allocWithZone:zone] init];
179 if (self->_has.timestamp)
181 copy->_timestamp = _timestamp;
182 copy->_has.timestamp = YES;
184 if (self->_has.reason)
186 copy->_reason = _reason;
187 copy->_has.reason = YES;
189 if (self->_has.sqlitecode)
191 copy->_sqlitecode = _sqlitecode;
192 copy->_has.sqlitecode = YES;
197 - (BOOL)isEqual:(id)object
199 AWDKeychainSecDbMarkedCorrupt *other = (AWDKeychainSecDbMarkedCorrupt *)object;
200 return [other isMemberOfClass:[self class]]
202 ((self->_has.timestamp && other->_has.timestamp && self->_timestamp == other->_timestamp) || (!self->_has.timestamp && !other->_has.timestamp))
204 ((self->_has.reason && other->_has.reason && self->_reason == other->_reason) || (!self->_has.reason && !other->_has.reason))
206 ((self->_has.sqlitecode && other->_has.sqlitecode && self->_sqlitecode == other->_sqlitecode) || (!self->_has.sqlitecode && !other->_has.sqlitecode))
214 (self->_has.timestamp ? PBHashInt((NSUInteger)self->_timestamp) : 0)
216 (self->_has.reason ? PBHashInt((NSUInteger)self->_reason) : 0)
218 (self->_has.sqlitecode ? PBHashInt((NSUInteger)self->_sqlitecode) : 0)
222 - (void)mergeFrom:(AWDKeychainSecDbMarkedCorrupt *)other
224 if (other->_has.timestamp)
226 self->_timestamp = other->_timestamp;
227 self->_has.timestamp = YES;
229 if (other->_has.reason)
231 self->_reason = other->_reason;
232 self->_has.reason = YES;
234 if (other->_has.sqlitecode)
236 self->_sqlitecode = other->_sqlitecode;
237 self->_has.sqlitecode = YES;