thirdparty/google_appengine/google/appengine/datastore/datastore_pb.py
changeset 1278 a7766286a7be
parent 828 f5fd65cc3bf3
child 2273 e4cb9c53db3e
equal deleted inserted replaced
1277:5c931bd3dc1e 1278:a7766286a7be
    42   def set_handle(self, x):
    42   def set_handle(self, x):
    43     self.has_handle_ = 1
    43     self.has_handle_ = 1
    44     self.handle_ = x
    44     self.handle_ = x
    45 
    45 
    46   def clear_handle(self):
    46   def clear_handle(self):
    47     self.has_handle_ = 0
    47     if self.has_handle_:
    48     self.handle_ = 0
    48       self.has_handle_ = 0
       
    49       self.handle_ = 0
    49 
    50 
    50   def has_handle(self): return self.has_handle_
    51   def has_handle(self): return self.has_handle_
    51 
    52 
    52 
    53 
    53   def MergeFrom(self, x):
    54   def MergeFrom(self, x):
   144   def set_op(self, x):
   145   def set_op(self, x):
   145     self.has_op_ = 1
   146     self.has_op_ = 1
   146     self.op_ = x
   147     self.op_ = x
   147 
   148 
   148   def clear_op(self):
   149   def clear_op(self):
   149     self.has_op_ = 0
   150     if self.has_op_:
   150     self.op_ = 0
   151       self.has_op_ = 0
       
   152       self.op_ = 0
   151 
   153 
   152   def has_op(self): return self.has_op_
   154   def has_op(self): return self.has_op_
   153 
   155 
   154   def property_size(self): return len(self.property_)
   156   def property_size(self): return len(self.property_)
   155   def property_list(self): return self.property_
   157   def property_list(self): return self.property_
   267   def set_property(self, x):
   269   def set_property(self, x):
   268     self.has_property_ = 1
   270     self.has_property_ = 1
   269     self.property_ = x
   271     self.property_ = x
   270 
   272 
   271   def clear_property(self):
   273   def clear_property(self):
   272     self.has_property_ = 0
   274     if self.has_property_:
   273     self.property_ = ""
   275       self.has_property_ = 0
       
   276       self.property_ = ""
   274 
   277 
   275   def has_property(self): return self.has_property_
   278   def has_property(self): return self.has_property_
   276 
   279 
   277   def direction(self): return self.direction_
   280   def direction(self): return self.direction_
   278 
   281 
   279   def set_direction(self, x):
   282   def set_direction(self, x):
   280     self.has_direction_ = 1
   283     self.has_direction_ = 1
   281     self.direction_ = x
   284     self.direction_ = x
   282 
   285 
   283   def clear_direction(self):
   286   def clear_direction(self):
   284     self.has_direction_ = 0
   287     if self.has_direction_:
   285     self.direction_ = 1
   288       self.has_direction_ = 0
       
   289       self.direction_ = 1
   286 
   290 
   287   def has_direction(self): return self.has_direction_
   291   def has_direction(self): return self.has_direction_
   288 
   292 
   289 
   293 
   290   def MergeFrom(self, x):
   294   def MergeFrom(self, x):
   389   def set_app(self, x):
   393   def set_app(self, x):
   390     self.has_app_ = 1
   394     self.has_app_ = 1
   391     self.app_ = x
   395     self.app_ = x
   392 
   396 
   393   def clear_app(self):
   397   def clear_app(self):
   394     self.has_app_ = 0
   398     if self.has_app_:
   395     self.app_ = ""
   399       self.has_app_ = 0
       
   400       self.app_ = ""
   396 
   401 
   397   def has_app(self): return self.has_app_
   402   def has_app(self): return self.has_app_
   398 
   403 
   399   def kind(self): return self.kind_
   404   def kind(self): return self.kind_
   400 
   405 
   401   def set_kind(self, x):
   406   def set_kind(self, x):
   402     self.has_kind_ = 1
   407     self.has_kind_ = 1
   403     self.kind_ = x
   408     self.kind_ = x
   404 
   409 
   405   def clear_kind(self):
   410   def clear_kind(self):
   406     self.has_kind_ = 0
   411     if self.has_kind_:
   407     self.kind_ = ""
   412       self.has_kind_ = 0
       
   413       self.kind_ = ""
   408 
   414 
   409   def has_kind(self): return self.has_kind_
   415   def has_kind(self): return self.has_kind_
   410 
   416 
   411   def ancestor(self):
   417   def ancestor(self):
   412     if self.ancestor_ is None:
   418     if self.ancestor_ is None:
   418     return self.ancestor_
   424     return self.ancestor_
   419 
   425 
   420   def mutable_ancestor(self): self.has_ancestor_ = 1; return self.ancestor()
   426   def mutable_ancestor(self): self.has_ancestor_ = 1; return self.ancestor()
   421 
   427 
   422   def clear_ancestor(self):
   428   def clear_ancestor(self):
   423     self.has_ancestor_ = 0;
   429     if self.has_ancestor_:
   424     if self.ancestor_ is not None: self.ancestor_.Clear()
   430       self.has_ancestor_ = 0;
       
   431       if self.ancestor_ is not None: self.ancestor_.Clear()
   425 
   432 
   426   def has_ancestor(self): return self.has_ancestor_
   433   def has_ancestor(self): return self.has_ancestor_
   427 
   434 
   428   def filter_size(self): return len(self.filter_)
   435   def filter_size(self): return len(self.filter_)
   429   def filter_list(self): return self.filter_
   436   def filter_list(self): return self.filter_
   446   def set_search_query(self, x):
   453   def set_search_query(self, x):
   447     self.has_search_query_ = 1
   454     self.has_search_query_ = 1
   448     self.search_query_ = x
   455     self.search_query_ = x
   449 
   456 
   450   def clear_search_query(self):
   457   def clear_search_query(self):
   451     self.has_search_query_ = 0
   458     if self.has_search_query_:
   452     self.search_query_ = ""
   459       self.has_search_query_ = 0
       
   460       self.search_query_ = ""
   453 
   461 
   454   def has_search_query(self): return self.has_search_query_
   462   def has_search_query(self): return self.has_search_query_
   455 
   463 
   456   def order_size(self): return len(self.order_)
   464   def order_size(self): return len(self.order_)
   457   def order_list(self): return self.order_
   465   def order_list(self): return self.order_
   474   def set_hint(self, x):
   482   def set_hint(self, x):
   475     self.has_hint_ = 1
   483     self.has_hint_ = 1
   476     self.hint_ = x
   484     self.hint_ = x
   477 
   485 
   478   def clear_hint(self):
   486   def clear_hint(self):
   479     self.has_hint_ = 0
   487     if self.has_hint_:
   480     self.hint_ = 0
   488       self.has_hint_ = 0
       
   489       self.hint_ = 0
   481 
   490 
   482   def has_hint(self): return self.has_hint_
   491   def has_hint(self): return self.has_hint_
   483 
   492 
   484   def offset(self): return self.offset_
   493   def offset(self): return self.offset_
   485 
   494 
   486   def set_offset(self, x):
   495   def set_offset(self, x):
   487     self.has_offset_ = 1
   496     self.has_offset_ = 1
   488     self.offset_ = x
   497     self.offset_ = x
   489 
   498 
   490   def clear_offset(self):
   499   def clear_offset(self):
   491     self.has_offset_ = 0
   500     if self.has_offset_:
   492     self.offset_ = 0
   501       self.has_offset_ = 0
       
   502       self.offset_ = 0
   493 
   503 
   494   def has_offset(self): return self.has_offset_
   504   def has_offset(self): return self.has_offset_
   495 
   505 
   496   def limit(self): return self.limit_
   506   def limit(self): return self.limit_
   497 
   507 
   498   def set_limit(self, x):
   508   def set_limit(self, x):
   499     self.has_limit_ = 1
   509     self.has_limit_ = 1
   500     self.limit_ = x
   510     self.limit_ = x
   501 
   511 
   502   def clear_limit(self):
   512   def clear_limit(self):
   503     self.has_limit_ = 0
   513     if self.has_limit_:
   504     self.limit_ = 0
   514       self.has_limit_ = 0
       
   515       self.limit_ = 0
   505 
   516 
   506   def has_limit(self): return self.has_limit_
   517   def has_limit(self): return self.has_limit_
   507 
   518 
   508   def composite_index_size(self): return len(self.composite_index_)
   519   def composite_index_size(self): return len(self.composite_index_)
   509   def composite_index_list(self): return self.composite_index_
   520   def composite_index_list(self): return self.composite_index_
   526   def set_require_perfect_plan(self, x):
   537   def set_require_perfect_plan(self, x):
   527     self.has_require_perfect_plan_ = 1
   538     self.has_require_perfect_plan_ = 1
   528     self.require_perfect_plan_ = x
   539     self.require_perfect_plan_ = x
   529 
   540 
   530   def clear_require_perfect_plan(self):
   541   def clear_require_perfect_plan(self):
   531     self.has_require_perfect_plan_ = 0
   542     if self.has_require_perfect_plan_:
   532     self.require_perfect_plan_ = 0
   543       self.has_require_perfect_plan_ = 0
       
   544       self.require_perfect_plan_ = 0
   533 
   545 
   534   def has_require_perfect_plan(self): return self.has_require_perfect_plan_
   546   def has_require_perfect_plan(self): return self.has_require_perfect_plan_
   535 
   547 
   536 
   548 
   537   def MergeFrom(self, x):
   549   def MergeFrom(self, x):
   849   def set_native_ancestor(self, x):
   861   def set_native_ancestor(self, x):
   850     self.has_native_ancestor_ = 1
   862     self.has_native_ancestor_ = 1
   851     self.native_ancestor_ = x
   863     self.native_ancestor_ = x
   852 
   864 
   853   def clear_native_ancestor(self):
   865   def clear_native_ancestor(self):
   854     self.has_native_ancestor_ = 0
   866     if self.has_native_ancestor_:
   855     self.native_ancestor_ = 0
   867       self.has_native_ancestor_ = 0
       
   868       self.native_ancestor_ = 0
   856 
   869 
   857   def has_native_ancestor(self): return self.has_native_ancestor_
   870   def has_native_ancestor(self): return self.has_native_ancestor_
   858 
   871 
   859   def native_index_size(self): return len(self.native_index_)
   872   def native_index_size(self): return len(self.native_index_)
   860   def native_index_list(self): return self.native_index_
   873   def native_index_list(self): return self.native_index_
   877   def set_native_offset(self, x):
   890   def set_native_offset(self, x):
   878     self.has_native_offset_ = 1
   891     self.has_native_offset_ = 1
   879     self.native_offset_ = x
   892     self.native_offset_ = x
   880 
   893 
   881   def clear_native_offset(self):
   894   def clear_native_offset(self):
   882     self.has_native_offset_ = 0
   895     if self.has_native_offset_:
   883     self.native_offset_ = 0
   896       self.has_native_offset_ = 0
       
   897       self.native_offset_ = 0
   884 
   898 
   885   def has_native_offset(self): return self.has_native_offset_
   899   def has_native_offset(self): return self.has_native_offset_
   886 
   900 
   887   def native_limit(self): return self.native_limit_
   901   def native_limit(self): return self.native_limit_
   888 
   902 
   889   def set_native_limit(self, x):
   903   def set_native_limit(self, x):
   890     self.has_native_limit_ = 1
   904     self.has_native_limit_ = 1
   891     self.native_limit_ = x
   905     self.native_limit_ = x
   892 
   906 
   893   def clear_native_limit(self):
   907   def clear_native_limit(self):
   894     self.has_native_limit_ = 0
   908     if self.has_native_limit_:
   895     self.native_limit_ = 0
   909       self.has_native_limit_ = 0
       
   910       self.native_limit_ = 0
   896 
   911 
   897   def has_native_limit(self): return self.has_native_limit_
   912   def has_native_limit(self): return self.has_native_limit_
   898 
   913 
   899 
   914 
   900   def MergeFrom(self, x):
   915   def MergeFrom(self, x):
  1029   def set_cursor(self, x):
  1044   def set_cursor(self, x):
  1030     self.has_cursor_ = 1
  1045     self.has_cursor_ = 1
  1031     self.cursor_ = x
  1046     self.cursor_ = x
  1032 
  1047 
  1033   def clear_cursor(self):
  1048   def clear_cursor(self):
  1034     self.has_cursor_ = 0
  1049     if self.has_cursor_:
  1035     self.cursor_ = 0
  1050       self.has_cursor_ = 0
       
  1051       self.cursor_ = 0
  1036 
  1052 
  1037   def has_cursor(self): return self.has_cursor_
  1053   def has_cursor(self): return self.has_cursor_
  1038 
  1054 
  1039 
  1055 
  1040   def MergeFrom(self, x):
  1056   def MergeFrom(self, x):
  1176   def set_index_writes(self, x):
  1192   def set_index_writes(self, x):
  1177     self.has_index_writes_ = 1
  1193     self.has_index_writes_ = 1
  1178     self.index_writes_ = x
  1194     self.index_writes_ = x
  1179 
  1195 
  1180   def clear_index_writes(self):
  1196   def clear_index_writes(self):
  1181     self.has_index_writes_ = 0
  1197     if self.has_index_writes_:
  1182     self.index_writes_ = 0
  1198       self.has_index_writes_ = 0
       
  1199       self.index_writes_ = 0
  1183 
  1200 
  1184   def has_index_writes(self): return self.has_index_writes_
  1201   def has_index_writes(self): return self.has_index_writes_
  1185 
  1202 
  1186 
  1203 
  1187   def MergeFrom(self, x):
  1204   def MergeFrom(self, x):
  1276     return self.transaction_
  1293     return self.transaction_
  1277 
  1294 
  1278   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1295   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1279 
  1296 
  1280   def clear_transaction(self):
  1297   def clear_transaction(self):
  1281     self.has_transaction_ = 0;
  1298     if self.has_transaction_:
  1282     if self.transaction_ is not None: self.transaction_.Clear()
  1299       self.has_transaction_ = 0;
       
  1300       if self.transaction_ is not None: self.transaction_.Clear()
  1283 
  1301 
  1284   def has_transaction(self): return self.has_transaction_
  1302   def has_transaction(self): return self.has_transaction_
  1285 
  1303 
  1286 
  1304 
  1287   def MergeFrom(self, x):
  1305   def MergeFrom(self, x):
  1398     return self.entity_
  1416     return self.entity_
  1399 
  1417 
  1400   def mutable_entity(self): self.has_entity_ = 1; return self.entity()
  1418   def mutable_entity(self): self.has_entity_ = 1; return self.entity()
  1401 
  1419 
  1402   def clear_entity(self):
  1420   def clear_entity(self):
  1403     self.has_entity_ = 0;
  1421     if self.has_entity_:
  1404     if self.entity_ is not None: self.entity_.Clear()
  1422       self.has_entity_ = 0;
       
  1423       if self.entity_ is not None: self.entity_.Clear()
  1405 
  1424 
  1406   def has_entity(self): return self.has_entity_
  1425   def has_entity(self): return self.has_entity_
  1407 
  1426 
  1408 
  1427 
  1409   def MergeFrom(self, x):
  1428   def MergeFrom(self, x):
  1554   _STYLE = """"""
  1573   _STYLE = """"""
  1555   _STYLE_CONTENT_TYPE = """"""
  1574   _STYLE_CONTENT_TYPE = """"""
  1556 class PutRequest(ProtocolBuffer.ProtocolMessage):
  1575 class PutRequest(ProtocolBuffer.ProtocolMessage):
  1557   has_transaction_ = 0
  1576   has_transaction_ = 0
  1558   transaction_ = None
  1577   transaction_ = None
       
  1578   has_trusted_ = 0
       
  1579   trusted_ = 0
  1559 
  1580 
  1560   def __init__(self, contents=None):
  1581   def __init__(self, contents=None):
  1561     self.entity_ = []
  1582     self.entity_ = []
  1562     self.composite_index_ = []
  1583     self.composite_index_ = []
  1563     self.lazy_init_lock_ = thread.allocate_lock()
  1584     self.lazy_init_lock_ = thread.allocate_lock()
  1589     return self.transaction_
  1610     return self.transaction_
  1590 
  1611 
  1591   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1612   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1592 
  1613 
  1593   def clear_transaction(self):
  1614   def clear_transaction(self):
  1594     self.has_transaction_ = 0;
  1615     if self.has_transaction_:
  1595     if self.transaction_ is not None: self.transaction_.Clear()
  1616       self.has_transaction_ = 0;
       
  1617       if self.transaction_ is not None: self.transaction_.Clear()
  1596 
  1618 
  1597   def has_transaction(self): return self.has_transaction_
  1619   def has_transaction(self): return self.has_transaction_
  1598 
  1620 
  1599   def composite_index_size(self): return len(self.composite_index_)
  1621   def composite_index_size(self): return len(self.composite_index_)
  1600   def composite_index_list(self): return self.composite_index_
  1622   def composite_index_list(self): return self.composite_index_
  1610     self.composite_index_.append(x)
  1632     self.composite_index_.append(x)
  1611     return x
  1633     return x
  1612 
  1634 
  1613   def clear_composite_index(self):
  1635   def clear_composite_index(self):
  1614     self.composite_index_ = []
  1636     self.composite_index_ = []
       
  1637   def trusted(self): return self.trusted_
       
  1638 
       
  1639   def set_trusted(self, x):
       
  1640     self.has_trusted_ = 1
       
  1641     self.trusted_ = x
       
  1642 
       
  1643   def clear_trusted(self):
       
  1644     if self.has_trusted_:
       
  1645       self.has_trusted_ = 0
       
  1646       self.trusted_ = 0
       
  1647 
       
  1648   def has_trusted(self): return self.has_trusted_
       
  1649 
  1615 
  1650 
  1616   def MergeFrom(self, x):
  1651   def MergeFrom(self, x):
  1617     assert x is not self
  1652     assert x is not self
  1618     for i in xrange(x.entity_size()): self.add_entity().CopyFrom(x.entity(i))
  1653     for i in xrange(x.entity_size()): self.add_entity().CopyFrom(x.entity(i))
  1619     if (x.has_transaction()): self.mutable_transaction().MergeFrom(x.transaction())
  1654     if (x.has_transaction()): self.mutable_transaction().MergeFrom(x.transaction())
  1620     for i in xrange(x.composite_index_size()): self.add_composite_index().CopyFrom(x.composite_index(i))
  1655     for i in xrange(x.composite_index_size()): self.add_composite_index().CopyFrom(x.composite_index(i))
       
  1656     if (x.has_trusted()): self.set_trusted(x.trusted())
  1621 
  1657 
  1622   def Equals(self, x):
  1658   def Equals(self, x):
  1623     if x is self: return 1
  1659     if x is self: return 1
  1624     if len(self.entity_) != len(x.entity_): return 0
  1660     if len(self.entity_) != len(x.entity_): return 0
  1625     for e1, e2 in zip(self.entity_, x.entity_):
  1661     for e1, e2 in zip(self.entity_, x.entity_):
  1627     if self.has_transaction_ != x.has_transaction_: return 0
  1663     if self.has_transaction_ != x.has_transaction_: return 0
  1628     if self.has_transaction_ and self.transaction_ != x.transaction_: return 0
  1664     if self.has_transaction_ and self.transaction_ != x.transaction_: return 0
  1629     if len(self.composite_index_) != len(x.composite_index_): return 0
  1665     if len(self.composite_index_) != len(x.composite_index_): return 0
  1630     for e1, e2 in zip(self.composite_index_, x.composite_index_):
  1666     for e1, e2 in zip(self.composite_index_, x.composite_index_):
  1631       if e1 != e2: return 0
  1667       if e1 != e2: return 0
       
  1668     if self.has_trusted_ != x.has_trusted_: return 0
       
  1669     if self.has_trusted_ and self.trusted_ != x.trusted_: return 0
  1632     return 1
  1670     return 1
  1633 
  1671 
  1634   def IsInitialized(self, debug_strs=None):
  1672   def IsInitialized(self, debug_strs=None):
  1635     initialized = 1
  1673     initialized = 1
  1636     for p in self.entity_:
  1674     for p in self.entity_:
  1645     n += 1 * len(self.entity_)
  1683     n += 1 * len(self.entity_)
  1646     for i in xrange(len(self.entity_)): n += self.lengthString(self.entity_[i].ByteSize())
  1684     for i in xrange(len(self.entity_)): n += self.lengthString(self.entity_[i].ByteSize())
  1647     if (self.has_transaction_): n += 1 + self.lengthString(self.transaction_.ByteSize())
  1685     if (self.has_transaction_): n += 1 + self.lengthString(self.transaction_.ByteSize())
  1648     n += 1 * len(self.composite_index_)
  1686     n += 1 * len(self.composite_index_)
  1649     for i in xrange(len(self.composite_index_)): n += self.lengthString(self.composite_index_[i].ByteSize())
  1687     for i in xrange(len(self.composite_index_)): n += self.lengthString(self.composite_index_[i].ByteSize())
       
  1688     if (self.has_trusted_): n += 2
  1650     return n + 0
  1689     return n + 0
  1651 
  1690 
  1652   def Clear(self):
  1691   def Clear(self):
  1653     self.clear_entity()
  1692     self.clear_entity()
  1654     self.clear_transaction()
  1693     self.clear_transaction()
  1655     self.clear_composite_index()
  1694     self.clear_composite_index()
       
  1695     self.clear_trusted()
  1656 
  1696 
  1657   def OutputUnchecked(self, out):
  1697   def OutputUnchecked(self, out):
  1658     for i in xrange(len(self.entity_)):
  1698     for i in xrange(len(self.entity_)):
  1659       out.putVarInt32(10)
  1699       out.putVarInt32(10)
  1660       out.putVarInt32(self.entity_[i].ByteSize())
  1700       out.putVarInt32(self.entity_[i].ByteSize())
  1665       self.transaction_.OutputUnchecked(out)
  1705       self.transaction_.OutputUnchecked(out)
  1666     for i in xrange(len(self.composite_index_)):
  1706     for i in xrange(len(self.composite_index_)):
  1667       out.putVarInt32(26)
  1707       out.putVarInt32(26)
  1668       out.putVarInt32(self.composite_index_[i].ByteSize())
  1708       out.putVarInt32(self.composite_index_[i].ByteSize())
  1669       self.composite_index_[i].OutputUnchecked(out)
  1709       self.composite_index_[i].OutputUnchecked(out)
       
  1710     if (self.has_trusted_):
       
  1711       out.putVarInt32(32)
       
  1712       out.putBoolean(self.trusted_)
  1670 
  1713 
  1671   def TryMerge(self, d):
  1714   def TryMerge(self, d):
  1672     while d.avail() > 0:
  1715     while d.avail() > 0:
  1673       tt = d.getVarInt32()
  1716       tt = d.getVarInt32()
  1674       if tt == 10:
  1717       if tt == 10:
  1686       if tt == 26:
  1729       if tt == 26:
  1687         length = d.getVarInt32()
  1730         length = d.getVarInt32()
  1688         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
  1731         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
  1689         d.skip(length)
  1732         d.skip(length)
  1690         self.add_composite_index().TryMerge(tmp)
  1733         self.add_composite_index().TryMerge(tmp)
       
  1734         continue
       
  1735       if tt == 32:
       
  1736         self.set_trusted(d.getBoolean())
  1691         continue
  1737         continue
  1692       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
  1738       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
  1693       d.skipData(tt)
  1739       d.skipData(tt)
  1694 
  1740 
  1695 
  1741 
  1713       if printElemNumber: elm="(%d)" % cnt
  1759       if printElemNumber: elm="(%d)" % cnt
  1714       res+=prefix+("composite_index%s <\n" % elm)
  1760       res+=prefix+("composite_index%s <\n" % elm)
  1715       res+=e.__str__(prefix + "  ", printElemNumber)
  1761       res+=e.__str__(prefix + "  ", printElemNumber)
  1716       res+=prefix+">\n"
  1762       res+=prefix+">\n"
  1717       cnt+=1
  1763       cnt+=1
       
  1764     if self.has_trusted_: res+=prefix+("trusted: %s\n" % self.DebugFormatBool(self.trusted_))
  1718     return res
  1765     return res
  1719 
  1766 
  1720   kentity = 1
  1767   kentity = 1
  1721   ktransaction = 2
  1768   ktransaction = 2
  1722   kcomposite_index = 3
  1769   kcomposite_index = 3
       
  1770   ktrusted = 4
  1723 
  1771 
  1724   _TEXT = (
  1772   _TEXT = (
  1725    "ErrorCode",
  1773    "ErrorCode",
  1726    "entity",
  1774    "entity",
  1727    "transaction",
  1775    "transaction",
  1728    "composite_index",
  1776    "composite_index",
       
  1777    "trusted",
  1729   )
  1778   )
  1730 
  1779 
  1731   _TYPES = (
  1780   _TYPES = (
  1732    ProtocolBuffer.Encoder.NUMERIC,
  1781    ProtocolBuffer.Encoder.NUMERIC,
  1733    ProtocolBuffer.Encoder.STRING,
  1782    ProtocolBuffer.Encoder.STRING,
  1734 
  1783 
  1735    ProtocolBuffer.Encoder.STRING,
  1784    ProtocolBuffer.Encoder.STRING,
  1736 
  1785 
  1737    ProtocolBuffer.Encoder.STRING,
  1786    ProtocolBuffer.Encoder.STRING,
       
  1787 
       
  1788    ProtocolBuffer.Encoder.NUMERIC,
  1738 
  1789 
  1739   )
  1790   )
  1740 
  1791 
  1741   _STYLE = """"""
  1792   _STYLE = """"""
  1742   _STYLE_CONTENT_TYPE = """"""
  1793   _STYLE_CONTENT_TYPE = """"""
  1775     return self.cost_
  1826     return self.cost_
  1776 
  1827 
  1777   def mutable_cost(self): self.has_cost_ = 1; return self.cost()
  1828   def mutable_cost(self): self.has_cost_ = 1; return self.cost()
  1778 
  1829 
  1779   def clear_cost(self):
  1830   def clear_cost(self):
  1780     self.has_cost_ = 0;
  1831     if self.has_cost_:
  1781     if self.cost_ is not None: self.cost_.Clear()
  1832       self.has_cost_ = 0;
       
  1833       if self.cost_ is not None: self.cost_.Clear()
  1782 
  1834 
  1783   def has_cost(self): return self.has_cost_
  1835   def has_cost(self): return self.has_cost_
  1784 
  1836 
  1785 
  1837 
  1786   def MergeFrom(self, x):
  1838   def MergeFrom(self, x):
  1880   _STYLE = """"""
  1932   _STYLE = """"""
  1881   _STYLE_CONTENT_TYPE = """"""
  1933   _STYLE_CONTENT_TYPE = """"""
  1882 class DeleteRequest(ProtocolBuffer.ProtocolMessage):
  1934 class DeleteRequest(ProtocolBuffer.ProtocolMessage):
  1883   has_transaction_ = 0
  1935   has_transaction_ = 0
  1884   transaction_ = None
  1936   transaction_ = None
       
  1937   has_trusted_ = 0
       
  1938   trusted_ = 0
  1885 
  1939 
  1886   def __init__(self, contents=None):
  1940   def __init__(self, contents=None):
  1887     self.key_ = []
  1941     self.key_ = []
  1888     self.lazy_init_lock_ = thread.allocate_lock()
  1942     self.lazy_init_lock_ = thread.allocate_lock()
  1889     if contents is not None: self.MergeFromString(contents)
  1943     if contents is not None: self.MergeFromString(contents)
  1914     return self.transaction_
  1968     return self.transaction_
  1915 
  1969 
  1916   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1970   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
  1917 
  1971 
  1918   def clear_transaction(self):
  1972   def clear_transaction(self):
  1919     self.has_transaction_ = 0;
  1973     if self.has_transaction_:
  1920     if self.transaction_ is not None: self.transaction_.Clear()
  1974       self.has_transaction_ = 0;
       
  1975       if self.transaction_ is not None: self.transaction_.Clear()
  1921 
  1976 
  1922   def has_transaction(self): return self.has_transaction_
  1977   def has_transaction(self): return self.has_transaction_
       
  1978 
       
  1979   def trusted(self): return self.trusted_
       
  1980 
       
  1981   def set_trusted(self, x):
       
  1982     self.has_trusted_ = 1
       
  1983     self.trusted_ = x
       
  1984 
       
  1985   def clear_trusted(self):
       
  1986     if self.has_trusted_:
       
  1987       self.has_trusted_ = 0
       
  1988       self.trusted_ = 0
       
  1989 
       
  1990   def has_trusted(self): return self.has_trusted_
  1923 
  1991 
  1924 
  1992 
  1925   def MergeFrom(self, x):
  1993   def MergeFrom(self, x):
  1926     assert x is not self
  1994     assert x is not self
  1927     for i in xrange(x.key_size()): self.add_key().CopyFrom(x.key(i))
  1995     for i in xrange(x.key_size()): self.add_key().CopyFrom(x.key(i))
  1928     if (x.has_transaction()): self.mutable_transaction().MergeFrom(x.transaction())
  1996     if (x.has_transaction()): self.mutable_transaction().MergeFrom(x.transaction())
       
  1997     if (x.has_trusted()): self.set_trusted(x.trusted())
  1929 
  1998 
  1930   def Equals(self, x):
  1999   def Equals(self, x):
  1931     if x is self: return 1
  2000     if x is self: return 1
  1932     if len(self.key_) != len(x.key_): return 0
  2001     if len(self.key_) != len(x.key_): return 0
  1933     for e1, e2 in zip(self.key_, x.key_):
  2002     for e1, e2 in zip(self.key_, x.key_):
  1934       if e1 != e2: return 0
  2003       if e1 != e2: return 0
  1935     if self.has_transaction_ != x.has_transaction_: return 0
  2004     if self.has_transaction_ != x.has_transaction_: return 0
  1936     if self.has_transaction_ and self.transaction_ != x.transaction_: return 0
  2005     if self.has_transaction_ and self.transaction_ != x.transaction_: return 0
       
  2006     if self.has_trusted_ != x.has_trusted_: return 0
       
  2007     if self.has_trusted_ and self.trusted_ != x.trusted_: return 0
  1937     return 1
  2008     return 1
  1938 
  2009 
  1939   def IsInitialized(self, debug_strs=None):
  2010   def IsInitialized(self, debug_strs=None):
  1940     initialized = 1
  2011     initialized = 1
  1941     for p in self.key_:
  2012     for p in self.key_:
  1946   def ByteSize(self):
  2017   def ByteSize(self):
  1947     n = 0
  2018     n = 0
  1948     n += 1 * len(self.key_)
  2019     n += 1 * len(self.key_)
  1949     for i in xrange(len(self.key_)): n += self.lengthString(self.key_[i].ByteSize())
  2020     for i in xrange(len(self.key_)): n += self.lengthString(self.key_[i].ByteSize())
  1950     if (self.has_transaction_): n += 1 + self.lengthString(self.transaction_.ByteSize())
  2021     if (self.has_transaction_): n += 1 + self.lengthString(self.transaction_.ByteSize())
       
  2022     if (self.has_trusted_): n += 2
  1951     return n + 0
  2023     return n + 0
  1952 
  2024 
  1953   def Clear(self):
  2025   def Clear(self):
  1954     self.clear_key()
  2026     self.clear_key()
  1955     self.clear_transaction()
  2027     self.clear_transaction()
       
  2028     self.clear_trusted()
  1956 
  2029 
  1957   def OutputUnchecked(self, out):
  2030   def OutputUnchecked(self, out):
       
  2031     if (self.has_trusted_):
       
  2032       out.putVarInt32(32)
       
  2033       out.putBoolean(self.trusted_)
  1958     if (self.has_transaction_):
  2034     if (self.has_transaction_):
  1959       out.putVarInt32(42)
  2035       out.putVarInt32(42)
  1960       out.putVarInt32(self.transaction_.ByteSize())
  2036       out.putVarInt32(self.transaction_.ByteSize())
  1961       self.transaction_.OutputUnchecked(out)
  2037       self.transaction_.OutputUnchecked(out)
  1962     for i in xrange(len(self.key_)):
  2038     for i in xrange(len(self.key_)):
  1965       self.key_[i].OutputUnchecked(out)
  2041       self.key_[i].OutputUnchecked(out)
  1966 
  2042 
  1967   def TryMerge(self, d):
  2043   def TryMerge(self, d):
  1968     while d.avail() > 0:
  2044     while d.avail() > 0:
  1969       tt = d.getVarInt32()
  2045       tt = d.getVarInt32()
       
  2046       if tt == 32:
       
  2047         self.set_trusted(d.getBoolean())
       
  2048         continue
  1970       if tt == 42:
  2049       if tt == 42:
  1971         length = d.getVarInt32()
  2050         length = d.getVarInt32()
  1972         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
  2051         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
  1973         d.skip(length)
  2052         d.skip(length)
  1974         self.mutable_transaction().TryMerge(tmp)
  2053         self.mutable_transaction().TryMerge(tmp)
  1995       cnt+=1
  2074       cnt+=1
  1996     if self.has_transaction_:
  2075     if self.has_transaction_:
  1997       res+=prefix+"transaction <\n"
  2076       res+=prefix+"transaction <\n"
  1998       res+=self.transaction_.__str__(prefix + "  ", printElemNumber)
  2077       res+=self.transaction_.__str__(prefix + "  ", printElemNumber)
  1999       res+=prefix+">\n"
  2078       res+=prefix+">\n"
       
  2079     if self.has_trusted_: res+=prefix+("trusted: %s\n" % self.DebugFormatBool(self.trusted_))
  2000     return res
  2080     return res
  2001 
  2081 
  2002   kkey = 6
  2082   kkey = 6
  2003   ktransaction = 5
  2083   ktransaction = 5
       
  2084   ktrusted = 4
  2004 
  2085 
  2005   _TEXT = (
  2086   _TEXT = (
  2006    "ErrorCode",
  2087    "ErrorCode",
  2007    None,
  2088    None,
  2008    None,
  2089    None,
  2009    None,
  2090    None,
  2010    None,
  2091    "trusted",
  2011    "transaction",
  2092    "transaction",
  2012    "key",
  2093    "key",
  2013   )
  2094   )
  2014 
  2095 
  2015   _TYPES = (
  2096   _TYPES = (
  2018 
  2099 
  2019    ProtocolBuffer.Encoder.MAX_TYPE,
  2100    ProtocolBuffer.Encoder.MAX_TYPE,
  2020 
  2101 
  2021    ProtocolBuffer.Encoder.MAX_TYPE,
  2102    ProtocolBuffer.Encoder.MAX_TYPE,
  2022 
  2103 
  2023    ProtocolBuffer.Encoder.MAX_TYPE,
  2104    ProtocolBuffer.Encoder.NUMERIC,
  2024 
  2105 
  2025    ProtocolBuffer.Encoder.STRING,
  2106    ProtocolBuffer.Encoder.STRING,
  2026 
  2107 
  2027    ProtocolBuffer.Encoder.STRING,
  2108    ProtocolBuffer.Encoder.STRING,
  2028 
  2109 
  2048     return self.cost_
  2129     return self.cost_
  2049 
  2130 
  2050   def mutable_cost(self): self.has_cost_ = 1; return self.cost()
  2131   def mutable_cost(self): self.has_cost_ = 1; return self.cost()
  2051 
  2132 
  2052   def clear_cost(self):
  2133   def clear_cost(self):
  2053     self.has_cost_ = 0;
  2134     if self.has_cost_:
  2054     if self.cost_ is not None: self.cost_.Clear()
  2135       self.has_cost_ = 0;
       
  2136       if self.cost_ is not None: self.cost_.Clear()
  2055 
  2137 
  2056   def has_cost(self): return self.has_cost_
  2138   def has_cost(self): return self.has_cost_
  2057 
  2139 
  2058 
  2140 
  2059   def MergeFrom(self, x):
  2141   def MergeFrom(self, x):
  2143   def set_count(self, x):
  2225   def set_count(self, x):
  2144     self.has_count_ = 1
  2226     self.has_count_ = 1
  2145     self.count_ = x
  2227     self.count_ = x
  2146 
  2228 
  2147   def clear_count(self):
  2229   def clear_count(self):
  2148     self.has_count_ = 0
  2230     if self.has_count_:
  2149     self.count_ = 1
  2231       self.has_count_ = 0
       
  2232       self.count_ = 1
  2150 
  2233 
  2151   def has_count(self): return self.has_count_
  2234   def has_count(self): return self.has_count_
  2152 
  2235 
  2153 
  2236 
  2154   def MergeFrom(self, x):
  2237   def MergeFrom(self, x):
  2256     return self.cursor_
  2339     return self.cursor_
  2257 
  2340 
  2258   def mutable_cursor(self): self.has_cursor_ = 1; return self.cursor()
  2341   def mutable_cursor(self): self.has_cursor_ = 1; return self.cursor()
  2259 
  2342 
  2260   def clear_cursor(self):
  2343   def clear_cursor(self):
  2261     self.has_cursor_ = 0;
  2344     if self.has_cursor_:
  2262     if self.cursor_ is not None: self.cursor_.Clear()
  2345       self.has_cursor_ = 0;
       
  2346       if self.cursor_ is not None: self.cursor_.Clear()
  2263 
  2347 
  2264   def has_cursor(self): return self.has_cursor_
  2348   def has_cursor(self): return self.has_cursor_
  2265 
  2349 
  2266   def result_size(self): return len(self.result_)
  2350   def result_size(self): return len(self.result_)
  2267   def result_list(self): return self.result_
  2351   def result_list(self): return self.result_
  2284   def set_more_results(self, x):
  2368   def set_more_results(self, x):
  2285     self.has_more_results_ = 1
  2369     self.has_more_results_ = 1
  2286     self.more_results_ = x
  2370     self.more_results_ = x
  2287 
  2371 
  2288   def clear_more_results(self):
  2372   def clear_more_results(self):
  2289     self.has_more_results_ = 0
  2373     if self.has_more_results_:
  2290     self.more_results_ = 0
  2374       self.has_more_results_ = 0
       
  2375       self.more_results_ = 0
  2291 
  2376 
  2292   def has_more_results(self): return self.has_more_results_
  2377   def has_more_results(self): return self.has_more_results_
  2293 
  2378 
  2294 
  2379 
  2295   def MergeFrom(self, x):
  2380   def MergeFrom(self, x):
  2594 
  2679 
  2595   )
  2680   )
  2596 
  2681 
  2597   _STYLE = """"""
  2682   _STYLE = """"""
  2598   _STYLE_CONTENT_TYPE = """"""
  2683   _STYLE_CONTENT_TYPE = """"""
  2599 
  2684 class CommitResponse(ProtocolBuffer.ProtocolMessage):
  2600 __all__ = ['Transaction','Query','Query_Filter','Query_Order','QueryExplanation','Cursor','Error','Cost','GetRequest','GetResponse','GetResponse_Entity','PutRequest','PutResponse','DeleteRequest','DeleteResponse','NextRequest','QueryResult','Schema','CompositeIndices']
  2685   has_cost_ = 0
       
  2686   cost_ = None
       
  2687 
       
  2688   def __init__(self, contents=None):
       
  2689     self.lazy_init_lock_ = thread.allocate_lock()
       
  2690     if contents is not None: self.MergeFromString(contents)
       
  2691 
       
  2692   def cost(self):
       
  2693     if self.cost_ is None:
       
  2694       self.lazy_init_lock_.acquire()
       
  2695       try:
       
  2696         if self.cost_ is None: self.cost_ = Cost()
       
  2697       finally:
       
  2698         self.lazy_init_lock_.release()
       
  2699     return self.cost_
       
  2700 
       
  2701   def mutable_cost(self): self.has_cost_ = 1; return self.cost()
       
  2702 
       
  2703   def clear_cost(self):
       
  2704     if self.has_cost_:
       
  2705       self.has_cost_ = 0;
       
  2706       if self.cost_ is not None: self.cost_.Clear()
       
  2707 
       
  2708   def has_cost(self): return self.has_cost_
       
  2709 
       
  2710 
       
  2711   def MergeFrom(self, x):
       
  2712     assert x is not self
       
  2713     if (x.has_cost()): self.mutable_cost().MergeFrom(x.cost())
       
  2714 
       
  2715   def Equals(self, x):
       
  2716     if x is self: return 1
       
  2717     if self.has_cost_ != x.has_cost_: return 0
       
  2718     if self.has_cost_ and self.cost_ != x.cost_: return 0
       
  2719     return 1
       
  2720 
       
  2721   def IsInitialized(self, debug_strs=None):
       
  2722     initialized = 1
       
  2723     if (self.has_cost_ and not self.cost_.IsInitialized(debug_strs)): initialized = 0
       
  2724     return initialized
       
  2725 
       
  2726   def ByteSize(self):
       
  2727     n = 0
       
  2728     if (self.has_cost_): n += 1 + self.lengthString(self.cost_.ByteSize())
       
  2729     return n + 0
       
  2730 
       
  2731   def Clear(self):
       
  2732     self.clear_cost()
       
  2733 
       
  2734   def OutputUnchecked(self, out):
       
  2735     if (self.has_cost_):
       
  2736       out.putVarInt32(10)
       
  2737       out.putVarInt32(self.cost_.ByteSize())
       
  2738       self.cost_.OutputUnchecked(out)
       
  2739 
       
  2740   def TryMerge(self, d):
       
  2741     while d.avail() > 0:
       
  2742       tt = d.getVarInt32()
       
  2743       if tt == 10:
       
  2744         length = d.getVarInt32()
       
  2745         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
       
  2746         d.skip(length)
       
  2747         self.mutable_cost().TryMerge(tmp)
       
  2748         continue
       
  2749       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
       
  2750       d.skipData(tt)
       
  2751 
       
  2752 
       
  2753   def __str__(self, prefix="", printElemNumber=0):
       
  2754     res=""
       
  2755     if self.has_cost_:
       
  2756       res+=prefix+"cost <\n"
       
  2757       res+=self.cost_.__str__(prefix + "  ", printElemNumber)
       
  2758       res+=prefix+">\n"
       
  2759     return res
       
  2760 
       
  2761   kcost = 1
       
  2762 
       
  2763   _TEXT = (
       
  2764    "ErrorCode",
       
  2765    "cost",
       
  2766   )
       
  2767 
       
  2768   _TYPES = (
       
  2769    ProtocolBuffer.Encoder.NUMERIC,
       
  2770    ProtocolBuffer.Encoder.STRING,
       
  2771 
       
  2772   )
       
  2773 
       
  2774   _STYLE = """"""
       
  2775   _STYLE_CONTENT_TYPE = """"""
       
  2776 
       
  2777 __all__ = ['Transaction','Query','Query_Filter','Query_Order','QueryExplanation','Cursor','Error','Cost','GetRequest','GetResponse','GetResponse_Entity','PutRequest','PutResponse','DeleteRequest','DeleteResponse','NextRequest','QueryResult','Schema','CompositeIndices','CommitResponse']