thirdparty/google_appengine/google/appengine/datastore/entity_pb.py
changeset 2273 e4cb9c53db3e
parent 1278 a7766286a7be
child 2309 be1b94099f2d
equal deleted inserted replaced
2272:26491ee91e33 2273:e4cb9c53db3e
   245   auth_domain_ = ""
   245   auth_domain_ = ""
   246   has_nickname_ = 0
   246   has_nickname_ = 0
   247   nickname_ = ""
   247   nickname_ = ""
   248   has_gaiaid_ = 0
   248   has_gaiaid_ = 0
   249   gaiaid_ = 0
   249   gaiaid_ = 0
       
   250   has_obfuscated_gaiaid_ = 0
       
   251   obfuscated_gaiaid_ = ""
   250 
   252 
   251   def __init__(self, contents=None):
   253   def __init__(self, contents=None):
   252     if contents is not None: self.MergeFromString(contents)
   254     if contents is not None: self.MergeFromString(contents)
   253 
   255 
   254   def email(self): return self.email_
   256   def email(self): return self.email_
   300     if self.has_gaiaid_:
   302     if self.has_gaiaid_:
   301       self.has_gaiaid_ = 0
   303       self.has_gaiaid_ = 0
   302       self.gaiaid_ = 0
   304       self.gaiaid_ = 0
   303 
   305 
   304   def has_gaiaid(self): return self.has_gaiaid_
   306   def has_gaiaid(self): return self.has_gaiaid_
       
   307 
       
   308   def obfuscated_gaiaid(self): return self.obfuscated_gaiaid_
       
   309 
       
   310   def set_obfuscated_gaiaid(self, x):
       
   311     self.has_obfuscated_gaiaid_ = 1
       
   312     self.obfuscated_gaiaid_ = x
       
   313 
       
   314   def clear_obfuscated_gaiaid(self):
       
   315     if self.has_obfuscated_gaiaid_:
       
   316       self.has_obfuscated_gaiaid_ = 0
       
   317       self.obfuscated_gaiaid_ = ""
       
   318 
       
   319   def has_obfuscated_gaiaid(self): return self.has_obfuscated_gaiaid_
   305 
   320 
   306 
   321 
   307   def MergeFrom(self, x):
   322   def MergeFrom(self, x):
   308     assert x is not self
   323     assert x is not self
   309     if (x.has_email()): self.set_email(x.email())
   324     if (x.has_email()): self.set_email(x.email())
   310     if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
   325     if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
   311     if (x.has_nickname()): self.set_nickname(x.nickname())
   326     if (x.has_nickname()): self.set_nickname(x.nickname())
   312     if (x.has_gaiaid()): self.set_gaiaid(x.gaiaid())
   327     if (x.has_gaiaid()): self.set_gaiaid(x.gaiaid())
       
   328     if (x.has_obfuscated_gaiaid()): self.set_obfuscated_gaiaid(x.obfuscated_gaiaid())
   313 
   329 
   314   def Equals(self, x):
   330   def Equals(self, x):
   315     if x is self: return 1
   331     if x is self: return 1
   316     if self.has_email_ != x.has_email_: return 0
   332     if self.has_email_ != x.has_email_: return 0
   317     if self.has_email_ and self.email_ != x.email_: return 0
   333     if self.has_email_ and self.email_ != x.email_: return 0
   319     if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
   335     if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
   320     if self.has_nickname_ != x.has_nickname_: return 0
   336     if self.has_nickname_ != x.has_nickname_: return 0
   321     if self.has_nickname_ and self.nickname_ != x.nickname_: return 0
   337     if self.has_nickname_ and self.nickname_ != x.nickname_: return 0
   322     if self.has_gaiaid_ != x.has_gaiaid_: return 0
   338     if self.has_gaiaid_ != x.has_gaiaid_: return 0
   323     if self.has_gaiaid_ and self.gaiaid_ != x.gaiaid_: return 0
   339     if self.has_gaiaid_ and self.gaiaid_ != x.gaiaid_: return 0
       
   340     if self.has_obfuscated_gaiaid_ != x.has_obfuscated_gaiaid_: return 0
       
   341     if self.has_obfuscated_gaiaid_ and self.obfuscated_gaiaid_ != x.obfuscated_gaiaid_: return 0
   324     return 1
   342     return 1
   325 
   343 
   326   def IsInitialized(self, debug_strs=None):
   344   def IsInitialized(self, debug_strs=None):
   327     initialized = 1
   345     initialized = 1
   328     if (not self.has_email_):
   346     if (not self.has_email_):
   343     n = 0
   361     n = 0
   344     n += self.lengthString(len(self.email_))
   362     n += self.lengthString(len(self.email_))
   345     n += self.lengthString(len(self.auth_domain_))
   363     n += self.lengthString(len(self.auth_domain_))
   346     if (self.has_nickname_): n += 1 + self.lengthString(len(self.nickname_))
   364     if (self.has_nickname_): n += 1 + self.lengthString(len(self.nickname_))
   347     n += self.lengthVarInt64(self.gaiaid_)
   365     n += self.lengthVarInt64(self.gaiaid_)
       
   366     if (self.has_obfuscated_gaiaid_): n += 2 + self.lengthString(len(self.obfuscated_gaiaid_))
   348     return n + 4
   367     return n + 4
   349 
   368 
   350   def Clear(self):
   369   def Clear(self):
   351     self.clear_email()
   370     self.clear_email()
   352     self.clear_auth_domain()
   371     self.clear_auth_domain()
   353     self.clear_nickname()
   372     self.clear_nickname()
   354     self.clear_gaiaid()
   373     self.clear_gaiaid()
       
   374     self.clear_obfuscated_gaiaid()
   355 
   375 
   356   def OutputUnchecked(self, out):
   376   def OutputUnchecked(self, out):
   357     out.putVarInt32(74)
   377     out.putVarInt32(74)
   358     out.putPrefixedString(self.email_)
   378     out.putPrefixedString(self.email_)
   359     out.putVarInt32(82)
   379     out.putVarInt32(82)
   361     if (self.has_nickname_):
   381     if (self.has_nickname_):
   362       out.putVarInt32(90)
   382       out.putVarInt32(90)
   363       out.putPrefixedString(self.nickname_)
   383       out.putPrefixedString(self.nickname_)
   364     out.putVarInt32(144)
   384     out.putVarInt32(144)
   365     out.putVarInt64(self.gaiaid_)
   385     out.putVarInt64(self.gaiaid_)
       
   386     if (self.has_obfuscated_gaiaid_):
       
   387       out.putVarInt32(154)
       
   388       out.putPrefixedString(self.obfuscated_gaiaid_)
   366 
   389 
   367   def TryMerge(self, d):
   390   def TryMerge(self, d):
   368     while 1:
   391     while 1:
   369       tt = d.getVarInt32()
   392       tt = d.getVarInt32()
   370       if tt == 68: break
   393       if tt == 68: break
   378         self.set_nickname(d.getPrefixedString())
   401         self.set_nickname(d.getPrefixedString())
   379         continue
   402         continue
   380       if tt == 144:
   403       if tt == 144:
   381         self.set_gaiaid(d.getVarInt64())
   404         self.set_gaiaid(d.getVarInt64())
   382         continue
   405         continue
       
   406       if tt == 154:
       
   407         self.set_obfuscated_gaiaid(d.getPrefixedString())
       
   408         continue
   383       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
   409       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
   384       d.skipData(tt)
   410       d.skipData(tt)
   385 
   411 
   386 
   412 
   387   def __str__(self, prefix="", printElemNumber=0):
   413   def __str__(self, prefix="", printElemNumber=0):
   388     res=""
   414     res=""
   389     if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
   415     if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
   390     if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
   416     if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
   391     if self.has_nickname_: res+=prefix+("nickname: %s\n" % self.DebugFormatString(self.nickname_))
   417     if self.has_nickname_: res+=prefix+("nickname: %s\n" % self.DebugFormatString(self.nickname_))
   392     if self.has_gaiaid_: res+=prefix+("gaiaid: %s\n" % self.DebugFormatInt64(self.gaiaid_))
   418     if self.has_gaiaid_: res+=prefix+("gaiaid: %s\n" % self.DebugFormatInt64(self.gaiaid_))
       
   419     if self.has_obfuscated_gaiaid_: res+=prefix+("obfuscated_gaiaid: %s\n" % self.DebugFormatString(self.obfuscated_gaiaid_))
   393     return res
   420     return res
   394 
   421 
   395 class PropertyValue_ReferenceValue(ProtocolBuffer.ProtocolMessage):
   422 class PropertyValue_ReferenceValue(ProtocolBuffer.ProtocolMessage):
   396   has_app_ = 0
   423   has_app_ = 0
   397   app_ = ""
   424   app_ = ""
   766   kUserValueGroup = 8
   793   kUserValueGroup = 8
   767   kUserValueemail = 9
   794   kUserValueemail = 9
   768   kUserValueauth_domain = 10
   795   kUserValueauth_domain = 10
   769   kUserValuenickname = 11
   796   kUserValuenickname = 11
   770   kUserValuegaiaid = 18
   797   kUserValuegaiaid = 18
       
   798   kUserValueobfuscated_gaiaid = 19
   771   kReferenceValueGroup = 12
   799   kReferenceValueGroup = 12
   772   kReferenceValueapp = 13
   800   kReferenceValueapp = 13
   773   kReferenceValuePathElementGroup = 14
   801   kReferenceValuePathElementGroup = 14
   774   kReferenceValuePathElementtype = 15
   802   kReferenceValuePathElementtype = 15
   775   kReferenceValuePathElementid = 16
   803   kReferenceValuePathElementid = 16
   793    "PathElement",
   821    "PathElement",
   794    "type",
   822    "type",
   795    "id",
   823    "id",
   796    "name",
   824    "name",
   797    "gaiaid",
   825    "gaiaid",
       
   826    "obfuscated_gaiaid",
   798   )
   827   )
   799 
   828 
   800   _TYPES = (
   829   _TYPES = (
   801    ProtocolBuffer.Encoder.NUMERIC,
   830    ProtocolBuffer.Encoder.NUMERIC,
   802    ProtocolBuffer.Encoder.NUMERIC,
   831    ProtocolBuffer.Encoder.NUMERIC,
   832    ProtocolBuffer.Encoder.NUMERIC,
   861    ProtocolBuffer.Encoder.NUMERIC,
   833 
   862 
   834    ProtocolBuffer.Encoder.STRING,
   863    ProtocolBuffer.Encoder.STRING,
   835 
   864 
   836    ProtocolBuffer.Encoder.NUMERIC,
   865    ProtocolBuffer.Encoder.NUMERIC,
       
   866 
       
   867    ProtocolBuffer.Encoder.STRING,
   837 
   868 
   838   )
   869   )
   839 
   870 
   840   _STYLE = """"""
   871   _STYLE = """"""
   841   _STYLE_CONTENT_TYPE = """"""
   872   _STYLE_CONTENT_TYPE = """"""
  1476   auth_domain_ = ""
  1507   auth_domain_ = ""
  1477   has_nickname_ = 0
  1508   has_nickname_ = 0
  1478   nickname_ = ""
  1509   nickname_ = ""
  1479   has_gaiaid_ = 0
  1510   has_gaiaid_ = 0
  1480   gaiaid_ = 0
  1511   gaiaid_ = 0
       
  1512   has_obfuscated_gaiaid_ = 0
       
  1513   obfuscated_gaiaid_ = ""
  1481 
  1514 
  1482   def __init__(self, contents=None):
  1515   def __init__(self, contents=None):
  1483     if contents is not None: self.MergeFromString(contents)
  1516     if contents is not None: self.MergeFromString(contents)
  1484 
  1517 
  1485   def email(self): return self.email_
  1518   def email(self): return self.email_
  1531     if self.has_gaiaid_:
  1564     if self.has_gaiaid_:
  1532       self.has_gaiaid_ = 0
  1565       self.has_gaiaid_ = 0
  1533       self.gaiaid_ = 0
  1566       self.gaiaid_ = 0
  1534 
  1567 
  1535   def has_gaiaid(self): return self.has_gaiaid_
  1568   def has_gaiaid(self): return self.has_gaiaid_
       
  1569 
       
  1570   def obfuscated_gaiaid(self): return self.obfuscated_gaiaid_
       
  1571 
       
  1572   def set_obfuscated_gaiaid(self, x):
       
  1573     self.has_obfuscated_gaiaid_ = 1
       
  1574     self.obfuscated_gaiaid_ = x
       
  1575 
       
  1576   def clear_obfuscated_gaiaid(self):
       
  1577     if self.has_obfuscated_gaiaid_:
       
  1578       self.has_obfuscated_gaiaid_ = 0
       
  1579       self.obfuscated_gaiaid_ = ""
       
  1580 
       
  1581   def has_obfuscated_gaiaid(self): return self.has_obfuscated_gaiaid_
  1536 
  1582 
  1537 
  1583 
  1538   def MergeFrom(self, x):
  1584   def MergeFrom(self, x):
  1539     assert x is not self
  1585     assert x is not self
  1540     if (x.has_email()): self.set_email(x.email())
  1586     if (x.has_email()): self.set_email(x.email())
  1541     if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
  1587     if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
  1542     if (x.has_nickname()): self.set_nickname(x.nickname())
  1588     if (x.has_nickname()): self.set_nickname(x.nickname())
  1543     if (x.has_gaiaid()): self.set_gaiaid(x.gaiaid())
  1589     if (x.has_gaiaid()): self.set_gaiaid(x.gaiaid())
       
  1590     if (x.has_obfuscated_gaiaid()): self.set_obfuscated_gaiaid(x.obfuscated_gaiaid())
  1544 
  1591 
  1545   def Equals(self, x):
  1592   def Equals(self, x):
  1546     if x is self: return 1
  1593     if x is self: return 1
  1547     if self.has_email_ != x.has_email_: return 0
  1594     if self.has_email_ != x.has_email_: return 0
  1548     if self.has_email_ and self.email_ != x.email_: return 0
  1595     if self.has_email_ and self.email_ != x.email_: return 0
  1550     if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
  1597     if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
  1551     if self.has_nickname_ != x.has_nickname_: return 0
  1598     if self.has_nickname_ != x.has_nickname_: return 0
  1552     if self.has_nickname_ and self.nickname_ != x.nickname_: return 0
  1599     if self.has_nickname_ and self.nickname_ != x.nickname_: return 0
  1553     if self.has_gaiaid_ != x.has_gaiaid_: return 0
  1600     if self.has_gaiaid_ != x.has_gaiaid_: return 0
  1554     if self.has_gaiaid_ and self.gaiaid_ != x.gaiaid_: return 0
  1601     if self.has_gaiaid_ and self.gaiaid_ != x.gaiaid_: return 0
       
  1602     if self.has_obfuscated_gaiaid_ != x.has_obfuscated_gaiaid_: return 0
       
  1603     if self.has_obfuscated_gaiaid_ and self.obfuscated_gaiaid_ != x.obfuscated_gaiaid_: return 0
  1555     return 1
  1604     return 1
  1556 
  1605 
  1557   def IsInitialized(self, debug_strs=None):
  1606   def IsInitialized(self, debug_strs=None):
  1558     initialized = 1
  1607     initialized = 1
  1559     if (not self.has_email_):
  1608     if (not self.has_email_):
  1574     n = 0
  1623     n = 0
  1575     n += self.lengthString(len(self.email_))
  1624     n += self.lengthString(len(self.email_))
  1576     n += self.lengthString(len(self.auth_domain_))
  1625     n += self.lengthString(len(self.auth_domain_))
  1577     if (self.has_nickname_): n += 1 + self.lengthString(len(self.nickname_))
  1626     if (self.has_nickname_): n += 1 + self.lengthString(len(self.nickname_))
  1578     n += self.lengthVarInt64(self.gaiaid_)
  1627     n += self.lengthVarInt64(self.gaiaid_)
       
  1628     if (self.has_obfuscated_gaiaid_): n += 1 + self.lengthString(len(self.obfuscated_gaiaid_))
  1579     return n + 3
  1629     return n + 3
  1580 
  1630 
  1581   def Clear(self):
  1631   def Clear(self):
  1582     self.clear_email()
  1632     self.clear_email()
  1583     self.clear_auth_domain()
  1633     self.clear_auth_domain()
  1584     self.clear_nickname()
  1634     self.clear_nickname()
  1585     self.clear_gaiaid()
  1635     self.clear_gaiaid()
       
  1636     self.clear_obfuscated_gaiaid()
  1586 
  1637 
  1587   def OutputUnchecked(self, out):
  1638   def OutputUnchecked(self, out):
  1588     out.putVarInt32(10)
  1639     out.putVarInt32(10)
  1589     out.putPrefixedString(self.email_)
  1640     out.putPrefixedString(self.email_)
  1590     out.putVarInt32(18)
  1641     out.putVarInt32(18)
  1592     if (self.has_nickname_):
  1643     if (self.has_nickname_):
  1593       out.putVarInt32(26)
  1644       out.putVarInt32(26)
  1594       out.putPrefixedString(self.nickname_)
  1645       out.putPrefixedString(self.nickname_)
  1595     out.putVarInt32(32)
  1646     out.putVarInt32(32)
  1596     out.putVarInt64(self.gaiaid_)
  1647     out.putVarInt64(self.gaiaid_)
       
  1648     if (self.has_obfuscated_gaiaid_):
       
  1649       out.putVarInt32(42)
       
  1650       out.putPrefixedString(self.obfuscated_gaiaid_)
  1597 
  1651 
  1598   def TryMerge(self, d):
  1652   def TryMerge(self, d):
  1599     while d.avail() > 0:
  1653     while d.avail() > 0:
  1600       tt = d.getVarInt32()
  1654       tt = d.getVarInt32()
  1601       if tt == 10:
  1655       if tt == 10:
  1607       if tt == 26:
  1661       if tt == 26:
  1608         self.set_nickname(d.getPrefixedString())
  1662         self.set_nickname(d.getPrefixedString())
  1609         continue
  1663         continue
  1610       if tt == 32:
  1664       if tt == 32:
  1611         self.set_gaiaid(d.getVarInt64())
  1665         self.set_gaiaid(d.getVarInt64())
       
  1666         continue
       
  1667       if tt == 42:
       
  1668         self.set_obfuscated_gaiaid(d.getPrefixedString())
  1612         continue
  1669         continue
  1613       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
  1670       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
  1614       d.skipData(tt)
  1671       d.skipData(tt)
  1615 
  1672 
  1616 
  1673 
  1618     res=""
  1675     res=""
  1619     if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
  1676     if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
  1620     if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
  1677     if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
  1621     if self.has_nickname_: res+=prefix+("nickname: %s\n" % self.DebugFormatString(self.nickname_))
  1678     if self.has_nickname_: res+=prefix+("nickname: %s\n" % self.DebugFormatString(self.nickname_))
  1622     if self.has_gaiaid_: res+=prefix+("gaiaid: %s\n" % self.DebugFormatInt64(self.gaiaid_))
  1679     if self.has_gaiaid_: res+=prefix+("gaiaid: %s\n" % self.DebugFormatInt64(self.gaiaid_))
       
  1680     if self.has_obfuscated_gaiaid_: res+=prefix+("obfuscated_gaiaid: %s\n" % self.DebugFormatString(self.obfuscated_gaiaid_))
  1623     return res
  1681     return res
  1624 
  1682 
  1625   kemail = 1
  1683   kemail = 1
  1626   kauth_domain = 2
  1684   kauth_domain = 2
  1627   knickname = 3
  1685   knickname = 3
  1628   kgaiaid = 4
  1686   kgaiaid = 4
       
  1687   kobfuscated_gaiaid = 5
  1629 
  1688 
  1630   _TEXT = (
  1689   _TEXT = (
  1631    "ErrorCode",
  1690    "ErrorCode",
  1632    "email",
  1691    "email",
  1633    "auth_domain",
  1692    "auth_domain",
  1634    "nickname",
  1693    "nickname",
  1635    "gaiaid",
  1694    "gaiaid",
       
  1695    "obfuscated_gaiaid",
  1636   )
  1696   )
  1637 
  1697 
  1638   _TYPES = (
  1698   _TYPES = (
  1639    ProtocolBuffer.Encoder.NUMERIC,
  1699    ProtocolBuffer.Encoder.NUMERIC,
  1640    ProtocolBuffer.Encoder.STRING,
  1700    ProtocolBuffer.Encoder.STRING,
  1642    ProtocolBuffer.Encoder.STRING,
  1702    ProtocolBuffer.Encoder.STRING,
  1643 
  1703 
  1644    ProtocolBuffer.Encoder.STRING,
  1704    ProtocolBuffer.Encoder.STRING,
  1645 
  1705 
  1646    ProtocolBuffer.Encoder.NUMERIC,
  1706    ProtocolBuffer.Encoder.NUMERIC,
       
  1707 
       
  1708    ProtocolBuffer.Encoder.STRING,
  1647 
  1709 
  1648   )
  1710   )
  1649 
  1711 
  1650   _STYLE = """"""
  1712   _STYLE = """"""
  1651   _STYLE_CONTENT_TYPE = """"""
  1713   _STYLE_CONTENT_TYPE = """"""