App Engine Python SDK version 1.9.3
[gae.git] / python / google / appengine / api / app_identity / app_identity_service_pb.py
blob8a5a82cab629305b2901e6beea02ffedde5c04f0
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 base64
23 import dummy_thread as thread
24 try:
25 from google3.net.proto import _net_proto___parse__python
26 except ImportError:
27 _net_proto___parse__python = None
28 import sys
29 try:
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
35 except ImportError:
36 _client_stub_base_class = object
37 try:
38 __import__('google.net.rpc.python.rpcserver')
39 rpcserver = sys.modules.get('google.net.rpc.python.rpcserver')
40 _server_stub_base_class = rpcserver.BaseRpcServer
41 except ImportError:
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
50 else:
51 _extension_runtime = False
52 _ExtendableProtocolMessage = ProtocolBuffer.ProtocolMessage
54 class AppIdentityServiceError(ProtocolBuffer.ProtocolMessage):
57 SUCCESS = 0
58 UNKNOWN_SCOPE = 9
59 BLOB_TOO_LARGE = 1000
60 DEADLINE_EXCEEDED = 1001
61 NOT_A_VALID_APP = 1002
62 UNKNOWN_ERROR = 1003
63 GAIAMINT_NOT_INITIAILIZED = 1004
64 NOT_ALLOWED = 1005
65 NOT_IMPLEMENTED = 1006
67 _ErrorCode_NAMES = {
68 0: "SUCCESS",
69 9: "UNKNOWN_SCOPE",
70 1000: "BLOB_TOO_LARGE",
71 1001: "DEADLINE_EXCEEDED",
72 1002: "NOT_A_VALID_APP",
73 1003: "UNKNOWN_ERROR",
74 1004: "GAIAMINT_NOT_INITIAILIZED",
75 1005: "NOT_ALLOWED",
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):
84 pass
85 if contents is not None: self.MergeFromString(contents)
88 def MergeFrom(self, x):
89 assert x is not self
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:
96 def _CEncode(self):
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)
118 def Equals(self, x):
119 if x is self: return 1
120 return 1
122 def IsInitialized(self, debug_strs=None):
123 initialized = 1
124 return initialized
126 def ByteSize(self):
127 n = 0
128 return n
130 def ByteSizePartial(self):
131 n = 0
132 return n
134 def Clear(self):
135 pass
137 def OutputUnchecked(self, out):
138 pass
140 def OutputPartial(self, out):
141 pass
143 def TryMerge(self, d):
144 while d.avail() > 0:
145 tt = d.getVarInt32()
148 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
149 d.skipData(tt)
152 def __str__(self, prefix="", printElemNumber=0):
153 res=""
154 return res
157 def _BuildTagLookupTable(sparse, maxtag, default=None):
158 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
161 _TEXT = _BuildTagLookupTable({
162 0: "ErrorCode",
163 }, 0)
165 _TYPES = _BuildTagLookupTable({
166 0: ProtocolBuffer.Encoder.NUMERIC,
167 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
170 _STYLE = """"""
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
181 bytes_to_sign_ = ""
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):
201 assert x is not self
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:
209 def _CEncode(self):
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)
231 def Equals(self, x):
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
235 return 1
237 def IsInitialized(self, debug_strs=None):
238 initialized = 1
239 return initialized
241 def ByteSize(self):
242 n = 0
243 if (self.has_bytes_to_sign_): n += 1 + self.lengthString(len(self.bytes_to_sign_))
244 return n
246 def ByteSizePartial(self):
247 n = 0
248 if (self.has_bytes_to_sign_): n += 1 + self.lengthString(len(self.bytes_to_sign_))
249 return n
251 def Clear(self):
252 self.clear_bytes_to_sign()
254 def OutputUnchecked(self, out):
255 if (self.has_bytes_to_sign_):
256 out.putVarInt32(10)
257 out.putPrefixedString(self.bytes_to_sign_)
259 def OutputPartial(self, out):
260 if (self.has_bytes_to_sign_):
261 out.putVarInt32(10)
262 out.putPrefixedString(self.bytes_to_sign_)
264 def TryMerge(self, d):
265 while d.avail() > 0:
266 tt = d.getVarInt32()
267 if tt == 10:
268 self.set_bytes_to_sign(d.getPrefixedString())
269 continue
272 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
273 d.skipData(tt)
276 def __str__(self, prefix="", printElemNumber=0):
277 res=""
278 if self.has_bytes_to_sign_: res+=prefix+("bytes_to_sign: %s\n" % self.DebugFormatString(self.bytes_to_sign_))
279 return res
282 def _BuildTagLookupTable(sparse, maxtag, default=None):
283 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
285 kbytes_to_sign = 1
287 _TEXT = _BuildTagLookupTable({
288 0: "ErrorCode",
289 1: "bytes_to_sign",
290 }, 1)
292 _TYPES = _BuildTagLookupTable({
293 0: ProtocolBuffer.Encoder.NUMERIC,
294 1: ProtocolBuffer.Encoder.STRING,
295 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
298 _STYLE = """"""
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):
308 has_key_name_ = 0
309 key_name_ = ""
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
320 self.key_name_ = x
322 def clear_key_name(self):
323 if self.has_key_name_:
324 self.has_key_name_ = 0
325 self.key_name_ = ""
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):
344 assert x is not self
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:
353 def _CEncode(self):
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)
375 def Equals(self, x):
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
381 return 1
383 def IsInitialized(self, debug_strs=None):
384 initialized = 1
385 return initialized
387 def ByteSize(self):
388 n = 0
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_))
391 return n
393 def ByteSizePartial(self):
394 n = 0
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_))
397 return n
399 def Clear(self):
400 self.clear_key_name()
401 self.clear_signature_bytes()
403 def OutputUnchecked(self, out):
404 if (self.has_key_name_):
405 out.putVarInt32(10)
406 out.putPrefixedString(self.key_name_)
407 if (self.has_signature_bytes_):
408 out.putVarInt32(18)
409 out.putPrefixedString(self.signature_bytes_)
411 def OutputPartial(self, out):
412 if (self.has_key_name_):
413 out.putVarInt32(10)
414 out.putPrefixedString(self.key_name_)
415 if (self.has_signature_bytes_):
416 out.putVarInt32(18)
417 out.putPrefixedString(self.signature_bytes_)
419 def TryMerge(self, d):
420 while d.avail() > 0:
421 tt = d.getVarInt32()
422 if tt == 10:
423 self.set_key_name(d.getPrefixedString())
424 continue
425 if tt == 18:
426 self.set_signature_bytes(d.getPrefixedString())
427 continue
430 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
431 d.skipData(tt)
434 def __str__(self, prefix="", printElemNumber=0):
435 res=""
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_))
438 return res
441 def _BuildTagLookupTable(sparse, maxtag, default=None):
442 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
444 kkey_name = 1
445 ksignature_bytes = 2
447 _TEXT = _BuildTagLookupTable({
448 0: "ErrorCode",
449 1: "key_name",
450 2: "signature_bytes",
451 }, 2)
453 _TYPES = _BuildTagLookupTable({
454 0: ProtocolBuffer.Encoder.NUMERIC,
455 1: ProtocolBuffer.Encoder.STRING,
456 2: ProtocolBuffer.Encoder.STRING,
457 }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
460 _STYLE = """"""
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):
472 pass
473 if contents is not None: self.MergeFromString(contents)
476 def MergeFrom(self, x):
477 assert x is not self
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:
484 def _CEncode(self):
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)
506 def Equals(self, x):
507 if x is self: return 1
508 return 1
510 def IsInitialized(self, debug_strs=None):
511 initialized = 1
512 return initialized
514 def ByteSize(self):
515 n = 0
516 return n
518 def ByteSizePartial(self):
519 n = 0
520 return n
522 def Clear(self):
523 pass
525 def OutputUnchecked(self, out):
526 pass
528 def OutputPartial(self, out):
529 pass
531 def TryMerge(self, d):
532 while d.avail() > 0:
533 tt = d.getVarInt32()
536 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
537 d.skipData(tt)
540 def __str__(self, prefix="", printElemNumber=0):
541 res=""
542 return res
545 def _BuildTagLookupTable(sparse, maxtag, default=None):
546 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
549 _TEXT = _BuildTagLookupTable({
550 0: "ErrorCode",
551 }, 0)
553 _TYPES = _BuildTagLookupTable({
554 0: ProtocolBuffer.Encoder.NUMERIC,
555 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
558 _STYLE = """"""
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):
568 has_key_name_ = 0
569 key_name_ = ""
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
580 self.key_name_ = x
582 def clear_key_name(self):
583 if self.has_key_name_:
584 self.has_key_name_ = 0
585 self.key_name_ = ""
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):
604 assert x is not self
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:
613 def _CEncode(self):
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)
635 def Equals(self, x):
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
641 return 1
643 def IsInitialized(self, debug_strs=None):
644 initialized = 1
645 return initialized
647 def ByteSize(self):
648 n = 0
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_))
651 return n
653 def ByteSizePartial(self):
654 n = 0
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_))
657 return n
659 def Clear(self):
660 self.clear_key_name()
661 self.clear_x509_certificate_pem()
663 def OutputUnchecked(self, out):
664 if (self.has_key_name_):
665 out.putVarInt32(10)
666 out.putPrefixedString(self.key_name_)
667 if (self.has_x509_certificate_pem_):
668 out.putVarInt32(18)
669 out.putPrefixedString(self.x509_certificate_pem_)
671 def OutputPartial(self, out):
672 if (self.has_key_name_):
673 out.putVarInt32(10)
674 out.putPrefixedString(self.key_name_)
675 if (self.has_x509_certificate_pem_):
676 out.putVarInt32(18)
677 out.putPrefixedString(self.x509_certificate_pem_)
679 def TryMerge(self, d):
680 while d.avail() > 0:
681 tt = d.getVarInt32()
682 if tt == 10:
683 self.set_key_name(d.getPrefixedString())
684 continue
685 if tt == 18:
686 self.set_x509_certificate_pem(d.getPrefixedString())
687 continue
690 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
691 d.skipData(tt)
694 def __str__(self, prefix="", printElemNumber=0):
695 res=""
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_))
698 return res
701 def _BuildTagLookupTable(sparse, maxtag, default=None):
702 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
704 kkey_name = 1
705 kx509_certificate_pem = 2
707 _TEXT = _BuildTagLookupTable({
708 0: "ErrorCode",
709 1: "key_name",
710 2: "x509_certificate_pem",
711 }, 2)
713 _TYPES = _BuildTagLookupTable({
714 0: ProtocolBuffer.Encoder.NUMERIC,
715 1: ProtocolBuffer.Encoder.STRING,
716 2: ProtocolBuffer.Encoder.STRING,
717 }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
720 _STYLE = """"""
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)
749 return 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):
768 assert x is not self
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:
777 def _CEncode(self):
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)
799 def Equals(self, x):
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
806 return 1
808 def IsInitialized(self, debug_strs=None):
809 initialized = 1
810 for p in self.public_certificate_list_:
811 if not p.IsInitialized(debug_strs): initialized=0
812 return initialized
814 def ByteSize(self):
815 n = 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_)
819 return n
821 def ByteSizePartial(self):
822 n = 0
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_)
826 return n
828 def Clear(self):
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_)):
834 out.putVarInt32(10)
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_):
838 out.putVarInt32(16)
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_)):
843 out.putVarInt32(10)
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_):
847 out.putVarInt32(16)
848 out.putVarInt64(self.max_client_cache_time_in_second_)
850 def TryMerge(self, d):
851 while d.avail() > 0:
852 tt = d.getVarInt32()
853 if tt == 10:
854 length = d.getVarInt32()
855 tmp = ProtocolBuffer.Decoder(d.buffer(), d.pos(), d.pos() + length)
856 d.skip(length)
857 self.add_public_certificate_list().TryMerge(tmp)
858 continue
859 if tt == 16:
860 self.set_max_client_cache_time_in_second(d.getVarInt64())
861 continue
864 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
865 d.skipData(tt)
868 def __str__(self, prefix="", printElemNumber=0):
869 res=""
870 cnt=0
871 for e in self.public_certificate_list_:
872 elm=""
873 if printElemNumber: elm="(%d)" % cnt
874 res+=prefix+("public_certificate_list%s <\n" % elm)
875 res+=e.__str__(prefix + " ", printElemNumber)
876 res+=prefix+">\n"
877 cnt+=1
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_))
879 return res
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({
889 0: "ErrorCode",
890 1: "public_certificate_list",
891 2: "max_client_cache_time_in_second",
892 }, 2)
894 _TYPES = _BuildTagLookupTable({
895 0: ProtocolBuffer.Encoder.NUMERIC,
896 1: ProtocolBuffer.Encoder.STRING,
897 2: ProtocolBuffer.Encoder.NUMERIC,
898 }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
901 _STYLE = """"""
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):
913 pass
914 if contents is not None: self.MergeFromString(contents)
917 def MergeFrom(self, x):
918 assert x is not self
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:
925 def _CEncode(self):
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)
947 def Equals(self, x):
948 if x is self: return 1
949 return 1
951 def IsInitialized(self, debug_strs=None):
952 initialized = 1
953 return initialized
955 def ByteSize(self):
956 n = 0
957 return n
959 def ByteSizePartial(self):
960 n = 0
961 return n
963 def Clear(self):
964 pass
966 def OutputUnchecked(self, out):
967 pass
969 def OutputPartial(self, out):
970 pass
972 def TryMerge(self, d):
973 while d.avail() > 0:
974 tt = d.getVarInt32()
977 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
978 d.skipData(tt)
981 def __str__(self, prefix="", printElemNumber=0):
982 res=""
983 return res
986 def _BuildTagLookupTable(sparse, maxtag, default=None):
987 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
990 _TEXT = _BuildTagLookupTable({
991 0: "ErrorCode",
992 }, 0)
994 _TYPES = _BuildTagLookupTable({
995 0: ProtocolBuffer.Encoder.NUMERIC,
996 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
999 _STYLE = """"""
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:
1038 def _CEncode(self):
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
1064 return 1
1066 def IsInitialized(self, debug_strs=None):
1067 initialized = 1
1068 return initialized
1070 def ByteSize(self):
1071 n = 0
1072 if (self.has_service_account_name_): n += 1 + self.lengthString(len(self.service_account_name_))
1073 return n
1075 def ByteSizePartial(self):
1076 n = 0
1077 if (self.has_service_account_name_): n += 1 + self.lengthString(len(self.service_account_name_))
1078 return n
1080 def Clear(self):
1081 self.clear_service_account_name()
1083 def OutputUnchecked(self, out):
1084 if (self.has_service_account_name_):
1085 out.putVarInt32(10)
1086 out.putPrefixedString(self.service_account_name_)
1088 def OutputPartial(self, out):
1089 if (self.has_service_account_name_):
1090 out.putVarInt32(10)
1091 out.putPrefixedString(self.service_account_name_)
1093 def TryMerge(self, d):
1094 while d.avail() > 0:
1095 tt = d.getVarInt32()
1096 if tt == 10:
1097 self.set_service_account_name(d.getPrefixedString())
1098 continue
1101 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1102 d.skipData(tt)
1105 def __str__(self, prefix="", printElemNumber=0):
1106 res=""
1107 if self.has_service_account_name_: res+=prefix+("service_account_name: %s\n" % self.DebugFormatString(self.service_account_name_))
1108 return res
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({
1117 0: "ErrorCode",
1118 1: "service_account_name",
1119 }, 1)
1121 _TYPES = _BuildTagLookupTable({
1122 0: ProtocolBuffer.Encoder.NUMERIC,
1123 1: ProtocolBuffer.Encoder.STRING,
1124 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1127 _STYLE = """"""
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):
1143 self.scope_ = []
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_
1149 def scope(self, i):
1150 return self.scope_[i]
1152 def set_scope(self, i, x):
1153 self.scope_[i] = x
1155 def add_scope(self, x):
1156 self.scope_.append(x)
1158 def clear_scope(self):
1159 self.scope_ = []
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:
1199 def _CEncode(self):
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
1230 return 1
1232 def IsInitialized(self, debug_strs=None):
1233 initialized = 1
1234 return initialized
1236 def ByteSize(self):
1237 n = 0
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_))
1242 return n
1244 def ByteSizePartial(self):
1245 n = 0
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_))
1250 return n
1252 def Clear(self):
1253 self.clear_scope()
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_)):
1259 out.putVarInt32(10)
1260 out.putPrefixedString(self.scope_[i])
1261 if (self.has_service_account_id_):
1262 out.putVarInt32(16)
1263 out.putVarInt64(self.service_account_id_)
1264 if (self.has_service_account_name_):
1265 out.putVarInt32(26)
1266 out.putPrefixedString(self.service_account_name_)
1268 def OutputPartial(self, out):
1269 for i in xrange(len(self.scope_)):
1270 out.putVarInt32(10)
1271 out.putPrefixedString(self.scope_[i])
1272 if (self.has_service_account_id_):
1273 out.putVarInt32(16)
1274 out.putVarInt64(self.service_account_id_)
1275 if (self.has_service_account_name_):
1276 out.putVarInt32(26)
1277 out.putPrefixedString(self.service_account_name_)
1279 def TryMerge(self, d):
1280 while d.avail() > 0:
1281 tt = d.getVarInt32()
1282 if tt == 10:
1283 self.add_scope(d.getPrefixedString())
1284 continue
1285 if tt == 16:
1286 self.set_service_account_id(d.getVarInt64())
1287 continue
1288 if tt == 26:
1289 self.set_service_account_name(d.getPrefixedString())
1290 continue
1293 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1294 d.skipData(tt)
1297 def __str__(self, prefix="", printElemNumber=0):
1298 res=""
1299 cnt=0
1300 for e in self.scope_:
1301 elm=""
1302 if printElemNumber: elm="(%d)" % cnt
1303 res+=prefix+("scope%s: %s\n" % (elm, self.DebugFormatString(e)))
1304 cnt+=1
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_))
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 kscope = 1
1314 kservice_account_id = 2
1315 kservice_account_name = 3
1317 _TEXT = _BuildTagLookupTable({
1318 0: "ErrorCode",
1319 1: "scope",
1320 2: "service_account_id",
1321 3: "service_account_name",
1322 }, 3)
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)
1332 _STYLE = """"""
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
1343 access_token_ = ""
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:
1387 def _CEncode(self):
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
1415 return 1
1417 def IsInitialized(self, debug_strs=None):
1418 initialized = 1
1419 return initialized
1421 def ByteSize(self):
1422 n = 0
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_)
1425 return n
1427 def ByteSizePartial(self):
1428 n = 0
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_)
1431 return n
1433 def Clear(self):
1434 self.clear_access_token()
1435 self.clear_expiration_time()
1437 def OutputUnchecked(self, out):
1438 if (self.has_access_token_):
1439 out.putVarInt32(10)
1440 out.putPrefixedString(self.access_token_)
1441 if (self.has_expiration_time_):
1442 out.putVarInt32(16)
1443 out.putVarInt64(self.expiration_time_)
1445 def OutputPartial(self, out):
1446 if (self.has_access_token_):
1447 out.putVarInt32(10)
1448 out.putPrefixedString(self.access_token_)
1449 if (self.has_expiration_time_):
1450 out.putVarInt32(16)
1451 out.putVarInt64(self.expiration_time_)
1453 def TryMerge(self, d):
1454 while d.avail() > 0:
1455 tt = d.getVarInt32()
1456 if tt == 10:
1457 self.set_access_token(d.getPrefixedString())
1458 continue
1459 if tt == 16:
1460 self.set_expiration_time(d.getVarInt64())
1461 continue
1464 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1465 d.skipData(tt)
1468 def __str__(self, prefix="", printElemNumber=0):
1469 res=""
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_))
1472 return res
1475 def _BuildTagLookupTable(sparse, maxtag, default=None):
1476 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1478 kaccess_token = 1
1479 kexpiration_time = 2
1481 _TEXT = _BuildTagLookupTable({
1482 0: "ErrorCode",
1483 1: "access_token",
1484 2: "expiration_time",
1485 }, 2)
1487 _TYPES = _BuildTagLookupTable({
1488 0: ProtocolBuffer.Encoder.NUMERIC,
1489 1: ProtocolBuffer.Encoder.STRING,
1490 2: ProtocolBuffer.Encoder.NUMERIC,
1491 }, 2, ProtocolBuffer.Encoder.MAX_TYPE)
1494 _STYLE = """"""
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):
1506 pass
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:
1518 def _CEncode(self):
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
1542 return 1
1544 def IsInitialized(self, debug_strs=None):
1545 initialized = 1
1546 return initialized
1548 def ByteSize(self):
1549 n = 0
1550 return n
1552 def ByteSizePartial(self):
1553 n = 0
1554 return n
1556 def Clear(self):
1557 pass
1559 def OutputUnchecked(self, out):
1560 pass
1562 def OutputPartial(self, out):
1563 pass
1565 def TryMerge(self, d):
1566 while d.avail() > 0:
1567 tt = d.getVarInt32()
1570 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1571 d.skipData(tt)
1574 def __str__(self, prefix="", printElemNumber=0):
1575 res=""
1576 return res
1579 def _BuildTagLookupTable(sparse, maxtag, default=None):
1580 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)])
1583 _TEXT = _BuildTagLookupTable({
1584 0: "ErrorCode",
1585 }, 0)
1587 _TYPES = _BuildTagLookupTable({
1588 0: ProtocolBuffer.Encoder.NUMERIC,
1589 }, 0, ProtocolBuffer.Encoder.MAX_TYPE)
1592 _STYLE = """"""
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:
1631 def _CEncode(self):
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
1657 return 1
1659 def IsInitialized(self, debug_strs=None):
1660 initialized = 1
1661 return initialized
1663 def ByteSize(self):
1664 n = 0
1665 if (self.has_default_gcs_bucket_name_): n += 1 + self.lengthString(len(self.default_gcs_bucket_name_))
1666 return n
1668 def ByteSizePartial(self):
1669 n = 0
1670 if (self.has_default_gcs_bucket_name_): n += 1 + self.lengthString(len(self.default_gcs_bucket_name_))
1671 return n
1673 def Clear(self):
1674 self.clear_default_gcs_bucket_name()
1676 def OutputUnchecked(self, out):
1677 if (self.has_default_gcs_bucket_name_):
1678 out.putVarInt32(10)
1679 out.putPrefixedString(self.default_gcs_bucket_name_)
1681 def OutputPartial(self, out):
1682 if (self.has_default_gcs_bucket_name_):
1683 out.putVarInt32(10)
1684 out.putPrefixedString(self.default_gcs_bucket_name_)
1686 def TryMerge(self, d):
1687 while d.avail() > 0:
1688 tt = d.getVarInt32()
1689 if tt == 10:
1690 self.set_default_gcs_bucket_name(d.getPrefixedString())
1691 continue
1694 if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError
1695 d.skipData(tt)
1698 def __str__(self, prefix="", printElemNumber=0):
1699 res=""
1700 if self.has_default_gcs_bucket_name_: res+=prefix+("default_gcs_bucket_name: %s\n" % self.DebugFormatString(self.default_gcs_bucket_name_))
1701 return res
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({
1710 0: "ErrorCode",
1711 1: "default_gcs_bucket_name",
1712 }, 1)
1714 _TYPES = _BuildTagLookupTable({
1715 0: ProtocolBuffer.Encoder.NUMERIC,
1716 1: ProtocolBuffer.Encoder.STRING,
1717 }, 1, ProtocolBuffer.Encoder.MAX_TYPE)
1720 _STYLE = """"""
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."""
1734 __slots__ = (
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(
1747 'SignForApp')
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(
1759 'GetAccessToken')
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.
1768 Args:
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.
1776 Returns:
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,
1784 'SignForApp',
1785 request,
1786 response,
1787 callback,
1788 self._protorpc_SignForApp)
1790 def GetPublicCertificatesForApp(self, request, rpc=None, callback=None, response=None):
1791 """Make a GetPublicCertificatesForApp RPC call.
1793 Args:
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.
1801 Returns:
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',
1810 request,
1811 response,
1812 callback,
1813 self._protorpc_GetPublicCertificatesForApp)
1815 def GetServiceAccountName(self, request, rpc=None, callback=None, response=None):
1816 """Make a GetServiceAccountName RPC call.
1818 Args:
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.
1826 Returns:
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',
1835 request,
1836 response,
1837 callback,
1838 self._protorpc_GetServiceAccountName)
1840 def GetAccessToken(self, request, rpc=None, callback=None, response=None):
1841 """Make a GetAccessToken RPC call.
1843 Args:
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.
1851 Returns:
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,
1859 'GetAccessToken',
1860 request,
1861 response,
1862 callback,
1863 self._protorpc_GetAccessToken)
1865 def GetDefaultGcsBucketName(self, request, rpc=None, callback=None, response=None):
1866 """Make a GetDefaultGcsBucketName RPC call.
1868 Args:
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.
1876 Returns:
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',
1885 request,
1886 response,
1887 callback,
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):
1901 __slots__ = ()
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)))
1911 else:
1912 raise RuntimeError('Invalid argument combination to create a stub')
1915 class SigningService(_server_stub_base_class):
1916 """Base class for SigningService Stubby servers."""
1918 @classmethod
1919 def _MethodSignatures(cls):
1920 """Returns a dict of {<method-name>: (<request-type>, <response-type>)}."""
1921 return {
1922 'SignForApp': (SignForAppRequest, SignForAppResponse),
1923 'GetPublicCertificatesForApp': (GetPublicCertificateForAppRequest, GetPublicCertificateForAppResponse),
1924 'GetServiceAccountName': (GetServiceAccountNameRequest, GetServiceAccountNameResponse),
1925 'GetAccessToken': (GetAccessTokenRequest, GetAccessTokenResponse),
1926 'GetDefaultGcsBucketName': (GetDefaultGcsBucketNameRequest, GetDefaultGcsBucketNameResponse),
1929 @classmethod
1930 def _StreamMethodSignatures(cls):
1931 """Returns a dict of {<method-name>: (<request-type>, <stream-type>, <response-type>)}."""
1932 return {
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)
1945 @staticmethod
1946 def NewStub(rpc_stub_parameters, service_name=None):
1947 """Creates a new SigningService Stubby client stub.
1949 Args:
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)
1958 @staticmethod
1959 def NewRPC2Stub(server=None, channel=None, service_name=None):
1960 """Creates a new SigningService Stubby2 client stub.
1962 Args:
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.
1976 Args:
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.
1987 Args:
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.
1998 Args:
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.
2009 Args:
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.
2020 Args:
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__'),
2034 SignForAppRequest,
2035 SignForAppResponse,
2036 None,
2037 'INTEGRITY')
2038 rpcserver._GetHandlerDecorator(
2039 getattr(self.GetPublicCertificatesForApp, 'im_func' if str is bytes else '__func__'),
2040 GetPublicCertificateForAppRequest,
2041 GetPublicCertificateForAppResponse,
2042 None,
2043 'INTEGRITY')
2044 rpcserver._GetHandlerDecorator(
2045 getattr(self.GetServiceAccountName, 'im_func' if str is bytes else '__func__'),
2046 GetServiceAccountNameRequest,
2047 GetServiceAccountNameResponse,
2048 None,
2049 'INTEGRITY')
2050 rpcserver._GetHandlerDecorator(
2051 getattr(self.GetAccessToken, 'im_func' if str is bytes else '__func__'),
2052 GetAccessTokenRequest,
2053 GetAccessTokenResponse,
2054 None,
2055 'INTEGRITY')
2056 rpcserver._GetHandlerDecorator(
2057 getattr(self.GetDefaultGcsBucketName, 'im_func' if str is bytes else '__func__'),
2058 GetDefaultGcsBucketNameRequest,
2059 GetDefaultGcsBucketNameResponse,
2060 None,
2061 'INTEGRITY')
2063 if _extension_runtime:
2064 pass
2066 __all__ = ['AppIdentityServiceError','SignForAppRequest','SignForAppResponse','GetPublicCertificateForAppRequest','PublicCertificate','GetPublicCertificateForAppResponse','GetServiceAccountNameRequest','GetServiceAccountNameResponse','GetAccessTokenRequest','GetAccessTokenResponse','GetDefaultGcsBucketNameRequest','GetDefaultGcsBucketNameResponse','SigningService']