1 // This file was automatically generated by protocompiler
3 // Compiled from OTPairingMessage.proto
5 #import "OTSponsorToApplicantRound1M2.h"
6 #import <ProtocolBuffer/PBConstants.h>
7 #import <ProtocolBuffer/PBHashUtil.h>
8 #import <ProtocolBuffer/PBDataReader.h>
10 #if !__has_feature(objc_arc)
11 # 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.
14 @implementation OTSponsorToApplicantRound1M2
16 @synthesize epoch = _epoch;
17 - (void)setEpoch:(uint64_t)v
22 - (void)setHasEpoch:(BOOL)f
28 return _has.epoch != 0;
31 - (NSString *)description
33 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
36 - (NSDictionary *)dictionaryRepresentation
38 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
41 [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_epoch] forKey:@"epoch"];
46 BOOL OTSponsorToApplicantRound1M2ReadFrom(__unsafe_unretained OTSponsorToApplicantRound1M2 *self, __unsafe_unretained PBDataReader *reader) {
47 while (PBReaderHasMoreData(reader)) {
51 PBReaderReadTag32AndType(reader, &tag, &aType);
53 if (PBReaderHasError(reader))
56 if (aType == TYPE_END_GROUP) {
64 self->_has.epoch = YES;
65 self->_epoch = PBReaderReadUint64(reader);
69 if (!PBReaderSkipValueWithTag(reader, tag, aType))
74 return !PBReaderHasError(reader);
77 - (BOOL)readFrom:(PBDataReader *)reader
79 return OTSponsorToApplicantRound1M2ReadFrom(self, reader);
81 - (void)writeTo:(PBDataWriter *)writer
87 PBDataWriterWriteUint64Field(writer, self->_epoch, 1);
92 - (void)copyTo:(OTSponsorToApplicantRound1M2 *)other
96 other->_epoch = _epoch;
97 other->_has.epoch = YES;
101 - (id)copyWithZone:(NSZone *)zone
103 OTSponsorToApplicantRound1M2 *copy = [[[self class] allocWithZone:zone] init];
104 if (self->_has.epoch)
106 copy->_epoch = _epoch;
107 copy->_has.epoch = YES;
112 - (BOOL)isEqual:(id)object
114 OTSponsorToApplicantRound1M2 *other = (OTSponsorToApplicantRound1M2 *)object;
115 return [other isMemberOfClass:[self class]]
117 ((self->_has.epoch && other->_has.epoch && self->_epoch == other->_epoch) || (!self->_has.epoch && !other->_has.epoch))
125 (self->_has.epoch ? PBHashInt((NSUInteger)self->_epoch) : 0)
129 - (void)mergeFrom:(OTSponsorToApplicantRound1M2 *)other
131 if (other->_has.epoch)
133 self->_epoch = other->_epoch;
134 self->_has.epoch = YES;