thirdparty/google_appengine/google/appengine/api/user_service_pb.py
changeset 3031 7678f72140e6
parent 2864 2e0b0af889be
equal deleted inserted replaced
3030:09cae668b536 3031:7678f72140e6
    26 class UserServiceError(ProtocolBuffer.ProtocolMessage):
    26 class UserServiceError(ProtocolBuffer.ProtocolMessage):
    27 
    27 
    28   OK           =    0
    28   OK           =    0
    29   REDIRECT_URL_TOO_LONG =    1
    29   REDIRECT_URL_TOO_LONG =    1
    30   NOT_ALLOWED  =    2
    30   NOT_ALLOWED  =    2
       
    31   OAUTH_INVALID_TOKEN =    3
       
    32   OAUTH_INVALID_REQUEST =    4
       
    33   OAUTH_ERROR  =    5
    31 
    34 
    32   _ErrorCode_NAMES = {
    35   _ErrorCode_NAMES = {
    33     0: "OK",
    36     0: "OK",
    34     1: "REDIRECT_URL_TOO_LONG",
    37     1: "REDIRECT_URL_TOO_LONG",
    35     2: "NOT_ALLOWED",
    38     2: "NOT_ALLOWED",
       
    39     3: "OAUTH_INVALID_TOKEN",
       
    40     4: "OAUTH_INVALID_REQUEST",
       
    41     5: "OAUTH_ERROR",
    36   }
    42   }
    37 
    43 
    38   def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
    44   def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
    39   ErrorCode_Name = classmethod(ErrorCode_Name)
    45   ErrorCode_Name = classmethod(ErrorCode_Name)
    40 
    46 
   485     1: ProtocolBuffer.Encoder.STRING,
   491     1: ProtocolBuffer.Encoder.STRING,
   486   }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
   492   }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
   487 
   493 
   488   _STYLE = """"""
   494   _STYLE = """"""
   489   _STYLE_CONTENT_TYPE = """"""
   495   _STYLE_CONTENT_TYPE = """"""
   490 
   496 class GetOAuthUserRequest(ProtocolBuffer.ProtocolMessage):
   491 __all__ = ['UserServiceError','CreateLoginURLRequest','CreateLoginURLResponse','CreateLogoutURLRequest','CreateLogoutURLResponse']
   497 
       
   498   def __init__(self, contents=None):
       
   499     pass
       
   500     if contents is not None: self.MergeFromString(contents)
       
   501 
       
   502 
       
   503   def MergeFrom(self, x):
       
   504     assert x is not self
       
   505 
       
   506   def Equals(self, x):
       
   507     if x is self: return 1
       
   508     return 1
       
   509 
       
   510   def IsInitialized(self, debug_strs=None):
       
   511     initialized = 1
       
   512     return initialized
       
   513 
       
   514   def ByteSize(self):
       
   515     n = 0
       
   516     return n + 0
       
   517 
       
   518   def Clear(self):
       
   519     pass
       
   520 
       
   521   def OutputUnchecked(self, out):
       
   522     pass
       
   523 
       
   524   def TryMerge(self, d):
       
   525     while d.avail() > 0:
       
   526       tt = d.getVarInt32()
       
   527       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
       
   528       d.skipData(tt)
       
   529 
       
   530 
       
   531   def __str__(self, prefix="", printElemNumber=0):
       
   532     res=""
       
   533     return res
       
   534 
       
   535 
       
   536   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   537     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   538 
       
   539 
       
   540   _TEXT = _BuildTagLookupTable({
       
   541     0: "ErrorCode",
       
   542   }, 0)
       
   543 
       
   544   _TYPES = _BuildTagLookupTable({
       
   545     0: ProtocolBuffer.Encoder.NUMERIC,
       
   546   }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
       
   547 
       
   548   _STYLE = """"""
       
   549   _STYLE_CONTENT_TYPE = """"""
       
   550 class GetOAuthUserResponse(ProtocolBuffer.ProtocolMessage):
       
   551   has_email_ = 0
       
   552   email_ = ""
       
   553 
       
   554   def __init__(self, contents=None):
       
   555     if contents is not None: self.MergeFromString(contents)
       
   556 
       
   557   def email(self): return self.email_
       
   558 
       
   559   def set_email(self, x):
       
   560     self.has_email_ = 1
       
   561     self.email_ = x
       
   562 
       
   563   def clear_email(self):
       
   564     if self.has_email_:
       
   565       self.has_email_ = 0
       
   566       self.email_ = ""
       
   567 
       
   568   def has_email(self): return self.has_email_
       
   569 
       
   570 
       
   571   def MergeFrom(self, x):
       
   572     assert x is not self
       
   573     if (x.has_email()): self.set_email(x.email())
       
   574 
       
   575   def Equals(self, x):
       
   576     if x is self: return 1
       
   577     if self.has_email_ != x.has_email_: return 0
       
   578     if self.has_email_ and self.email_ != x.email_: return 0
       
   579     return 1
       
   580 
       
   581   def IsInitialized(self, debug_strs=None):
       
   582     initialized = 1
       
   583     return initialized
       
   584 
       
   585   def ByteSize(self):
       
   586     n = 0
       
   587     if (self.has_email_): n += 1 + self.lengthString(len(self.email_))
       
   588     return n + 0
       
   589 
       
   590   def Clear(self):
       
   591     self.clear_email()
       
   592 
       
   593   def OutputUnchecked(self, out):
       
   594     if (self.has_email_):
       
   595       out.putVarInt32(10)
       
   596       out.putPrefixedString(self.email_)
       
   597 
       
   598   def TryMerge(self, d):
       
   599     while d.avail() > 0:
       
   600       tt = d.getVarInt32()
       
   601       if tt == 10:
       
   602         self.set_email(d.getPrefixedString())
       
   603         continue
       
   604       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
       
   605       d.skipData(tt)
       
   606 
       
   607 
       
   608   def __str__(self, prefix="", printElemNumber=0):
       
   609     res=""
       
   610     if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
       
   611     return res
       
   612 
       
   613 
       
   614   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   615     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   616 
       
   617   kemail = 1
       
   618 
       
   619   _TEXT = _BuildTagLookupTable({
       
   620     0: "ErrorCode",
       
   621     1: "email",
       
   622   }, 1)
       
   623 
       
   624   _TYPES = _BuildTagLookupTable({
       
   625     0: ProtocolBuffer.Encoder.NUMERIC,
       
   626     1: ProtocolBuffer.Encoder.STRING,
       
   627   }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
       
   628 
       
   629   _STYLE = """"""
       
   630   _STYLE_CONTENT_TYPE = """"""
       
   631 class CheckOAuthSignatureRequest(ProtocolBuffer.ProtocolMessage):
       
   632 
       
   633   def __init__(self, contents=None):
       
   634     pass
       
   635     if contents is not None: self.MergeFromString(contents)
       
   636 
       
   637 
       
   638   def MergeFrom(self, x):
       
   639     assert x is not self
       
   640 
       
   641   def Equals(self, x):
       
   642     if x is self: return 1
       
   643     return 1
       
   644 
       
   645   def IsInitialized(self, debug_strs=None):
       
   646     initialized = 1
       
   647     return initialized
       
   648 
       
   649   def ByteSize(self):
       
   650     n = 0
       
   651     return n + 0
       
   652 
       
   653   def Clear(self):
       
   654     pass
       
   655 
       
   656   def OutputUnchecked(self, out):
       
   657     pass
       
   658 
       
   659   def TryMerge(self, d):
       
   660     while d.avail() > 0:
       
   661       tt = d.getVarInt32()
       
   662       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
       
   663       d.skipData(tt)
       
   664 
       
   665 
       
   666   def __str__(self, prefix="", printElemNumber=0):
       
   667     res=""
       
   668     return res
       
   669 
       
   670 
       
   671   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   672     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   673 
       
   674 
       
   675   _TEXT = _BuildTagLookupTable({
       
   676     0: "ErrorCode",
       
   677   }, 0)
       
   678 
       
   679   _TYPES = _BuildTagLookupTable({
       
   680     0: ProtocolBuffer.Encoder.NUMERIC,
       
   681   }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
       
   682 
       
   683   _STYLE = """"""
       
   684   _STYLE_CONTENT_TYPE = """"""
       
   685 class CheckOAuthSignatureResponse(ProtocolBuffer.ProtocolMessage):
       
   686   has_oauth_consumer_key_ = 0
       
   687   oauth_consumer_key_ = ""
       
   688 
       
   689   def __init__(self, contents=None):
       
   690     if contents is not None: self.MergeFromString(contents)
       
   691 
       
   692   def oauth_consumer_key(self): return self.oauth_consumer_key_
       
   693 
       
   694   def set_oauth_consumer_key(self, x):
       
   695     self.has_oauth_consumer_key_ = 1
       
   696     self.oauth_consumer_key_ = x
       
   697 
       
   698   def clear_oauth_consumer_key(self):
       
   699     if self.has_oauth_consumer_key_:
       
   700       self.has_oauth_consumer_key_ = 0
       
   701       self.oauth_consumer_key_ = ""
       
   702 
       
   703   def has_oauth_consumer_key(self): return self.has_oauth_consumer_key_
       
   704 
       
   705 
       
   706   def MergeFrom(self, x):
       
   707     assert x is not self
       
   708     if (x.has_oauth_consumer_key()): self.set_oauth_consumer_key(x.oauth_consumer_key())
       
   709 
       
   710   def Equals(self, x):
       
   711     if x is self: return 1
       
   712     if self.has_oauth_consumer_key_ != x.has_oauth_consumer_key_: return 0
       
   713     if self.has_oauth_consumer_key_ and self.oauth_consumer_key_ != x.oauth_consumer_key_: return 0
       
   714     return 1
       
   715 
       
   716   def IsInitialized(self, debug_strs=None):
       
   717     initialized = 1
       
   718     return initialized
       
   719 
       
   720   def ByteSize(self):
       
   721     n = 0
       
   722     if (self.has_oauth_consumer_key_): n += 1 + self.lengthString(len(self.oauth_consumer_key_))
       
   723     return n + 0
       
   724 
       
   725   def Clear(self):
       
   726     self.clear_oauth_consumer_key()
       
   727 
       
   728   def OutputUnchecked(self, out):
       
   729     if (self.has_oauth_consumer_key_):
       
   730       out.putVarInt32(10)
       
   731       out.putPrefixedString(self.oauth_consumer_key_)
       
   732 
       
   733   def TryMerge(self, d):
       
   734     while d.avail() > 0:
       
   735       tt = d.getVarInt32()
       
   736       if tt == 10:
       
   737         self.set_oauth_consumer_key(d.getPrefixedString())
       
   738         continue
       
   739       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
       
   740       d.skipData(tt)
       
   741 
       
   742 
       
   743   def __str__(self, prefix="", printElemNumber=0):
       
   744     res=""
       
   745     if self.has_oauth_consumer_key_: res+=prefix+("oauth_consumer_key: %s\n" % self.DebugFormatString(self.oauth_consumer_key_))
       
   746     return res
       
   747 
       
   748 
       
   749   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   750     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   751 
       
   752   koauth_consumer_key = 1
       
   753 
       
   754   _TEXT = _BuildTagLookupTable({
       
   755     0: "ErrorCode",
       
   756     1: "oauth_consumer_key",
       
   757   }, 1)
       
   758 
       
   759   _TYPES = _BuildTagLookupTable({
       
   760     0: ProtocolBuffer.Encoder.NUMERIC,
       
   761     1: ProtocolBuffer.Encoder.STRING,
       
   762   }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
       
   763 
       
   764   _STYLE = """"""
       
   765   _STYLE_CONTENT_TYPE = """"""
       
   766 
       
   767 __all__ = ['UserServiceError','CreateLoginURLRequest','CreateLoginURLResponse','CreateLogoutURLRequest','CreateLogoutURLResponse','GetOAuthUserRequest','GetOAuthUserResponse','CheckOAuthSignatureRequest','CheckOAuthSignatureResponse']