1 // This file was automatically generated by protocompiler
3 // Compiled from C2Metric.proto
5 #import "SECC2MPInternalTestConfig.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 SECC2MPInternalTestConfig
20 @synthesize key = _key;
25 @synthesize value = _value;
27 - (NSString *)description
29 return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];
32 - (NSDictionary *)dictionaryRepresentation
34 NSMutableDictionary *dict = [NSMutableDictionary dictionary];
37 [dict setObject:self->_key forKey:@"key"];
41 [dict setObject:self->_value forKey:@"value"];
46 BOOL SECC2MPInternalTestConfigReadFrom(__unsafe_unretained SECC2MPInternalTestConfig *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 NSString *new_key = PBReaderReadString(reader);
70 NSString *new_value = PBReaderReadString(reader);
71 self->_value = new_value;
75 if (!PBReaderSkipValueWithTag(reader, tag, aType))
80 return !PBReaderHasError(reader);
83 - (BOOL)readFrom:(PBDataReader *)reader
85 return SECC2MPInternalTestConfigReadFrom(self, reader);
87 - (void)writeTo:(PBDataWriter *)writer
93 PBDataWriterWriteStringField(writer, self->_key, 101);
100 PBDataWriterWriteStringField(writer, self->_value, 102);
105 - (void)copyTo:(SECC2MPInternalTestConfig *)other
113 other.value = _value;
117 - (id)copyWithZone:(NSZone *)zone
119 SECC2MPInternalTestConfig *copy = [[[self class] allocWithZone:zone] init];
120 copy->_key = [_key copyWithZone:zone];
121 copy->_value = [_value copyWithZone:zone];
125 - (BOOL)isEqual:(id)object
127 SECC2MPInternalTestConfig *other = (SECC2MPInternalTestConfig *)object;
128 return [other isMemberOfClass:[self class]]
130 ((!self->_key && !other->_key) || [self->_key isEqual:other->_key])
132 ((!self->_value && !other->_value) || [self->_value isEqual:other->_value])
146 - (void)mergeFrom:(SECC2MPInternalTestConfig *)other
150 [self setKey:other->_key];
154 [self setValue:other->_value];