Fixes an issue where the organization home page would throw a 505 when no projects...
[Melange.git] / thirdparty / google_appengine / google / appengine / api / urlfetch_service_pb.py
blobafdf6190228284481d7e4c17401d9b482546b18c
1 #!/usr/bin/env python
3 # Copyright 2007 Google Inc.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 from google.net.proto import ProtocolBuffer
19 import array
20 import dummy_thread as thread
22 __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit
23 unusednames=printElemNumber,debug_strs no-special"""
25 from google.appengine.api.api_base_pb import *
26 class URLFetchServiceError(ProtocolBuffer.ProtocolMessage):
28 OK = 0
29 INVALID_URL = 1
30 FETCH_ERROR = 2
31 UNSPECIFIED_ERROR = 3
32 RESPONSE_TOO_LARGE = 4
33 DEADLINE_EXCEEDED = 5
35 _ErrorCode_NAMES = {
36 0: "OK",
37 1: "INVALID_URL",
38 2: "FETCH_ERROR",
39 3: "UNSPECIFIED_ERROR",
40 4: "RESPONSE_TOO_LARGE",
41 5: "DEADLINE_EXCEEDED",
44 def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
45 ErrorCode_Name = classmethod(ErrorCode_Name)
48 def __init__(self, contents=None):
49 pass
50 if contents is not None: self.MergeFromString(contents)
53 def MergeFrom(self, x):
54 assert x is not self
56 def Equals(self, x):
57 if x is self: return 1
58 return 1
60 def IsInitialized(self, debug_strs=None):
61 initialized = 1
62 return initialized
64 def ByteSize(self):
65 n = 0
66 return n + 0
68 def Clear(self):
69 pass
71 def OutputUnchecked(self, out):
72 pass
74 def TryMerge(self, d):
75 while d.avail() > 0:
76 tt = d.getVarInt32()
77 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
78 d.skipData(tt)
81 def __str__(self, prefix="", printElemNumber=0):
82 res=""
83 return res
86 _TEXT = (
87 "ErrorCode",
90 _TYPES = (
91 ProtocolBuffer.Encoder.NUMERIC,
94 _STYLE = """"""
95 _STYLE_CONTENT_TYPE = """"""
96 class URLFetchRequest_Header(ProtocolBuffer.ProtocolMessage):
97 has_key_ = 0
98 key_ = ""
99 has_value_ = 0
100 value_ = ""
102 def __init__(self, contents=None):
103 if contents is not None: self.MergeFromString(contents)
105 def key(self): return self.key_
107 def set_key(self, x):
108 self.has_key_ = 1
109 self.key_ = x
111 def clear_key(self):
112 if self.has_key_:
113 self.has_key_ = 0
114 self.key_ = ""
116 def has_key(self): return self.has_key_
118 def value(self): return self.value_
120 def set_value(self, x):
121 self.has_value_ = 1
122 self.value_ = x
124 def clear_value(self):
125 if self.has_value_:
126 self.has_value_ = 0
127 self.value_ = ""
129 def has_value(self): return self.has_value_
132 def MergeFrom(self, x):
133 assert x is not self
134 if (x.has_key()): self.set_key(x.key())
135 if (x.has_value()): self.set_value(x.value())
137 def Equals(self, x):
138 if x is self: return 1
139 if self.has_key_ != x.has_key_: return 0
140 if self.has_key_ and self.key_ != x.key_: return 0
141 if self.has_value_ != x.has_value_: return 0
142 if self.has_value_ and self.value_ != x.value_: return 0
143 return 1
145 def IsInitialized(self, debug_strs=None):
146 initialized = 1
147 if (not self.has_key_):
148 initialized = 0
149 if debug_strs is not None:
150 debug_strs.append('Required field: key not set.')
151 if (not self.has_value_):
152 initialized = 0
153 if debug_strs is not None:
154 debug_strs.append('Required field: value not set.')
155 return initialized
157 def ByteSize(self):
158 n = 0
159 n += self.lengthString(len(self.key_))
160 n += self.lengthString(len(self.value_))
161 return n + 2
163 def Clear(self):
164 self.clear_key()
165 self.clear_value()
167 def OutputUnchecked(self, out):
168 out.putVarInt32(34)
169 out.putPrefixedString(self.key_)
170 out.putVarInt32(42)
171 out.putPrefixedString(self.value_)
173 def TryMerge(self, d):
174 while 1:
175 tt = d.getVarInt32()
176 if tt == 28: break
177 if tt == 34:
178 self.set_key(d.getPrefixedString())
179 continue
180 if tt == 42:
181 self.set_value(d.getPrefixedString())
182 continue
183 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
184 d.skipData(tt)
187 def __str__(self, prefix="", printElemNumber=0):
188 res=""
189 if self.has_key_: res+=prefix+("Key: %s\n" % self.DebugFormatString(self.key_))
190 if self.has_value_: res+=prefix+("Value: %s\n" % self.DebugFormatString(self.value_))
191 return res
193 class URLFetchRequest(ProtocolBuffer.ProtocolMessage):
195 GET = 1
196 POST = 2
197 HEAD = 3
198 PUT = 4
199 DELETE = 5
201 _RequestMethod_NAMES = {
202 1: "GET",
203 2: "POST",
204 3: "HEAD",
205 4: "PUT",
206 5: "DELETE",
209 def RequestMethod_Name(cls, x): return cls._RequestMethod_NAMES.get(x, "")
210 RequestMethod_Name = classmethod(RequestMethod_Name)
212 has_method_ = 0
213 method_ = 0
214 has_url_ = 0
215 url_ = ""
216 has_payload_ = 0
217 payload_ = ""
218 has_followredirects_ = 0
219 followredirects_ = 1
220 has_deadline_ = 0
221 deadline_ = 0.0
223 def __init__(self, contents=None):
224 self.header_ = []
225 if contents is not None: self.MergeFromString(contents)
227 def method(self): return self.method_
229 def set_method(self, x):
230 self.has_method_ = 1
231 self.method_ = x
233 def clear_method(self):
234 if self.has_method_:
235 self.has_method_ = 0
236 self.method_ = 0
238 def has_method(self): return self.has_method_
240 def url(self): return self.url_
242 def set_url(self, x):
243 self.has_url_ = 1
244 self.url_ = x
246 def clear_url(self):
247 if self.has_url_:
248 self.has_url_ = 0
249 self.url_ = ""
251 def has_url(self): return self.has_url_
253 def header_size(self): return len(self.header_)
254 def header_list(self): return self.header_
256 def header(self, i):
257 return self.header_[i]
259 def mutable_header(self, i):
260 return self.header_[i]
262 def add_header(self):
263 x = URLFetchRequest_Header()
264 self.header_.append(x)
265 return x
267 def clear_header(self):
268 self.header_ = []
269 def payload(self): return self.payload_
271 def set_payload(self, x):
272 self.has_payload_ = 1
273 self.payload_ = x
275 def clear_payload(self):
276 if self.has_payload_:
277 self.has_payload_ = 0
278 self.payload_ = ""
280 def has_payload(self): return self.has_payload_
282 def followredirects(self): return self.followredirects_
284 def set_followredirects(self, x):
285 self.has_followredirects_ = 1
286 self.followredirects_ = x
288 def clear_followredirects(self):
289 if self.has_followredirects_:
290 self.has_followredirects_ = 0
291 self.followredirects_ = 1
293 def has_followredirects(self): return self.has_followredirects_
295 def deadline(self): return self.deadline_
297 def set_deadline(self, x):
298 self.has_deadline_ = 1
299 self.deadline_ = x
301 def clear_deadline(self):
302 if self.has_deadline_:
303 self.has_deadline_ = 0
304 self.deadline_ = 0.0
306 def has_deadline(self): return self.has_deadline_
309 def MergeFrom(self, x):
310 assert x is not self
311 if (x.has_method()): self.set_method(x.method())
312 if (x.has_url()): self.set_url(x.url())
313 for i in xrange(x.header_size()): self.add_header().CopyFrom(x.header(i))
314 if (x.has_payload()): self.set_payload(x.payload())
315 if (x.has_followredirects()): self.set_followredirects(x.followredirects())
316 if (x.has_deadline()): self.set_deadline(x.deadline())
318 def Equals(self, x):
319 if x is self: return 1
320 if self.has_method_ != x.has_method_: return 0
321 if self.has_method_ and self.method_ != x.method_: return 0
322 if self.has_url_ != x.has_url_: return 0
323 if self.has_url_ and self.url_ != x.url_: return 0
324 if len(self.header_) != len(x.header_): return 0
325 for e1, e2 in zip(self.header_, x.header_):
326 if e1 != e2: return 0
327 if self.has_payload_ != x.has_payload_: return 0
328 if self.has_payload_ and self.payload_ != x.payload_: return 0
329 if self.has_followredirects_ != x.has_followredirects_: return 0
330 if self.has_followredirects_ and self.followredirects_ != x.followredirects_: return 0
331 if self.has_deadline_ != x.has_deadline_: return 0
332 if self.has_deadline_ and self.deadline_ != x.deadline_: return 0
333 return 1
335 def IsInitialized(self, debug_strs=None):
336 initialized = 1
337 if (not self.has_method_):
338 initialized = 0
339 if debug_strs is not None:
340 debug_strs.append('Required field: method not set.')
341 if (not self.has_url_):
342 initialized = 0
343 if debug_strs is not None:
344 debug_strs.append('Required field: url not set.')
345 for p in self.header_:
346 if not p.IsInitialized(debug_strs): initialized=0
347 return initialized
349 def ByteSize(self):
350 n = 0
351 n += self.lengthVarInt64(self.method_)
352 n += self.lengthString(len(self.url_))
353 n += 2 * len(self.header_)
354 for i in xrange(len(self.header_)): n += self.header_[i].ByteSize()
355 if (self.has_payload_): n += 1 + self.lengthString(len(self.payload_))
356 if (self.has_followredirects_): n += 2
357 if (self.has_deadline_): n += 9
358 return n + 2
360 def Clear(self):
361 self.clear_method()
362 self.clear_url()
363 self.clear_header()
364 self.clear_payload()
365 self.clear_followredirects()
366 self.clear_deadline()
368 def OutputUnchecked(self, out):
369 out.putVarInt32(8)
370 out.putVarInt32(self.method_)
371 out.putVarInt32(18)
372 out.putPrefixedString(self.url_)
373 for i in xrange(len(self.header_)):
374 out.putVarInt32(27)
375 self.header_[i].OutputUnchecked(out)
376 out.putVarInt32(28)
377 if (self.has_payload_):
378 out.putVarInt32(50)
379 out.putPrefixedString(self.payload_)
380 if (self.has_followredirects_):
381 out.putVarInt32(56)
382 out.putBoolean(self.followredirects_)
383 if (self.has_deadline_):
384 out.putVarInt32(65)
385 out.putDouble(self.deadline_)
387 def TryMerge(self, d):
388 while d.avail() > 0:
389 tt = d.getVarInt32()
390 if tt == 8:
391 self.set_method(d.getVarInt32())
392 continue
393 if tt == 18:
394 self.set_url(d.getPrefixedString())
395 continue
396 if tt == 27:
397 self.add_header().TryMerge(d)
398 continue
399 if tt == 50:
400 self.set_payload(d.getPrefixedString())
401 continue
402 if tt == 56:
403 self.set_followredirects(d.getBoolean())
404 continue
405 if tt == 65:
406 self.set_deadline(d.getDouble())
407 continue
408 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
409 d.skipData(tt)
412 def __str__(self, prefix="", printElemNumber=0):
413 res=""
414 if self.has_method_: res+=prefix+("Method: %s\n" % self.DebugFormatInt32(self.method_))
415 if self.has_url_: res+=prefix+("Url: %s\n" % self.DebugFormatString(self.url_))
416 cnt=0
417 for e in self.header_:
418 elm=""
419 if printElemNumber: elm="(%d)" % cnt
420 res+=prefix+("Header%s {\n" % elm)
421 res+=e.__str__(prefix + " ", printElemNumber)
422 res+=prefix+"}\n"
423 cnt+=1
424 if self.has_payload_: res+=prefix+("Payload: %s\n" % self.DebugFormatString(self.payload_))
425 if self.has_followredirects_: res+=prefix+("FollowRedirects: %s\n" % self.DebugFormatBool(self.followredirects_))
426 if self.has_deadline_: res+=prefix+("Deadline: %s\n" % self.DebugFormat(self.deadline_))
427 return res
429 kMethod = 1
430 kUrl = 2
431 kHeaderGroup = 3
432 kHeaderKey = 4
433 kHeaderValue = 5
434 kPayload = 6
435 kFollowRedirects = 7
436 kDeadline = 8
438 _TEXT = (
439 "ErrorCode",
440 "Method",
441 "Url",
442 "Header",
443 "Key",
444 "Value",
445 "Payload",
446 "FollowRedirects",
447 "Deadline",
450 _TYPES = (
451 ProtocolBuffer.Encoder.NUMERIC,
452 ProtocolBuffer.Encoder.NUMERIC,
454 ProtocolBuffer.Encoder.STRING,
456 ProtocolBuffer.Encoder.STARTGROUP,
458 ProtocolBuffer.Encoder.STRING,
460 ProtocolBuffer.Encoder.STRING,
462 ProtocolBuffer.Encoder.STRING,
464 ProtocolBuffer.Encoder.NUMERIC,
466 ProtocolBuffer.Encoder.DOUBLE,
470 _STYLE = """"""
471 _STYLE_CONTENT_TYPE = """"""
472 class URLFetchResponse_Header(ProtocolBuffer.ProtocolMessage):
473 has_key_ = 0
474 key_ = ""
475 has_value_ = 0
476 value_ = ""
478 def __init__(self, contents=None):
479 if contents is not None: self.MergeFromString(contents)
481 def key(self): return self.key_
483 def set_key(self, x):
484 self.has_key_ = 1
485 self.key_ = x
487 def clear_key(self):
488 if self.has_key_:
489 self.has_key_ = 0
490 self.key_ = ""
492 def has_key(self): return self.has_key_
494 def value(self): return self.value_
496 def set_value(self, x):
497 self.has_value_ = 1
498 self.value_ = x
500 def clear_value(self):
501 if self.has_value_:
502 self.has_value_ = 0
503 self.value_ = ""
505 def has_value(self): return self.has_value_
508 def MergeFrom(self, x):
509 assert x is not self
510 if (x.has_key()): self.set_key(x.key())
511 if (x.has_value()): self.set_value(x.value())
513 def Equals(self, x):
514 if x is self: return 1
515 if self.has_key_ != x.has_key_: return 0
516 if self.has_key_ and self.key_ != x.key_: return 0
517 if self.has_value_ != x.has_value_: return 0
518 if self.has_value_ and self.value_ != x.value_: return 0
519 return 1
521 def IsInitialized(self, debug_strs=None):
522 initialized = 1
523 if (not self.has_key_):
524 initialized = 0
525 if debug_strs is not None:
526 debug_strs.append('Required field: key not set.')
527 if (not self.has_value_):
528 initialized = 0
529 if debug_strs is not None:
530 debug_strs.append('Required field: value not set.')
531 return initialized
533 def ByteSize(self):
534 n = 0
535 n += self.lengthString(len(self.key_))
536 n += self.lengthString(len(self.value_))
537 return n + 2
539 def Clear(self):
540 self.clear_key()
541 self.clear_value()
543 def OutputUnchecked(self, out):
544 out.putVarInt32(34)
545 out.putPrefixedString(self.key_)
546 out.putVarInt32(42)
547 out.putPrefixedString(self.value_)
549 def TryMerge(self, d):
550 while 1:
551 tt = d.getVarInt32()
552 if tt == 28: break
553 if tt == 34:
554 self.set_key(d.getPrefixedString())
555 continue
556 if tt == 42:
557 self.set_value(d.getPrefixedString())
558 continue
559 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
560 d.skipData(tt)
563 def __str__(self, prefix="", printElemNumber=0):
564 res=""
565 if self.has_key_: res+=prefix+("Key: %s\n" % self.DebugFormatString(self.key_))
566 if self.has_value_: res+=prefix+("Value: %s\n" % self.DebugFormatString(self.value_))
567 return res
569 class URLFetchResponse(ProtocolBuffer.ProtocolMessage):
570 has_content_ = 0
571 content_ = ""
572 has_statuscode_ = 0
573 statuscode_ = 0
574 has_contentwastruncated_ = 0
575 contentwastruncated_ = 0
576 has_externalbytessent_ = 0
577 externalbytessent_ = 0
578 has_externalbytesreceived_ = 0
579 externalbytesreceived_ = 0
581 def __init__(self, contents=None):
582 self.header_ = []
583 if contents is not None: self.MergeFromString(contents)
585 def content(self): return self.content_
587 def set_content(self, x):
588 self.has_content_ = 1
589 self.content_ = x
591 def clear_content(self):
592 if self.has_content_:
593 self.has_content_ = 0
594 self.content_ = ""
596 def has_content(self): return self.has_content_
598 def statuscode(self): return self.statuscode_
600 def set_statuscode(self, x):
601 self.has_statuscode_ = 1
602 self.statuscode_ = x
604 def clear_statuscode(self):
605 if self.has_statuscode_:
606 self.has_statuscode_ = 0
607 self.statuscode_ = 0
609 def has_statuscode(self): return self.has_statuscode_
611 def header_size(self): return len(self.header_)
612 def header_list(self): return self.header_
614 def header(self, i):
615 return self.header_[i]
617 def mutable_header(self, i):
618 return self.header_[i]
620 def add_header(self):
621 x = URLFetchResponse_Header()
622 self.header_.append(x)
623 return x
625 def clear_header(self):
626 self.header_ = []
627 def contentwastruncated(self): return self.contentwastruncated_
629 def set_contentwastruncated(self, x):
630 self.has_contentwastruncated_ = 1
631 self.contentwastruncated_ = x
633 def clear_contentwastruncated(self):
634 if self.has_contentwastruncated_:
635 self.has_contentwastruncated_ = 0
636 self.contentwastruncated_ = 0
638 def has_contentwastruncated(self): return self.has_contentwastruncated_
640 def externalbytessent(self): return self.externalbytessent_
642 def set_externalbytessent(self, x):
643 self.has_externalbytessent_ = 1
644 self.externalbytessent_ = x
646 def clear_externalbytessent(self):
647 if self.has_externalbytessent_:
648 self.has_externalbytessent_ = 0
649 self.externalbytessent_ = 0
651 def has_externalbytessent(self): return self.has_externalbytessent_
653 def externalbytesreceived(self): return self.externalbytesreceived_
655 def set_externalbytesreceived(self, x):
656 self.has_externalbytesreceived_ = 1
657 self.externalbytesreceived_ = x
659 def clear_externalbytesreceived(self):
660 if self.has_externalbytesreceived_:
661 self.has_externalbytesreceived_ = 0
662 self.externalbytesreceived_ = 0
664 def has_externalbytesreceived(self): return self.has_externalbytesreceived_
667 def MergeFrom(self, x):
668 assert x is not self
669 if (x.has_content()): self.set_content(x.content())
670 if (x.has_statuscode()): self.set_statuscode(x.statuscode())
671 for i in xrange(x.header_size()): self.add_header().CopyFrom(x.header(i))
672 if (x.has_contentwastruncated()): self.set_contentwastruncated(x.contentwastruncated())
673 if (x.has_externalbytessent()): self.set_externalbytessent(x.externalbytessent())
674 if (x.has_externalbytesreceived()): self.set_externalbytesreceived(x.externalbytesreceived())
676 def Equals(self, x):
677 if x is self: return 1
678 if self.has_content_ != x.has_content_: return 0
679 if self.has_content_ and self.content_ != x.content_: return 0
680 if self.has_statuscode_ != x.has_statuscode_: return 0
681 if self.has_statuscode_ and self.statuscode_ != x.statuscode_: return 0
682 if len(self.header_) != len(x.header_): return 0
683 for e1, e2 in zip(self.header_, x.header_):
684 if e1 != e2: return 0
685 if self.has_contentwastruncated_ != x.has_contentwastruncated_: return 0
686 if self.has_contentwastruncated_ and self.contentwastruncated_ != x.contentwastruncated_: return 0
687 if self.has_externalbytessent_ != x.has_externalbytessent_: return 0
688 if self.has_externalbytessent_ and self.externalbytessent_ != x.externalbytessent_: return 0
689 if self.has_externalbytesreceived_ != x.has_externalbytesreceived_: return 0
690 if self.has_externalbytesreceived_ and self.externalbytesreceived_ != x.externalbytesreceived_: return 0
691 return 1
693 def IsInitialized(self, debug_strs=None):
694 initialized = 1
695 if (not self.has_statuscode_):
696 initialized = 0
697 if debug_strs is not None:
698 debug_strs.append('Required field: statuscode not set.')
699 for p in self.header_:
700 if not p.IsInitialized(debug_strs): initialized=0
701 return initialized
703 def ByteSize(self):
704 n = 0
705 if (self.has_content_): n += 1 + self.lengthString(len(self.content_))
706 n += self.lengthVarInt64(self.statuscode_)
707 n += 2 * len(self.header_)
708 for i in xrange(len(self.header_)): n += self.header_[i].ByteSize()
709 if (self.has_contentwastruncated_): n += 2
710 if (self.has_externalbytessent_): n += 1 + self.lengthVarInt64(self.externalbytessent_)
711 if (self.has_externalbytesreceived_): n += 1 + self.lengthVarInt64(self.externalbytesreceived_)
712 return n + 1
714 def Clear(self):
715 self.clear_content()
716 self.clear_statuscode()
717 self.clear_header()
718 self.clear_contentwastruncated()
719 self.clear_externalbytessent()
720 self.clear_externalbytesreceived()
722 def OutputUnchecked(self, out):
723 if (self.has_content_):
724 out.putVarInt32(10)
725 out.putPrefixedString(self.content_)
726 out.putVarInt32(16)
727 out.putVarInt32(self.statuscode_)
728 for i in xrange(len(self.header_)):
729 out.putVarInt32(27)
730 self.header_[i].OutputUnchecked(out)
731 out.putVarInt32(28)
732 if (self.has_contentwastruncated_):
733 out.putVarInt32(48)
734 out.putBoolean(self.contentwastruncated_)
735 if (self.has_externalbytessent_):
736 out.putVarInt32(56)
737 out.putVarInt64(self.externalbytessent_)
738 if (self.has_externalbytesreceived_):
739 out.putVarInt32(64)
740 out.putVarInt64(self.externalbytesreceived_)
742 def TryMerge(self, d):
743 while d.avail() > 0:
744 tt = d.getVarInt32()
745 if tt == 10:
746 self.set_content(d.getPrefixedString())
747 continue
748 if tt == 16:
749 self.set_statuscode(d.getVarInt32())
750 continue
751 if tt == 27:
752 self.add_header().TryMerge(d)
753 continue
754 if tt == 48:
755 self.set_contentwastruncated(d.getBoolean())
756 continue
757 if tt == 56:
758 self.set_externalbytessent(d.getVarInt64())
759 continue
760 if tt == 64:
761 self.set_externalbytesreceived(d.getVarInt64())
762 continue
763 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
764 d.skipData(tt)
767 def __str__(self, prefix="", printElemNumber=0):
768 res=""
769 if self.has_content_: res+=prefix+("Content: %s\n" % self.DebugFormatString(self.content_))
770 if self.has_statuscode_: res+=prefix+("StatusCode: %s\n" % self.DebugFormatInt32(self.statuscode_))
771 cnt=0
772 for e in self.header_:
773 elm=""
774 if printElemNumber: elm="(%d)" % cnt
775 res+=prefix+("Header%s {\n" % elm)
776 res+=e.__str__(prefix + " ", printElemNumber)
777 res+=prefix+"}\n"
778 cnt+=1
779 if self.has_contentwastruncated_: res+=prefix+("ContentWasTruncated: %s\n" % self.DebugFormatBool(self.contentwastruncated_))
780 if self.has_externalbytessent_: res+=prefix+("ExternalBytesSent: %s\n" % self.DebugFormatInt64(self.externalbytessent_))
781 if self.has_externalbytesreceived_: res+=prefix+("ExternalBytesReceived: %s\n" % self.DebugFormatInt64(self.externalbytesreceived_))
782 return res
784 kContent = 1
785 kStatusCode = 2
786 kHeaderGroup = 3
787 kHeaderKey = 4
788 kHeaderValue = 5
789 kContentWasTruncated = 6
790 kExternalBytesSent = 7
791 kExternalBytesReceived = 8
793 _TEXT = (
794 "ErrorCode",
795 "Content",
796 "StatusCode",
797 "Header",
798 "Key",
799 "Value",
800 "ContentWasTruncated",
801 "ExternalBytesSent",
802 "ExternalBytesReceived",
805 _TYPES = (
806 ProtocolBuffer.Encoder.NUMERIC,
807 ProtocolBuffer.Encoder.STRING,
809 ProtocolBuffer.Encoder.NUMERIC,
811 ProtocolBuffer.Encoder.STARTGROUP,
813 ProtocolBuffer.Encoder.STRING,
815 ProtocolBuffer.Encoder.STRING,
817 ProtocolBuffer.Encoder.NUMERIC,
819 ProtocolBuffer.Encoder.NUMERIC,
821 ProtocolBuffer.Encoder.NUMERIC,
825 _STYLE = """"""
826 _STYLE_CONTENT_TYPE = """"""
828 __all__ = ['URLFetchServiceError','URLFetchRequest','URLFetchRequest_Header','URLFetchResponse','URLFetchResponse_Header']