thirdparty/google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.py
changeset 2864 2e0b0af889be
parent 2413 d0b7dac5325c
child 3031 7678f72140e6
equal deleted inserted replaced
2862:27971a13089f 2864:2e0b0af889be
    20 import dummy_thread as thread
    20 import dummy_thread as thread
    21 
    21 
    22 __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit
    22 __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit
    23                    unusednames=printElemNumber,debug_strs no-special"""
    23                    unusednames=printElemNumber,debug_strs no-special"""
    24 
    24 
       
    25 from google.appengine.datastore.datastore_v3_pb import *
    25 class TaskQueueServiceError(ProtocolBuffer.ProtocolMessage):
    26 class TaskQueueServiceError(ProtocolBuffer.ProtocolMessage):
    26 
    27 
    27   OK           =    0
    28   OK           =    0
    28   UNKNOWN_QUEUE =    1
    29   UNKNOWN_QUEUE =    1
    29   TRANSIENT_ERROR =    2
    30   TRANSIENT_ERROR =    2
    35   INVALID_QUEUE_RATE =    8
    36   INVALID_QUEUE_RATE =    8
    36   PERMISSION_DENIED =    9
    37   PERMISSION_DENIED =    9
    37   TASK_ALREADY_EXISTS =   10
    38   TASK_ALREADY_EXISTS =   10
    38   TOMBSTONED_TASK =   11
    39   TOMBSTONED_TASK =   11
    39   INVALID_ETA  =   12
    40   INVALID_ETA  =   12
       
    41   INVALID_REQUEST =   13
    40 
    42 
    41   _ErrorCode_NAMES = {
    43   _ErrorCode_NAMES = {
    42     0: "OK",
    44     0: "OK",
    43     1: "UNKNOWN_QUEUE",
    45     1: "UNKNOWN_QUEUE",
    44     2: "TRANSIENT_ERROR",
    46     2: "TRANSIENT_ERROR",
    50     8: "INVALID_QUEUE_RATE",
    52     8: "INVALID_QUEUE_RATE",
    51     9: "PERMISSION_DENIED",
    53     9: "PERMISSION_DENIED",
    52     10: "TASK_ALREADY_EXISTS",
    54     10: "TASK_ALREADY_EXISTS",
    53     11: "TOMBSTONED_TASK",
    55     11: "TOMBSTONED_TASK",
    54     12: "INVALID_ETA",
    56     12: "INVALID_ETA",
       
    57     13: "INVALID_REQUEST",
    55   }
    58   }
    56 
    59 
    57   def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
    60   def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
    58   ErrorCode_Name = classmethod(ErrorCode_Name)
    61   ErrorCode_Name = classmethod(ErrorCode_Name)
    59 
    62 
    94   def __str__(self, prefix="", printElemNumber=0):
    97   def __str__(self, prefix="", printElemNumber=0):
    95     res=""
    98     res=""
    96     return res
    99     return res
    97 
   100 
    98 
   101 
    99   _TEXT = (
   102   def _BuildTagLookupTable(sparse, maxtag, default=None):
   100    "ErrorCode",
   103     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
   101   )
   104 
   102 
   105 
   103   _TYPES = (
   106   _TEXT = _BuildTagLookupTable({
   104    ProtocolBuffer.Encoder.NUMERIC,
   107     0: "ErrorCode",
   105   )
   108   }, 0)
       
   109 
       
   110   _TYPES = _BuildTagLookupTable({
       
   111     0: ProtocolBuffer.Encoder.NUMERIC,
       
   112   }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
   106 
   113 
   107   _STYLE = """"""
   114   _STYLE = """"""
   108   _STYLE_CONTENT_TYPE = """"""
   115   _STYLE_CONTENT_TYPE = """"""
   109 class TaskQueueAddRequest_Header(ProtocolBuffer.ProtocolMessage):
   116 class TaskQueueAddRequest_Header(ProtocolBuffer.ProtocolMessage):
   110   has_key_ = 0
   117   has_key_ = 0
   232   method_ = 2
   239   method_ = 2
   233   has_url_ = 0
   240   has_url_ = 0
   234   url_ = ""
   241   url_ = ""
   235   has_body_ = 0
   242   has_body_ = 0
   236   body_ = ""
   243   body_ = ""
       
   244   has_transaction_ = 0
       
   245   transaction_ = None
   237 
   246 
   238   def __init__(self, contents=None):
   247   def __init__(self, contents=None):
   239     self.header_ = []
   248     self.header_ = []
       
   249     self.lazy_init_lock_ = thread.allocate_lock()
   240     if contents is not None: self.MergeFromString(contents)
   250     if contents is not None: self.MergeFromString(contents)
   241 
   251 
   242   def queue_name(self): return self.queue_name_
   252   def queue_name(self): return self.queue_name_
   243 
   253 
   244   def set_queue_name(self, x):
   254   def set_queue_name(self, x):
   330     if self.has_body_:
   340     if self.has_body_:
   331       self.has_body_ = 0
   341       self.has_body_ = 0
   332       self.body_ = ""
   342       self.body_ = ""
   333 
   343 
   334   def has_body(self): return self.has_body_
   344   def has_body(self): return self.has_body_
       
   345 
       
   346   def transaction(self):
       
   347     if self.transaction_ is None:
       
   348       self.lazy_init_lock_.acquire()
       
   349       try:
       
   350         if self.transaction_ is None: self.transaction_ = Transaction()
       
   351       finally:
       
   352         self.lazy_init_lock_.release()
       
   353     return self.transaction_
       
   354 
       
   355   def mutable_transaction(self): self.has_transaction_ = 1; return self.transaction()
       
   356 
       
   357   def clear_transaction(self):
       
   358     if self.has_transaction_:
       
   359       self.has_transaction_ = 0;
       
   360       if self.transaction_ is not None: self.transaction_.Clear()
       
   361 
       
   362   def has_transaction(self): return self.has_transaction_
   335 
   363 
   336 
   364 
   337   def MergeFrom(self, x):
   365   def MergeFrom(self, x):
   338     assert x is not self
   366     assert x is not self
   339     if (x.has_queue_name()): self.set_queue_name(x.queue_name())
   367     if (x.has_queue_name()): self.set_queue_name(x.queue_name())
   341     if (x.has_eta_usec()): self.set_eta_usec(x.eta_usec())
   369     if (x.has_eta_usec()): self.set_eta_usec(x.eta_usec())
   342     if (x.has_method()): self.set_method(x.method())
   370     if (x.has_method()): self.set_method(x.method())
   343     if (x.has_url()): self.set_url(x.url())
   371     if (x.has_url()): self.set_url(x.url())
   344     for i in xrange(x.header_size()): self.add_header().CopyFrom(x.header(i))
   372     for i in xrange(x.header_size()): self.add_header().CopyFrom(x.header(i))
   345     if (x.has_body()): self.set_body(x.body())
   373     if (x.has_body()): self.set_body(x.body())
       
   374     if (x.has_transaction()): self.mutable_transaction().MergeFrom(x.transaction())
   346 
   375 
   347   def Equals(self, x):
   376   def Equals(self, x):
   348     if x is self: return 1
   377     if x is self: return 1
   349     if self.has_queue_name_ != x.has_queue_name_: return 0
   378     if self.has_queue_name_ != x.has_queue_name_: return 0
   350     if self.has_queue_name_ and self.queue_name_ != x.queue_name_: return 0
   379     if self.has_queue_name_ and self.queue_name_ != x.queue_name_: return 0
   359     if len(self.header_) != len(x.header_): return 0
   388     if len(self.header_) != len(x.header_): return 0
   360     for e1, e2 in zip(self.header_, x.header_):
   389     for e1, e2 in zip(self.header_, x.header_):
   361       if e1 != e2: return 0
   390       if e1 != e2: return 0
   362     if self.has_body_ != x.has_body_: return 0
   391     if self.has_body_ != x.has_body_: return 0
   363     if self.has_body_ and self.body_ != x.body_: return 0
   392     if self.has_body_ and self.body_ != x.body_: return 0
       
   393     if self.has_transaction_ != x.has_transaction_: return 0
       
   394     if self.has_transaction_ and self.transaction_ != x.transaction_: return 0
   364     return 1
   395     return 1
   365 
   396 
   366   def IsInitialized(self, debug_strs=None):
   397   def IsInitialized(self, debug_strs=None):
   367     initialized = 1
   398     initialized = 1
   368     if (not self.has_queue_name_):
   399     if (not self.has_queue_name_):
   381       initialized = 0
   412       initialized = 0
   382       if debug_strs is not None:
   413       if debug_strs is not None:
   383         debug_strs.append('Required field: url not set.')
   414         debug_strs.append('Required field: url not set.')
   384     for p in self.header_:
   415     for p in self.header_:
   385       if not p.IsInitialized(debug_strs): initialized=0
   416       if not p.IsInitialized(debug_strs): initialized=0
       
   417     if (self.has_transaction_ and not self.transaction_.IsInitialized(debug_strs)): initialized = 0
   386     return initialized
   418     return initialized
   387 
   419 
   388   def ByteSize(self):
   420   def ByteSize(self):
   389     n = 0
   421     n = 0
   390     n += self.lengthString(len(self.queue_name_))
   422     n += self.lengthString(len(self.queue_name_))
   393     if (self.has_method_): n += 1 + self.lengthVarInt64(self.method_)
   425     if (self.has_method_): n += 1 + self.lengthVarInt64(self.method_)
   394     n += self.lengthString(len(self.url_))
   426     n += self.lengthString(len(self.url_))
   395     n += 2 * len(self.header_)
   427     n += 2 * len(self.header_)
   396     for i in xrange(len(self.header_)): n += self.header_[i].ByteSize()
   428     for i in xrange(len(self.header_)): n += self.header_[i].ByteSize()
   397     if (self.has_body_): n += 1 + self.lengthString(len(self.body_))
   429     if (self.has_body_): n += 1 + self.lengthString(len(self.body_))
       
   430     if (self.has_transaction_): n += 1 + self.lengthString(self.transaction_.ByteSize())
   398     return n + 4
   431     return n + 4
   399 
   432 
   400   def Clear(self):
   433   def Clear(self):
   401     self.clear_queue_name()
   434     self.clear_queue_name()
   402     self.clear_task_name()
   435     self.clear_task_name()
   403     self.clear_eta_usec()
   436     self.clear_eta_usec()
   404     self.clear_method()
   437     self.clear_method()
   405     self.clear_url()
   438     self.clear_url()
   406     self.clear_header()
   439     self.clear_header()
   407     self.clear_body()
   440     self.clear_body()
       
   441     self.clear_transaction()
   408 
   442 
   409   def OutputUnchecked(self, out):
   443   def OutputUnchecked(self, out):
   410     out.putVarInt32(10)
   444     out.putVarInt32(10)
   411     out.putPrefixedString(self.queue_name_)
   445     out.putPrefixedString(self.queue_name_)
   412     out.putVarInt32(18)
   446     out.putVarInt32(18)
   423       self.header_[i].OutputUnchecked(out)
   457       self.header_[i].OutputUnchecked(out)
   424       out.putVarInt32(52)
   458       out.putVarInt32(52)
   425     if (self.has_body_):
   459     if (self.has_body_):
   426       out.putVarInt32(74)
   460       out.putVarInt32(74)
   427       out.putPrefixedString(self.body_)
   461       out.putPrefixedString(self.body_)
       
   462     if (self.has_transaction_):
       
   463       out.putVarInt32(82)
       
   464       out.putVarInt32(self.transaction_.ByteSize())
       
   465       self.transaction_.OutputUnchecked(out)
   428 
   466 
   429   def TryMerge(self, d):
   467   def TryMerge(self, d):
   430     while d.avail() > 0:
   468     while d.avail() > 0:
   431       tt = d.getVarInt32()
   469       tt = d.getVarInt32()
   432       if tt == 10:
   470       if tt == 10:
   447       if tt == 51:
   485       if tt == 51:
   448         self.add_header().TryMerge(d)
   486         self.add_header().TryMerge(d)
   449         continue
   487         continue
   450       if tt == 74:
   488       if tt == 74:
   451         self.set_body(d.getPrefixedString())
   489         self.set_body(d.getPrefixedString())
       
   490         continue
       
   491       if tt == 82:
       
   492         length = d.getVarInt32()
       
   493         tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
       
   494         d.skip(length)
       
   495         self.mutable_transaction().TryMerge(tmp)
   452         continue
   496         continue
   453       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
   497       if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
   454       d.skipData(tt)
   498       d.skipData(tt)
   455 
   499 
   456 
   500 
   468       res+=prefix+("Header%s {\n" % elm)
   512       res+=prefix+("Header%s {\n" % elm)
   469       res+=e.__str__(prefix + "  ", printElemNumber)
   513       res+=e.__str__(prefix + "  ", printElemNumber)
   470       res+=prefix+"}\n"
   514       res+=prefix+"}\n"
   471       cnt+=1
   515       cnt+=1
   472     if self.has_body_: res+=prefix+("body: %s\n" % self.DebugFormatString(self.body_))
   516     if self.has_body_: res+=prefix+("body: %s\n" % self.DebugFormatString(self.body_))
       
   517     if self.has_transaction_:
       
   518       res+=prefix+"transaction <\n"
       
   519       res+=self.transaction_.__str__(prefix + "  ", printElemNumber)
       
   520       res+=prefix+">\n"
   473     return res
   521     return res
       
   522 
       
   523 
       
   524   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   525     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
   474 
   526 
   475   kqueue_name = 1
   527   kqueue_name = 1
   476   ktask_name = 2
   528   ktask_name = 2
   477   keta_usec = 3
   529   keta_usec = 3
   478   kmethod = 5
   530   kmethod = 5
   479   kurl = 4
   531   kurl = 4
   480   kHeaderGroup = 6
   532   kHeaderGroup = 6
   481   kHeaderkey = 7
   533   kHeaderkey = 7
   482   kHeadervalue = 8
   534   kHeadervalue = 8
   483   kbody = 9
   535   kbody = 9
   484 
   536   ktransaction = 10
   485   _TEXT = (
   537 
   486    "ErrorCode",
   538   _TEXT = _BuildTagLookupTable({
   487    "queue_name",
   539     0: "ErrorCode",
   488    "task_name",
   540     1: "queue_name",
   489    "eta_usec",
   541     2: "task_name",
   490    "url",
   542     3: "eta_usec",
   491    "method",
   543     4: "url",
   492    "Header",
   544     5: "method",
   493    "key",
   545     6: "Header",
   494    "value",
   546     7: "key",
   495    "body",
   547     8: "value",
   496   )
   548     9: "body",
   497 
   549     10: "transaction",
   498   _TYPES = (
   550   }, 10)
   499    ProtocolBuffer.Encoder.NUMERIC,
   551 
   500    ProtocolBuffer.Encoder.STRING,
   552   _TYPES = _BuildTagLookupTable({
   501 
   553     0: ProtocolBuffer.Encoder.NUMERIC,
   502    ProtocolBuffer.Encoder.STRING,
   554     1: ProtocolBuffer.Encoder.STRING,
   503 
   555     2: ProtocolBuffer.Encoder.STRING,
   504    ProtocolBuffer.Encoder.NUMERIC,
   556     3: ProtocolBuffer.Encoder.NUMERIC,
   505 
   557     4: ProtocolBuffer.Encoder.STRING,
   506    ProtocolBuffer.Encoder.STRING,
   558     5: ProtocolBuffer.Encoder.NUMERIC,
   507 
   559     6: ProtocolBuffer.Encoder.STARTGROUP,
   508    ProtocolBuffer.Encoder.NUMERIC,
   560     7: ProtocolBuffer.Encoder.STRING,
   509 
   561     8: ProtocolBuffer.Encoder.STRING,
   510    ProtocolBuffer.Encoder.STARTGROUP,
   562     9: ProtocolBuffer.Encoder.STRING,
   511 
   563     10: ProtocolBuffer.Encoder.STRING,
   512    ProtocolBuffer.Encoder.STRING,
   564   }, 10, ProtocolBuffer.Encoder.MAX_TYPE)
   513 
       
   514    ProtocolBuffer.Encoder.STRING,
       
   515 
       
   516    ProtocolBuffer.Encoder.STRING,
       
   517 
       
   518   )
       
   519 
   565 
   520   _STYLE = """"""
   566   _STYLE = """"""
   521   _STYLE_CONTENT_TYPE = """"""
   567   _STYLE_CONTENT_TYPE = """"""
   522 class TaskQueueAddResponse(ProtocolBuffer.ProtocolMessage):
   568 class TaskQueueAddResponse(ProtocolBuffer.ProtocolMessage):
   523   has_chosen_task_name_ = 0
   569   has_chosen_task_name_ = 0
   580   def __str__(self, prefix="", printElemNumber=0):
   626   def __str__(self, prefix="", printElemNumber=0):
   581     res=""
   627     res=""
   582     if self.has_chosen_task_name_: res+=prefix+("chosen_task_name: %s\n" % self.DebugFormatString(self.chosen_task_name_))
   628     if self.has_chosen_task_name_: res+=prefix+("chosen_task_name: %s\n" % self.DebugFormatString(self.chosen_task_name_))
   583     return res
   629     return res
   584 
   630 
       
   631 
       
   632   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   633     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   634 
   585   kchosen_task_name = 1
   635   kchosen_task_name = 1
   586 
   636 
   587   _TEXT = (
   637   _TEXT = _BuildTagLookupTable({
   588    "ErrorCode",
   638     0: "ErrorCode",
   589    "chosen_task_name",
   639     1: "chosen_task_name",
   590   )
   640   }, 1)
   591 
   641 
   592   _TYPES = (
   642   _TYPES = _BuildTagLookupTable({
   593    ProtocolBuffer.Encoder.NUMERIC,
   643     0: ProtocolBuffer.Encoder.NUMERIC,
   594    ProtocolBuffer.Encoder.STRING,
   644     1: ProtocolBuffer.Encoder.STRING,
   595 
   645   }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
   596   )
       
   597 
   646 
   598   _STYLE = """"""
   647   _STYLE = """"""
   599   _STYLE_CONTENT_TYPE = """"""
   648   _STYLE_CONTENT_TYPE = """"""
   600 class TaskQueueUpdateQueueRequest(ProtocolBuffer.ProtocolMessage):
   649 class TaskQueueUpdateQueueRequest(ProtocolBuffer.ProtocolMessage):
   601   has_app_id_ = 0
   650   has_app_id_ = 0
   777     if self.has_bucket_refill_per_second_: res+=prefix+("bucket_refill_per_second: %s\n" % self.DebugFormat(self.bucket_refill_per_second_))
   826     if self.has_bucket_refill_per_second_: res+=prefix+("bucket_refill_per_second: %s\n" % self.DebugFormat(self.bucket_refill_per_second_))
   778     if self.has_bucket_capacity_: res+=prefix+("bucket_capacity: %s\n" % self.DebugFormatInt32(self.bucket_capacity_))
   827     if self.has_bucket_capacity_: res+=prefix+("bucket_capacity: %s\n" % self.DebugFormatInt32(self.bucket_capacity_))
   779     if self.has_user_specified_rate_: res+=prefix+("user_specified_rate: %s\n" % self.DebugFormatString(self.user_specified_rate_))
   828     if self.has_user_specified_rate_: res+=prefix+("user_specified_rate: %s\n" % self.DebugFormatString(self.user_specified_rate_))
   780     return res
   829     return res
   781 
   830 
       
   831 
       
   832   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
   833     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
   834 
   782   kapp_id = 1
   835   kapp_id = 1
   783   kqueue_name = 2
   836   kqueue_name = 2
   784   kbucket_refill_per_second = 3
   837   kbucket_refill_per_second = 3
   785   kbucket_capacity = 4
   838   kbucket_capacity = 4
   786   kuser_specified_rate = 5
   839   kuser_specified_rate = 5
   787 
   840 
   788   _TEXT = (
   841   _TEXT = _BuildTagLookupTable({
   789    "ErrorCode",
   842     0: "ErrorCode",
   790    "app_id",
   843     1: "app_id",
   791    "queue_name",
   844     2: "queue_name",
   792    "bucket_refill_per_second",
   845     3: "bucket_refill_per_second",
   793    "bucket_capacity",
   846     4: "bucket_capacity",
   794    "user_specified_rate",
   847     5: "user_specified_rate",
   795   )
   848   }, 5)
   796 
   849 
   797   _TYPES = (
   850   _TYPES = _BuildTagLookupTable({
   798    ProtocolBuffer.Encoder.NUMERIC,
   851     0: ProtocolBuffer.Encoder.NUMERIC,
   799    ProtocolBuffer.Encoder.STRING,
   852     1: ProtocolBuffer.Encoder.STRING,
   800 
   853     2: ProtocolBuffer.Encoder.STRING,
   801    ProtocolBuffer.Encoder.STRING,
   854     3: ProtocolBuffer.Encoder.DOUBLE,
   802 
   855     4: ProtocolBuffer.Encoder.NUMERIC,
   803    ProtocolBuffer.Encoder.DOUBLE,
   856     5: ProtocolBuffer.Encoder.STRING,
   804 
   857   }, 5, ProtocolBuffer.Encoder.MAX_TYPE)
   805    ProtocolBuffer.Encoder.NUMERIC,
       
   806 
       
   807    ProtocolBuffer.Encoder.STRING,
       
   808 
       
   809   )
       
   810 
   858 
   811   _STYLE = """"""
   859   _STYLE = """"""
   812   _STYLE_CONTENT_TYPE = """"""
   860   _STYLE_CONTENT_TYPE = """"""
   813 class TaskQueueUpdateQueueResponse(ProtocolBuffer.ProtocolMessage):
   861 class TaskQueueUpdateQueueResponse(ProtocolBuffer.ProtocolMessage):
   814 
   862 
   848   def __str__(self, prefix="", printElemNumber=0):
   896   def __str__(self, prefix="", printElemNumber=0):
   849     res=""
   897     res=""
   850     return res
   898     return res
   851 
   899 
   852 
   900 
   853   _TEXT = (
   901   def _BuildTagLookupTable(sparse, maxtag, default=None):
   854    "ErrorCode",
   902     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
   855   )
   903 
   856 
   904 
   857   _TYPES = (
   905   _TEXT = _BuildTagLookupTable({
   858    ProtocolBuffer.Encoder.NUMERIC,
   906     0: "ErrorCode",
   859   )
   907   }, 0)
       
   908 
       
   909   _TYPES = _BuildTagLookupTable({
       
   910     0: ProtocolBuffer.Encoder.NUMERIC,
       
   911   }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
   860 
   912 
   861   _STYLE = """"""
   913   _STYLE = """"""
   862   _STYLE_CONTENT_TYPE = """"""
   914   _STYLE_CONTENT_TYPE = """"""
   863 class TaskQueueFetchQueuesRequest(ProtocolBuffer.ProtocolMessage):
   915 class TaskQueueFetchQueuesRequest(ProtocolBuffer.ProtocolMessage):
   864   has_app_id_ = 0
   916   has_app_id_ = 0
   954     res=""
  1006     res=""
   955     if self.has_app_id_: res+=prefix+("app_id: %s\n" % self.DebugFormatString(self.app_id_))
  1007     if self.has_app_id_: res+=prefix+("app_id: %s\n" % self.DebugFormatString(self.app_id_))
   956     if self.has_max_rows_: res+=prefix+("max_rows: %s\n" % self.DebugFormatInt32(self.max_rows_))
  1008     if self.has_max_rows_: res+=prefix+("max_rows: %s\n" % self.DebugFormatInt32(self.max_rows_))
   957     return res
  1009     return res
   958 
  1010 
       
  1011 
       
  1012   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
  1013     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
  1014 
   959   kapp_id = 1
  1015   kapp_id = 1
   960   kmax_rows = 2
  1016   kmax_rows = 2
   961 
  1017 
   962   _TEXT = (
  1018   _TEXT = _BuildTagLookupTable({
   963    "ErrorCode",
  1019     0: "ErrorCode",
   964    "app_id",
  1020     1: "app_id",
   965    "max_rows",
  1021     2: "max_rows",
   966   )
  1022   }, 2)
   967 
  1023 
   968   _TYPES = (
  1024   _TYPES = _BuildTagLookupTable({
   969    ProtocolBuffer.Encoder.NUMERIC,
  1025     0: ProtocolBuffer.Encoder.NUMERIC,
   970    ProtocolBuffer.Encoder.STRING,
  1026     1: ProtocolBuffer.Encoder.STRING,
   971 
  1027     2: ProtocolBuffer.Encoder.NUMERIC,
   972    ProtocolBuffer.Encoder.NUMERIC,
  1028   }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
   973 
       
   974   )
       
   975 
  1029 
   976   _STYLE = """"""
  1030   _STYLE = """"""
   977   _STYLE_CONTENT_TYPE = """"""
  1031   _STYLE_CONTENT_TYPE = """"""
   978 class TaskQueueFetchQueuesResponse_Queue(ProtocolBuffer.ProtocolMessage):
  1032 class TaskQueueFetchQueuesResponse_Queue(ProtocolBuffer.ProtocolMessage):
   979   has_queue_name_ = 0
  1033   has_queue_name_ = 0
  1202       res+=e.__str__(prefix + "  ", printElemNumber)
  1256       res+=e.__str__(prefix + "  ", printElemNumber)
  1203       res+=prefix+"}\n"
  1257       res+=prefix+"}\n"
  1204       cnt+=1
  1258       cnt+=1
  1205     return res
  1259     return res
  1206 
  1260 
       
  1261 
       
  1262   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
  1263     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
  1264 
  1207   kQueueGroup = 1
  1265   kQueueGroup = 1
  1208   kQueuequeue_name = 2
  1266   kQueuequeue_name = 2
  1209   kQueuebucket_refill_per_second = 3
  1267   kQueuebucket_refill_per_second = 3
  1210   kQueuebucket_capacity = 4
  1268   kQueuebucket_capacity = 4
  1211   kQueueuser_specified_rate = 5
  1269   kQueueuser_specified_rate = 5
  1212 
  1270 
  1213   _TEXT = (
  1271   _TEXT = _BuildTagLookupTable({
  1214    "ErrorCode",
  1272     0: "ErrorCode",
  1215    "Queue",
  1273     1: "Queue",
  1216    "queue_name",
  1274     2: "queue_name",
  1217    "bucket_refill_per_second",
  1275     3: "bucket_refill_per_second",
  1218    "bucket_capacity",
  1276     4: "bucket_capacity",
  1219    "user_specified_rate",
  1277     5: "user_specified_rate",
  1220   )
  1278   }, 5)
  1221 
  1279 
  1222   _TYPES = (
  1280   _TYPES = _BuildTagLookupTable({
  1223    ProtocolBuffer.Encoder.NUMERIC,
  1281     0: ProtocolBuffer.Encoder.NUMERIC,
  1224    ProtocolBuffer.Encoder.STARTGROUP,
  1282     1: ProtocolBuffer.Encoder.STARTGROUP,
  1225 
  1283     2: ProtocolBuffer.Encoder.STRING,
  1226    ProtocolBuffer.Encoder.STRING,
  1284     3: ProtocolBuffer.Encoder.DOUBLE,
  1227 
  1285     4: ProtocolBuffer.Encoder.DOUBLE,
  1228    ProtocolBuffer.Encoder.DOUBLE,
  1286     5: ProtocolBuffer.Encoder.STRING,
  1229 
  1287   }, 5, ProtocolBuffer.Encoder.MAX_TYPE)
  1230    ProtocolBuffer.Encoder.DOUBLE,
       
  1231 
       
  1232    ProtocolBuffer.Encoder.STRING,
       
  1233 
       
  1234   )
       
  1235 
  1288 
  1236   _STYLE = """"""
  1289   _STYLE = """"""
  1237   _STYLE_CONTENT_TYPE = """"""
  1290   _STYLE_CONTENT_TYPE = """"""
  1238 class TaskQueueFetchQueueStatsRequest(ProtocolBuffer.ProtocolMessage):
  1291 class TaskQueueFetchQueueStatsRequest(ProtocolBuffer.ProtocolMessage):
  1239   has_app_id_ = 0
  1292   has_app_id_ = 0
  1364       res+=prefix+("queue_name%s: %s\n" % (elm, self.DebugFormatString(e)))
  1417       res+=prefix+("queue_name%s: %s\n" % (elm, self.DebugFormatString(e)))
  1365       cnt+=1
  1418       cnt+=1
  1366     if self.has_max_num_tasks_: res+=prefix+("max_num_tasks: %s\n" % self.DebugFormatInt32(self.max_num_tasks_))
  1419     if self.has_max_num_tasks_: res+=prefix+("max_num_tasks: %s\n" % self.DebugFormatInt32(self.max_num_tasks_))
  1367     return res
  1420     return res
  1368 
  1421 
       
  1422 
       
  1423   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
  1424     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
  1425 
  1369   kapp_id = 1
  1426   kapp_id = 1
  1370   kqueue_name = 2
  1427   kqueue_name = 2
  1371   kmax_num_tasks = 3
  1428   kmax_num_tasks = 3
  1372 
  1429 
  1373   _TEXT = (
  1430   _TEXT = _BuildTagLookupTable({
  1374    "ErrorCode",
  1431     0: "ErrorCode",
  1375    "app_id",
  1432     1: "app_id",
  1376    "queue_name",
  1433     2: "queue_name",
  1377    "max_num_tasks",
  1434     3: "max_num_tasks",
  1378   )
  1435   }, 3)
  1379 
  1436 
  1380   _TYPES = (
  1437   _TYPES = _BuildTagLookupTable({
  1381    ProtocolBuffer.Encoder.NUMERIC,
  1438     0: ProtocolBuffer.Encoder.NUMERIC,
  1382    ProtocolBuffer.Encoder.STRING,
  1439     1: ProtocolBuffer.Encoder.STRING,
  1383 
  1440     2: ProtocolBuffer.Encoder.STRING,
  1384    ProtocolBuffer.Encoder.STRING,
  1441     3: ProtocolBuffer.Encoder.NUMERIC,
  1385 
  1442   }, 3, ProtocolBuffer.Encoder.MAX_TYPE)
  1386    ProtocolBuffer.Encoder.NUMERIC,
       
  1387 
       
  1388   )
       
  1389 
  1443 
  1390   _STYLE = """"""
  1444   _STYLE = """"""
  1391   _STYLE_CONTENT_TYPE = """"""
  1445   _STYLE_CONTENT_TYPE = """"""
  1392 class TaskQueueFetchQueueStatsResponse_QueueStats(ProtocolBuffer.ProtocolMessage):
  1446 class TaskQueueFetchQueueStatsResponse_QueueStats(ProtocolBuffer.ProtocolMessage):
  1393   has_num_tasks_ = 0
  1447   has_num_tasks_ = 0
  1561       res+=e.__str__(prefix + "  ", printElemNumber)
  1615       res+=e.__str__(prefix + "  ", printElemNumber)
  1562       res+=prefix+"}\n"
  1616       res+=prefix+"}\n"
  1563       cnt+=1
  1617       cnt+=1
  1564     return res
  1618     return res
  1565 
  1619 
       
  1620 
       
  1621   def _BuildTagLookupTable(sparse, maxtag, default=None):
       
  1622     return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
       
  1623 
  1566   kQueueStatsGroup = 1
  1624   kQueueStatsGroup = 1
  1567   kQueueStatsnum_tasks = 2
  1625   kQueueStatsnum_tasks = 2
  1568   kQueueStatsoldest_eta_usec = 3
  1626   kQueueStatsoldest_eta_usec = 3
  1569 
  1627 
  1570   _TEXT = (
  1628   _TEXT = _BuildTagLookupTable({
  1571    "ErrorCode",
  1629     0: "ErrorCode",
  1572    "QueueStats",
  1630     1: "QueueStats",
  1573    "num_tasks",
  1631     2: "num_tasks",
  1574    "oldest_eta_usec",
  1632     3: "oldest_eta_usec",
  1575   )
  1633   }, 3)
  1576 
  1634 
  1577   _TYPES = (
  1635   _TYPES = _BuildTagLookupTable({
  1578    ProtocolBuffer.Encoder.NUMERIC,
  1636     0: ProtocolBuffer.Encoder.NUMERIC,
  1579    ProtocolBuffer.Encoder.STARTGROUP,
  1637     1: ProtocolBuffer.Encoder.STARTGROUP,
  1580 
  1638     2: ProtocolBuffer.Encoder.NUMERIC,
  1581    ProtocolBuffer.Encoder.NUMERIC,
  1639     3: ProtocolBuffer.Encoder.NUMERIC,
  1582 
  1640   }, 3, ProtocolBuffer.Encoder.MAX_TYPE)
  1583    ProtocolBuffer.Encoder.NUMERIC,
       
  1584 
       
  1585   )
       
  1586 
  1641 
  1587   _STYLE = """"""
  1642   _STYLE = """"""
  1588   _STYLE_CONTENT_TYPE = """"""
  1643   _STYLE_CONTENT_TYPE = """"""
  1589 
  1644 
  1590 __all__ = ['TaskQueueServiceError','TaskQueueAddRequest','TaskQueueAddRequest_Header','TaskQueueAddResponse','TaskQueueUpdateQueueRequest','TaskQueueUpdateQueueResponse','TaskQueueFetchQueuesRequest','TaskQueueFetchQueuesResponse','TaskQueueFetchQueuesResponse_Queue','TaskQueueFetchQueueStatsRequest','TaskQueueFetchQueueStatsResponse','TaskQueueFetchQueueStatsResponse_QueueStats']
  1645 __all__ = ['TaskQueueServiceError','TaskQueueAddRequest','TaskQueueAddRequest_Header','TaskQueueAddResponse','TaskQueueUpdateQueueRequest','TaskQueueUpdateQueueResponse','TaskQueueFetchQueuesRequest','TaskQueueFetchQueuesResponse','TaskQueueFetchQueuesResponse_Queue','TaskQueueFetchQueueStatsRequest','TaskQueueFetchQueueStatsResponse','TaskQueueFetchQueueStatsResponse_QueueStats']