1198 self.has_index_writes_ = 0 |
1204 self.has_index_writes_ = 0 |
1199 self.index_writes_ = 0 |
1205 self.index_writes_ = 0 |
1200 |
1206 |
1201 def has_index_writes(self): return self.has_index_writes_ |
1207 def has_index_writes(self): return self.has_index_writes_ |
1202 |
1208 |
|
1209 def index_write_bytes(self): return self.index_write_bytes_ |
|
1210 |
|
1211 def set_index_write_bytes(self, x): |
|
1212 self.has_index_write_bytes_ = 1 |
|
1213 self.index_write_bytes_ = x |
|
1214 |
|
1215 def clear_index_write_bytes(self): |
|
1216 if self.has_index_write_bytes_: |
|
1217 self.has_index_write_bytes_ = 0 |
|
1218 self.index_write_bytes_ = 0 |
|
1219 |
|
1220 def has_index_write_bytes(self): return self.has_index_write_bytes_ |
|
1221 |
|
1222 def entity_writes(self): return self.entity_writes_ |
|
1223 |
|
1224 def set_entity_writes(self, x): |
|
1225 self.has_entity_writes_ = 1 |
|
1226 self.entity_writes_ = x |
|
1227 |
|
1228 def clear_entity_writes(self): |
|
1229 if self.has_entity_writes_: |
|
1230 self.has_entity_writes_ = 0 |
|
1231 self.entity_writes_ = 0 |
|
1232 |
|
1233 def has_entity_writes(self): return self.has_entity_writes_ |
|
1234 |
|
1235 def entity_write_bytes(self): return self.entity_write_bytes_ |
|
1236 |
|
1237 def set_entity_write_bytes(self, x): |
|
1238 self.has_entity_write_bytes_ = 1 |
|
1239 self.entity_write_bytes_ = x |
|
1240 |
|
1241 def clear_entity_write_bytes(self): |
|
1242 if self.has_entity_write_bytes_: |
|
1243 self.has_entity_write_bytes_ = 0 |
|
1244 self.entity_write_bytes_ = 0 |
|
1245 |
|
1246 def has_entity_write_bytes(self): return self.has_entity_write_bytes_ |
|
1247 |
1203 |
1248 |
1204 def MergeFrom(self, x): |
1249 def MergeFrom(self, x): |
1205 assert x is not self |
1250 assert x is not self |
1206 if (x.has_index_writes()): self.set_index_writes(x.index_writes()) |
1251 if (x.has_index_writes()): self.set_index_writes(x.index_writes()) |
|
1252 if (x.has_index_write_bytes()): self.set_index_write_bytes(x.index_write_bytes()) |
|
1253 if (x.has_entity_writes()): self.set_entity_writes(x.entity_writes()) |
|
1254 if (x.has_entity_write_bytes()): self.set_entity_write_bytes(x.entity_write_bytes()) |
1207 |
1255 |
1208 def Equals(self, x): |
1256 def Equals(self, x): |
1209 if x is self: return 1 |
1257 if x is self: return 1 |
1210 if self.has_index_writes_ != x.has_index_writes_: return 0 |
1258 if self.has_index_writes_ != x.has_index_writes_: return 0 |
1211 if self.has_index_writes_ and self.index_writes_ != x.index_writes_: return 0 |
1259 if self.has_index_writes_ and self.index_writes_ != x.index_writes_: return 0 |
|
1260 if self.has_index_write_bytes_ != x.has_index_write_bytes_: return 0 |
|
1261 if self.has_index_write_bytes_ and self.index_write_bytes_ != x.index_write_bytes_: return 0 |
|
1262 if self.has_entity_writes_ != x.has_entity_writes_: return 0 |
|
1263 if self.has_entity_writes_ and self.entity_writes_ != x.entity_writes_: return 0 |
|
1264 if self.has_entity_write_bytes_ != x.has_entity_write_bytes_: return 0 |
|
1265 if self.has_entity_write_bytes_ and self.entity_write_bytes_ != x.entity_write_bytes_: return 0 |
1212 return 1 |
1266 return 1 |
1213 |
1267 |
1214 def IsInitialized(self, debug_strs=None): |
1268 def IsInitialized(self, debug_strs=None): |
1215 initialized = 1 |
1269 initialized = 1 |
1216 return initialized |
1270 return initialized |
1217 |
1271 |
1218 def ByteSize(self): |
1272 def ByteSize(self): |
1219 n = 0 |
1273 n = 0 |
1220 if (self.has_index_writes_): n += 1 + self.lengthVarInt64(self.index_writes_) |
1274 if (self.has_index_writes_): n += 1 + self.lengthVarInt64(self.index_writes_) |
|
1275 if (self.has_index_write_bytes_): n += 1 + self.lengthVarInt64(self.index_write_bytes_) |
|
1276 if (self.has_entity_writes_): n += 1 + self.lengthVarInt64(self.entity_writes_) |
|
1277 if (self.has_entity_write_bytes_): n += 1 + self.lengthVarInt64(self.entity_write_bytes_) |
1221 return n + 0 |
1278 return n + 0 |
1222 |
1279 |
1223 def Clear(self): |
1280 def Clear(self): |
1224 self.clear_index_writes() |
1281 self.clear_index_writes() |
|
1282 self.clear_index_write_bytes() |
|
1283 self.clear_entity_writes() |
|
1284 self.clear_entity_write_bytes() |
1225 |
1285 |
1226 def OutputUnchecked(self, out): |
1286 def OutputUnchecked(self, out): |
1227 if (self.has_index_writes_): |
1287 if (self.has_index_writes_): |
1228 out.putVarInt32(8) |
1288 out.putVarInt32(8) |
1229 out.putVarInt32(self.index_writes_) |
1289 out.putVarInt32(self.index_writes_) |
|
1290 if (self.has_index_write_bytes_): |
|
1291 out.putVarInt32(16) |
|
1292 out.putVarInt32(self.index_write_bytes_) |
|
1293 if (self.has_entity_writes_): |
|
1294 out.putVarInt32(24) |
|
1295 out.putVarInt32(self.entity_writes_) |
|
1296 if (self.has_entity_write_bytes_): |
|
1297 out.putVarInt32(32) |
|
1298 out.putVarInt32(self.entity_write_bytes_) |
1230 |
1299 |
1231 def TryMerge(self, d): |
1300 def TryMerge(self, d): |
1232 while d.avail() > 0: |
1301 while d.avail() > 0: |
1233 tt = d.getVarInt32() |
1302 tt = d.getVarInt32() |
1234 if tt == 8: |
1303 if tt == 8: |
1235 self.set_index_writes(d.getVarInt32()) |
1304 self.set_index_writes(d.getVarInt32()) |
1236 continue |
1305 continue |
|
1306 if tt == 16: |
|
1307 self.set_index_write_bytes(d.getVarInt32()) |
|
1308 continue |
|
1309 if tt == 24: |
|
1310 self.set_entity_writes(d.getVarInt32()) |
|
1311 continue |
|
1312 if tt == 32: |
|
1313 self.set_entity_write_bytes(d.getVarInt32()) |
|
1314 continue |
1237 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
1315 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
1238 d.skipData(tt) |
1316 d.skipData(tt) |
1239 |
1317 |
1240 |
1318 |
1241 def __str__(self, prefix="", printElemNumber=0): |
1319 def __str__(self, prefix="", printElemNumber=0): |
1242 res="" |
1320 res="" |
1243 if self.has_index_writes_: res+=prefix+("index_writes: %s\n" % self.DebugFormatInt32(self.index_writes_)) |
1321 if self.has_index_writes_: res+=prefix+("index_writes: %s\n" % self.DebugFormatInt32(self.index_writes_)) |
|
1322 if self.has_index_write_bytes_: res+=prefix+("index_write_bytes: %s\n" % self.DebugFormatInt32(self.index_write_bytes_)) |
|
1323 if self.has_entity_writes_: res+=prefix+("entity_writes: %s\n" % self.DebugFormatInt32(self.entity_writes_)) |
|
1324 if self.has_entity_write_bytes_: res+=prefix+("entity_write_bytes: %s\n" % self.DebugFormatInt32(self.entity_write_bytes_)) |
1244 return res |
1325 return res |
1245 |
1326 |
1246 kindex_writes = 1 |
1327 kindex_writes = 1 |
|
1328 kindex_write_bytes = 2 |
|
1329 kentity_writes = 3 |
|
1330 kentity_write_bytes = 4 |
1247 |
1331 |
1248 _TEXT = ( |
1332 _TEXT = ( |
1249 "ErrorCode", |
1333 "ErrorCode", |
1250 "index_writes", |
1334 "index_writes", |
|
1335 "index_write_bytes", |
|
1336 "entity_writes", |
|
1337 "entity_write_bytes", |
1251 ) |
1338 ) |
1252 |
1339 |
1253 _TYPES = ( |
1340 _TYPES = ( |
1254 ProtocolBuffer.Encoder.NUMERIC, |
1341 ProtocolBuffer.Encoder.NUMERIC, |
|
1342 ProtocolBuffer.Encoder.NUMERIC, |
|
1343 |
|
1344 ProtocolBuffer.Encoder.NUMERIC, |
|
1345 |
|
1346 ProtocolBuffer.Encoder.NUMERIC, |
|
1347 |
1255 ProtocolBuffer.Encoder.NUMERIC, |
1348 ProtocolBuffer.Encoder.NUMERIC, |
1256 |
1349 |
1257 ) |
1350 ) |
1258 |
1351 |
1259 _STYLE = """""" |
1352 _STYLE = """""" |