App Engine Python SDK version 1.7.7
[gae.git] / python / google / appengine / api / user_service_pb.py
blob50b6deec0a108bbb760311a940289f3bde833e76
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.
20 from google.net.proto import ProtocolBuffer
21 import array
22 import dummy_thread as thread
24 __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit
25 unusednames=printElemNumber,debug_strs no-special"""
27 if hasattr(ProtocolBuffer, 'ExtendableProtocolMessage'):
28 _extension_runtime = True
29 _ExtendableProtocolMessage = ProtocolBuffer.ExtendableProtocolMessage
30 else:
31 _extension_runtime = False
32 _ExtendableProtocolMessage = ProtocolBuffer.ProtocolMessage
34 class UserServiceError(ProtocolBuffer.ProtocolMessage):
37 OK = 0
38 REDIRECT_URL_TOO_LONG = 1
39 NOT_ALLOWED = 2
40 OAUTH_INVALID_TOKEN = 3
41 OAUTH_INVALID_REQUEST = 4
42 OAUTH_ERROR = 5
44 _ErrorCode_NAMES = {
45 0: "OK",
46 1: "REDIRECT_URL_TOO_LONG",
47 2: "NOT_ALLOWED",
48 3: "OAUTH_INVALID_TOKEN",
49 4: "OAUTH_INVALID_REQUEST",
50 5: "OAUTH_ERROR",
53 def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "")
54 ErrorCode_Name = classmethod(ErrorCode_Name)
57 def __init__(self, contents=None):
58 pass
59 if contents is not None: self.MergeFromString(contents)
62 def MergeFrom(self, x):
63 assert x is not self
65 def Equals(self, x):
66 if x is self: return 1
67 return 1
69 def IsInitialized(self, debug_strs=None):
70 initialized = 1
71 return initialized
73 def ByteSize(self):
74 n = 0
75 return n
77 def ByteSizePartial(self):
78 n = 0
79 return n
81 def Clear(self):
82 pass
84 def OutputUnchecked(self, out):
85 pass
87 def OutputPartial(self, out):
88 pass
90 def TryMerge(self, d):
91 while d.avail() > 0:
92 tt = d.getVarInt32()
95 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
96 d.skipData(tt)
99 def __str__(self, prefix="", printElemNumber=0):
100 res=""
101 return res
104 def _BuildTagLookupTable(sparse, maxtag, default=None):
105 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
108 _TEXT = _BuildTagLookupTable({
109 0: "ErrorCode",
110 }, 0)
112 _TYPES = _BuildTagLookupTable({
113 0: ProtocolBuffer.Encoder.NUMERIC,
114 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
117 _STYLE = """"""
118 _STYLE_CONTENT_TYPE = """"""
119 _PROTO_DESCRIPTOR_NAME = 'apphosting.UserServiceError'
120 class CreateLoginURLRequest(ProtocolBuffer.ProtocolMessage):
121 has_destination_url_ = 0
122 destination_url_ = ""
123 has_auth_domain_ = 0
124 auth_domain_ = ""
125 has_federated_identity_ = 0
126 federated_identity_ = ""
128 def __init__(self, contents=None):
129 if contents is not None: self.MergeFromString(contents)
131 def destination_url(self): return self.destination_url_
133 def set_destination_url(self, x):
134 self.has_destination_url_ = 1
135 self.destination_url_ = x
137 def clear_destination_url(self):
138 if self.has_destination_url_:
139 self.has_destination_url_ = 0
140 self.destination_url_ = ""
142 def has_destination_url(self): return self.has_destination_url_
144 def auth_domain(self): return self.auth_domain_
146 def set_auth_domain(self, x):
147 self.has_auth_domain_ = 1
148 self.auth_domain_ = x
150 def clear_auth_domain(self):
151 if self.has_auth_domain_:
152 self.has_auth_domain_ = 0
153 self.auth_domain_ = ""
155 def has_auth_domain(self): return self.has_auth_domain_
157 def federated_identity(self): return self.federated_identity_
159 def set_federated_identity(self, x):
160 self.has_federated_identity_ = 1
161 self.federated_identity_ = x
163 def clear_federated_identity(self):
164 if self.has_federated_identity_:
165 self.has_federated_identity_ = 0
166 self.federated_identity_ = ""
168 def has_federated_identity(self): return self.has_federated_identity_
171 def MergeFrom(self, x):
172 assert x is not self
173 if (x.has_destination_url()): self.set_destination_url(x.destination_url())
174 if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
175 if (x.has_federated_identity()): self.set_federated_identity(x.federated_identity())
177 def Equals(self, x):
178 if x is self: return 1
179 if self.has_destination_url_ != x.has_destination_url_: return 0
180 if self.has_destination_url_ and self.destination_url_ != x.destination_url_: return 0
181 if self.has_auth_domain_ != x.has_auth_domain_: return 0
182 if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
183 if self.has_federated_identity_ != x.has_federated_identity_: return 0
184 if self.has_federated_identity_ and self.federated_identity_ != x.federated_identity_: return 0
185 return 1
187 def IsInitialized(self, debug_strs=None):
188 initialized = 1
189 if (not self.has_destination_url_):
190 initialized = 0
191 if debug_strs is not None:
192 debug_strs.append('Required field: destination_url not set.')
193 return initialized
195 def ByteSize(self):
196 n = 0
197 n += self.lengthString(len(self.destination_url_))
198 if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_))
199 if (self.has_federated_identity_): n += 1 + self.lengthString(len(self.federated_identity_))
200 return n + 1
202 def ByteSizePartial(self):
203 n = 0
204 if (self.has_destination_url_):
205 n += 1
206 n += self.lengthString(len(self.destination_url_))
207 if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_))
208 if (self.has_federated_identity_): n += 1 + self.lengthString(len(self.federated_identity_))
209 return n
211 def Clear(self):
212 self.clear_destination_url()
213 self.clear_auth_domain()
214 self.clear_federated_identity()
216 def OutputUnchecked(self, out):
217 out.putVarInt32(10)
218 out.putPrefixedString(self.destination_url_)
219 if (self.has_auth_domain_):
220 out.putVarInt32(18)
221 out.putPrefixedString(self.auth_domain_)
222 if (self.has_federated_identity_):
223 out.putVarInt32(26)
224 out.putPrefixedString(self.federated_identity_)
226 def OutputPartial(self, out):
227 if (self.has_destination_url_):
228 out.putVarInt32(10)
229 out.putPrefixedString(self.destination_url_)
230 if (self.has_auth_domain_):
231 out.putVarInt32(18)
232 out.putPrefixedString(self.auth_domain_)
233 if (self.has_federated_identity_):
234 out.putVarInt32(26)
235 out.putPrefixedString(self.federated_identity_)
237 def TryMerge(self, d):
238 while d.avail() > 0:
239 tt = d.getVarInt32()
240 if tt == 10:
241 self.set_destination_url(d.getPrefixedString())
242 continue
243 if tt == 18:
244 self.set_auth_domain(d.getPrefixedString())
245 continue
246 if tt == 26:
247 self.set_federated_identity(d.getPrefixedString())
248 continue
251 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
252 d.skipData(tt)
255 def __str__(self, prefix="", printElemNumber=0):
256 res=""
257 if self.has_destination_url_: res+=prefix+("destination_url: %s\n" % self.DebugFormatString(self.destination_url_))
258 if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
259 if self.has_federated_identity_: res+=prefix+("federated_identity: %s\n" % self.DebugFormatString(self.federated_identity_))
260 return res
263 def _BuildTagLookupTable(sparse, maxtag, default=None):
264 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
266 kdestination_url = 1
267 kauth_domain = 2
268 kfederated_identity = 3
270 _TEXT = _BuildTagLookupTable({
271 0: "ErrorCode",
272 1: "destination_url",
273 2: "auth_domain",
274 3: "federated_identity",
275 }, 3)
277 _TYPES = _BuildTagLookupTable({
278 0: ProtocolBuffer.Encoder.NUMERIC,
279 1: ProtocolBuffer.Encoder.STRING,
280 2: ProtocolBuffer.Encoder.STRING,
281 3: ProtocolBuffer.Encoder.STRING,
282 }, 3, ProtocolBuffer.Encoder.MAX_TYPE)
285 _STYLE = """"""
286 _STYLE_CONTENT_TYPE = """"""
287 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateLoginURLRequest'
288 class CreateLoginURLResponse(ProtocolBuffer.ProtocolMessage):
289 has_login_url_ = 0
290 login_url_ = ""
292 def __init__(self, contents=None):
293 if contents is not None: self.MergeFromString(contents)
295 def login_url(self): return self.login_url_
297 def set_login_url(self, x):
298 self.has_login_url_ = 1
299 self.login_url_ = x
301 def clear_login_url(self):
302 if self.has_login_url_:
303 self.has_login_url_ = 0
304 self.login_url_ = ""
306 def has_login_url(self): return self.has_login_url_
309 def MergeFrom(self, x):
310 assert x is not self
311 if (x.has_login_url()): self.set_login_url(x.login_url())
313 def Equals(self, x):
314 if x is self: return 1
315 if self.has_login_url_ != x.has_login_url_: return 0
316 if self.has_login_url_ and self.login_url_ != x.login_url_: return 0
317 return 1
319 def IsInitialized(self, debug_strs=None):
320 initialized = 1
321 if (not self.has_login_url_):
322 initialized = 0
323 if debug_strs is not None:
324 debug_strs.append('Required field: login_url not set.')
325 return initialized
327 def ByteSize(self):
328 n = 0
329 n += self.lengthString(len(self.login_url_))
330 return n + 1
332 def ByteSizePartial(self):
333 n = 0
334 if (self.has_login_url_):
335 n += 1
336 n += self.lengthString(len(self.login_url_))
337 return n
339 def Clear(self):
340 self.clear_login_url()
342 def OutputUnchecked(self, out):
343 out.putVarInt32(10)
344 out.putPrefixedString(self.login_url_)
346 def OutputPartial(self, out):
347 if (self.has_login_url_):
348 out.putVarInt32(10)
349 out.putPrefixedString(self.login_url_)
351 def TryMerge(self, d):
352 while d.avail() > 0:
353 tt = d.getVarInt32()
354 if tt == 10:
355 self.set_login_url(d.getPrefixedString())
356 continue
359 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
360 d.skipData(tt)
363 def __str__(self, prefix="", printElemNumber=0):
364 res=""
365 if self.has_login_url_: res+=prefix+("login_url: %s\n" % self.DebugFormatString(self.login_url_))
366 return res
369 def _BuildTagLookupTable(sparse, maxtag, default=None):
370 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
372 klogin_url = 1
374 _TEXT = _BuildTagLookupTable({
375 0: "ErrorCode",
376 1: "login_url",
377 }, 1)
379 _TYPES = _BuildTagLookupTable({
380 0: ProtocolBuffer.Encoder.NUMERIC,
381 1: ProtocolBuffer.Encoder.STRING,
382 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
385 _STYLE = """"""
386 _STYLE_CONTENT_TYPE = """"""
387 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateLoginURLResponse'
388 class CreateLogoutURLRequest(ProtocolBuffer.ProtocolMessage):
389 has_destination_url_ = 0
390 destination_url_ = ""
391 has_auth_domain_ = 0
392 auth_domain_ = ""
394 def __init__(self, contents=None):
395 if contents is not None: self.MergeFromString(contents)
397 def destination_url(self): return self.destination_url_
399 def set_destination_url(self, x):
400 self.has_destination_url_ = 1
401 self.destination_url_ = x
403 def clear_destination_url(self):
404 if self.has_destination_url_:
405 self.has_destination_url_ = 0
406 self.destination_url_ = ""
408 def has_destination_url(self): return self.has_destination_url_
410 def auth_domain(self): return self.auth_domain_
412 def set_auth_domain(self, x):
413 self.has_auth_domain_ = 1
414 self.auth_domain_ = x
416 def clear_auth_domain(self):
417 if self.has_auth_domain_:
418 self.has_auth_domain_ = 0
419 self.auth_domain_ = ""
421 def has_auth_domain(self): return self.has_auth_domain_
424 def MergeFrom(self, x):
425 assert x is not self
426 if (x.has_destination_url()): self.set_destination_url(x.destination_url())
427 if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
429 def Equals(self, x):
430 if x is self: return 1
431 if self.has_destination_url_ != x.has_destination_url_: return 0
432 if self.has_destination_url_ and self.destination_url_ != x.destination_url_: return 0
433 if self.has_auth_domain_ != x.has_auth_domain_: return 0
434 if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
435 return 1
437 def IsInitialized(self, debug_strs=None):
438 initialized = 1
439 if (not self.has_destination_url_):
440 initialized = 0
441 if debug_strs is not None:
442 debug_strs.append('Required field: destination_url not set.')
443 return initialized
445 def ByteSize(self):
446 n = 0
447 n += self.lengthString(len(self.destination_url_))
448 if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_))
449 return n + 1
451 def ByteSizePartial(self):
452 n = 0
453 if (self.has_destination_url_):
454 n += 1
455 n += self.lengthString(len(self.destination_url_))
456 if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_))
457 return n
459 def Clear(self):
460 self.clear_destination_url()
461 self.clear_auth_domain()
463 def OutputUnchecked(self, out):
464 out.putVarInt32(10)
465 out.putPrefixedString(self.destination_url_)
466 if (self.has_auth_domain_):
467 out.putVarInt32(18)
468 out.putPrefixedString(self.auth_domain_)
470 def OutputPartial(self, out):
471 if (self.has_destination_url_):
472 out.putVarInt32(10)
473 out.putPrefixedString(self.destination_url_)
474 if (self.has_auth_domain_):
475 out.putVarInt32(18)
476 out.putPrefixedString(self.auth_domain_)
478 def TryMerge(self, d):
479 while d.avail() > 0:
480 tt = d.getVarInt32()
481 if tt == 10:
482 self.set_destination_url(d.getPrefixedString())
483 continue
484 if tt == 18:
485 self.set_auth_domain(d.getPrefixedString())
486 continue
489 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
490 d.skipData(tt)
493 def __str__(self, prefix="", printElemNumber=0):
494 res=""
495 if self.has_destination_url_: res+=prefix+("destination_url: %s\n" % self.DebugFormatString(self.destination_url_))
496 if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
497 return res
500 def _BuildTagLookupTable(sparse, maxtag, default=None):
501 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
503 kdestination_url = 1
504 kauth_domain = 2
506 _TEXT = _BuildTagLookupTable({
507 0: "ErrorCode",
508 1: "destination_url",
509 2: "auth_domain",
510 }, 2)
512 _TYPES = _BuildTagLookupTable({
513 0: ProtocolBuffer.Encoder.NUMERIC,
514 1: ProtocolBuffer.Encoder.STRING,
515 2: ProtocolBuffer.Encoder.STRING,
516 }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
519 _STYLE = """"""
520 _STYLE_CONTENT_TYPE = """"""
521 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateLogoutURLRequest'
522 class CreateLogoutURLResponse(ProtocolBuffer.ProtocolMessage):
523 has_logout_url_ = 0
524 logout_url_ = ""
526 def __init__(self, contents=None):
527 if contents is not None: self.MergeFromString(contents)
529 def logout_url(self): return self.logout_url_
531 def set_logout_url(self, x):
532 self.has_logout_url_ = 1
533 self.logout_url_ = x
535 def clear_logout_url(self):
536 if self.has_logout_url_:
537 self.has_logout_url_ = 0
538 self.logout_url_ = ""
540 def has_logout_url(self): return self.has_logout_url_
543 def MergeFrom(self, x):
544 assert x is not self
545 if (x.has_logout_url()): self.set_logout_url(x.logout_url())
547 def Equals(self, x):
548 if x is self: return 1
549 if self.has_logout_url_ != x.has_logout_url_: return 0
550 if self.has_logout_url_ and self.logout_url_ != x.logout_url_: return 0
551 return 1
553 def IsInitialized(self, debug_strs=None):
554 initialized = 1
555 if (not self.has_logout_url_):
556 initialized = 0
557 if debug_strs is not None:
558 debug_strs.append('Required field: logout_url not set.')
559 return initialized
561 def ByteSize(self):
562 n = 0
563 n += self.lengthString(len(self.logout_url_))
564 return n + 1
566 def ByteSizePartial(self):
567 n = 0
568 if (self.has_logout_url_):
569 n += 1
570 n += self.lengthString(len(self.logout_url_))
571 return n
573 def Clear(self):
574 self.clear_logout_url()
576 def OutputUnchecked(self, out):
577 out.putVarInt32(10)
578 out.putPrefixedString(self.logout_url_)
580 def OutputPartial(self, out):
581 if (self.has_logout_url_):
582 out.putVarInt32(10)
583 out.putPrefixedString(self.logout_url_)
585 def TryMerge(self, d):
586 while d.avail() > 0:
587 tt = d.getVarInt32()
588 if tt == 10:
589 self.set_logout_url(d.getPrefixedString())
590 continue
593 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
594 d.skipData(tt)
597 def __str__(self, prefix="", printElemNumber=0):
598 res=""
599 if self.has_logout_url_: res+=prefix+("logout_url: %s\n" % self.DebugFormatString(self.logout_url_))
600 return res
603 def _BuildTagLookupTable(sparse, maxtag, default=None):
604 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
606 klogout_url = 1
608 _TEXT = _BuildTagLookupTable({
609 0: "ErrorCode",
610 1: "logout_url",
611 }, 1)
613 _TYPES = _BuildTagLookupTable({
614 0: ProtocolBuffer.Encoder.NUMERIC,
615 1: ProtocolBuffer.Encoder.STRING,
616 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
619 _STYLE = """"""
620 _STYLE_CONTENT_TYPE = """"""
621 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateLogoutURLResponse'
622 class GetOAuthUserRequest(ProtocolBuffer.ProtocolMessage):
623 has_scope_ = 0
624 scope_ = ""
626 def __init__(self, contents=None):
627 if contents is not None: self.MergeFromString(contents)
629 def scope(self): return self.scope_
631 def set_scope(self, x):
632 self.has_scope_ = 1
633 self.scope_ = x
635 def clear_scope(self):
636 if self.has_scope_:
637 self.has_scope_ = 0
638 self.scope_ = ""
640 def has_scope(self): return self.has_scope_
643 def MergeFrom(self, x):
644 assert x is not self
645 if (x.has_scope()): self.set_scope(x.scope())
647 def Equals(self, x):
648 if x is self: return 1
649 if self.has_scope_ != x.has_scope_: return 0
650 if self.has_scope_ and self.scope_ != x.scope_: return 0
651 return 1
653 def IsInitialized(self, debug_strs=None):
654 initialized = 1
655 return initialized
657 def ByteSize(self):
658 n = 0
659 if (self.has_scope_): n += 1 + self.lengthString(len(self.scope_))
660 return n
662 def ByteSizePartial(self):
663 n = 0
664 if (self.has_scope_): n += 1 + self.lengthString(len(self.scope_))
665 return n
667 def Clear(self):
668 self.clear_scope()
670 def OutputUnchecked(self, out):
671 if (self.has_scope_):
672 out.putVarInt32(10)
673 out.putPrefixedString(self.scope_)
675 def OutputPartial(self, out):
676 if (self.has_scope_):
677 out.putVarInt32(10)
678 out.putPrefixedString(self.scope_)
680 def TryMerge(self, d):
681 while d.avail() > 0:
682 tt = d.getVarInt32()
683 if tt == 10:
684 self.set_scope(d.getPrefixedString())
685 continue
688 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
689 d.skipData(tt)
692 def __str__(self, prefix="", printElemNumber=0):
693 res=""
694 if self.has_scope_: res+=prefix+("scope: %s\n" % self.DebugFormatString(self.scope_))
695 return res
698 def _BuildTagLookupTable(sparse, maxtag, default=None):
699 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
701 kscope = 1
703 _TEXT = _BuildTagLookupTable({
704 0: "ErrorCode",
705 1: "scope",
706 }, 1)
708 _TYPES = _BuildTagLookupTable({
709 0: ProtocolBuffer.Encoder.NUMERIC,
710 1: ProtocolBuffer.Encoder.STRING,
711 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
714 _STYLE = """"""
715 _STYLE_CONTENT_TYPE = """"""
716 _PROTO_DESCRIPTOR_NAME = 'apphosting.GetOAuthUserRequest'
717 class GetOAuthUserResponse(ProtocolBuffer.ProtocolMessage):
718 has_email_ = 0
719 email_ = ""
720 has_user_id_ = 0
721 user_id_ = ""
722 has_auth_domain_ = 0
723 auth_domain_ = ""
724 has_user_organization_ = 0
725 user_organization_ = ""
726 has_is_admin_ = 0
727 is_admin_ = 0
728 has_client_id_ = 0
729 client_id_ = ""
731 def __init__(self, contents=None):
732 if contents is not None: self.MergeFromString(contents)
734 def email(self): return self.email_
736 def set_email(self, x):
737 self.has_email_ = 1
738 self.email_ = x
740 def clear_email(self):
741 if self.has_email_:
742 self.has_email_ = 0
743 self.email_ = ""
745 def has_email(self): return self.has_email_
747 def user_id(self): return self.user_id_
749 def set_user_id(self, x):
750 self.has_user_id_ = 1
751 self.user_id_ = x
753 def clear_user_id(self):
754 if self.has_user_id_:
755 self.has_user_id_ = 0
756 self.user_id_ = ""
758 def has_user_id(self): return self.has_user_id_
760 def auth_domain(self): return self.auth_domain_
762 def set_auth_domain(self, x):
763 self.has_auth_domain_ = 1
764 self.auth_domain_ = x
766 def clear_auth_domain(self):
767 if self.has_auth_domain_:
768 self.has_auth_domain_ = 0
769 self.auth_domain_ = ""
771 def has_auth_domain(self): return self.has_auth_domain_
773 def user_organization(self): return self.user_organization_
775 def set_user_organization(self, x):
776 self.has_user_organization_ = 1
777 self.user_organization_ = x
779 def clear_user_organization(self):
780 if self.has_user_organization_:
781 self.has_user_organization_ = 0
782 self.user_organization_ = ""
784 def has_user_organization(self): return self.has_user_organization_
786 def is_admin(self): return self.is_admin_
788 def set_is_admin(self, x):
789 self.has_is_admin_ = 1
790 self.is_admin_ = x
792 def clear_is_admin(self):
793 if self.has_is_admin_:
794 self.has_is_admin_ = 0
795 self.is_admin_ = 0
797 def has_is_admin(self): return self.has_is_admin_
799 def client_id(self): return self.client_id_
801 def set_client_id(self, x):
802 self.has_client_id_ = 1
803 self.client_id_ = x
805 def clear_client_id(self):
806 if self.has_client_id_:
807 self.has_client_id_ = 0
808 self.client_id_ = ""
810 def has_client_id(self): return self.has_client_id_
813 def MergeFrom(self, x):
814 assert x is not self
815 if (x.has_email()): self.set_email(x.email())
816 if (x.has_user_id()): self.set_user_id(x.user_id())
817 if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain())
818 if (x.has_user_organization()): self.set_user_organization(x.user_organization())
819 if (x.has_is_admin()): self.set_is_admin(x.is_admin())
820 if (x.has_client_id()): self.set_client_id(x.client_id())
822 def Equals(self, x):
823 if x is self: return 1
824 if self.has_email_ != x.has_email_: return 0
825 if self.has_email_ and self.email_ != x.email_: return 0
826 if self.has_user_id_ != x.has_user_id_: return 0
827 if self.has_user_id_ and self.user_id_ != x.user_id_: return 0
828 if self.has_auth_domain_ != x.has_auth_domain_: return 0
829 if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0
830 if self.has_user_organization_ != x.has_user_organization_: return 0
831 if self.has_user_organization_ and self.user_organization_ != x.user_organization_: return 0
832 if self.has_is_admin_ != x.has_is_admin_: return 0
833 if self.has_is_admin_ and self.is_admin_ != x.is_admin_: return 0
834 if self.has_client_id_ != x.has_client_id_: return 0
835 if self.has_client_id_ and self.client_id_ != x.client_id_: return 0
836 return 1
838 def IsInitialized(self, debug_strs=None):
839 initialized = 1
840 if (not self.has_email_):
841 initialized = 0
842 if debug_strs is not None:
843 debug_strs.append('Required field: email not set.')
844 if (not self.has_user_id_):
845 initialized = 0
846 if debug_strs is not None:
847 debug_strs.append('Required field: user_id not set.')
848 if (not self.has_auth_domain_):
849 initialized = 0
850 if debug_strs is not None:
851 debug_strs.append('Required field: auth_domain not set.')
852 return initialized
854 def ByteSize(self):
855 n = 0
856 n += self.lengthString(len(self.email_))
857 n += self.lengthString(len(self.user_id_))
858 n += self.lengthString(len(self.auth_domain_))
859 if (self.has_user_organization_): n += 1 + self.lengthString(len(self.user_organization_))
860 if (self.has_is_admin_): n += 2
861 if (self.has_client_id_): n += 1 + self.lengthString(len(self.client_id_))
862 return n + 3
864 def ByteSizePartial(self):
865 n = 0
866 if (self.has_email_):
867 n += 1
868 n += self.lengthString(len(self.email_))
869 if (self.has_user_id_):
870 n += 1
871 n += self.lengthString(len(self.user_id_))
872 if (self.has_auth_domain_):
873 n += 1
874 n += self.lengthString(len(self.auth_domain_))
875 if (self.has_user_organization_): n += 1 + self.lengthString(len(self.user_organization_))
876 if (self.has_is_admin_): n += 2
877 if (self.has_client_id_): n += 1 + self.lengthString(len(self.client_id_))
878 return n
880 def Clear(self):
881 self.clear_email()
882 self.clear_user_id()
883 self.clear_auth_domain()
884 self.clear_user_organization()
885 self.clear_is_admin()
886 self.clear_client_id()
888 def OutputUnchecked(self, out):
889 out.putVarInt32(10)
890 out.putPrefixedString(self.email_)
891 out.putVarInt32(18)
892 out.putPrefixedString(self.user_id_)
893 out.putVarInt32(26)
894 out.putPrefixedString(self.auth_domain_)
895 if (self.has_user_organization_):
896 out.putVarInt32(34)
897 out.putPrefixedString(self.user_organization_)
898 if (self.has_is_admin_):
899 out.putVarInt32(40)
900 out.putBoolean(self.is_admin_)
901 if (self.has_client_id_):
902 out.putVarInt32(50)
903 out.putPrefixedString(self.client_id_)
905 def OutputPartial(self, out):
906 if (self.has_email_):
907 out.putVarInt32(10)
908 out.putPrefixedString(self.email_)
909 if (self.has_user_id_):
910 out.putVarInt32(18)
911 out.putPrefixedString(self.user_id_)
912 if (self.has_auth_domain_):
913 out.putVarInt32(26)
914 out.putPrefixedString(self.auth_domain_)
915 if (self.has_user_organization_):
916 out.putVarInt32(34)
917 out.putPrefixedString(self.user_organization_)
918 if (self.has_is_admin_):
919 out.putVarInt32(40)
920 out.putBoolean(self.is_admin_)
921 if (self.has_client_id_):
922 out.putVarInt32(50)
923 out.putPrefixedString(self.client_id_)
925 def TryMerge(self, d):
926 while d.avail() > 0:
927 tt = d.getVarInt32()
928 if tt == 10:
929 self.set_email(d.getPrefixedString())
930 continue
931 if tt == 18:
932 self.set_user_id(d.getPrefixedString())
933 continue
934 if tt == 26:
935 self.set_auth_domain(d.getPrefixedString())
936 continue
937 if tt == 34:
938 self.set_user_organization(d.getPrefixedString())
939 continue
940 if tt == 40:
941 self.set_is_admin(d.getBoolean())
942 continue
943 if tt == 50:
944 self.set_client_id(d.getPrefixedString())
945 continue
948 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
949 d.skipData(tt)
952 def __str__(self, prefix="", printElemNumber=0):
953 res=""
954 if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_))
955 if self.has_user_id_: res+=prefix+("user_id: %s\n" % self.DebugFormatString(self.user_id_))
956 if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_))
957 if self.has_user_organization_: res+=prefix+("user_organization: %s\n" % self.DebugFormatString(self.user_organization_))
958 if self.has_is_admin_: res+=prefix+("is_admin: %s\n" % self.DebugFormatBool(self.is_admin_))
959 if self.has_client_id_: res+=prefix+("client_id: %s\n" % self.DebugFormatString(self.client_id_))
960 return res
963 def _BuildTagLookupTable(sparse, maxtag, default=None):
964 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
966 kemail = 1
967 kuser_id = 2
968 kauth_domain = 3
969 kuser_organization = 4
970 kis_admin = 5
971 kclient_id = 6
973 _TEXT = _BuildTagLookupTable({
974 0: "ErrorCode",
975 1: "email",
976 2: "user_id",
977 3: "auth_domain",
978 4: "user_organization",
979 5: "is_admin",
980 6: "client_id",
981 }, 6)
983 _TYPES = _BuildTagLookupTable({
984 0: ProtocolBuffer.Encoder.NUMERIC,
985 1: ProtocolBuffer.Encoder.STRING,
986 2: ProtocolBuffer.Encoder.STRING,
987 3: ProtocolBuffer.Encoder.STRING,
988 4: ProtocolBuffer.Encoder.STRING,
989 5: ProtocolBuffer.Encoder.NUMERIC,
990 6: ProtocolBuffer.Encoder.STRING,
991 }, 6, ProtocolBuffer.Encoder.MAX_TYPE)
994 _STYLE = """"""
995 _STYLE_CONTENT_TYPE = """"""
996 _PROTO_DESCRIPTOR_NAME = 'apphosting.GetOAuthUserResponse'
997 class CheckOAuthSignatureRequest(ProtocolBuffer.ProtocolMessage):
999 def __init__(self, contents=None):
1000 pass
1001 if contents is not None: self.MergeFromString(contents)
1004 def MergeFrom(self, x):
1005 assert x is not self
1007 def Equals(self, x):
1008 if x is self: return 1
1009 return 1
1011 def IsInitialized(self, debug_strs=None):
1012 initialized = 1
1013 return initialized
1015 def ByteSize(self):
1016 n = 0
1017 return n
1019 def ByteSizePartial(self):
1020 n = 0
1021 return n
1023 def Clear(self):
1024 pass
1026 def OutputUnchecked(self, out):
1027 pass
1029 def OutputPartial(self, out):
1030 pass
1032 def TryMerge(self, d):
1033 while d.avail() > 0:
1034 tt = d.getVarInt32()
1037 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1038 d.skipData(tt)
1041 def __str__(self, prefix="", printElemNumber=0):
1042 res=""
1043 return res
1046 def _BuildTagLookupTable(sparse, maxtag, default=None):
1047 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1050 _TEXT = _BuildTagLookupTable({
1051 0: "ErrorCode",
1052 }, 0)
1054 _TYPES = _BuildTagLookupTable({
1055 0: ProtocolBuffer.Encoder.NUMERIC,
1056 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
1059 _STYLE = """"""
1060 _STYLE_CONTENT_TYPE = """"""
1061 _PROTO_DESCRIPTOR_NAME = 'apphosting.CheckOAuthSignatureRequest'
1062 class CheckOAuthSignatureResponse(ProtocolBuffer.ProtocolMessage):
1063 has_oauth_consumer_key_ = 0
1064 oauth_consumer_key_ = ""
1066 def __init__(self, contents=None):
1067 if contents is not None: self.MergeFromString(contents)
1069 def oauth_consumer_key(self): return self.oauth_consumer_key_
1071 def set_oauth_consumer_key(self, x):
1072 self.has_oauth_consumer_key_ = 1
1073 self.oauth_consumer_key_ = x
1075 def clear_oauth_consumer_key(self):
1076 if self.has_oauth_consumer_key_:
1077 self.has_oauth_consumer_key_ = 0
1078 self.oauth_consumer_key_ = ""
1080 def has_oauth_consumer_key(self): return self.has_oauth_consumer_key_
1083 def MergeFrom(self, x):
1084 assert x is not self
1085 if (x.has_oauth_consumer_key()): self.set_oauth_consumer_key(x.oauth_consumer_key())
1087 def Equals(self, x):
1088 if x is self: return 1
1089 if self.has_oauth_consumer_key_ != x.has_oauth_consumer_key_: return 0
1090 if self.has_oauth_consumer_key_ and self.oauth_consumer_key_ != x.oauth_consumer_key_: return 0
1091 return 1
1093 def IsInitialized(self, debug_strs=None):
1094 initialized = 1
1095 if (not self.has_oauth_consumer_key_):
1096 initialized = 0
1097 if debug_strs is not None:
1098 debug_strs.append('Required field: oauth_consumer_key not set.')
1099 return initialized
1101 def ByteSize(self):
1102 n = 0
1103 n += self.lengthString(len(self.oauth_consumer_key_))
1104 return n + 1
1106 def ByteSizePartial(self):
1107 n = 0
1108 if (self.has_oauth_consumer_key_):
1109 n += 1
1110 n += self.lengthString(len(self.oauth_consumer_key_))
1111 return n
1113 def Clear(self):
1114 self.clear_oauth_consumer_key()
1116 def OutputUnchecked(self, out):
1117 out.putVarInt32(10)
1118 out.putPrefixedString(self.oauth_consumer_key_)
1120 def OutputPartial(self, out):
1121 if (self.has_oauth_consumer_key_):
1122 out.putVarInt32(10)
1123 out.putPrefixedString(self.oauth_consumer_key_)
1125 def TryMerge(self, d):
1126 while d.avail() > 0:
1127 tt = d.getVarInt32()
1128 if tt == 10:
1129 self.set_oauth_consumer_key(d.getPrefixedString())
1130 continue
1133 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1134 d.skipData(tt)
1137 def __str__(self, prefix="", printElemNumber=0):
1138 res=""
1139 if self.has_oauth_consumer_key_: res+=prefix+("oauth_consumer_key: %s\n" % self.DebugFormatString(self.oauth_consumer_key_))
1140 return res
1143 def _BuildTagLookupTable(sparse, maxtag, default=None):
1144 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1146 koauth_consumer_key = 1
1148 _TEXT = _BuildTagLookupTable({
1149 0: "ErrorCode",
1150 1: "oauth_consumer_key",
1151 }, 1)
1153 _TYPES = _BuildTagLookupTable({
1154 0: ProtocolBuffer.Encoder.NUMERIC,
1155 1: ProtocolBuffer.Encoder.STRING,
1156 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1159 _STYLE = """"""
1160 _STYLE_CONTENT_TYPE = """"""
1161 _PROTO_DESCRIPTOR_NAME = 'apphosting.CheckOAuthSignatureResponse'
1162 class CreateFederatedLoginRequest(ProtocolBuffer.ProtocolMessage):
1163 has_claimed_id_ = 0
1164 claimed_id_ = ""
1165 has_continue_url_ = 0
1166 continue_url_ = ""
1167 has_authority_ = 0
1168 authority_ = ""
1170 def __init__(self, contents=None):
1171 if contents is not None: self.MergeFromString(contents)
1173 def claimed_id(self): return self.claimed_id_
1175 def set_claimed_id(self, x):
1176 self.has_claimed_id_ = 1
1177 self.claimed_id_ = x
1179 def clear_claimed_id(self):
1180 if self.has_claimed_id_:
1181 self.has_claimed_id_ = 0
1182 self.claimed_id_ = ""
1184 def has_claimed_id(self): return self.has_claimed_id_
1186 def continue_url(self): return self.continue_url_
1188 def set_continue_url(self, x):
1189 self.has_continue_url_ = 1
1190 self.continue_url_ = x
1192 def clear_continue_url(self):
1193 if self.has_continue_url_:
1194 self.has_continue_url_ = 0
1195 self.continue_url_ = ""
1197 def has_continue_url(self): return self.has_continue_url_
1199 def authority(self): return self.authority_
1201 def set_authority(self, x):
1202 self.has_authority_ = 1
1203 self.authority_ = x
1205 def clear_authority(self):
1206 if self.has_authority_:
1207 self.has_authority_ = 0
1208 self.authority_ = ""
1210 def has_authority(self): return self.has_authority_
1213 def MergeFrom(self, x):
1214 assert x is not self
1215 if (x.has_claimed_id()): self.set_claimed_id(x.claimed_id())
1216 if (x.has_continue_url()): self.set_continue_url(x.continue_url())
1217 if (x.has_authority()): self.set_authority(x.authority())
1219 def Equals(self, x):
1220 if x is self: return 1
1221 if self.has_claimed_id_ != x.has_claimed_id_: return 0
1222 if self.has_claimed_id_ and self.claimed_id_ != x.claimed_id_: return 0
1223 if self.has_continue_url_ != x.has_continue_url_: return 0
1224 if self.has_continue_url_ and self.continue_url_ != x.continue_url_: return 0
1225 if self.has_authority_ != x.has_authority_: return 0
1226 if self.has_authority_ and self.authority_ != x.authority_: return 0
1227 return 1
1229 def IsInitialized(self, debug_strs=None):
1230 initialized = 1
1231 if (not self.has_claimed_id_):
1232 initialized = 0
1233 if debug_strs is not None:
1234 debug_strs.append('Required field: claimed_id not set.')
1235 if (not self.has_continue_url_):
1236 initialized = 0
1237 if debug_strs is not None:
1238 debug_strs.append('Required field: continue_url not set.')
1239 return initialized
1241 def ByteSize(self):
1242 n = 0
1243 n += self.lengthString(len(self.claimed_id_))
1244 n += self.lengthString(len(self.continue_url_))
1245 if (self.has_authority_): n += 1 + self.lengthString(len(self.authority_))
1246 return n + 2
1248 def ByteSizePartial(self):
1249 n = 0
1250 if (self.has_claimed_id_):
1251 n += 1
1252 n += self.lengthString(len(self.claimed_id_))
1253 if (self.has_continue_url_):
1254 n += 1
1255 n += self.lengthString(len(self.continue_url_))
1256 if (self.has_authority_): n += 1 + self.lengthString(len(self.authority_))
1257 return n
1259 def Clear(self):
1260 self.clear_claimed_id()
1261 self.clear_continue_url()
1262 self.clear_authority()
1264 def OutputUnchecked(self, out):
1265 out.putVarInt32(10)
1266 out.putPrefixedString(self.claimed_id_)
1267 out.putVarInt32(18)
1268 out.putPrefixedString(self.continue_url_)
1269 if (self.has_authority_):
1270 out.putVarInt32(26)
1271 out.putPrefixedString(self.authority_)
1273 def OutputPartial(self, out):
1274 if (self.has_claimed_id_):
1275 out.putVarInt32(10)
1276 out.putPrefixedString(self.claimed_id_)
1277 if (self.has_continue_url_):
1278 out.putVarInt32(18)
1279 out.putPrefixedString(self.continue_url_)
1280 if (self.has_authority_):
1281 out.putVarInt32(26)
1282 out.putPrefixedString(self.authority_)
1284 def TryMerge(self, d):
1285 while d.avail() > 0:
1286 tt = d.getVarInt32()
1287 if tt == 10:
1288 self.set_claimed_id(d.getPrefixedString())
1289 continue
1290 if tt == 18:
1291 self.set_continue_url(d.getPrefixedString())
1292 continue
1293 if tt == 26:
1294 self.set_authority(d.getPrefixedString())
1295 continue
1298 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1299 d.skipData(tt)
1302 def __str__(self, prefix="", printElemNumber=0):
1303 res=""
1304 if self.has_claimed_id_: res+=prefix+("claimed_id: %s\n" % self.DebugFormatString(self.claimed_id_))
1305 if self.has_continue_url_: res+=prefix+("continue_url: %s\n" % self.DebugFormatString(self.continue_url_))
1306 if self.has_authority_: res+=prefix+("authority: %s\n" % self.DebugFormatString(self.authority_))
1307 return res
1310 def _BuildTagLookupTable(sparse, maxtag, default=None):
1311 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1313 kclaimed_id = 1
1314 kcontinue_url = 2
1315 kauthority = 3
1317 _TEXT = _BuildTagLookupTable({
1318 0: "ErrorCode",
1319 1: "claimed_id",
1320 2: "continue_url",
1321 3: "authority",
1322 }, 3)
1324 _TYPES = _BuildTagLookupTable({
1325 0: ProtocolBuffer.Encoder.NUMERIC,
1326 1: ProtocolBuffer.Encoder.STRING,
1327 2: ProtocolBuffer.Encoder.STRING,
1328 3: ProtocolBuffer.Encoder.STRING,
1329 }, 3, ProtocolBuffer.Encoder.MAX_TYPE)
1332 _STYLE = """"""
1333 _STYLE_CONTENT_TYPE = """"""
1334 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateFederatedLoginRequest'
1335 class CreateFederatedLoginResponse(ProtocolBuffer.ProtocolMessage):
1336 has_redirected_url_ = 0
1337 redirected_url_ = ""
1339 def __init__(self, contents=None):
1340 if contents is not None: self.MergeFromString(contents)
1342 def redirected_url(self): return self.redirected_url_
1344 def set_redirected_url(self, x):
1345 self.has_redirected_url_ = 1
1346 self.redirected_url_ = x
1348 def clear_redirected_url(self):
1349 if self.has_redirected_url_:
1350 self.has_redirected_url_ = 0
1351 self.redirected_url_ = ""
1353 def has_redirected_url(self): return self.has_redirected_url_
1356 def MergeFrom(self, x):
1357 assert x is not self
1358 if (x.has_redirected_url()): self.set_redirected_url(x.redirected_url())
1360 def Equals(self, x):
1361 if x is self: return 1
1362 if self.has_redirected_url_ != x.has_redirected_url_: return 0
1363 if self.has_redirected_url_ and self.redirected_url_ != x.redirected_url_: return 0
1364 return 1
1366 def IsInitialized(self, debug_strs=None):
1367 initialized = 1
1368 if (not self.has_redirected_url_):
1369 initialized = 0
1370 if debug_strs is not None:
1371 debug_strs.append('Required field: redirected_url not set.')
1372 return initialized
1374 def ByteSize(self):
1375 n = 0
1376 n += self.lengthString(len(self.redirected_url_))
1377 return n + 1
1379 def ByteSizePartial(self):
1380 n = 0
1381 if (self.has_redirected_url_):
1382 n += 1
1383 n += self.lengthString(len(self.redirected_url_))
1384 return n
1386 def Clear(self):
1387 self.clear_redirected_url()
1389 def OutputUnchecked(self, out):
1390 out.putVarInt32(10)
1391 out.putPrefixedString(self.redirected_url_)
1393 def OutputPartial(self, out):
1394 if (self.has_redirected_url_):
1395 out.putVarInt32(10)
1396 out.putPrefixedString(self.redirected_url_)
1398 def TryMerge(self, d):
1399 while d.avail() > 0:
1400 tt = d.getVarInt32()
1401 if tt == 10:
1402 self.set_redirected_url(d.getPrefixedString())
1403 continue
1406 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1407 d.skipData(tt)
1410 def __str__(self, prefix="", printElemNumber=0):
1411 res=""
1412 if self.has_redirected_url_: res+=prefix+("redirected_url: %s\n" % self.DebugFormatString(self.redirected_url_))
1413 return res
1416 def _BuildTagLookupTable(sparse, maxtag, default=None):
1417 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1419 kredirected_url = 1
1421 _TEXT = _BuildTagLookupTable({
1422 0: "ErrorCode",
1423 1: "redirected_url",
1424 }, 1)
1426 _TYPES = _BuildTagLookupTable({
1427 0: ProtocolBuffer.Encoder.NUMERIC,
1428 1: ProtocolBuffer.Encoder.STRING,
1429 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1432 _STYLE = """"""
1433 _STYLE_CONTENT_TYPE = """"""
1434 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateFederatedLoginResponse'
1435 class CreateFederatedLogoutRequest(ProtocolBuffer.ProtocolMessage):
1436 has_destination_url_ = 0
1437 destination_url_ = ""
1439 def __init__(self, contents=None):
1440 if contents is not None: self.MergeFromString(contents)
1442 def destination_url(self): return self.destination_url_
1444 def set_destination_url(self, x):
1445 self.has_destination_url_ = 1
1446 self.destination_url_ = x
1448 def clear_destination_url(self):
1449 if self.has_destination_url_:
1450 self.has_destination_url_ = 0
1451 self.destination_url_ = ""
1453 def has_destination_url(self): return self.has_destination_url_
1456 def MergeFrom(self, x):
1457 assert x is not self
1458 if (x.has_destination_url()): self.set_destination_url(x.destination_url())
1460 def Equals(self, x):
1461 if x is self: return 1
1462 if self.has_destination_url_ != x.has_destination_url_: return 0
1463 if self.has_destination_url_ and self.destination_url_ != x.destination_url_: return 0
1464 return 1
1466 def IsInitialized(self, debug_strs=None):
1467 initialized = 1
1468 if (not self.has_destination_url_):
1469 initialized = 0
1470 if debug_strs is not None:
1471 debug_strs.append('Required field: destination_url not set.')
1472 return initialized
1474 def ByteSize(self):
1475 n = 0
1476 n += self.lengthString(len(self.destination_url_))
1477 return n + 1
1479 def ByteSizePartial(self):
1480 n = 0
1481 if (self.has_destination_url_):
1482 n += 1
1483 n += self.lengthString(len(self.destination_url_))
1484 return n
1486 def Clear(self):
1487 self.clear_destination_url()
1489 def OutputUnchecked(self, out):
1490 out.putVarInt32(10)
1491 out.putPrefixedString(self.destination_url_)
1493 def OutputPartial(self, out):
1494 if (self.has_destination_url_):
1495 out.putVarInt32(10)
1496 out.putPrefixedString(self.destination_url_)
1498 def TryMerge(self, d):
1499 while d.avail() > 0:
1500 tt = d.getVarInt32()
1501 if tt == 10:
1502 self.set_destination_url(d.getPrefixedString())
1503 continue
1506 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1507 d.skipData(tt)
1510 def __str__(self, prefix="", printElemNumber=0):
1511 res=""
1512 if self.has_destination_url_: res+=prefix+("destination_url: %s\n" % self.DebugFormatString(self.destination_url_))
1513 return res
1516 def _BuildTagLookupTable(sparse, maxtag, default=None):
1517 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1519 kdestination_url = 1
1521 _TEXT = _BuildTagLookupTable({
1522 0: "ErrorCode",
1523 1: "destination_url",
1524 }, 1)
1526 _TYPES = _BuildTagLookupTable({
1527 0: ProtocolBuffer.Encoder.NUMERIC,
1528 1: ProtocolBuffer.Encoder.STRING,
1529 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1532 _STYLE = """"""
1533 _STYLE_CONTENT_TYPE = """"""
1534 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateFederatedLogoutRequest'
1535 class CreateFederatedLogoutResponse(ProtocolBuffer.ProtocolMessage):
1536 has_logout_url_ = 0
1537 logout_url_ = ""
1539 def __init__(self, contents=None):
1540 if contents is not None: self.MergeFromString(contents)
1542 def logout_url(self): return self.logout_url_
1544 def set_logout_url(self, x):
1545 self.has_logout_url_ = 1
1546 self.logout_url_ = x
1548 def clear_logout_url(self):
1549 if self.has_logout_url_:
1550 self.has_logout_url_ = 0
1551 self.logout_url_ = ""
1553 def has_logout_url(self): return self.has_logout_url_
1556 def MergeFrom(self, x):
1557 assert x is not self
1558 if (x.has_logout_url()): self.set_logout_url(x.logout_url())
1560 def Equals(self, x):
1561 if x is self: return 1
1562 if self.has_logout_url_ != x.has_logout_url_: return 0
1563 if self.has_logout_url_ and self.logout_url_ != x.logout_url_: return 0
1564 return 1
1566 def IsInitialized(self, debug_strs=None):
1567 initialized = 1
1568 if (not self.has_logout_url_):
1569 initialized = 0
1570 if debug_strs is not None:
1571 debug_strs.append('Required field: logout_url not set.')
1572 return initialized
1574 def ByteSize(self):
1575 n = 0
1576 n += self.lengthString(len(self.logout_url_))
1577 return n + 1
1579 def ByteSizePartial(self):
1580 n = 0
1581 if (self.has_logout_url_):
1582 n += 1
1583 n += self.lengthString(len(self.logout_url_))
1584 return n
1586 def Clear(self):
1587 self.clear_logout_url()
1589 def OutputUnchecked(self, out):
1590 out.putVarInt32(10)
1591 out.putPrefixedString(self.logout_url_)
1593 def OutputPartial(self, out):
1594 if (self.has_logout_url_):
1595 out.putVarInt32(10)
1596 out.putPrefixedString(self.logout_url_)
1598 def TryMerge(self, d):
1599 while d.avail() > 0:
1600 tt = d.getVarInt32()
1601 if tt == 10:
1602 self.set_logout_url(d.getPrefixedString())
1603 continue
1606 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1607 d.skipData(tt)
1610 def __str__(self, prefix="", printElemNumber=0):
1611 res=""
1612 if self.has_logout_url_: res+=prefix+("logout_url: %s\n" % self.DebugFormatString(self.logout_url_))
1613 return res
1616 def _BuildTagLookupTable(sparse, maxtag, default=None):
1617 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1619 klogout_url = 1
1621 _TEXT = _BuildTagLookupTable({
1622 0: "ErrorCode",
1623 1: "logout_url",
1624 }, 1)
1626 _TYPES = _BuildTagLookupTable({
1627 0: ProtocolBuffer.Encoder.NUMERIC,
1628 1: ProtocolBuffer.Encoder.STRING,
1629 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1632 _STYLE = """"""
1633 _STYLE_CONTENT_TYPE = """"""
1634 _PROTO_DESCRIPTOR_NAME = 'apphosting.CreateFederatedLogoutResponse'
1635 if _extension_runtime:
1636 pass
1638 __all__ = ['UserServiceError','CreateLoginURLRequest','CreateLoginURLResponse','CreateLogoutURLRequest','CreateLogoutURLResponse','GetOAuthUserRequest','GetOAuthUserResponse','CheckOAuthSignatureRequest','CheckOAuthSignatureResponse','CreateFederatedLoginRequest','CreateFederatedLoginResponse','CreateFederatedLogoutRequest','CreateFederatedLogoutResponse']