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
23 import dummy_thread
as thread
25 from google3
.net
.proto
import _net_proto___parse__python
27 _net_proto___parse__python
= None
30 __import__('google.net.rpc.python.rpc_internals_lite')
31 __import__('google.net.rpc.python.pywraprpc_lite')
32 rpc_internals
= sys
.modules
.get('google.net.rpc.python.rpc_internals_lite')
33 pywraprpc
= sys
.modules
.get('google.net.rpc.python.pywraprpc_lite')
34 _client_stub_base_class
= rpc_internals
.StubbyRPCBaseStub
36 _client_stub_base_class
= object
38 __import__('google.net.rpc.python.rpcserver')
39 rpcserver
= sys
.modules
.get('google.net.rpc.python.rpcserver')
40 _server_stub_base_class
= rpcserver
.BaseRpcServer
42 _server_stub_base_class
= object
44 __pychecker__
= """maxreturns=0 maxbranches=0 no-callinit
45 unusednames=printElemNumber,debug_strs no-special"""
47 if hasattr(ProtocolBuffer
, 'ExtendableProtocolMessage'):
48 _extension_runtime
= True
49 _ExtendableProtocolMessage
= ProtocolBuffer
.ExtendableProtocolMessage
51 _extension_runtime
= False
52 _ExtendableProtocolMessage
= ProtocolBuffer
.ProtocolMessage
54 class AppIdentityServiceError(ProtocolBuffer
.ProtocolMessage
):
60 DEADLINE_EXCEEDED
= 1001
61 NOT_A_VALID_APP
= 1002
63 GAIAMINT_NOT_INITIAILIZED
= 1004
65 NOT_IMPLEMENTED
= 1006
70 1000: "BLOB_TOO_LARGE",
71 1001: "DEADLINE_EXCEEDED",
72 1002: "NOT_A_VALID_APP",
73 1003: "UNKNOWN_ERROR",
74 1004: "GAIAMINT_NOT_INITIAILIZED",
76 1006: "NOT_IMPLEMENTED",
79 def ErrorCode_Name(cls
, x
): return cls
._ErrorCode
_NAMES
.get(x
, "")
80 ErrorCode_Name
= classmethod(ErrorCode_Name
)
83 def __init__(self
, contents
=None):
85 if contents
is not None: self
.MergeFromString(contents
)
88 def MergeFrom(self
, x
):
91 if _net_proto___parse__python
is not None:
92 def _CMergeFromString(self
, s
):
93 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.AppIdentityServiceError', s
)
95 if _net_proto___parse__python
is not None:
97 return _net_proto___parse__python
.Encode(self
, 'apphosting.AppIdentityServiceError')
99 if _net_proto___parse__python
is not None:
100 def _CEncodePartial(self
):
101 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.AppIdentityServiceError')
103 if _net_proto___parse__python
is not None:
104 def _CToASCII(self
, output_format
):
105 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.AppIdentityServiceError', output_format
)
108 if _net_proto___parse__python
is not None:
109 def ParseASCII(self
, s
):
110 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.AppIdentityServiceError', s
)
113 if _net_proto___parse__python
is not None:
114 def ParseASCIIIgnoreUnknown(self
, s
):
115 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.AppIdentityServiceError', s
)
119 if x
is self
: return 1
122 def IsInitialized(self
, debug_strs
=None):
130 def ByteSizePartial(self
):
137 def OutputUnchecked(self
, out
):
140 def OutputPartial(self
, out
):
143 def TryMerge(self
, d
):
148 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
152 def __str__(self
, prefix
="", printElemNumber
=0):
157 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
158 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
161 _TEXT
= _BuildTagLookupTable({
165 _TYPES
= _BuildTagLookupTable({
166 0: ProtocolBuffer
.Encoder
.NUMERIC
,
167 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
171 _STYLE_CONTENT_TYPE
= """"""
172 _PROTO_DESCRIPTOR_NAME
= 'apphosting.AppIdentityServiceError'
173 _SERIALIZED_DESCRIPTOR
= array
.array('B')
174 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3JzeglFcnJvckNvZGWLAZIBB1NVQ0NFU1OYAQCMAYsBkgENVU5LTk9XTl9TQ09QRZgBCYwBiwGSAQ5CTE9CX1RPT19MQVJHRZgB6AeMAYsBkgERREVBRExJTkVfRVhDRUVERUSYAekHjAGLAZIBD05PVF9BX1ZBTElEX0FQUJgB6geMAYsBkgENVU5LTk9XTl9FUlJPUpgB6weMAYsBkgEZR0FJQU1JTlRfTk9UX0lOSVRJQUlMSVpFRJgB7AeMAYsBkgELTk9UX0FMTE9XRUSYAe0HjAGLAZIBD05PVF9JTVBMRU1FTlRFRJgB7geMAXS6AekMCjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8SCmFwcGhvc3Rpbmci5gEKF0FwcElkZW50aXR5U2VydmljZUVycm9yIsoBCglFcnJvckNvZGUSCwoHU1VDQ0VTUxAAEhEKDVVOS05PV05fU0NPUEUQCRITCg5CTE9CX1RPT19MQVJHRRDoBxIWChFERUFETElORV9FWENFRURFRBDpBxIUCg9OT1RfQV9WQUxJRF9BUFAQ6gcSEgoNVU5LTk9XTl9FUlJPUhDrBxIeChlHQUlBTUlOVF9OT1RfSU5JVElBSUxJWkVEEOwHEhAKC05PVF9BTExPV0VEEO0HEhQKD05PVF9JTVBMRU1FTlRFRBDuByIqChFTaWduRm9yQXBwUmVxdWVzdBIVCg1ieXRlc190b19zaWduGAEgASgMIj8KElNpZ25Gb3JBcHBSZXNwb25zZRIQCghrZXlfbmFtZRgBIAEoCRIXCg9zaWduYXR1cmVfYnl0ZXMYAiABKAwiIwohR2V0UHVibGljQ2VydGlmaWNhdGVGb3JBcHBSZXF1ZXN0IkMKEVB1YmxpY0NlcnRpZmljYXRlEhAKCGtleV9uYW1lGAEgASgJEhwKFHg1MDlfY2VydGlmaWNhdGVfcGVtGAIgASgJIo0BCiJHZXRQdWJsaWNDZXJ0aWZpY2F0ZUZvckFwcFJlc3BvbnNlEj4KF3B1YmxpY19jZXJ0aWZpY2F0ZV9saXN0GAEgAygLMh0uYXBwaG9zdGluZy5QdWJsaWNDZXJ0aWZpY2F0ZRInCh9tYXhfY2xpZW50X2NhY2hlX3RpbWVfaW5fc2Vjb25kGAIgASgDIh4KHEdldFNlcnZpY2VBY2NvdW50TmFtZVJlcXVlc3QiPQodR2V0U2VydmljZUFjY291bnROYW1lUmVzcG9uc2USHAoUc2VydmljZV9hY2NvdW50X25hbWUYASABKAkiYAoVR2V0QWNjZXNzVG9rZW5SZXF1ZXN0Eg0KBXNjb3BlGAEgAygJEhoKEnNlcnZpY2VfYWNjb3VudF9pZBgCIAEoAxIcChRzZXJ2aWNlX2FjY291bnRfbmFtZRgDIAEoCSJHChZHZXRBY2Nlc3NUb2tlblJlc3BvbnNlEhQKDGFjY2Vzc190b2tlbhgBIAEoCRIXCg9leHBpcmF0aW9uX3RpbWUYAiABKAMiIAoeR2V0RGVmYXVsdEdjc0J1Y2tldE5hbWVSZXF1ZXN0IkIKH0dldERlZmF1bHRHY3NCdWNrZXROYW1lUmVzcG9uc2USHwoXZGVmYXVsdF9nY3NfYnVja2V0X25hbWUYASABKAkyoAQKDlNpZ25pbmdTZXJ2aWNlEk0KClNpZ25Gb3JBcHASHS5hcHBob3N0aW5nLlNpZ25Gb3JBcHBSZXF1ZXN0Gh4uYXBwaG9zdGluZy5TaWduRm9yQXBwUmVzcG9uc2UiABJ+ChtHZXRQdWJsaWNDZXJ0aWZpY2F0ZXNGb3JBcHASLS5hcHBob3N0aW5nLkdldFB1YmxpY0NlcnRpZmljYXRlRm9yQXBwUmVxdWVzdBouLmFwcGhvc3RpbmcuR2V0UHVibGljQ2VydGlmaWNhdGVGb3JBcHBSZXNwb25zZSIAEm4KFUdldFNlcnZpY2VBY2NvdW50TmFtZRIoLmFwcGhvc3RpbmcuR2V0U2VydmljZUFjY291bnROYW1lUmVxdWVzdBopLmFwcGhvc3RpbmcuR2V0U2VydmljZUFjY291bnROYW1lUmVzcG9uc2UiABJZCg5HZXRBY2Nlc3NUb2tlbhIhLmFwcGhvc3RpbmcuR2V0QWNjZXNzVG9rZW5SZXF1ZXN0GiIuYXBwaG9zdGluZy5HZXRBY2Nlc3NUb2tlblJlc3BvbnNlIgASdAoXR2V0RGVmYXVsdEdjc0J1Y2tldE5hbWUSKi5hcHBob3N0aW5nLkdldERlZmF1bHRHY3NCdWNrZXROYW1lUmVxdWVzdBorLmFwcGhvc3RpbmcuR2V0RGVmYXVsdEdjc0J1Y2tldE5hbWVSZXNwb25zZSIAQkAKJGNvbS5nb29nbGUuYXBwZW5naW5lLmFwaS5hcHBpZGVudGl0eSABKAJCFEFwcElkZW50aXR5U2VydmljZVBi"))
175 if _net_proto___parse__python
is not None:
176 _net_proto___parse__python
.RegisterType(
177 _SERIALIZED_DESCRIPTOR
.tostring())
179 class SignForAppRequest(ProtocolBuffer
.ProtocolMessage
):
180 has_bytes_to_sign_
= 0
183 def __init__(self
, contents
=None):
184 if contents
is not None: self
.MergeFromString(contents
)
186 def bytes_to_sign(self
): return self
.bytes_to_sign_
188 def set_bytes_to_sign(self
, x
):
189 self
.has_bytes_to_sign_
= 1
190 self
.bytes_to_sign_
= x
192 def clear_bytes_to_sign(self
):
193 if self
.has_bytes_to_sign_
:
194 self
.has_bytes_to_sign_
= 0
195 self
.bytes_to_sign_
= ""
197 def has_bytes_to_sign(self
): return self
.has_bytes_to_sign_
200 def MergeFrom(self
, x
):
202 if (x
.has_bytes_to_sign()): self
.set_bytes_to_sign(x
.bytes_to_sign())
204 if _net_proto___parse__python
is not None:
205 def _CMergeFromString(self
, s
):
206 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.SignForAppRequest', s
)
208 if _net_proto___parse__python
is not None:
210 return _net_proto___parse__python
.Encode(self
, 'apphosting.SignForAppRequest')
212 if _net_proto___parse__python
is not None:
213 def _CEncodePartial(self
):
214 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.SignForAppRequest')
216 if _net_proto___parse__python
is not None:
217 def _CToASCII(self
, output_format
):
218 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.SignForAppRequest', output_format
)
221 if _net_proto___parse__python
is not None:
222 def ParseASCII(self
, s
):
223 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.SignForAppRequest', s
)
226 if _net_proto___parse__python
is not None:
227 def ParseASCIIIgnoreUnknown(self
, s
):
228 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.SignForAppRequest', s
)
232 if x
is self
: return 1
233 if self
.has_bytes_to_sign_
!= x
.has_bytes_to_sign_
: return 0
234 if self
.has_bytes_to_sign_
and self
.bytes_to_sign_
!= x
.bytes_to_sign_
: return 0
237 def IsInitialized(self
, debug_strs
=None):
243 if (self
.has_bytes_to_sign_
): n
+= 1 + self
.lengthString(len(self
.bytes_to_sign_
))
246 def ByteSizePartial(self
):
248 if (self
.has_bytes_to_sign_
): n
+= 1 + self
.lengthString(len(self
.bytes_to_sign_
))
252 self
.clear_bytes_to_sign()
254 def OutputUnchecked(self
, out
):
255 if (self
.has_bytes_to_sign_
):
257 out
.putPrefixedString(self
.bytes_to_sign_
)
259 def OutputPartial(self
, out
):
260 if (self
.has_bytes_to_sign_
):
262 out
.putPrefixedString(self
.bytes_to_sign_
)
264 def TryMerge(self
, d
):
268 self
.set_bytes_to_sign(d
.getPrefixedString())
272 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
276 def __str__(self
, prefix
="", printElemNumber
=0):
278 if self
.has_bytes_to_sign_
: res
+=prefix
+("bytes_to_sign: %s\n" % self
.DebugFormatString(self
.bytes_to_sign_
))
282 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
283 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
287 _TEXT
= _BuildTagLookupTable({
292 _TYPES
= _BuildTagLookupTable({
293 0: ProtocolBuffer
.Encoder
.NUMERIC
,
294 1: ProtocolBuffer
.Encoder
.STRING
,
295 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
299 _STYLE_CONTENT_TYPE
= """"""
300 _PROTO_DESCRIPTOR_NAME
= 'apphosting.SignForAppRequest'
301 _SERIALIZED_DESCRIPTOR
= array
.array('B')
302 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KHGFwcGhvc3RpbmcuU2lnbkZvckFwcFJlcXVlc3QTGg1ieXRlc190b19zaWduIAEoAjAJOAEUwgEiYXBwaG9zdGluZy5BcHBJZGVudGl0eVNlcnZpY2VFcnJvcg=="))
303 if _net_proto___parse__python
is not None:
304 _net_proto___parse__python
.RegisterType(
305 _SERIALIZED_DESCRIPTOR
.tostring())
307 class SignForAppResponse(ProtocolBuffer
.ProtocolMessage
):
310 has_signature_bytes_
= 0
311 signature_bytes_
= ""
313 def __init__(self
, contents
=None):
314 if contents
is not None: self
.MergeFromString(contents
)
316 def key_name(self
): return self
.key_name_
318 def set_key_name(self
, x
):
319 self
.has_key_name_
= 1
322 def clear_key_name(self
):
323 if self
.has_key_name_
:
324 self
.has_key_name_
= 0
327 def has_key_name(self
): return self
.has_key_name_
329 def signature_bytes(self
): return self
.signature_bytes_
331 def set_signature_bytes(self
, x
):
332 self
.has_signature_bytes_
= 1
333 self
.signature_bytes_
= x
335 def clear_signature_bytes(self
):
336 if self
.has_signature_bytes_
:
337 self
.has_signature_bytes_
= 0
338 self
.signature_bytes_
= ""
340 def has_signature_bytes(self
): return self
.has_signature_bytes_
343 def MergeFrom(self
, x
):
345 if (x
.has_key_name()): self
.set_key_name(x
.key_name())
346 if (x
.has_signature_bytes()): self
.set_signature_bytes(x
.signature_bytes())
348 if _net_proto___parse__python
is not None:
349 def _CMergeFromString(self
, s
):
350 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.SignForAppResponse', s
)
352 if _net_proto___parse__python
is not None:
354 return _net_proto___parse__python
.Encode(self
, 'apphosting.SignForAppResponse')
356 if _net_proto___parse__python
is not None:
357 def _CEncodePartial(self
):
358 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.SignForAppResponse')
360 if _net_proto___parse__python
is not None:
361 def _CToASCII(self
, output_format
):
362 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.SignForAppResponse', output_format
)
365 if _net_proto___parse__python
is not None:
366 def ParseASCII(self
, s
):
367 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.SignForAppResponse', s
)
370 if _net_proto___parse__python
is not None:
371 def ParseASCIIIgnoreUnknown(self
, s
):
372 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.SignForAppResponse', s
)
376 if x
is self
: return 1
377 if self
.has_key_name_
!= x
.has_key_name_
: return 0
378 if self
.has_key_name_
and self
.key_name_
!= x
.key_name_
: return 0
379 if self
.has_signature_bytes_
!= x
.has_signature_bytes_
: return 0
380 if self
.has_signature_bytes_
and self
.signature_bytes_
!= x
.signature_bytes_
: return 0
383 def IsInitialized(self
, debug_strs
=None):
389 if (self
.has_key_name_
): n
+= 1 + self
.lengthString(len(self
.key_name_
))
390 if (self
.has_signature_bytes_
): n
+= 1 + self
.lengthString(len(self
.signature_bytes_
))
393 def ByteSizePartial(self
):
395 if (self
.has_key_name_
): n
+= 1 + self
.lengthString(len(self
.key_name_
))
396 if (self
.has_signature_bytes_
): n
+= 1 + self
.lengthString(len(self
.signature_bytes_
))
400 self
.clear_key_name()
401 self
.clear_signature_bytes()
403 def OutputUnchecked(self
, out
):
404 if (self
.has_key_name_
):
406 out
.putPrefixedString(self
.key_name_
)
407 if (self
.has_signature_bytes_
):
409 out
.putPrefixedString(self
.signature_bytes_
)
411 def OutputPartial(self
, out
):
412 if (self
.has_key_name_
):
414 out
.putPrefixedString(self
.key_name_
)
415 if (self
.has_signature_bytes_
):
417 out
.putPrefixedString(self
.signature_bytes_
)
419 def TryMerge(self
, d
):
423 self
.set_key_name(d
.getPrefixedString())
426 self
.set_signature_bytes(d
.getPrefixedString())
430 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
434 def __str__(self
, prefix
="", printElemNumber
=0):
436 if self
.has_key_name_
: res
+=prefix
+("key_name: %s\n" % self
.DebugFormatString(self
.key_name_
))
437 if self
.has_signature_bytes_
: res
+=prefix
+("signature_bytes: %s\n" % self
.DebugFormatString(self
.signature_bytes_
))
441 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
442 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
447 _TEXT
= _BuildTagLookupTable({
450 2: "signature_bytes",
453 _TYPES
= _BuildTagLookupTable({
454 0: ProtocolBuffer
.Encoder
.NUMERIC
,
455 1: ProtocolBuffer
.Encoder
.STRING
,
456 2: ProtocolBuffer
.Encoder
.STRING
,
457 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
461 _STYLE_CONTENT_TYPE
= """"""
462 _PROTO_DESCRIPTOR_NAME
= 'apphosting.SignForAppResponse'
463 _SERIALIZED_DESCRIPTOR
= array
.array('B')
464 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KHWFwcGhvc3RpbmcuU2lnbkZvckFwcFJlc3BvbnNlExoIa2V5X25hbWUgASgCMAk4ARQTGg9zaWduYXR1cmVfYnl0ZXMgAigCMAk4ARTCASJhcHBob3N0aW5nLkFwcElkZW50aXR5U2VydmljZUVycm9y"))
465 if _net_proto___parse__python
is not None:
466 _net_proto___parse__python
.RegisterType(
467 _SERIALIZED_DESCRIPTOR
.tostring())
469 class GetPublicCertificateForAppRequest(ProtocolBuffer
.ProtocolMessage
):
471 def __init__(self
, contents
=None):
473 if contents
is not None: self
.MergeFromString(contents
)
476 def MergeFrom(self
, x
):
479 if _net_proto___parse__python
is not None:
480 def _CMergeFromString(self
, s
):
481 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetPublicCertificateForAppRequest', s
)
483 if _net_proto___parse__python
is not None:
485 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetPublicCertificateForAppRequest')
487 if _net_proto___parse__python
is not None:
488 def _CEncodePartial(self
):
489 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetPublicCertificateForAppRequest')
491 if _net_proto___parse__python
is not None:
492 def _CToASCII(self
, output_format
):
493 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetPublicCertificateForAppRequest', output_format
)
496 if _net_proto___parse__python
is not None:
497 def ParseASCII(self
, s
):
498 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetPublicCertificateForAppRequest', s
)
501 if _net_proto___parse__python
is not None:
502 def ParseASCIIIgnoreUnknown(self
, s
):
503 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetPublicCertificateForAppRequest', s
)
507 if x
is self
: return 1
510 def IsInitialized(self
, debug_strs
=None):
518 def ByteSizePartial(self
):
525 def OutputUnchecked(self
, out
):
528 def OutputPartial(self
, out
):
531 def TryMerge(self
, d
):
536 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
540 def __str__(self
, prefix
="", printElemNumber
=0):
545 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
546 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
549 _TEXT
= _BuildTagLookupTable({
553 _TYPES
= _BuildTagLookupTable({
554 0: ProtocolBuffer
.Encoder
.NUMERIC
,
555 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
559 _STYLE_CONTENT_TYPE
= """"""
560 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetPublicCertificateForAppRequest'
561 _SERIALIZED_DESCRIPTOR
= array
.array('B')
562 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KLGFwcGhvc3RpbmcuR2V0UHVibGljQ2VydGlmaWNhdGVGb3JBcHBSZXF1ZXN0wgEiYXBwaG9zdGluZy5BcHBJZGVudGl0eVNlcnZpY2VFcnJvcg=="))
563 if _net_proto___parse__python
is not None:
564 _net_proto___parse__python
.RegisterType(
565 _SERIALIZED_DESCRIPTOR
.tostring())
567 class PublicCertificate(ProtocolBuffer
.ProtocolMessage
):
570 has_x509_certificate_pem_
= 0
571 x509_certificate_pem_
= ""
573 def __init__(self
, contents
=None):
574 if contents
is not None: self
.MergeFromString(contents
)
576 def key_name(self
): return self
.key_name_
578 def set_key_name(self
, x
):
579 self
.has_key_name_
= 1
582 def clear_key_name(self
):
583 if self
.has_key_name_
:
584 self
.has_key_name_
= 0
587 def has_key_name(self
): return self
.has_key_name_
589 def x509_certificate_pem(self
): return self
.x509_certificate_pem_
591 def set_x509_certificate_pem(self
, x
):
592 self
.has_x509_certificate_pem_
= 1
593 self
.x509_certificate_pem_
= x
595 def clear_x509_certificate_pem(self
):
596 if self
.has_x509_certificate_pem_
:
597 self
.has_x509_certificate_pem_
= 0
598 self
.x509_certificate_pem_
= ""
600 def has_x509_certificate_pem(self
): return self
.has_x509_certificate_pem_
603 def MergeFrom(self
, x
):
605 if (x
.has_key_name()): self
.set_key_name(x
.key_name())
606 if (x
.has_x509_certificate_pem()): self
.set_x509_certificate_pem(x
.x509_certificate_pem())
608 if _net_proto___parse__python
is not None:
609 def _CMergeFromString(self
, s
):
610 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.PublicCertificate', s
)
612 if _net_proto___parse__python
is not None:
614 return _net_proto___parse__python
.Encode(self
, 'apphosting.PublicCertificate')
616 if _net_proto___parse__python
is not None:
617 def _CEncodePartial(self
):
618 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.PublicCertificate')
620 if _net_proto___parse__python
is not None:
621 def _CToASCII(self
, output_format
):
622 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.PublicCertificate', output_format
)
625 if _net_proto___parse__python
is not None:
626 def ParseASCII(self
, s
):
627 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.PublicCertificate', s
)
630 if _net_proto___parse__python
is not None:
631 def ParseASCIIIgnoreUnknown(self
, s
):
632 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.PublicCertificate', s
)
636 if x
is self
: return 1
637 if self
.has_key_name_
!= x
.has_key_name_
: return 0
638 if self
.has_key_name_
and self
.key_name_
!= x
.key_name_
: return 0
639 if self
.has_x509_certificate_pem_
!= x
.has_x509_certificate_pem_
: return 0
640 if self
.has_x509_certificate_pem_
and self
.x509_certificate_pem_
!= x
.x509_certificate_pem_
: return 0
643 def IsInitialized(self
, debug_strs
=None):
649 if (self
.has_key_name_
): n
+= 1 + self
.lengthString(len(self
.key_name_
))
650 if (self
.has_x509_certificate_pem_
): n
+= 1 + self
.lengthString(len(self
.x509_certificate_pem_
))
653 def ByteSizePartial(self
):
655 if (self
.has_key_name_
): n
+= 1 + self
.lengthString(len(self
.key_name_
))
656 if (self
.has_x509_certificate_pem_
): n
+= 1 + self
.lengthString(len(self
.x509_certificate_pem_
))
660 self
.clear_key_name()
661 self
.clear_x509_certificate_pem()
663 def OutputUnchecked(self
, out
):
664 if (self
.has_key_name_
):
666 out
.putPrefixedString(self
.key_name_
)
667 if (self
.has_x509_certificate_pem_
):
669 out
.putPrefixedString(self
.x509_certificate_pem_
)
671 def OutputPartial(self
, out
):
672 if (self
.has_key_name_
):
674 out
.putPrefixedString(self
.key_name_
)
675 if (self
.has_x509_certificate_pem_
):
677 out
.putPrefixedString(self
.x509_certificate_pem_
)
679 def TryMerge(self
, d
):
683 self
.set_key_name(d
.getPrefixedString())
686 self
.set_x509_certificate_pem(d
.getPrefixedString())
690 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
694 def __str__(self
, prefix
="", printElemNumber
=0):
696 if self
.has_key_name_
: res
+=prefix
+("key_name: %s\n" % self
.DebugFormatString(self
.key_name_
))
697 if self
.has_x509_certificate_pem_
: res
+=prefix
+("x509_certificate_pem: %s\n" % self
.DebugFormatString(self
.x509_certificate_pem_
))
701 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
702 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
705 kx509_certificate_pem
= 2
707 _TEXT
= _BuildTagLookupTable({
710 2: "x509_certificate_pem",
713 _TYPES
= _BuildTagLookupTable({
714 0: ProtocolBuffer
.Encoder
.NUMERIC
,
715 1: ProtocolBuffer
.Encoder
.STRING
,
716 2: ProtocolBuffer
.Encoder
.STRING
,
717 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
721 _STYLE_CONTENT_TYPE
= """"""
722 _PROTO_DESCRIPTOR_NAME
= 'apphosting.PublicCertificate'
723 _SERIALIZED_DESCRIPTOR
= array
.array('B')
724 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KHGFwcGhvc3RpbmcuUHVibGljQ2VydGlmaWNhdGUTGghrZXlfbmFtZSABKAIwCTgBFBMaFHg1MDlfY2VydGlmaWNhdGVfcGVtIAIoAjAJOAEUwgEiYXBwaG9zdGluZy5BcHBJZGVudGl0eVNlcnZpY2VFcnJvcg=="))
725 if _net_proto___parse__python
is not None:
726 _net_proto___parse__python
.RegisterType(
727 _SERIALIZED_DESCRIPTOR
.tostring())
729 class GetPublicCertificateForAppResponse(ProtocolBuffer
.ProtocolMessage
):
730 has_max_client_cache_time_in_second_
= 0
731 max_client_cache_time_in_second_
= 0
733 def __init__(self
, contents
=None):
734 self
.public_certificate_list_
= []
735 if contents
is not None: self
.MergeFromString(contents
)
737 def public_certificate_list_size(self
): return len(self
.public_certificate_list_
)
738 def public_certificate_list_list(self
): return self
.public_certificate_list_
740 def public_certificate_list(self
, i
):
741 return self
.public_certificate_list_
[i
]
743 def mutable_public_certificate_list(self
, i
):
744 return self
.public_certificate_list_
[i
]
746 def add_public_certificate_list(self
):
747 x
= PublicCertificate()
748 self
.public_certificate_list_
.append(x
)
751 def clear_public_certificate_list(self
):
752 self
.public_certificate_list_
= []
753 def max_client_cache_time_in_second(self
): return self
.max_client_cache_time_in_second_
755 def set_max_client_cache_time_in_second(self
, x
):
756 self
.has_max_client_cache_time_in_second_
= 1
757 self
.max_client_cache_time_in_second_
= x
759 def clear_max_client_cache_time_in_second(self
):
760 if self
.has_max_client_cache_time_in_second_
:
761 self
.has_max_client_cache_time_in_second_
= 0
762 self
.max_client_cache_time_in_second_
= 0
764 def has_max_client_cache_time_in_second(self
): return self
.has_max_client_cache_time_in_second_
767 def MergeFrom(self
, x
):
769 for i
in xrange(x
.public_certificate_list_size()): self
.add_public_certificate_list().CopyFrom(x
.public_certificate_list(i
))
770 if (x
.has_max_client_cache_time_in_second()): self
.set_max_client_cache_time_in_second(x
.max_client_cache_time_in_second())
772 if _net_proto___parse__python
is not None:
773 def _CMergeFromString(self
, s
):
774 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetPublicCertificateForAppResponse', s
)
776 if _net_proto___parse__python
is not None:
778 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetPublicCertificateForAppResponse')
780 if _net_proto___parse__python
is not None:
781 def _CEncodePartial(self
):
782 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetPublicCertificateForAppResponse')
784 if _net_proto___parse__python
is not None:
785 def _CToASCII(self
, output_format
):
786 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetPublicCertificateForAppResponse', output_format
)
789 if _net_proto___parse__python
is not None:
790 def ParseASCII(self
, s
):
791 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetPublicCertificateForAppResponse', s
)
794 if _net_proto___parse__python
is not None:
795 def ParseASCIIIgnoreUnknown(self
, s
):
796 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetPublicCertificateForAppResponse', s
)
800 if x
is self
: return 1
801 if len(self
.public_certificate_list_
) != len(x
.public_certificate_list_
): return 0
802 for e1
, e2
in zip(self
.public_certificate_list_
, x
.public_certificate_list_
):
803 if e1
!= e2
: return 0
804 if self
.has_max_client_cache_time_in_second_
!= x
.has_max_client_cache_time_in_second_
: return 0
805 if self
.has_max_client_cache_time_in_second_
and self
.max_client_cache_time_in_second_
!= x
.max_client_cache_time_in_second_
: return 0
808 def IsInitialized(self
, debug_strs
=None):
810 for p
in self
.public_certificate_list_
:
811 if not p
.IsInitialized(debug_strs
): initialized
=0
816 n
+= 1 * len(self
.public_certificate_list_
)
817 for i
in xrange(len(self
.public_certificate_list_
)): n
+= self
.lengthString(self
.public_certificate_list_
[i
].ByteSize())
818 if (self
.has_max_client_cache_time_in_second_
): n
+= 1 + self
.lengthVarInt64(self
.max_client_cache_time_in_second_
)
821 def ByteSizePartial(self
):
823 n
+= 1 * len(self
.public_certificate_list_
)
824 for i
in xrange(len(self
.public_certificate_list_
)): n
+= self
.lengthString(self
.public_certificate_list_
[i
].ByteSizePartial())
825 if (self
.has_max_client_cache_time_in_second_
): n
+= 1 + self
.lengthVarInt64(self
.max_client_cache_time_in_second_
)
829 self
.clear_public_certificate_list()
830 self
.clear_max_client_cache_time_in_second()
832 def OutputUnchecked(self
, out
):
833 for i
in xrange(len(self
.public_certificate_list_
)):
835 out
.putVarInt32(self
.public_certificate_list_
[i
].ByteSize())
836 self
.public_certificate_list_
[i
].OutputUnchecked(out
)
837 if (self
.has_max_client_cache_time_in_second_
):
839 out
.putVarInt64(self
.max_client_cache_time_in_second_
)
841 def OutputPartial(self
, out
):
842 for i
in xrange(len(self
.public_certificate_list_
)):
844 out
.putVarInt32(self
.public_certificate_list_
[i
].ByteSizePartial())
845 self
.public_certificate_list_
[i
].OutputPartial(out
)
846 if (self
.has_max_client_cache_time_in_second_
):
848 out
.putVarInt64(self
.max_client_cache_time_in_second_
)
850 def TryMerge(self
, d
):
854 length
= d
.getVarInt32()
855 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
857 self
.add_public_certificate_list().TryMerge(tmp
)
860 self
.set_max_client_cache_time_in_second(d
.getVarInt64())
864 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
868 def __str__(self
, prefix
="", printElemNumber
=0):
871 for e
in self
.public_certificate_list_
:
873 if printElemNumber
: elm
="(%d)" % cnt
874 res
+=prefix
+("public_certificate_list%s <\n" % elm
)
875 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
878 if self
.has_max_client_cache_time_in_second_
: res
+=prefix
+("max_client_cache_time_in_second: %s\n" % self
.DebugFormatInt64(self
.max_client_cache_time_in_second_
))
882 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
883 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
885 kpublic_certificate_list
= 1
886 kmax_client_cache_time_in_second
= 2
888 _TEXT
= _BuildTagLookupTable({
890 1: "public_certificate_list",
891 2: "max_client_cache_time_in_second",
894 _TYPES
= _BuildTagLookupTable({
895 0: ProtocolBuffer
.Encoder
.NUMERIC
,
896 1: ProtocolBuffer
.Encoder
.STRING
,
897 2: ProtocolBuffer
.Encoder
.NUMERIC
,
898 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
902 _STYLE_CONTENT_TYPE
= """"""
903 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetPublicCertificateForAppResponse'
904 _SERIALIZED_DESCRIPTOR
= array
.array('B')
905 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KLWFwcGhvc3RpbmcuR2V0UHVibGljQ2VydGlmaWNhdGVGb3JBcHBSZXNwb25zZRMaF3B1YmxpY19jZXJ0aWZpY2F0ZV9saXN0IAEoAjALOANKHGFwcGhvc3RpbmcuUHVibGljQ2VydGlmaWNhdGWjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExofbWF4X2NsaWVudF9jYWNoZV90aW1lX2luX3NlY29uZCACKAAwAzgBFMIBImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3I="))
906 if _net_proto___parse__python
is not None:
907 _net_proto___parse__python
.RegisterType(
908 _SERIALIZED_DESCRIPTOR
.tostring())
910 class GetServiceAccountNameRequest(ProtocolBuffer
.ProtocolMessage
):
912 def __init__(self
, contents
=None):
914 if contents
is not None: self
.MergeFromString(contents
)
917 def MergeFrom(self
, x
):
920 if _net_proto___parse__python
is not None:
921 def _CMergeFromString(self
, s
):
922 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetServiceAccountNameRequest', s
)
924 if _net_proto___parse__python
is not None:
926 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetServiceAccountNameRequest')
928 if _net_proto___parse__python
is not None:
929 def _CEncodePartial(self
):
930 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetServiceAccountNameRequest')
932 if _net_proto___parse__python
is not None:
933 def _CToASCII(self
, output_format
):
934 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetServiceAccountNameRequest', output_format
)
937 if _net_proto___parse__python
is not None:
938 def ParseASCII(self
, s
):
939 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetServiceAccountNameRequest', s
)
942 if _net_proto___parse__python
is not None:
943 def ParseASCIIIgnoreUnknown(self
, s
):
944 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetServiceAccountNameRequest', s
)
948 if x
is self
: return 1
951 def IsInitialized(self
, debug_strs
=None):
959 def ByteSizePartial(self
):
966 def OutputUnchecked(self
, out
):
969 def OutputPartial(self
, out
):
972 def TryMerge(self
, d
):
977 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
981 def __str__(self
, prefix
="", printElemNumber
=0):
986 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
987 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
990 _TEXT
= _BuildTagLookupTable({
994 _TYPES
= _BuildTagLookupTable({
995 0: ProtocolBuffer
.Encoder
.NUMERIC
,
996 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1000 _STYLE_CONTENT_TYPE
= """"""
1001 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetServiceAccountNameRequest'
1002 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1003 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KJ2FwcGhvc3RpbmcuR2V0U2VydmljZUFjY291bnROYW1lUmVxdWVzdMIBImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3I="))
1004 if _net_proto___parse__python
is not None:
1005 _net_proto___parse__python
.RegisterType(
1006 _SERIALIZED_DESCRIPTOR
.tostring())
1008 class GetServiceAccountNameResponse(ProtocolBuffer
.ProtocolMessage
):
1009 has_service_account_name_
= 0
1010 service_account_name_
= ""
1012 def __init__(self
, contents
=None):
1013 if contents
is not None: self
.MergeFromString(contents
)
1015 def service_account_name(self
): return self
.service_account_name_
1017 def set_service_account_name(self
, x
):
1018 self
.has_service_account_name_
= 1
1019 self
.service_account_name_
= x
1021 def clear_service_account_name(self
):
1022 if self
.has_service_account_name_
:
1023 self
.has_service_account_name_
= 0
1024 self
.service_account_name_
= ""
1026 def has_service_account_name(self
): return self
.has_service_account_name_
1029 def MergeFrom(self
, x
):
1030 assert x
is not self
1031 if (x
.has_service_account_name()): self
.set_service_account_name(x
.service_account_name())
1033 if _net_proto___parse__python
is not None:
1034 def _CMergeFromString(self
, s
):
1035 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetServiceAccountNameResponse', s
)
1037 if _net_proto___parse__python
is not None:
1039 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetServiceAccountNameResponse')
1041 if _net_proto___parse__python
is not None:
1042 def _CEncodePartial(self
):
1043 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetServiceAccountNameResponse')
1045 if _net_proto___parse__python
is not None:
1046 def _CToASCII(self
, output_format
):
1047 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetServiceAccountNameResponse', output_format
)
1050 if _net_proto___parse__python
is not None:
1051 def ParseASCII(self
, s
):
1052 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetServiceAccountNameResponse', s
)
1055 if _net_proto___parse__python
is not None:
1056 def ParseASCIIIgnoreUnknown(self
, s
):
1057 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetServiceAccountNameResponse', s
)
1060 def Equals(self
, x
):
1061 if x
is self
: return 1
1062 if self
.has_service_account_name_
!= x
.has_service_account_name_
: return 0
1063 if self
.has_service_account_name_
and self
.service_account_name_
!= x
.service_account_name_
: return 0
1066 def IsInitialized(self
, debug_strs
=None):
1072 if (self
.has_service_account_name_
): n
+= 1 + self
.lengthString(len(self
.service_account_name_
))
1075 def ByteSizePartial(self
):
1077 if (self
.has_service_account_name_
): n
+= 1 + self
.lengthString(len(self
.service_account_name_
))
1081 self
.clear_service_account_name()
1083 def OutputUnchecked(self
, out
):
1084 if (self
.has_service_account_name_
):
1086 out
.putPrefixedString(self
.service_account_name_
)
1088 def OutputPartial(self
, out
):
1089 if (self
.has_service_account_name_
):
1091 out
.putPrefixedString(self
.service_account_name_
)
1093 def TryMerge(self
, d
):
1094 while d
.avail() > 0:
1095 tt
= d
.getVarInt32()
1097 self
.set_service_account_name(d
.getPrefixedString())
1101 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1105 def __str__(self
, prefix
="", printElemNumber
=0):
1107 if self
.has_service_account_name_
: res
+=prefix
+("service_account_name: %s\n" % self
.DebugFormatString(self
.service_account_name_
))
1111 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1112 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1114 kservice_account_name
= 1
1116 _TEXT
= _BuildTagLookupTable({
1118 1: "service_account_name",
1121 _TYPES
= _BuildTagLookupTable({
1122 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1123 1: ProtocolBuffer
.Encoder
.STRING
,
1124 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1128 _STYLE_CONTENT_TYPE
= """"""
1129 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetServiceAccountNameResponse'
1130 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1131 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KKGFwcGhvc3RpbmcuR2V0U2VydmljZUFjY291bnROYW1lUmVzcG9uc2UTGhRzZXJ2aWNlX2FjY291bnRfbmFtZSABKAIwCTgBFMIBImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3I="))
1132 if _net_proto___parse__python
is not None:
1133 _net_proto___parse__python
.RegisterType(
1134 _SERIALIZED_DESCRIPTOR
.tostring())
1136 class GetAccessTokenRequest(ProtocolBuffer
.ProtocolMessage
):
1137 has_service_account_id_
= 0
1138 service_account_id_
= 0
1139 has_service_account_name_
= 0
1140 service_account_name_
= ""
1142 def __init__(self
, contents
=None):
1144 if contents
is not None: self
.MergeFromString(contents
)
1146 def scope_size(self
): return len(self
.scope_
)
1147 def scope_list(self
): return self
.scope_
1150 return self
.scope_
[i
]
1152 def set_scope(self
, i
, x
):
1155 def add_scope(self
, x
):
1156 self
.scope_
.append(x
)
1158 def clear_scope(self
):
1161 def service_account_id(self
): return self
.service_account_id_
1163 def set_service_account_id(self
, x
):
1164 self
.has_service_account_id_
= 1
1165 self
.service_account_id_
= x
1167 def clear_service_account_id(self
):
1168 if self
.has_service_account_id_
:
1169 self
.has_service_account_id_
= 0
1170 self
.service_account_id_
= 0
1172 def has_service_account_id(self
): return self
.has_service_account_id_
1174 def service_account_name(self
): return self
.service_account_name_
1176 def set_service_account_name(self
, x
):
1177 self
.has_service_account_name_
= 1
1178 self
.service_account_name_
= x
1180 def clear_service_account_name(self
):
1181 if self
.has_service_account_name_
:
1182 self
.has_service_account_name_
= 0
1183 self
.service_account_name_
= ""
1185 def has_service_account_name(self
): return self
.has_service_account_name_
1188 def MergeFrom(self
, x
):
1189 assert x
is not self
1190 for i
in xrange(x
.scope_size()): self
.add_scope(x
.scope(i
))
1191 if (x
.has_service_account_id()): self
.set_service_account_id(x
.service_account_id())
1192 if (x
.has_service_account_name()): self
.set_service_account_name(x
.service_account_name())
1194 if _net_proto___parse__python
is not None:
1195 def _CMergeFromString(self
, s
):
1196 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetAccessTokenRequest', s
)
1198 if _net_proto___parse__python
is not None:
1200 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetAccessTokenRequest')
1202 if _net_proto___parse__python
is not None:
1203 def _CEncodePartial(self
):
1204 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetAccessTokenRequest')
1206 if _net_proto___parse__python
is not None:
1207 def _CToASCII(self
, output_format
):
1208 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetAccessTokenRequest', output_format
)
1211 if _net_proto___parse__python
is not None:
1212 def ParseASCII(self
, s
):
1213 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetAccessTokenRequest', s
)
1216 if _net_proto___parse__python
is not None:
1217 def ParseASCIIIgnoreUnknown(self
, s
):
1218 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetAccessTokenRequest', s
)
1221 def Equals(self
, x
):
1222 if x
is self
: return 1
1223 if len(self
.scope_
) != len(x
.scope_
): return 0
1224 for e1
, e2
in zip(self
.scope_
, x
.scope_
):
1225 if e1
!= e2
: return 0
1226 if self
.has_service_account_id_
!= x
.has_service_account_id_
: return 0
1227 if self
.has_service_account_id_
and self
.service_account_id_
!= x
.service_account_id_
: return 0
1228 if self
.has_service_account_name_
!= x
.has_service_account_name_
: return 0
1229 if self
.has_service_account_name_
and self
.service_account_name_
!= x
.service_account_name_
: return 0
1232 def IsInitialized(self
, debug_strs
=None):
1238 n
+= 1 * len(self
.scope_
)
1239 for i
in xrange(len(self
.scope_
)): n
+= self
.lengthString(len(self
.scope_
[i
]))
1240 if (self
.has_service_account_id_
): n
+= 1 + self
.lengthVarInt64(self
.service_account_id_
)
1241 if (self
.has_service_account_name_
): n
+= 1 + self
.lengthString(len(self
.service_account_name_
))
1244 def ByteSizePartial(self
):
1246 n
+= 1 * len(self
.scope_
)
1247 for i
in xrange(len(self
.scope_
)): n
+= self
.lengthString(len(self
.scope_
[i
]))
1248 if (self
.has_service_account_id_
): n
+= 1 + self
.lengthVarInt64(self
.service_account_id_
)
1249 if (self
.has_service_account_name_
): n
+= 1 + self
.lengthString(len(self
.service_account_name_
))
1254 self
.clear_service_account_id()
1255 self
.clear_service_account_name()
1257 def OutputUnchecked(self
, out
):
1258 for i
in xrange(len(self
.scope_
)):
1260 out
.putPrefixedString(self
.scope_
[i
])
1261 if (self
.has_service_account_id_
):
1263 out
.putVarInt64(self
.service_account_id_
)
1264 if (self
.has_service_account_name_
):
1266 out
.putPrefixedString(self
.service_account_name_
)
1268 def OutputPartial(self
, out
):
1269 for i
in xrange(len(self
.scope_
)):
1271 out
.putPrefixedString(self
.scope_
[i
])
1272 if (self
.has_service_account_id_
):
1274 out
.putVarInt64(self
.service_account_id_
)
1275 if (self
.has_service_account_name_
):
1277 out
.putPrefixedString(self
.service_account_name_
)
1279 def TryMerge(self
, d
):
1280 while d
.avail() > 0:
1281 tt
= d
.getVarInt32()
1283 self
.add_scope(d
.getPrefixedString())
1286 self
.set_service_account_id(d
.getVarInt64())
1289 self
.set_service_account_name(d
.getPrefixedString())
1293 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1297 def __str__(self
, prefix
="", printElemNumber
=0):
1300 for e
in self
.scope_
:
1302 if printElemNumber
: elm
="(%d)" % cnt
1303 res
+=prefix
+("scope%s: %s\n" % (elm
, self
.DebugFormatString(e
)))
1305 if self
.has_service_account_id_
: res
+=prefix
+("service_account_id: %s\n" % self
.DebugFormatInt64(self
.service_account_id_
))
1306 if self
.has_service_account_name_
: res
+=prefix
+("service_account_name: %s\n" % self
.DebugFormatString(self
.service_account_name_
))
1310 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1311 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1314 kservice_account_id
= 2
1315 kservice_account_name
= 3
1317 _TEXT
= _BuildTagLookupTable({
1320 2: "service_account_id",
1321 3: "service_account_name",
1324 _TYPES
= _BuildTagLookupTable({
1325 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1326 1: ProtocolBuffer
.Encoder
.STRING
,
1327 2: ProtocolBuffer
.Encoder
.NUMERIC
,
1328 3: ProtocolBuffer
.Encoder
.STRING
,
1329 }, 3, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1333 _STYLE_CONTENT_TYPE
= """"""
1334 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetAccessTokenRequest'
1335 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1336 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KIGFwcGhvc3RpbmcuR2V0QWNjZXNzVG9rZW5SZXF1ZXN0ExoFc2NvcGUgASgCMAk4AxQTGhJzZXJ2aWNlX2FjY291bnRfaWQgAigAMAM4ARQTGhRzZXJ2aWNlX2FjY291bnRfbmFtZSADKAIwCTgBFMIBImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3I="))
1337 if _net_proto___parse__python
is not None:
1338 _net_proto___parse__python
.RegisterType(
1339 _SERIALIZED_DESCRIPTOR
.tostring())
1341 class GetAccessTokenResponse(ProtocolBuffer
.ProtocolMessage
):
1342 has_access_token_
= 0
1344 has_expiration_time_
= 0
1345 expiration_time_
= 0
1347 def __init__(self
, contents
=None):
1348 if contents
is not None: self
.MergeFromString(contents
)
1350 def access_token(self
): return self
.access_token_
1352 def set_access_token(self
, x
):
1353 self
.has_access_token_
= 1
1354 self
.access_token_
= x
1356 def clear_access_token(self
):
1357 if self
.has_access_token_
:
1358 self
.has_access_token_
= 0
1359 self
.access_token_
= ""
1361 def has_access_token(self
): return self
.has_access_token_
1363 def expiration_time(self
): return self
.expiration_time_
1365 def set_expiration_time(self
, x
):
1366 self
.has_expiration_time_
= 1
1367 self
.expiration_time_
= x
1369 def clear_expiration_time(self
):
1370 if self
.has_expiration_time_
:
1371 self
.has_expiration_time_
= 0
1372 self
.expiration_time_
= 0
1374 def has_expiration_time(self
): return self
.has_expiration_time_
1377 def MergeFrom(self
, x
):
1378 assert x
is not self
1379 if (x
.has_access_token()): self
.set_access_token(x
.access_token())
1380 if (x
.has_expiration_time()): self
.set_expiration_time(x
.expiration_time())
1382 if _net_proto___parse__python
is not None:
1383 def _CMergeFromString(self
, s
):
1384 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetAccessTokenResponse', s
)
1386 if _net_proto___parse__python
is not None:
1388 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetAccessTokenResponse')
1390 if _net_proto___parse__python
is not None:
1391 def _CEncodePartial(self
):
1392 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetAccessTokenResponse')
1394 if _net_proto___parse__python
is not None:
1395 def _CToASCII(self
, output_format
):
1396 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetAccessTokenResponse', output_format
)
1399 if _net_proto___parse__python
is not None:
1400 def ParseASCII(self
, s
):
1401 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetAccessTokenResponse', s
)
1404 if _net_proto___parse__python
is not None:
1405 def ParseASCIIIgnoreUnknown(self
, s
):
1406 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetAccessTokenResponse', s
)
1409 def Equals(self
, x
):
1410 if x
is self
: return 1
1411 if self
.has_access_token_
!= x
.has_access_token_
: return 0
1412 if self
.has_access_token_
and self
.access_token_
!= x
.access_token_
: return 0
1413 if self
.has_expiration_time_
!= x
.has_expiration_time_
: return 0
1414 if self
.has_expiration_time_
and self
.expiration_time_
!= x
.expiration_time_
: return 0
1417 def IsInitialized(self
, debug_strs
=None):
1423 if (self
.has_access_token_
): n
+= 1 + self
.lengthString(len(self
.access_token_
))
1424 if (self
.has_expiration_time_
): n
+= 1 + self
.lengthVarInt64(self
.expiration_time_
)
1427 def ByteSizePartial(self
):
1429 if (self
.has_access_token_
): n
+= 1 + self
.lengthString(len(self
.access_token_
))
1430 if (self
.has_expiration_time_
): n
+= 1 + self
.lengthVarInt64(self
.expiration_time_
)
1434 self
.clear_access_token()
1435 self
.clear_expiration_time()
1437 def OutputUnchecked(self
, out
):
1438 if (self
.has_access_token_
):
1440 out
.putPrefixedString(self
.access_token_
)
1441 if (self
.has_expiration_time_
):
1443 out
.putVarInt64(self
.expiration_time_
)
1445 def OutputPartial(self
, out
):
1446 if (self
.has_access_token_
):
1448 out
.putPrefixedString(self
.access_token_
)
1449 if (self
.has_expiration_time_
):
1451 out
.putVarInt64(self
.expiration_time_
)
1453 def TryMerge(self
, d
):
1454 while d
.avail() > 0:
1455 tt
= d
.getVarInt32()
1457 self
.set_access_token(d
.getPrefixedString())
1460 self
.set_expiration_time(d
.getVarInt64())
1464 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1468 def __str__(self
, prefix
="", printElemNumber
=0):
1470 if self
.has_access_token_
: res
+=prefix
+("access_token: %s\n" % self
.DebugFormatString(self
.access_token_
))
1471 if self
.has_expiration_time_
: res
+=prefix
+("expiration_time: %s\n" % self
.DebugFormatInt64(self
.expiration_time_
))
1475 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1476 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1479 kexpiration_time
= 2
1481 _TEXT
= _BuildTagLookupTable({
1484 2: "expiration_time",
1487 _TYPES
= _BuildTagLookupTable({
1488 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1489 1: ProtocolBuffer
.Encoder
.STRING
,
1490 2: ProtocolBuffer
.Encoder
.NUMERIC
,
1491 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1495 _STYLE_CONTENT_TYPE
= """"""
1496 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetAccessTokenResponse'
1497 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1498 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KIWFwcGhvc3RpbmcuR2V0QWNjZXNzVG9rZW5SZXNwb25zZRMaDGFjY2Vzc190b2tlbiABKAIwCTgBFBMaD2V4cGlyYXRpb25fdGltZSACKAAwAzgBFMIBImFwcGhvc3RpbmcuQXBwSWRlbnRpdHlTZXJ2aWNlRXJyb3I="))
1499 if _net_proto___parse__python
is not None:
1500 _net_proto___parse__python
.RegisterType(
1501 _SERIALIZED_DESCRIPTOR
.tostring())
1503 class GetDefaultGcsBucketNameRequest(ProtocolBuffer
.ProtocolMessage
):
1505 def __init__(self
, contents
=None):
1507 if contents
is not None: self
.MergeFromString(contents
)
1510 def MergeFrom(self
, x
):
1511 assert x
is not self
1513 if _net_proto___parse__python
is not None:
1514 def _CMergeFromString(self
, s
):
1515 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetDefaultGcsBucketNameRequest', s
)
1517 if _net_proto___parse__python
is not None:
1519 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetDefaultGcsBucketNameRequest')
1521 if _net_proto___parse__python
is not None:
1522 def _CEncodePartial(self
):
1523 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetDefaultGcsBucketNameRequest')
1525 if _net_proto___parse__python
is not None:
1526 def _CToASCII(self
, output_format
):
1527 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetDefaultGcsBucketNameRequest', output_format
)
1530 if _net_proto___parse__python
is not None:
1531 def ParseASCII(self
, s
):
1532 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetDefaultGcsBucketNameRequest', s
)
1535 if _net_proto___parse__python
is not None:
1536 def ParseASCIIIgnoreUnknown(self
, s
):
1537 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetDefaultGcsBucketNameRequest', s
)
1540 def Equals(self
, x
):
1541 if x
is self
: return 1
1544 def IsInitialized(self
, debug_strs
=None):
1552 def ByteSizePartial(self
):
1559 def OutputUnchecked(self
, out
):
1562 def OutputPartial(self
, out
):
1565 def TryMerge(self
, d
):
1566 while d
.avail() > 0:
1567 tt
= d
.getVarInt32()
1570 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1574 def __str__(self
, prefix
="", printElemNumber
=0):
1579 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1580 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1583 _TEXT
= _BuildTagLookupTable({
1587 _TYPES
= _BuildTagLookupTable({
1588 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1589 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1593 _STYLE_CONTENT_TYPE
= """"""
1594 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetDefaultGcsBucketNameRequest'
1595 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1596 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KKWFwcGhvc3RpbmcuR2V0RGVmYXVsdEdjc0J1Y2tldE5hbWVSZXF1ZXN0wgEiYXBwaG9zdGluZy5BcHBJZGVudGl0eVNlcnZpY2VFcnJvcg=="))
1597 if _net_proto___parse__python
is not None:
1598 _net_proto___parse__python
.RegisterType(
1599 _SERIALIZED_DESCRIPTOR
.tostring())
1601 class GetDefaultGcsBucketNameResponse(ProtocolBuffer
.ProtocolMessage
):
1602 has_default_gcs_bucket_name_
= 0
1603 default_gcs_bucket_name_
= ""
1605 def __init__(self
, contents
=None):
1606 if contents
is not None: self
.MergeFromString(contents
)
1608 def default_gcs_bucket_name(self
): return self
.default_gcs_bucket_name_
1610 def set_default_gcs_bucket_name(self
, x
):
1611 self
.has_default_gcs_bucket_name_
= 1
1612 self
.default_gcs_bucket_name_
= x
1614 def clear_default_gcs_bucket_name(self
):
1615 if self
.has_default_gcs_bucket_name_
:
1616 self
.has_default_gcs_bucket_name_
= 0
1617 self
.default_gcs_bucket_name_
= ""
1619 def has_default_gcs_bucket_name(self
): return self
.has_default_gcs_bucket_name_
1622 def MergeFrom(self
, x
):
1623 assert x
is not self
1624 if (x
.has_default_gcs_bucket_name()): self
.set_default_gcs_bucket_name(x
.default_gcs_bucket_name())
1626 if _net_proto___parse__python
is not None:
1627 def _CMergeFromString(self
, s
):
1628 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.GetDefaultGcsBucketNameResponse', s
)
1630 if _net_proto___parse__python
is not None:
1632 return _net_proto___parse__python
.Encode(self
, 'apphosting.GetDefaultGcsBucketNameResponse')
1634 if _net_proto___parse__python
is not None:
1635 def _CEncodePartial(self
):
1636 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.GetDefaultGcsBucketNameResponse')
1638 if _net_proto___parse__python
is not None:
1639 def _CToASCII(self
, output_format
):
1640 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.GetDefaultGcsBucketNameResponse', output_format
)
1643 if _net_proto___parse__python
is not None:
1644 def ParseASCII(self
, s
):
1645 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.GetDefaultGcsBucketNameResponse', s
)
1648 if _net_proto___parse__python
is not None:
1649 def ParseASCIIIgnoreUnknown(self
, s
):
1650 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.GetDefaultGcsBucketNameResponse', s
)
1653 def Equals(self
, x
):
1654 if x
is self
: return 1
1655 if self
.has_default_gcs_bucket_name_
!= x
.has_default_gcs_bucket_name_
: return 0
1656 if self
.has_default_gcs_bucket_name_
and self
.default_gcs_bucket_name_
!= x
.default_gcs_bucket_name_
: return 0
1659 def IsInitialized(self
, debug_strs
=None):
1665 if (self
.has_default_gcs_bucket_name_
): n
+= 1 + self
.lengthString(len(self
.default_gcs_bucket_name_
))
1668 def ByteSizePartial(self
):
1670 if (self
.has_default_gcs_bucket_name_
): n
+= 1 + self
.lengthString(len(self
.default_gcs_bucket_name_
))
1674 self
.clear_default_gcs_bucket_name()
1676 def OutputUnchecked(self
, out
):
1677 if (self
.has_default_gcs_bucket_name_
):
1679 out
.putPrefixedString(self
.default_gcs_bucket_name_
)
1681 def OutputPartial(self
, out
):
1682 if (self
.has_default_gcs_bucket_name_
):
1684 out
.putPrefixedString(self
.default_gcs_bucket_name_
)
1686 def TryMerge(self
, d
):
1687 while d
.avail() > 0:
1688 tt
= d
.getVarInt32()
1690 self
.set_default_gcs_bucket_name(d
.getPrefixedString())
1694 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1698 def __str__(self
, prefix
="", printElemNumber
=0):
1700 if self
.has_default_gcs_bucket_name_
: res
+=prefix
+("default_gcs_bucket_name: %s\n" % self
.DebugFormatString(self
.default_gcs_bucket_name_
))
1704 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1705 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1707 kdefault_gcs_bucket_name
= 1
1709 _TEXT
= _BuildTagLookupTable({
1711 1: "default_gcs_bucket_name",
1714 _TYPES
= _BuildTagLookupTable({
1715 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1716 1: ProtocolBuffer
.Encoder
.STRING
,
1717 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1721 _STYLE_CONTENT_TYPE
= """"""
1722 _PROTO_DESCRIPTOR_NAME
= 'apphosting.GetDefaultGcsBucketNameResponse'
1723 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1724 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WjZhcHBob3N0aW5nL2FwaS9hcHBfaWRlbnRpdHkvYXBwX2lkZW50aXR5X3NlcnZpY2UucHJvdG8KKmFwcGhvc3RpbmcuR2V0RGVmYXVsdEdjc0J1Y2tldE5hbWVSZXNwb25zZRMaF2RlZmF1bHRfZ2NzX2J1Y2tldF9uYW1lIAEoAjAJOAEUwgEiYXBwaG9zdGluZy5BcHBJZGVudGl0eVNlcnZpY2VFcnJvcg=="))
1725 if _net_proto___parse__python
is not None:
1726 _net_proto___parse__python
.RegisterType(
1727 _SERIALIZED_DESCRIPTOR
.tostring())
1731 class _SigningService_ClientBaseStub(_client_stub_base_class
):
1732 """Makes Stubby RPC calls to a SigningService server."""
1735 '_protorpc_SignForApp', '_full_name_SignForApp',
1736 '_protorpc_GetPublicCertificatesForApp', '_full_name_GetPublicCertificatesForApp',
1737 '_protorpc_GetServiceAccountName', '_full_name_GetServiceAccountName',
1738 '_protorpc_GetAccessToken', '_full_name_GetAccessToken',
1739 '_protorpc_GetDefaultGcsBucketName', '_full_name_GetDefaultGcsBucketName',
1742 def __init__(self
, rpc_stub
):
1743 self
._stub
= rpc_stub
1745 self
._protorpc
_SignForApp
= pywraprpc
.RPC()
1746 self
._full
_name
_SignForApp
= self
._stub
.GetFullMethodName(
1749 self
._protorpc
_GetPublicCertificatesForApp
= pywraprpc
.RPC()
1750 self
._full
_name
_GetPublicCertificatesForApp
= self
._stub
.GetFullMethodName(
1751 'GetPublicCertificatesForApp')
1753 self
._protorpc
_GetServiceAccountName
= pywraprpc
.RPC()
1754 self
._full
_name
_GetServiceAccountName
= self
._stub
.GetFullMethodName(
1755 'GetServiceAccountName')
1757 self
._protorpc
_GetAccessToken
= pywraprpc
.RPC()
1758 self
._full
_name
_GetAccessToken
= self
._stub
.GetFullMethodName(
1761 self
._protorpc
_GetDefaultGcsBucketName
= pywraprpc
.RPC()
1762 self
._full
_name
_GetDefaultGcsBucketName
= self
._stub
.GetFullMethodName(
1763 'GetDefaultGcsBucketName')
1765 def SignForApp(self
, request
, rpc
=None, callback
=None, response
=None):
1766 """Make a SignForApp RPC call.
1769 request: a SignForAppRequest instance.
1770 rpc: Optional RPC instance to use for the call.
1771 callback: Optional final callback. Will be called as
1772 callback(rpc, result) when the rpc completes. If None, the
1773 call is synchronous.
1774 response: Optional ProtocolMessage to be filled in with response.
1777 The SignForAppResponse if callback is None. Otherwise, returns None.
1780 if response
is None:
1781 response
= SignForAppResponse
1782 return self
._MakeCall
(rpc
,
1783 self
._full
_name
_SignForApp
,
1788 self
._protorpc
_SignForApp
)
1790 def GetPublicCertificatesForApp(self
, request
, rpc
=None, callback
=None, response
=None):
1791 """Make a GetPublicCertificatesForApp RPC call.
1794 request: a GetPublicCertificateForAppRequest instance.
1795 rpc: Optional RPC instance to use for the call.
1796 callback: Optional final callback. Will be called as
1797 callback(rpc, result) when the rpc completes. If None, the
1798 call is synchronous.
1799 response: Optional ProtocolMessage to be filled in with response.
1802 The GetPublicCertificateForAppResponse if callback is None. Otherwise, returns None.
1805 if response
is None:
1806 response
= GetPublicCertificateForAppResponse
1807 return self
._MakeCall
(rpc
,
1808 self
._full
_name
_GetPublicCertificatesForApp
,
1809 'GetPublicCertificatesForApp',
1813 self
._protorpc
_GetPublicCertificatesForApp
)
1815 def GetServiceAccountName(self
, request
, rpc
=None, callback
=None, response
=None):
1816 """Make a GetServiceAccountName RPC call.
1819 request: a GetServiceAccountNameRequest instance.
1820 rpc: Optional RPC instance to use for the call.
1821 callback: Optional final callback. Will be called as
1822 callback(rpc, result) when the rpc completes. If None, the
1823 call is synchronous.
1824 response: Optional ProtocolMessage to be filled in with response.
1827 The GetServiceAccountNameResponse if callback is None. Otherwise, returns None.
1830 if response
is None:
1831 response
= GetServiceAccountNameResponse
1832 return self
._MakeCall
(rpc
,
1833 self
._full
_name
_GetServiceAccountName
,
1834 'GetServiceAccountName',
1838 self
._protorpc
_GetServiceAccountName
)
1840 def GetAccessToken(self
, request
, rpc
=None, callback
=None, response
=None):
1841 """Make a GetAccessToken RPC call.
1844 request: a GetAccessTokenRequest instance.
1845 rpc: Optional RPC instance to use for the call.
1846 callback: Optional final callback. Will be called as
1847 callback(rpc, result) when the rpc completes. If None, the
1848 call is synchronous.
1849 response: Optional ProtocolMessage to be filled in with response.
1852 The GetAccessTokenResponse if callback is None. Otherwise, returns None.
1855 if response
is None:
1856 response
= GetAccessTokenResponse
1857 return self
._MakeCall
(rpc
,
1858 self
._full
_name
_GetAccessToken
,
1863 self
._protorpc
_GetAccessToken
)
1865 def GetDefaultGcsBucketName(self
, request
, rpc
=None, callback
=None, response
=None):
1866 """Make a GetDefaultGcsBucketName RPC call.
1869 request: a GetDefaultGcsBucketNameRequest instance.
1870 rpc: Optional RPC instance to use for the call.
1871 callback: Optional final callback. Will be called as
1872 callback(rpc, result) when the rpc completes. If None, the
1873 call is synchronous.
1874 response: Optional ProtocolMessage to be filled in with response.
1877 The GetDefaultGcsBucketNameResponse if callback is None. Otherwise, returns None.
1880 if response
is None:
1881 response
= GetDefaultGcsBucketNameResponse
1882 return self
._MakeCall
(rpc
,
1883 self
._full
_name
_GetDefaultGcsBucketName
,
1884 'GetDefaultGcsBucketName',
1888 self
._protorpc
_GetDefaultGcsBucketName
)
1891 class _SigningService_ClientStub(_SigningService_ClientBaseStub
):
1892 __slots__
= ('_params',)
1893 def __init__(self
, rpc_stub_parameters
, service_name
):
1894 if service_name
is None:
1895 service_name
= 'SigningService'
1896 _SigningService_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, rpc_stub_parameters
))
1897 self
._params
= rpc_stub_parameters
1900 class _SigningService_RPC2ClientStub(_SigningService_ClientBaseStub
):
1902 def __init__(self
, server
, channel
, service_name
):
1903 if service_name
is None:
1904 service_name
= 'SigningService'
1905 if channel
is not None:
1906 if channel
.version() == 1:
1907 raise RuntimeError('Expecting an RPC2 channel to create the stub')
1908 _SigningService_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, channel
))
1909 elif server
is not None:
1910 _SigningService_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, pywraprpc
.NewClientChannel(server
)))
1912 raise RuntimeError('Invalid argument combination to create a stub')
1915 class SigningService(_server_stub_base_class
):
1916 """Base class for SigningService Stubby servers."""
1919 def _MethodSignatures(cls
):
1920 """Returns a dict of {<method-name>: (<request-type>, <response-type>)}."""
1922 'SignForApp': (SignForAppRequest
, SignForAppResponse
),
1923 'GetPublicCertificatesForApp': (GetPublicCertificateForAppRequest
, GetPublicCertificateForAppResponse
),
1924 'GetServiceAccountName': (GetServiceAccountNameRequest
, GetServiceAccountNameResponse
),
1925 'GetAccessToken': (GetAccessTokenRequest
, GetAccessTokenResponse
),
1926 'GetDefaultGcsBucketName': (GetDefaultGcsBucketNameRequest
, GetDefaultGcsBucketNameResponse
),
1930 def _StreamMethodSignatures(cls
):
1931 """Returns a dict of {<method-name>: (<request-type>, <stream-type>, <response-type>)}."""
1935 def __init__(self
, *args
, **kwargs
):
1936 """Creates a Stubby RPC server.
1938 See BaseRpcServer.__init__ in rpcserver.py for detail on arguments.
1940 if _server_stub_base_class
is object:
1941 raise NotImplementedError('Add //net/rpc/python:rpcserver as a '
1942 'dependency for Stubby server support.')
1943 _server_stub_base_class
.__init
__(self
, 'apphosting.SigningService', *args
, **kwargs
)
1946 def NewStub(rpc_stub_parameters
, service_name
=None):
1947 """Creates a new SigningService Stubby client stub.
1950 rpc_stub_parameters: an RPC_StubParameter instance.
1951 service_name: the service name used by the Stubby server.
1954 if _client_stub_base_class
is object:
1955 raise RuntimeError('Add //net/rpc/python as a dependency to use Stubby')
1956 return _SigningService_ClientStub(rpc_stub_parameters
, service_name
)
1959 def NewRPC2Stub(server
=None, channel
=None, service_name
=None):
1960 """Creates a new SigningService Stubby2 client stub.
1963 server: host:port or bns address.
1964 channel: directly use a channel to create a stub. Will ignore server
1965 argument if this is specified.
1966 service_name: the service name used by the Stubby server.
1969 if _client_stub_base_class
is object:
1970 raise RuntimeError('Add //net/rpc/python as a dependency to use Stubby')
1971 return _SigningService_RPC2ClientStub(server
, channel
, service_name
)
1973 def SignForApp(self
, rpc
, request
, response
):
1974 """Handles a SignForApp RPC call. You should override this.
1977 rpc: a Stubby RPC object
1978 request: a SignForAppRequest that contains the client request
1979 response: a SignForAppResponse that should be modified to send the response
1981 raise NotImplementedError
1984 def GetPublicCertificatesForApp(self
, rpc
, request
, response
):
1985 """Handles a GetPublicCertificatesForApp RPC call. You should override this.
1988 rpc: a Stubby RPC object
1989 request: a GetPublicCertificateForAppRequest that contains the client request
1990 response: a GetPublicCertificateForAppResponse that should be modified to send the response
1992 raise NotImplementedError
1995 def GetServiceAccountName(self
, rpc
, request
, response
):
1996 """Handles a GetServiceAccountName RPC call. You should override this.
1999 rpc: a Stubby RPC object
2000 request: a GetServiceAccountNameRequest that contains the client request
2001 response: a GetServiceAccountNameResponse that should be modified to send the response
2003 raise NotImplementedError
2006 def GetAccessToken(self
, rpc
, request
, response
):
2007 """Handles a GetAccessToken RPC call. You should override this.
2010 rpc: a Stubby RPC object
2011 request: a GetAccessTokenRequest that contains the client request
2012 response: a GetAccessTokenResponse that should be modified to send the response
2014 raise NotImplementedError
2017 def GetDefaultGcsBucketName(self
, rpc
, request
, response
):
2018 """Handles a GetDefaultGcsBucketName RPC call. You should override this.
2021 rpc: a Stubby RPC object
2022 request: a GetDefaultGcsBucketNameRequest that contains the client request
2023 response: a GetDefaultGcsBucketNameResponse that should be modified to send the response
2025 raise NotImplementedError
2027 def _AddMethodAttributes(self
):
2028 """Sets attributes on Python RPC handlers.
2030 See BaseRpcServer in rpcserver.py for details.
2032 rpcserver
._GetHandlerDecorator
(
2033 getattr(self
.SignForApp
, 'im_func' if str is bytes
else '__func__'),
2038 rpcserver
._GetHandlerDecorator
(
2039 getattr(self
.GetPublicCertificatesForApp
, 'im_func' if str is bytes
else '__func__'),
2040 GetPublicCertificateForAppRequest
,
2041 GetPublicCertificateForAppResponse
,
2044 rpcserver
._GetHandlerDecorator
(
2045 getattr(self
.GetServiceAccountName
, 'im_func' if str is bytes
else '__func__'),
2046 GetServiceAccountNameRequest
,
2047 GetServiceAccountNameResponse
,
2050 rpcserver
._GetHandlerDecorator
(
2051 getattr(self
.GetAccessToken
, 'im_func' if str is bytes
else '__func__'),
2052 GetAccessTokenRequest
,
2053 GetAccessTokenResponse
,
2056 rpcserver
._GetHandlerDecorator
(
2057 getattr(self
.GetDefaultGcsBucketName
, 'im_func' if str is bytes
else '__func__'),
2058 GetDefaultGcsBucketNameRequest
,
2059 GetDefaultGcsBucketNameResponse
,
2063 if _extension_runtime
:
2066 __all__
= ['AppIdentityServiceError','SignForAppRequest','SignForAppResponse','GetPublicCertificateForAppRequest','PublicCertificate','GetPublicCertificateForAppResponse','GetServiceAccountNameRequest','GetServiceAccountNameResponse','GetAccessTokenRequest','GetAccessTokenResponse','GetDefaultGcsBucketNameRequest','GetDefaultGcsBucketNameResponse','SigningService']