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 from google
.appengine
.datastore
.entity_v4_pb
import *
55 import google
.appengine
.datastore
.entity_v4_pb
56 class Error(ProtocolBuffer
.ProtocolMessage
):
60 CONCURRENT_TRANSACTION
= 2
66 COMMITTED_BUT_STILL_APPLYING
= 8
67 CAPABILITY_DISABLED
= 9
68 TRY_ALTERNATE_BACKEND
= 10
69 SAFE_TIME_TOO_OLD
= 11
73 2: "CONCURRENT_TRANSACTION",
77 6: "PERMISSION_DENIED",
79 8: "COMMITTED_BUT_STILL_APPLYING",
80 9: "CAPABILITY_DISABLED",
81 10: "TRY_ALTERNATE_BACKEND",
82 11: "SAFE_TIME_TOO_OLD",
85 def ErrorCode_Name(cls
, x
): return cls
._ErrorCode
_NAMES
.get(x
, "")
86 ErrorCode_Name
= classmethod(ErrorCode_Name
)
89 def __init__(self
, contents
=None):
91 if contents
is not None: self
.MergeFromString(contents
)
94 def MergeFrom(self
, x
):
97 if _net_proto___parse__python
is not None:
98 def _CMergeFromString(self
, s
):
99 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.Error', s
)
101 if _net_proto___parse__python
is not None:
103 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.Error')
105 if _net_proto___parse__python
is not None:
106 def _CEncodePartial(self
):
107 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.Error')
109 if _net_proto___parse__python
is not None:
110 def _CToASCII(self
, output_format
):
111 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.Error', output_format
)
114 if _net_proto___parse__python
is not None:
115 def ParseASCII(self
, s
):
116 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.Error', s
)
119 if _net_proto___parse__python
is not None:
120 def ParseASCIIIgnoreUnknown(self
, s
):
121 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.Error', s
)
125 if x
is self
: return 1
128 def IsInitialized(self
, debug_strs
=None):
136 def ByteSizePartial(self
):
143 def OutputUnchecked(self
, out
):
146 def OutputPartial(self
, out
):
149 def TryMerge(self
, d
):
154 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
158 def __str__(self
, prefix
="", printElemNumber
=0):
163 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
164 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
167 _TEXT
= _BuildTagLookupTable({
171 _TYPES
= _BuildTagLookupTable({
172 0: ProtocolBuffer
.Encoder
.NUMERIC
,
173 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
177 _STYLE_CONTENT_TYPE
= """"""
178 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.Error'
179 _SERIALIZED_DESCRIPTOR
= array
.array('B')
180 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9yc3oJRXJyb3JDb2RliwGSAQtCQURfUkVRVUVTVJgBAYwBiwGSARZDT05DVVJSRU5UX1RSQU5TQUNUSU9OmAECjAGLAZIBDklOVEVSTkFMX0VSUk9SmAEDjAGLAZIBCk5FRURfSU5ERViYAQSMAYsBkgEHVElNRU9VVJgBBYwBiwGSARFQRVJNSVNTSU9OX0RFTklFRJgBBowBiwGSAQ5CSUdUQUJMRV9FUlJPUpgBB4wBiwGSARxDT01NSVRURURfQlVUX1NUSUxMX0FQUExZSU5HmAEIjAGLAZIBE0NBUEFCSUxJVFlfRElTQUJMRUSYAQmMAYsBkgEVVFJZX0FMVEVSTkFURV9CQUNLRU5EmAEKjAGLAZIBEVNBRkVfVElNRV9UT09fT0xEmAELjAF0ugH4LQonYXBwaG9zdGluZy9kYXRhc3RvcmUvZGF0YXN0b3JlX3Y0LnByb3RvEhdhcHBob3N0aW5nLmRhdGFzdG9yZS52NBokYXBwaG9zdGluZy9kYXRhc3RvcmUvZW50aXR5X3Y0LnByb3RvIosCCgVFcnJvciKBAgoJRXJyb3JDb2RlEg8KC0JBRF9SRVFVRVNUEAESGgoWQ09OQ1VSUkVOVF9UUkFOU0FDVElPThACEhIKDklOVEVSTkFMX0VSUk9SEAMSDgoKTkVFRF9JTkRFWBAEEgsKB1RJTUVPVVQQBRIVChFQRVJNSVNTSU9OX0RFTklFRBAGEhIKDkJJR1RBQkxFX0VSUk9SEAcSIAocQ09NTUlUVEVEX0JVVF9TVElMTF9BUFBMWUlORxAIEhcKE0NBUEFCSUxJVFlfRElTQUJMRUQQCRIZChVUUllfQUxURVJOQVRFX0JBQ0tFTkQQChIVChFTQUZFX1RJTUVfVE9PX09MRBALIoYBCgxFbnRpdHlSZXN1bHQSLwoGZW50aXR5GAEgAigLMh8uYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5Eg8KB3ZlcnNpb24YAiABKAMiNAoKUmVzdWx0VHlwZRIICgRGVUxMEAESDgoKUFJPSkVDVElPThACEgwKCEtFWV9PTkxZEAMi8QIKBVF1ZXJ5Ej8KCnByb2plY3Rpb24YAiADKAsyKy5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eUV4cHJlc3Npb24SNQoEa2luZBgDIAMoCzInLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktpbmRFeHByZXNzaW9uEi8KBmZpbHRlchgEIAEoCzIfLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkZpbHRlchI1CgVvcmRlchgFIAMoCzImLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5T3JkZXISPAoIZ3JvdXBfYnkYBiADKAsyKi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eVJlZmVyZW5jZRIUCgxzdGFydF9jdXJzb3IYByABKAwSEgoKZW5kX2N1cnNvchgIIAEoDBIRCgZvZmZzZXQYCiABKAU6ATASDQoFbGltaXQYCyABKAUiHgoOS2luZEV4cHJlc3Npb24SDAoEbmFtZRgBIAIoCSIhChFQcm9wZXJ0eVJlZmVyZW5jZRIMCgRuYW1lGAIgAigJItMBChJQcm9wZXJ0eUV4cHJlc3Npb24SPAoIcHJvcGVydHkYASACKAsyKi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eVJlZmVyZW5jZRJdChRhZ2dyZWdhdGlvbl9mdW5jdGlvbhgCIAEoDjI/LmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5RXhwcmVzc2lvbi5BZ2dyZWdhdGlvbkZ1bmN0aW9uIiAKE0FnZ3JlZ2F0aW9uRnVuY3Rpb24SCQoFRklSU1QQASLJAQoNUHJvcGVydHlPcmRlchI8Cghwcm9wZXJ0eRgBIAIoCzIqLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5UmVmZXJlbmNlEk4KCWRpcmVjdGlvbhgCIAEoDjIwLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5T3JkZXIuRGlyZWN0aW9uOglBU0NFTkRJTkciKgoJRGlyZWN0aW9uEg0KCUFTQ0VORElORxABEg4KCkRFU0NFTkRJTkcQAiKOAQoGRmlsdGVyEkIKEGNvbXBvc2l0ZV9maWx0ZXIYASABKAsyKC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Db21wb3NpdGVGaWx0ZXISQAoPcHJvcGVydHlfZmlsdGVyGAIgASgLMicuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUHJvcGVydHlGaWx0ZXIinAEKD0NvbXBvc2l0ZUZpbHRlchJDCghvcGVyYXRvchgBIAIoDjIxLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbXBvc2l0ZUZpbHRlci5PcGVyYXRvchIvCgZmaWx0ZXIYAiADKAsyHy5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5GaWx0ZXIiEwoIT3BlcmF0b3ISBwoDQU5EEAEivgIKDlByb3BlcnR5RmlsdGVyEjwKCHByb3BlcnR5GAEgAigLMiouYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUHJvcGVydHlSZWZlcmVuY2USQgoIb3BlcmF0b3IYAiACKA4yMC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eUZpbHRlci5PcGVyYXRvchItCgV2YWx1ZRgDIAIoCzIeLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlZhbHVlInsKCE9wZXJhdG9yEg0KCUxFU1NfVEhBThABEhYKEkxFU1NfVEhBTl9PUl9FUVVBTBACEhAKDEdSRUFURVJfVEhBThADEhkKFUdSRUFURVJfVEhBTl9PUl9FUVVBTBAEEgkKBUVRVUFMEAUSEAoMSEFTX0FOQ0VTVE9SEAsisAEKCEdxbFF1ZXJ5EhQKDHF1ZXJ5X3N0cmluZxgBIAIoCRIcCg1hbGxvd19saXRlcmFsGAIgASgIOgVmYWxzZRI2CghuYW1lX2FyZxgDIAMoCzIkLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkdxbFF1ZXJ5QXJnEjgKCm51bWJlcl9hcmcYBCADKAsyJC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5HcWxRdWVyeUFyZyJaCgtHcWxRdWVyeUFyZxIMCgRuYW1lGAEgASgJEi0KBXZhbHVlGAIgASgLMh4uYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuVmFsdWUSDgoGY3Vyc29yGAMgASgMIvcCChBRdWVyeVJlc3VsdEJhdGNoEkwKEmVudGl0eV9yZXN1bHRfdHlwZRgBIAIoDjIwLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eVJlc3VsdC5SZXN1bHRUeXBlEjwKDWVudGl0eV9yZXN1bHQYAiADKAsyJS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FbnRpdHlSZXN1bHQSEgoKZW5kX2N1cnNvchgEIAEoDBJPCgxtb3JlX3Jlc3VsdHMYBSACKA4yOS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5RdWVyeVJlc3VsdEJhdGNoLk1vcmVSZXN1bHRzVHlwZRIaCg9za2lwcGVkX3Jlc3VsdHMYBiABKAU6ATAiVgoPTW9yZVJlc3VsdHNUeXBlEhAKDE5PVF9GSU5JU0hFRBABEhwKGE1PUkVfUkVTVUxUU19BRlRFUl9MSU1JVBACEhMKD05PX01PUkVfUkVTVUxUUxADIpMCCghNdXRhdGlvbhIvCgZ1cHNlcnQYASADKAsyHy5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FbnRpdHkSLwoGdXBkYXRlGAIgAygLMh8uYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5Ei8KBmluc2VydBgDIAMoCzIfLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eRI3Cg5pbnNlcnRfYXV0b19pZBgEIAMoCzIfLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eRIsCgZkZWxldGUYBSADKAsyHC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LZXkSDQoFZm9yY2UYBiABKAgi4QEKDk11dGF0aW9uUmVzdWx0EhUKDWluZGV4X3VwZGF0ZXMYASACKAUSOAoSaW5zZXJ0X2F1dG9faWRfa2V5GAIgAygLMhwuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuS2V5EhYKDnVwc2VydF92ZXJzaW9uGAMgAygDEhYKDnVwZGF0ZV92ZXJzaW9uGAQgAygDEhYKDmluc2VydF92ZXJzaW9uGAUgAygDEh4KFmluc2VydF9hdXRvX2lkX3ZlcnNpb24YBiADKAMSFgoOZGVsZXRlX3ZlcnNpb24YByADKAMitQEKC1JlYWRPcHRpb25zElcKEHJlYWRfY29uc2lzdGVuY3kYASABKA4yNC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5SZWFkT3B0aW9ucy5SZWFkQ29uc2lzdGVuY3k6B0RFRkFVTFQSEwoLdHJhbnNhY3Rpb24YAiABKAwiOAoPUmVhZENvbnNpc3RlbmN5EgsKB0RFRkFVTFQQABIKCgZTVFJPTkcQARIMCghFVkVOVFVBTBACInYKDUxvb2t1cFJlcXVlc3QSOgoMcmVhZF9vcHRpb25zGAEgASgLMiQuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUmVhZE9wdGlvbnMSKQoDa2V5GAMgAygLMhwuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuS2V5Iq4BCg5Mb29rdXBSZXNwb25zZRI0CgVmb3VuZBgBIAMoCzIlLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eVJlc3VsdBI2CgdtaXNzaW5nGAIgAygLMiUuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5UmVzdWx0Ei4KCGRlZmVycmVkGAMgAygLMhwuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuS2V5IqsCCg9SdW5RdWVyeVJlcXVlc3QSOgoMcmVhZF9vcHRpb25zGAEgASgLMiQuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUmVhZE9wdGlvbnMSOgoMcGFydGl0aW9uX2lkGAIgASgLMiQuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUGFydGl0aW9uSWQSLQoFcXVlcnkYAyABKAsyHi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5RdWVyeRI0CglncWxfcXVlcnkYByABKAsyIS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5HcWxRdWVyeRIdChVtaW5fc2FmZV90aW1lX3NlY29uZHMYBCABKAMSHAoUc3VnZ2VzdGVkX2JhdGNoX3NpemUYBSABKAUiYgoQUnVuUXVlcnlSZXNwb25zZRI4CgViYXRjaBgBIAIoCzIpLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlF1ZXJ5UmVzdWx0QmF0Y2gSFAoMcXVlcnlfaGFuZGxlGAIgASgMIiwKFENvbnRpbnVlUXVlcnlSZXF1ZXN0EhQKDHF1ZXJ5X2hhbmRsZRgBIAIoDCJRChVDb250aW51ZVF1ZXJ5UmVzcG9uc2USOAoFYmF0Y2gYASACKAsyKS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5RdWVyeVJlc3VsdEJhdGNoIlMKF0JlZ2luVHJhbnNhY3Rpb25SZXF1ZXN0EhoKC2Nyb3NzX2dyb3VwGAEgASgIOgVmYWxzZRIcCg1jcm9zc19yZXF1ZXN0GAIgASgIOgVmYWxzZSIvChhCZWdpblRyYW5zYWN0aW9uUmVzcG9uc2USEwoLdHJhbnNhY3Rpb24YASACKAwiJgoPUm9sbGJhY2tSZXF1ZXN0EhMKC3RyYW5zYWN0aW9uGAEgAigMIhIKEFJvbGxiYWNrUmVzcG9uc2Ui1QEKDUNvbW1pdFJlcXVlc3QSEwoLdHJhbnNhY3Rpb24YASABKAwSMwoIbXV0YXRpb24YAiABKAsyIS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5NdXRhdGlvbhJICgRtb2RlGAQgASgOMisuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuQ29tbWl0UmVxdWVzdC5Nb2RlOg1UUkFOU0FDVElPTkFMIjAKBE1vZGUSEQoNVFJBTlNBQ1RJT05BTBABEhUKEU5PTl9UUkFOU0FDVElPTkFMEAIiUgoOQ29tbWl0UmVzcG9uc2USQAoPbXV0YXRpb25fcmVzdWx0GAEgASgLMicuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuTXV0YXRpb25SZXN1bHQicwoSQWxsb2NhdGVJZHNSZXF1ZXN0Ei4KCGFsbG9jYXRlGAEgAygLMhwuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuS2V5Ei0KB3Jlc2VydmUYAiADKAsyHC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LZXkiRgoTQWxsb2NhdGVJZHNSZXNwb25zZRIvCglhbGxvY2F0ZWQYASADKAsyHC5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LZXkiQwoMV3JpdGVSZXF1ZXN0EjMKCG11dGF0aW9uGAEgAigLMiEuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuTXV0YXRpb24yogcKEkRhdGFzdG9yZVY0U2VydmljZRJ5ChBCZWdpblRyYW5zYWN0aW9uEjAuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuQmVnaW5UcmFuc2FjdGlvblJlcXVlc3QaMS5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5CZWdpblRyYW5zYWN0aW9uUmVzcG9uc2UiABJhCghSb2xsYmFjaxIoLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJvbGxiYWNrUmVxdWVzdBopLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJvbGxiYWNrUmVzcG9uc2UiABJbCgZDb21taXQSJi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Db21taXRSZXF1ZXN0GicuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuQ29tbWl0UmVzcG9uc2UiABJhCghSdW5RdWVyeRIoLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJ1blF1ZXJ5UmVxdWVzdBopLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJ1blF1ZXJ5UmVzcG9uc2UiABJwCg1Db250aW51ZVF1ZXJ5Ei0uYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuQ29udGludWVRdWVyeVJlcXVlc3QaLi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Db250aW51ZVF1ZXJ5UmVzcG9uc2UiABJbCgZMb29rdXASJi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Mb29rdXBSZXF1ZXN0GicuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuTG9va3VwUmVzcG9uc2UiABJqCgtBbGxvY2F0ZUlkcxIrLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkFsbG9jYXRlSWRzUmVxdWVzdBosLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkFsbG9jYXRlSWRzUmVzcG9uc2UiABJYCgNHZXQSJi5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Mb29rdXBSZXF1ZXN0GicuYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuTG9va3VwUmVzcG9uc2UiABJZCgVXcml0ZRIlLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LldyaXRlUmVxdWVzdBonLmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbW1pdFJlc3BvbnNlIgBCIQofY29tLmdvb2dsZS5hcHBob3N0aW5nLmRhdGFzdG9yZQ=="))
181 if _net_proto___parse__python
is not None:
182 _net_proto___parse__python
.RegisterType(
183 _SERIALIZED_DESCRIPTOR
.tostring())
185 class EntityResult(ProtocolBuffer
.ProtocolMessage
):
192 _ResultType_NAMES
= {
198 def ResultType_Name(cls
, x
): return cls
._ResultType
_NAMES
.get(x
, "")
199 ResultType_Name
= classmethod(ResultType_Name
)
205 def __init__(self
, contents
=None):
206 self
.entity_
= google
.appengine
.datastore
.entity_v4_pb
.Entity()
207 if contents
is not None: self
.MergeFromString(contents
)
209 def entity(self
): return self
.entity_
211 def mutable_entity(self
): self
.has_entity_
= 1; return self
.entity_
213 def clear_entity(self
):self
.has_entity_
= 0; self
.entity_
.Clear()
215 def has_entity(self
): return self
.has_entity_
217 def version(self
): return self
.version_
219 def set_version(self
, x
):
220 self
.has_version_
= 1
223 def clear_version(self
):
224 if self
.has_version_
:
225 self
.has_version_
= 0
228 def has_version(self
): return self
.has_version_
231 def MergeFrom(self
, x
):
233 if (x
.has_entity()): self
.mutable_entity().MergeFrom(x
.entity())
234 if (x
.has_version()): self
.set_version(x
.version())
236 if _net_proto___parse__python
is not None:
237 def _CMergeFromString(self
, s
):
238 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.EntityResult', s
)
240 if _net_proto___parse__python
is not None:
242 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.EntityResult')
244 if _net_proto___parse__python
is not None:
245 def _CEncodePartial(self
):
246 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.EntityResult')
248 if _net_proto___parse__python
is not None:
249 def _CToASCII(self
, output_format
):
250 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.EntityResult', output_format
)
253 if _net_proto___parse__python
is not None:
254 def ParseASCII(self
, s
):
255 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.EntityResult', s
)
258 if _net_proto___parse__python
is not None:
259 def ParseASCIIIgnoreUnknown(self
, s
):
260 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.EntityResult', s
)
264 if x
is self
: return 1
265 if self
.has_entity_
!= x
.has_entity_
: return 0
266 if self
.has_entity_
and self
.entity_
!= x
.entity_
: return 0
267 if self
.has_version_
!= x
.has_version_
: return 0
268 if self
.has_version_
and self
.version_
!= x
.version_
: return 0
271 def IsInitialized(self
, debug_strs
=None):
273 if (not self
.has_entity_
):
275 if debug_strs
is not None:
276 debug_strs
.append('Required field: entity not set.')
277 elif not self
.entity_
.IsInitialized(debug_strs
): initialized
= 0
282 n
+= self
.lengthString(self
.entity_
.ByteSize())
283 if (self
.has_version_
): n
+= 1 + self
.lengthVarInt64(self
.version_
)
286 def ByteSizePartial(self
):
288 if (self
.has_entity_
):
290 n
+= self
.lengthString(self
.entity_
.ByteSizePartial())
291 if (self
.has_version_
): n
+= 1 + self
.lengthVarInt64(self
.version_
)
298 def OutputUnchecked(self
, out
):
300 out
.putVarInt32(self
.entity_
.ByteSize())
301 self
.entity_
.OutputUnchecked(out
)
302 if (self
.has_version_
):
304 out
.putVarInt64(self
.version_
)
306 def OutputPartial(self
, out
):
307 if (self
.has_entity_
):
309 out
.putVarInt32(self
.entity_
.ByteSizePartial())
310 self
.entity_
.OutputPartial(out
)
311 if (self
.has_version_
):
313 out
.putVarInt64(self
.version_
)
315 def TryMerge(self
, d
):
319 length
= d
.getVarInt32()
320 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
322 self
.mutable_entity().TryMerge(tmp
)
325 self
.set_version(d
.getVarInt64())
329 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
333 def __str__(self
, prefix
="", printElemNumber
=0):
336 res
+=prefix
+"entity <\n"
337 res
+=self
.entity_
.__str
__(prefix
+ " ", printElemNumber
)
339 if self
.has_version_
: res
+=prefix
+("version: %s\n" % self
.DebugFormatInt64(self
.version_
))
343 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
344 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
349 _TEXT
= _BuildTagLookupTable({
355 _TYPES
= _BuildTagLookupTable({
356 0: ProtocolBuffer
.Encoder
.NUMERIC
,
357 1: ProtocolBuffer
.Encoder
.STRING
,
358 2: ProtocolBuffer
.Encoder
.NUMERIC
,
359 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
363 _STYLE_CONTENT_TYPE
= """"""
364 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.EntityResult'
365 _SERIALIZED_DESCRIPTOR
= array
.array('B')
366 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eVJlc3VsdBMaBmVudGl0eSABKAIwCzgCSh5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FbnRpdHmjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoHdmVyc2lvbiACKAAwAzgBFHN6ClJlc3VsdFR5cGWLAZIBBEZVTEyYAQGMAYsBkgEKUFJPSkVDVElPTpgBAowBiwGSAQhLRVlfT05MWZgBA4wBdMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
367 if _net_proto___parse__python
is not None:
368 _net_proto___parse__python
.RegisterType(
369 _SERIALIZED_DESCRIPTOR
.tostring())
371 class Query(ProtocolBuffer
.ProtocolMessage
):
374 has_start_cursor_
= 0
383 def __init__(self
, contents
=None):
384 self
.projection_
= []
388 self
.lazy_init_lock_
= thread
.allocate_lock()
389 if contents
is not None: self
.MergeFromString(contents
)
391 def projection_size(self
): return len(self
.projection_
)
392 def projection_list(self
): return self
.projection_
394 def projection(self
, i
):
395 return self
.projection_
[i
]
397 def mutable_projection(self
, i
):
398 return self
.projection_
[i
]
400 def add_projection(self
):
401 x
= PropertyExpression()
402 self
.projection_
.append(x
)
405 def clear_projection(self
):
406 self
.projection_
= []
407 def kind_size(self
): return len(self
.kind_
)
408 def kind_list(self
): return self
.kind_
413 def mutable_kind(self
, i
):
421 def clear_kind(self
):
424 if self
.filter_
is None:
425 self
.lazy_init_lock_
.acquire()
427 if self
.filter_
is None: self
.filter_
= Filter()
429 self
.lazy_init_lock_
.release()
432 def mutable_filter(self
): self
.has_filter_
= 1; return self
.filter()
434 def clear_filter(self
):
437 self
.has_filter_
= 0;
438 if self
.filter_
is not None: self
.filter_
.Clear()
440 def has_filter(self
): return self
.has_filter_
442 def order_size(self
): return len(self
.order_
)
443 def order_list(self
): return self
.order_
446 return self
.order_
[i
]
448 def mutable_order(self
, i
):
449 return self
.order_
[i
]
453 self
.order_
.append(x
)
456 def clear_order(self
):
458 def group_by_size(self
): return len(self
.group_by_
)
459 def group_by_list(self
): return self
.group_by_
461 def group_by(self
, i
):
462 return self
.group_by_
[i
]
464 def mutable_group_by(self
, i
):
465 return self
.group_by_
[i
]
467 def add_group_by(self
):
468 x
= PropertyReference()
469 self
.group_by_
.append(x
)
472 def clear_group_by(self
):
474 def start_cursor(self
): return self
.start_cursor_
476 def set_start_cursor(self
, x
):
477 self
.has_start_cursor_
= 1
478 self
.start_cursor_
= x
480 def clear_start_cursor(self
):
481 if self
.has_start_cursor_
:
482 self
.has_start_cursor_
= 0
483 self
.start_cursor_
= ""
485 def has_start_cursor(self
): return self
.has_start_cursor_
487 def end_cursor(self
): return self
.end_cursor_
489 def set_end_cursor(self
, x
):
490 self
.has_end_cursor_
= 1
493 def clear_end_cursor(self
):
494 if self
.has_end_cursor_
:
495 self
.has_end_cursor_
= 0
496 self
.end_cursor_
= ""
498 def has_end_cursor(self
): return self
.has_end_cursor_
500 def offset(self
): return self
.offset_
502 def set_offset(self
, x
):
506 def clear_offset(self
):
511 def has_offset(self
): return self
.has_offset_
513 def limit(self
): return self
.limit_
515 def set_limit(self
, x
):
519 def clear_limit(self
):
524 def has_limit(self
): return self
.has_limit_
527 def MergeFrom(self
, x
):
529 for i
in xrange(x
.projection_size()): self
.add_projection().CopyFrom(x
.projection(i
))
530 for i
in xrange(x
.kind_size()): self
.add_kind().CopyFrom(x
.kind(i
))
531 if (x
.has_filter()): self
.mutable_filter().MergeFrom(x
.filter())
532 for i
in xrange(x
.order_size()): self
.add_order().CopyFrom(x
.order(i
))
533 for i
in xrange(x
.group_by_size()): self
.add_group_by().CopyFrom(x
.group_by(i
))
534 if (x
.has_start_cursor()): self
.set_start_cursor(x
.start_cursor())
535 if (x
.has_end_cursor()): self
.set_end_cursor(x
.end_cursor())
536 if (x
.has_offset()): self
.set_offset(x
.offset())
537 if (x
.has_limit()): self
.set_limit(x
.limit())
539 if _net_proto___parse__python
is not None:
540 def _CMergeFromString(self
, s
):
541 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.Query', s
)
543 if _net_proto___parse__python
is not None:
545 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.Query')
547 if _net_proto___parse__python
is not None:
548 def _CEncodePartial(self
):
549 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.Query')
551 if _net_proto___parse__python
is not None:
552 def _CToASCII(self
, output_format
):
553 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.Query', output_format
)
556 if _net_proto___parse__python
is not None:
557 def ParseASCII(self
, s
):
558 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.Query', s
)
561 if _net_proto___parse__python
is not None:
562 def ParseASCIIIgnoreUnknown(self
, s
):
563 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.Query', s
)
567 if x
is self
: return 1
568 if len(self
.projection_
) != len(x
.projection_
): return 0
569 for e1
, e2
in zip(self
.projection_
, x
.projection_
):
570 if e1
!= e2
: return 0
571 if len(self
.kind_
) != len(x
.kind_
): return 0
572 for e1
, e2
in zip(self
.kind_
, x
.kind_
):
573 if e1
!= e2
: return 0
574 if self
.has_filter_
!= x
.has_filter_
: return 0
575 if self
.has_filter_
and self
.filter_
!= x
.filter_
: return 0
576 if len(self
.order_
) != len(x
.order_
): return 0
577 for e1
, e2
in zip(self
.order_
, x
.order_
):
578 if e1
!= e2
: return 0
579 if len(self
.group_by_
) != len(x
.group_by_
): return 0
580 for e1
, e2
in zip(self
.group_by_
, x
.group_by_
):
581 if e1
!= e2
: return 0
582 if self
.has_start_cursor_
!= x
.has_start_cursor_
: return 0
583 if self
.has_start_cursor_
and self
.start_cursor_
!= x
.start_cursor_
: return 0
584 if self
.has_end_cursor_
!= x
.has_end_cursor_
: return 0
585 if self
.has_end_cursor_
and self
.end_cursor_
!= x
.end_cursor_
: return 0
586 if self
.has_offset_
!= x
.has_offset_
: return 0
587 if self
.has_offset_
and self
.offset_
!= x
.offset_
: return 0
588 if self
.has_limit_
!= x
.has_limit_
: return 0
589 if self
.has_limit_
and self
.limit_
!= x
.limit_
: return 0
592 def IsInitialized(self
, debug_strs
=None):
594 for p
in self
.projection_
:
595 if not p
.IsInitialized(debug_strs
): initialized
=0
597 if not p
.IsInitialized(debug_strs
): initialized
=0
598 if (self
.has_filter_
and not self
.filter_
.IsInitialized(debug_strs
)): initialized
= 0
599 for p
in self
.order_
:
600 if not p
.IsInitialized(debug_strs
): initialized
=0
601 for p
in self
.group_by_
:
602 if not p
.IsInitialized(debug_strs
): initialized
=0
607 n
+= 1 * len(self
.projection_
)
608 for i
in xrange(len(self
.projection_
)): n
+= self
.lengthString(self
.projection_
[i
].ByteSize())
609 n
+= 1 * len(self
.kind_
)
610 for i
in xrange(len(self
.kind_
)): n
+= self
.lengthString(self
.kind_
[i
].ByteSize())
611 if (self
.has_filter_
): n
+= 1 + self
.lengthString(self
.filter_
.ByteSize())
612 n
+= 1 * len(self
.order_
)
613 for i
in xrange(len(self
.order_
)): n
+= self
.lengthString(self
.order_
[i
].ByteSize())
614 n
+= 1 * len(self
.group_by_
)
615 for i
in xrange(len(self
.group_by_
)): n
+= self
.lengthString(self
.group_by_
[i
].ByteSize())
616 if (self
.has_start_cursor_
): n
+= 1 + self
.lengthString(len(self
.start_cursor_
))
617 if (self
.has_end_cursor_
): n
+= 1 + self
.lengthString(len(self
.end_cursor_
))
618 if (self
.has_offset_
): n
+= 1 + self
.lengthVarInt64(self
.offset_
)
619 if (self
.has_limit_
): n
+= 1 + self
.lengthVarInt64(self
.limit_
)
622 def ByteSizePartial(self
):
624 n
+= 1 * len(self
.projection_
)
625 for i
in xrange(len(self
.projection_
)): n
+= self
.lengthString(self
.projection_
[i
].ByteSizePartial())
626 n
+= 1 * len(self
.kind_
)
627 for i
in xrange(len(self
.kind_
)): n
+= self
.lengthString(self
.kind_
[i
].ByteSizePartial())
628 if (self
.has_filter_
): n
+= 1 + self
.lengthString(self
.filter_
.ByteSizePartial())
629 n
+= 1 * len(self
.order_
)
630 for i
in xrange(len(self
.order_
)): n
+= self
.lengthString(self
.order_
[i
].ByteSizePartial())
631 n
+= 1 * len(self
.group_by_
)
632 for i
in xrange(len(self
.group_by_
)): n
+= self
.lengthString(self
.group_by_
[i
].ByteSizePartial())
633 if (self
.has_start_cursor_
): n
+= 1 + self
.lengthString(len(self
.start_cursor_
))
634 if (self
.has_end_cursor_
): n
+= 1 + self
.lengthString(len(self
.end_cursor_
))
635 if (self
.has_offset_
): n
+= 1 + self
.lengthVarInt64(self
.offset_
)
636 if (self
.has_limit_
): n
+= 1 + self
.lengthVarInt64(self
.limit_
)
640 self
.clear_projection()
644 self
.clear_group_by()
645 self
.clear_start_cursor()
646 self
.clear_end_cursor()
650 def OutputUnchecked(self
, out
):
651 for i
in xrange(len(self
.projection_
)):
653 out
.putVarInt32(self
.projection_
[i
].ByteSize())
654 self
.projection_
[i
].OutputUnchecked(out
)
655 for i
in xrange(len(self
.kind_
)):
657 out
.putVarInt32(self
.kind_
[i
].ByteSize())
658 self
.kind_
[i
].OutputUnchecked(out
)
659 if (self
.has_filter_
):
661 out
.putVarInt32(self
.filter_
.ByteSize())
662 self
.filter_
.OutputUnchecked(out
)
663 for i
in xrange(len(self
.order_
)):
665 out
.putVarInt32(self
.order_
[i
].ByteSize())
666 self
.order_
[i
].OutputUnchecked(out
)
667 for i
in xrange(len(self
.group_by_
)):
669 out
.putVarInt32(self
.group_by_
[i
].ByteSize())
670 self
.group_by_
[i
].OutputUnchecked(out
)
671 if (self
.has_start_cursor_
):
673 out
.putPrefixedString(self
.start_cursor_
)
674 if (self
.has_end_cursor_
):
676 out
.putPrefixedString(self
.end_cursor_
)
677 if (self
.has_offset_
):
679 out
.putVarInt32(self
.offset_
)
680 if (self
.has_limit_
):
682 out
.putVarInt32(self
.limit_
)
684 def OutputPartial(self
, out
):
685 for i
in xrange(len(self
.projection_
)):
687 out
.putVarInt32(self
.projection_
[i
].ByteSizePartial())
688 self
.projection_
[i
].OutputPartial(out
)
689 for i
in xrange(len(self
.kind_
)):
691 out
.putVarInt32(self
.kind_
[i
].ByteSizePartial())
692 self
.kind_
[i
].OutputPartial(out
)
693 if (self
.has_filter_
):
695 out
.putVarInt32(self
.filter_
.ByteSizePartial())
696 self
.filter_
.OutputPartial(out
)
697 for i
in xrange(len(self
.order_
)):
699 out
.putVarInt32(self
.order_
[i
].ByteSizePartial())
700 self
.order_
[i
].OutputPartial(out
)
701 for i
in xrange(len(self
.group_by_
)):
703 out
.putVarInt32(self
.group_by_
[i
].ByteSizePartial())
704 self
.group_by_
[i
].OutputPartial(out
)
705 if (self
.has_start_cursor_
):
707 out
.putPrefixedString(self
.start_cursor_
)
708 if (self
.has_end_cursor_
):
710 out
.putPrefixedString(self
.end_cursor_
)
711 if (self
.has_offset_
):
713 out
.putVarInt32(self
.offset_
)
714 if (self
.has_limit_
):
716 out
.putVarInt32(self
.limit_
)
718 def TryMerge(self
, d
):
722 length
= d
.getVarInt32()
723 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
725 self
.add_projection().TryMerge(tmp
)
728 length
= d
.getVarInt32()
729 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
731 self
.add_kind().TryMerge(tmp
)
734 length
= d
.getVarInt32()
735 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
737 self
.mutable_filter().TryMerge(tmp
)
740 length
= d
.getVarInt32()
741 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
743 self
.add_order().TryMerge(tmp
)
746 length
= d
.getVarInt32()
747 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
749 self
.add_group_by().TryMerge(tmp
)
752 self
.set_start_cursor(d
.getPrefixedString())
755 self
.set_end_cursor(d
.getPrefixedString())
758 self
.set_offset(d
.getVarInt32())
761 self
.set_limit(d
.getVarInt32())
765 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
769 def __str__(self
, prefix
="", printElemNumber
=0):
772 for e
in self
.projection_
:
774 if printElemNumber
: elm
="(%d)" % cnt
775 res
+=prefix
+("projection%s <\n" % elm
)
776 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
782 if printElemNumber
: elm
="(%d)" % cnt
783 res
+=prefix
+("kind%s <\n" % elm
)
784 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
788 res
+=prefix
+"filter <\n"
789 res
+=self
.filter_
.__str
__(prefix
+ " ", printElemNumber
)
792 for e
in self
.order_
:
794 if printElemNumber
: elm
="(%d)" % cnt
795 res
+=prefix
+("order%s <\n" % elm
)
796 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
800 for e
in self
.group_by_
:
802 if printElemNumber
: elm
="(%d)" % cnt
803 res
+=prefix
+("group_by%s <\n" % elm
)
804 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
807 if self
.has_start_cursor_
: res
+=prefix
+("start_cursor: %s\n" % self
.DebugFormatString(self
.start_cursor_
))
808 if self
.has_end_cursor_
: res
+=prefix
+("end_cursor: %s\n" % self
.DebugFormatString(self
.end_cursor_
))
809 if self
.has_offset_
: res
+=prefix
+("offset: %s\n" % self
.DebugFormatInt32(self
.offset_
))
810 if self
.has_limit_
: res
+=prefix
+("limit: %s\n" % self
.DebugFormatInt32(self
.limit_
))
814 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
815 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
827 _TEXT
= _BuildTagLookupTable({
840 _TYPES
= _BuildTagLookupTable({
841 0: ProtocolBuffer
.Encoder
.NUMERIC
,
842 2: ProtocolBuffer
.Encoder
.STRING
,
843 3: ProtocolBuffer
.Encoder
.STRING
,
844 4: ProtocolBuffer
.Encoder
.STRING
,
845 5: ProtocolBuffer
.Encoder
.STRING
,
846 6: ProtocolBuffer
.Encoder
.STRING
,
847 7: ProtocolBuffer
.Encoder
.STRING
,
848 8: ProtocolBuffer
.Encoder
.STRING
,
849 10: ProtocolBuffer
.Encoder
.NUMERIC
,
850 11: ProtocolBuffer
.Encoder
.NUMERIC
,
851 }, 11, ProtocolBuffer
.Encoder
.MAX_TYPE
)
855 _STYLE_CONTENT_TYPE
= """"""
856 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.Query'
857 _SERIALIZED_DESCRIPTOR
= array
.array('B')
858 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlF1ZXJ5ExoKcHJvamVjdGlvbiACKAIwCzgDSiphcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eUV4cHJlc3Npb26jAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoEa2luZCADKAIwCzgDSiZhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LaW5kRXhwcmVzc2lvbqMBqgEFY3R5cGWyAQZwcm90bzKkARQTGgZmaWx0ZXIgBCgCMAs4AUoeYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRmlsdGVyowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaBW9yZGVyIAUoAjALOANKJWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5T3JkZXKjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoIZ3JvdXBfYnkgBigCMAs4A0opYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUHJvcGVydHlSZWZlcmVuY2WjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoMc3RhcnRfY3Vyc29yIAcoAjAJOAEUExoKZW5kX2N1cnNvciAIKAIwCTgBFBMaBm9mZnNldCAKKAAwBTgBQgEwowGqAQdkZWZhdWx0sgEBMKQBFBMaBWxpbWl0IAsoADAFOAEUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
859 if _net_proto___parse__python
is not None:
860 _net_proto___parse__python
.RegisterType(
861 _SERIALIZED_DESCRIPTOR
.tostring())
863 class KindExpression(ProtocolBuffer
.ProtocolMessage
):
867 def __init__(self
, contents
=None):
868 if contents
is not None: self
.MergeFromString(contents
)
870 def name(self
): return self
.name_
872 def set_name(self
, x
):
876 def clear_name(self
):
881 def has_name(self
): return self
.has_name_
884 def MergeFrom(self
, x
):
886 if (x
.has_name()): self
.set_name(x
.name())
888 if _net_proto___parse__python
is not None:
889 def _CMergeFromString(self
, s
):
890 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.KindExpression', s
)
892 if _net_proto___parse__python
is not None:
894 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.KindExpression')
896 if _net_proto___parse__python
is not None:
897 def _CEncodePartial(self
):
898 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.KindExpression')
900 if _net_proto___parse__python
is not None:
901 def _CToASCII(self
, output_format
):
902 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.KindExpression', output_format
)
905 if _net_proto___parse__python
is not None:
906 def ParseASCII(self
, s
):
907 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.KindExpression', s
)
910 if _net_proto___parse__python
is not None:
911 def ParseASCIIIgnoreUnknown(self
, s
):
912 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.KindExpression', s
)
916 if x
is self
: return 1
917 if self
.has_name_
!= x
.has_name_
: return 0
918 if self
.has_name_
and self
.name_
!= x
.name_
: return 0
921 def IsInitialized(self
, debug_strs
=None):
923 if (not self
.has_name_
):
925 if debug_strs
is not None:
926 debug_strs
.append('Required field: name not set.')
931 n
+= self
.lengthString(len(self
.name_
))
934 def ByteSizePartial(self
):
938 n
+= self
.lengthString(len(self
.name_
))
944 def OutputUnchecked(self
, out
):
946 out
.putPrefixedString(self
.name_
)
948 def OutputPartial(self
, out
):
951 out
.putPrefixedString(self
.name_
)
953 def TryMerge(self
, d
):
957 self
.set_name(d
.getPrefixedString())
961 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
965 def __str__(self
, prefix
="", printElemNumber
=0):
967 if self
.has_name_
: res
+=prefix
+("name: %s\n" % self
.DebugFormatString(self
.name_
))
971 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
972 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
976 _TEXT
= _BuildTagLookupTable({
981 _TYPES
= _BuildTagLookupTable({
982 0: ProtocolBuffer
.Encoder
.NUMERIC
,
983 1: ProtocolBuffer
.Encoder
.STRING
,
984 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
988 _STYLE_CONTENT_TYPE
= """"""
989 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.KindExpression'
990 _SERIALIZED_DESCRIPTOR
= array
.array('B')
991 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktpbmRFeHByZXNzaW9uExoEbmFtZSABKAIwCTgCFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
992 if _net_proto___parse__python
is not None:
993 _net_proto___parse__python
.RegisterType(
994 _SERIALIZED_DESCRIPTOR
.tostring())
996 class PropertyReference(ProtocolBuffer
.ProtocolMessage
):
1000 def __init__(self
, contents
=None):
1001 if contents
is not None: self
.MergeFromString(contents
)
1003 def name(self
): return self
.name_
1005 def set_name(self
, x
):
1009 def clear_name(self
):
1014 def has_name(self
): return self
.has_name_
1017 def MergeFrom(self
, x
):
1018 assert x
is not self
1019 if (x
.has_name()): self
.set_name(x
.name())
1021 if _net_proto___parse__python
is not None:
1022 def _CMergeFromString(self
, s
):
1023 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.PropertyReference', s
)
1025 if _net_proto___parse__python
is not None:
1027 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.PropertyReference')
1029 if _net_proto___parse__python
is not None:
1030 def _CEncodePartial(self
):
1031 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.PropertyReference')
1033 if _net_proto___parse__python
is not None:
1034 def _CToASCII(self
, output_format
):
1035 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.PropertyReference', output_format
)
1038 if _net_proto___parse__python
is not None:
1039 def ParseASCII(self
, s
):
1040 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.PropertyReference', s
)
1043 if _net_proto___parse__python
is not None:
1044 def ParseASCIIIgnoreUnknown(self
, s
):
1045 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.PropertyReference', s
)
1048 def Equals(self
, x
):
1049 if x
is self
: return 1
1050 if self
.has_name_
!= x
.has_name_
: return 0
1051 if self
.has_name_
and self
.name_
!= x
.name_
: return 0
1054 def IsInitialized(self
, debug_strs
=None):
1056 if (not self
.has_name_
):
1058 if debug_strs
is not None:
1059 debug_strs
.append('Required field: name not set.')
1064 n
+= self
.lengthString(len(self
.name_
))
1067 def ByteSizePartial(self
):
1069 if (self
.has_name_
):
1071 n
+= self
.lengthString(len(self
.name_
))
1077 def OutputUnchecked(self
, out
):
1079 out
.putPrefixedString(self
.name_
)
1081 def OutputPartial(self
, out
):
1082 if (self
.has_name_
):
1084 out
.putPrefixedString(self
.name_
)
1086 def TryMerge(self
, d
):
1087 while d
.avail() > 0:
1088 tt
= d
.getVarInt32()
1090 self
.set_name(d
.getPrefixedString())
1094 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1098 def __str__(self
, prefix
="", printElemNumber
=0):
1100 if self
.has_name_
: res
+=prefix
+("name: %s\n" % self
.DebugFormatString(self
.name_
))
1104 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1105 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1109 _TEXT
= _BuildTagLookupTable({
1114 _TYPES
= _BuildTagLookupTable({
1115 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1116 2: ProtocolBuffer
.Encoder
.STRING
,
1117 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1121 _STYLE_CONTENT_TYPE
= """"""
1122 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.PropertyReference'
1123 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1124 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5UmVmZXJlbmNlExoEbmFtZSACKAIwCTgCFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
1125 if _net_proto___parse__python
is not None:
1126 _net_proto___parse__python
.RegisterType(
1127 _SERIALIZED_DESCRIPTOR
.tostring())
1129 class PropertyExpression(ProtocolBuffer
.ProtocolMessage
):
1134 _AggregationFunction_NAMES
= {
1138 def AggregationFunction_Name(cls
, x
): return cls
._AggregationFunction
_NAMES
.get(x
, "")
1139 AggregationFunction_Name
= classmethod(AggregationFunction_Name
)
1142 has_aggregation_function_
= 0
1143 aggregation_function_
= 0
1145 def __init__(self
, contents
=None):
1146 self
.property_
= PropertyReference()
1147 if contents
is not None: self
.MergeFromString(contents
)
1149 def property(self
): return self
.property_
1151 def mutable_property(self
): self
.has_property_
= 1; return self
.property_
1153 def clear_property(self
):self
.has_property_
= 0; self
.property_
.Clear()
1155 def has_property(self
): return self
.has_property_
1157 def aggregation_function(self
): return self
.aggregation_function_
1159 def set_aggregation_function(self
, x
):
1160 self
.has_aggregation_function_
= 1
1161 self
.aggregation_function_
= x
1163 def clear_aggregation_function(self
):
1164 if self
.has_aggregation_function_
:
1165 self
.has_aggregation_function_
= 0
1166 self
.aggregation_function_
= 0
1168 def has_aggregation_function(self
): return self
.has_aggregation_function_
1171 def MergeFrom(self
, x
):
1172 assert x
is not self
1173 if (x
.has_property()): self
.mutable_property().MergeFrom(x
.property())
1174 if (x
.has_aggregation_function()): self
.set_aggregation_function(x
.aggregation_function())
1176 if _net_proto___parse__python
is not None:
1177 def _CMergeFromString(self
, s
):
1178 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.PropertyExpression', s
)
1180 if _net_proto___parse__python
is not None:
1182 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.PropertyExpression')
1184 if _net_proto___parse__python
is not None:
1185 def _CEncodePartial(self
):
1186 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.PropertyExpression')
1188 if _net_proto___parse__python
is not None:
1189 def _CToASCII(self
, output_format
):
1190 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.PropertyExpression', output_format
)
1193 if _net_proto___parse__python
is not None:
1194 def ParseASCII(self
, s
):
1195 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.PropertyExpression', s
)
1198 if _net_proto___parse__python
is not None:
1199 def ParseASCIIIgnoreUnknown(self
, s
):
1200 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.PropertyExpression', s
)
1203 def Equals(self
, x
):
1204 if x
is self
: return 1
1205 if self
.has_property_
!= x
.has_property_
: return 0
1206 if self
.has_property_
and self
.property_
!= x
.property_
: return 0
1207 if self
.has_aggregation_function_
!= x
.has_aggregation_function_
: return 0
1208 if self
.has_aggregation_function_
and self
.aggregation_function_
!= x
.aggregation_function_
: return 0
1211 def IsInitialized(self
, debug_strs
=None):
1213 if (not self
.has_property_
):
1215 if debug_strs
is not None:
1216 debug_strs
.append('Required field: property not set.')
1217 elif not self
.property_
.IsInitialized(debug_strs
): initialized
= 0
1222 n
+= self
.lengthString(self
.property_
.ByteSize())
1223 if (self
.has_aggregation_function_
): n
+= 1 + self
.lengthVarInt64(self
.aggregation_function_
)
1226 def ByteSizePartial(self
):
1228 if (self
.has_property_
):
1230 n
+= self
.lengthString(self
.property_
.ByteSizePartial())
1231 if (self
.has_aggregation_function_
): n
+= 1 + self
.lengthVarInt64(self
.aggregation_function_
)
1235 self
.clear_property()
1236 self
.clear_aggregation_function()
1238 def OutputUnchecked(self
, out
):
1240 out
.putVarInt32(self
.property_
.ByteSize())
1241 self
.property_
.OutputUnchecked(out
)
1242 if (self
.has_aggregation_function_
):
1244 out
.putVarInt32(self
.aggregation_function_
)
1246 def OutputPartial(self
, out
):
1247 if (self
.has_property_
):
1249 out
.putVarInt32(self
.property_
.ByteSizePartial())
1250 self
.property_
.OutputPartial(out
)
1251 if (self
.has_aggregation_function_
):
1253 out
.putVarInt32(self
.aggregation_function_
)
1255 def TryMerge(self
, d
):
1256 while d
.avail() > 0:
1257 tt
= d
.getVarInt32()
1259 length
= d
.getVarInt32()
1260 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
1262 self
.mutable_property().TryMerge(tmp
)
1265 self
.set_aggregation_function(d
.getVarInt32())
1269 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1273 def __str__(self
, prefix
="", printElemNumber
=0):
1275 if self
.has_property_
:
1276 res
+=prefix
+"property <\n"
1277 res
+=self
.property_
.__str
__(prefix
+ " ", printElemNumber
)
1279 if self
.has_aggregation_function_
: res
+=prefix
+("aggregation_function: %s\n" % self
.DebugFormatInt32(self
.aggregation_function_
))
1283 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1284 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1287 kaggregation_function
= 2
1289 _TEXT
= _BuildTagLookupTable({
1292 2: "aggregation_function",
1295 _TYPES
= _BuildTagLookupTable({
1296 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1297 1: ProtocolBuffer
.Encoder
.STRING
,
1298 2: ProtocolBuffer
.Encoder
.NUMERIC
,
1299 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1303 _STYLE_CONTENT_TYPE
= """"""
1304 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.PropertyExpression'
1305 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1306 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5RXhwcmVzc2lvbhMaCHByb3BlcnR5IAEoAjALOAJKKWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5UmVmZXJlbmNlowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaFGFnZ3JlZ2F0aW9uX2Z1bmN0aW9uIAIoADAFOAFoABRzehNBZ2dyZWdhdGlvbkZ1bmN0aW9uiwGSAQVGSVJTVJgBAYwBdMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
1307 if _net_proto___parse__python
is not None:
1308 _net_proto___parse__python
.RegisterType(
1309 _SERIALIZED_DESCRIPTOR
.tostring())
1311 class PropertyOrder(ProtocolBuffer
.ProtocolMessage
):
1317 _Direction_NAMES
= {
1322 def Direction_Name(cls
, x
): return cls
._Direction
_NAMES
.get(x
, "")
1323 Direction_Name
= classmethod(Direction_Name
)
1329 def __init__(self
, contents
=None):
1330 self
.property_
= PropertyReference()
1331 if contents
is not None: self
.MergeFromString(contents
)
1333 def property(self
): return self
.property_
1335 def mutable_property(self
): self
.has_property_
= 1; return self
.property_
1337 def clear_property(self
):self
.has_property_
= 0; self
.property_
.Clear()
1339 def has_property(self
): return self
.has_property_
1341 def direction(self
): return self
.direction_
1343 def set_direction(self
, x
):
1344 self
.has_direction_
= 1
1347 def clear_direction(self
):
1348 if self
.has_direction_
:
1349 self
.has_direction_
= 0
1352 def has_direction(self
): return self
.has_direction_
1355 def MergeFrom(self
, x
):
1356 assert x
is not self
1357 if (x
.has_property()): self
.mutable_property().MergeFrom(x
.property())
1358 if (x
.has_direction()): self
.set_direction(x
.direction())
1360 if _net_proto___parse__python
is not None:
1361 def _CMergeFromString(self
, s
):
1362 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.PropertyOrder', s
)
1364 if _net_proto___parse__python
is not None:
1366 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.PropertyOrder')
1368 if _net_proto___parse__python
is not None:
1369 def _CEncodePartial(self
):
1370 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.PropertyOrder')
1372 if _net_proto___parse__python
is not None:
1373 def _CToASCII(self
, output_format
):
1374 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.PropertyOrder', output_format
)
1377 if _net_proto___parse__python
is not None:
1378 def ParseASCII(self
, s
):
1379 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.PropertyOrder', s
)
1382 if _net_proto___parse__python
is not None:
1383 def ParseASCIIIgnoreUnknown(self
, s
):
1384 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.PropertyOrder', s
)
1387 def Equals(self
, x
):
1388 if x
is self
: return 1
1389 if self
.has_property_
!= x
.has_property_
: return 0
1390 if self
.has_property_
and self
.property_
!= x
.property_
: return 0
1391 if self
.has_direction_
!= x
.has_direction_
: return 0
1392 if self
.has_direction_
and self
.direction_
!= x
.direction_
: return 0
1395 def IsInitialized(self
, debug_strs
=None):
1397 if (not self
.has_property_
):
1399 if debug_strs
is not None:
1400 debug_strs
.append('Required field: property not set.')
1401 elif not self
.property_
.IsInitialized(debug_strs
): initialized
= 0
1406 n
+= self
.lengthString(self
.property_
.ByteSize())
1407 if (self
.has_direction_
): n
+= 1 + self
.lengthVarInt64(self
.direction_
)
1410 def ByteSizePartial(self
):
1412 if (self
.has_property_
):
1414 n
+= self
.lengthString(self
.property_
.ByteSizePartial())
1415 if (self
.has_direction_
): n
+= 1 + self
.lengthVarInt64(self
.direction_
)
1419 self
.clear_property()
1420 self
.clear_direction()
1422 def OutputUnchecked(self
, out
):
1424 out
.putVarInt32(self
.property_
.ByteSize())
1425 self
.property_
.OutputUnchecked(out
)
1426 if (self
.has_direction_
):
1428 out
.putVarInt32(self
.direction_
)
1430 def OutputPartial(self
, out
):
1431 if (self
.has_property_
):
1433 out
.putVarInt32(self
.property_
.ByteSizePartial())
1434 self
.property_
.OutputPartial(out
)
1435 if (self
.has_direction_
):
1437 out
.putVarInt32(self
.direction_
)
1439 def TryMerge(self
, d
):
1440 while d
.avail() > 0:
1441 tt
= d
.getVarInt32()
1443 length
= d
.getVarInt32()
1444 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
1446 self
.mutable_property().TryMerge(tmp
)
1449 self
.set_direction(d
.getVarInt32())
1453 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1457 def __str__(self
, prefix
="", printElemNumber
=0):
1459 if self
.has_property_
:
1460 res
+=prefix
+"property <\n"
1461 res
+=self
.property_
.__str
__(prefix
+ " ", printElemNumber
)
1463 if self
.has_direction_
: res
+=prefix
+("direction: %s\n" % self
.DebugFormatInt32(self
.direction_
))
1467 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1468 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1473 _TEXT
= _BuildTagLookupTable({
1479 _TYPES
= _BuildTagLookupTable({
1480 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1481 1: ProtocolBuffer
.Encoder
.STRING
,
1482 2: ProtocolBuffer
.Encoder
.NUMERIC
,
1483 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1487 _STYLE_CONTENT_TYPE
= """"""
1488 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.PropertyOrder'
1489 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1490 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5T3JkZXITGghwcm9wZXJ0eSABKAIwCzgCSilhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eVJlZmVyZW5jZaMBqgEFY3R5cGWyAQZwcm90bzKkARQTGglkaXJlY3Rpb24gAigAMAU4AUIBMWgAowGqAQdkZWZhdWx0sgEJQVNDRU5ESU5HpAEUc3oJRGlyZWN0aW9uiwGSAQlBU0NFTkRJTkeYAQGMAYsBkgEKREVTQ0VORElOR5gBAowBdMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
1491 if _net_proto___parse__python
is not None:
1492 _net_proto___parse__python
.RegisterType(
1493 _SERIALIZED_DESCRIPTOR
.tostring())
1495 class Filter(ProtocolBuffer
.ProtocolMessage
):
1496 has_composite_filter_
= 0
1497 composite_filter_
= None
1498 has_property_filter_
= 0
1499 property_filter_
= None
1501 def __init__(self
, contents
=None):
1502 self
.lazy_init_lock_
= thread
.allocate_lock()
1503 if contents
is not None: self
.MergeFromString(contents
)
1505 def composite_filter(self
):
1506 if self
.composite_filter_
is None:
1507 self
.lazy_init_lock_
.acquire()
1509 if self
.composite_filter_
is None: self
.composite_filter_
= CompositeFilter()
1511 self
.lazy_init_lock_
.release()
1512 return self
.composite_filter_
1514 def mutable_composite_filter(self
): self
.has_composite_filter_
= 1; return self
.composite_filter()
1516 def clear_composite_filter(self
):
1518 if self
.has_composite_filter_
:
1519 self
.has_composite_filter_
= 0;
1520 if self
.composite_filter_
is not None: self
.composite_filter_
.Clear()
1522 def has_composite_filter(self
): return self
.has_composite_filter_
1524 def property_filter(self
):
1525 if self
.property_filter_
is None:
1526 self
.lazy_init_lock_
.acquire()
1528 if self
.property_filter_
is None: self
.property_filter_
= PropertyFilter()
1530 self
.lazy_init_lock_
.release()
1531 return self
.property_filter_
1533 def mutable_property_filter(self
): self
.has_property_filter_
= 1; return self
.property_filter()
1535 def clear_property_filter(self
):
1537 if self
.has_property_filter_
:
1538 self
.has_property_filter_
= 0;
1539 if self
.property_filter_
is not None: self
.property_filter_
.Clear()
1541 def has_property_filter(self
): return self
.has_property_filter_
1544 def MergeFrom(self
, x
):
1545 assert x
is not self
1546 if (x
.has_composite_filter()): self
.mutable_composite_filter().MergeFrom(x
.composite_filter())
1547 if (x
.has_property_filter()): self
.mutable_property_filter().MergeFrom(x
.property_filter())
1549 if _net_proto___parse__python
is not None:
1550 def _CMergeFromString(self
, s
):
1551 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.Filter', s
)
1553 if _net_proto___parse__python
is not None:
1555 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.Filter')
1557 if _net_proto___parse__python
is not None:
1558 def _CEncodePartial(self
):
1559 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.Filter')
1561 if _net_proto___parse__python
is not None:
1562 def _CToASCII(self
, output_format
):
1563 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.Filter', output_format
)
1566 if _net_proto___parse__python
is not None:
1567 def ParseASCII(self
, s
):
1568 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.Filter', s
)
1571 if _net_proto___parse__python
is not None:
1572 def ParseASCIIIgnoreUnknown(self
, s
):
1573 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.Filter', s
)
1576 def Equals(self
, x
):
1577 if x
is self
: return 1
1578 if self
.has_composite_filter_
!= x
.has_composite_filter_
: return 0
1579 if self
.has_composite_filter_
and self
.composite_filter_
!= x
.composite_filter_
: return 0
1580 if self
.has_property_filter_
!= x
.has_property_filter_
: return 0
1581 if self
.has_property_filter_
and self
.property_filter_
!= x
.property_filter_
: return 0
1584 def IsInitialized(self
, debug_strs
=None):
1586 if (self
.has_composite_filter_
and not self
.composite_filter_
.IsInitialized(debug_strs
)): initialized
= 0
1587 if (self
.has_property_filter_
and not self
.property_filter_
.IsInitialized(debug_strs
)): initialized
= 0
1592 if (self
.has_composite_filter_
): n
+= 1 + self
.lengthString(self
.composite_filter_
.ByteSize())
1593 if (self
.has_property_filter_
): n
+= 1 + self
.lengthString(self
.property_filter_
.ByteSize())
1596 def ByteSizePartial(self
):
1598 if (self
.has_composite_filter_
): n
+= 1 + self
.lengthString(self
.composite_filter_
.ByteSizePartial())
1599 if (self
.has_property_filter_
): n
+= 1 + self
.lengthString(self
.property_filter_
.ByteSizePartial())
1603 self
.clear_composite_filter()
1604 self
.clear_property_filter()
1606 def OutputUnchecked(self
, out
):
1607 if (self
.has_composite_filter_
):
1609 out
.putVarInt32(self
.composite_filter_
.ByteSize())
1610 self
.composite_filter_
.OutputUnchecked(out
)
1611 if (self
.has_property_filter_
):
1613 out
.putVarInt32(self
.property_filter_
.ByteSize())
1614 self
.property_filter_
.OutputUnchecked(out
)
1616 def OutputPartial(self
, out
):
1617 if (self
.has_composite_filter_
):
1619 out
.putVarInt32(self
.composite_filter_
.ByteSizePartial())
1620 self
.composite_filter_
.OutputPartial(out
)
1621 if (self
.has_property_filter_
):
1623 out
.putVarInt32(self
.property_filter_
.ByteSizePartial())
1624 self
.property_filter_
.OutputPartial(out
)
1626 def TryMerge(self
, d
):
1627 while d
.avail() > 0:
1628 tt
= d
.getVarInt32()
1630 length
= d
.getVarInt32()
1631 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
1633 self
.mutable_composite_filter().TryMerge(tmp
)
1636 length
= d
.getVarInt32()
1637 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
1639 self
.mutable_property_filter().TryMerge(tmp
)
1643 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1647 def __str__(self
, prefix
="", printElemNumber
=0):
1649 if self
.has_composite_filter_
:
1650 res
+=prefix
+"composite_filter <\n"
1651 res
+=self
.composite_filter_
.__str
__(prefix
+ " ", printElemNumber
)
1653 if self
.has_property_filter_
:
1654 res
+=prefix
+"property_filter <\n"
1655 res
+=self
.property_filter_
.__str
__(prefix
+ " ", printElemNumber
)
1660 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1661 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1663 kcomposite_filter
= 1
1664 kproperty_filter
= 2
1666 _TEXT
= _BuildTagLookupTable({
1668 1: "composite_filter",
1669 2: "property_filter",
1672 _TYPES
= _BuildTagLookupTable({
1673 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1674 1: ProtocolBuffer
.Encoder
.STRING
,
1675 2: ProtocolBuffer
.Encoder
.STRING
,
1676 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1680 _STYLE_CONTENT_TYPE
= """"""
1681 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.Filter'
1682 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1683 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KHmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkZpbHRlchMaEGNvbXBvc2l0ZV9maWx0ZXIgASgCMAs4AUonYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuQ29tcG9zaXRlRmlsdGVyowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaD3Byb3BlcnR5X2ZpbHRlciACKAIwCzgBSiZhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5Qcm9wZXJ0eUZpbHRlcqMBqgEFY3R5cGWyAQZwcm90bzKkARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
1684 if _net_proto___parse__python
is not None:
1685 _net_proto___parse__python
.RegisterType(
1686 _SERIALIZED_DESCRIPTOR
.tostring())
1688 class CompositeFilter(ProtocolBuffer
.ProtocolMessage
):
1697 def Operator_Name(cls
, x
): return cls
._Operator
_NAMES
.get(x
, "")
1698 Operator_Name
= classmethod(Operator_Name
)
1703 def __init__(self
, contents
=None):
1705 if contents
is not None: self
.MergeFromString(contents
)
1707 def operator(self
): return self
.operator_
1709 def set_operator(self
, x
):
1710 self
.has_operator_
= 1
1713 def clear_operator(self
):
1714 if self
.has_operator_
:
1715 self
.has_operator_
= 0
1718 def has_operator(self
): return self
.has_operator_
1720 def filter_size(self
): return len(self
.filter_
)
1721 def filter_list(self
): return self
.filter_
1723 def filter(self
, i
):
1724 return self
.filter_
[i
]
1726 def mutable_filter(self
, i
):
1727 return self
.filter_
[i
]
1729 def add_filter(self
):
1731 self
.filter_
.append(x
)
1734 def clear_filter(self
):
1737 def MergeFrom(self
, x
):
1738 assert x
is not self
1739 if (x
.has_operator()): self
.set_operator(x
.operator())
1740 for i
in xrange(x
.filter_size()): self
.add_filter().CopyFrom(x
.filter(i
))
1742 if _net_proto___parse__python
is not None:
1743 def _CMergeFromString(self
, s
):
1744 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.CompositeFilter', s
)
1746 if _net_proto___parse__python
is not None:
1748 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.CompositeFilter')
1750 if _net_proto___parse__python
is not None:
1751 def _CEncodePartial(self
):
1752 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.CompositeFilter')
1754 if _net_proto___parse__python
is not None:
1755 def _CToASCII(self
, output_format
):
1756 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.CompositeFilter', output_format
)
1759 if _net_proto___parse__python
is not None:
1760 def ParseASCII(self
, s
):
1761 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.CompositeFilter', s
)
1764 if _net_proto___parse__python
is not None:
1765 def ParseASCIIIgnoreUnknown(self
, s
):
1766 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.CompositeFilter', s
)
1769 def Equals(self
, x
):
1770 if x
is self
: return 1
1771 if self
.has_operator_
!= x
.has_operator_
: return 0
1772 if self
.has_operator_
and self
.operator_
!= x
.operator_
: return 0
1773 if len(self
.filter_
) != len(x
.filter_
): return 0
1774 for e1
, e2
in zip(self
.filter_
, x
.filter_
):
1775 if e1
!= e2
: return 0
1778 def IsInitialized(self
, debug_strs
=None):
1780 if (not self
.has_operator_
):
1782 if debug_strs
is not None:
1783 debug_strs
.append('Required field: operator not set.')
1784 for p
in self
.filter_
:
1785 if not p
.IsInitialized(debug_strs
): initialized
=0
1790 n
+= self
.lengthVarInt64(self
.operator_
)
1791 n
+= 1 * len(self
.filter_
)
1792 for i
in xrange(len(self
.filter_
)): n
+= self
.lengthString(self
.filter_
[i
].ByteSize())
1795 def ByteSizePartial(self
):
1797 if (self
.has_operator_
):
1799 n
+= self
.lengthVarInt64(self
.operator_
)
1800 n
+= 1 * len(self
.filter_
)
1801 for i
in xrange(len(self
.filter_
)): n
+= self
.lengthString(self
.filter_
[i
].ByteSizePartial())
1805 self
.clear_operator()
1808 def OutputUnchecked(self
, out
):
1810 out
.putVarInt32(self
.operator_
)
1811 for i
in xrange(len(self
.filter_
)):
1813 out
.putVarInt32(self
.filter_
[i
].ByteSize())
1814 self
.filter_
[i
].OutputUnchecked(out
)
1816 def OutputPartial(self
, out
):
1817 if (self
.has_operator_
):
1819 out
.putVarInt32(self
.operator_
)
1820 for i
in xrange(len(self
.filter_
)):
1822 out
.putVarInt32(self
.filter_
[i
].ByteSizePartial())
1823 self
.filter_
[i
].OutputPartial(out
)
1825 def TryMerge(self
, d
):
1826 while d
.avail() > 0:
1827 tt
= d
.getVarInt32()
1829 self
.set_operator(d
.getVarInt32())
1832 length
= d
.getVarInt32()
1833 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
1835 self
.add_filter().TryMerge(tmp
)
1839 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
1843 def __str__(self
, prefix
="", printElemNumber
=0):
1845 if self
.has_operator_
: res
+=prefix
+("operator: %s\n" % self
.DebugFormatInt32(self
.operator_
))
1847 for e
in self
.filter_
:
1849 if printElemNumber
: elm
="(%d)" % cnt
1850 res
+=prefix
+("filter%s <\n" % elm
)
1851 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
1857 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
1858 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
1863 _TEXT
= _BuildTagLookupTable({
1869 _TYPES
= _BuildTagLookupTable({
1870 0: ProtocolBuffer
.Encoder
.NUMERIC
,
1871 1: ProtocolBuffer
.Encoder
.NUMERIC
,
1872 2: ProtocolBuffer
.Encoder
.STRING
,
1873 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
1877 _STYLE_CONTENT_TYPE
= """"""
1878 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.CompositeFilter'
1879 _SERIALIZED_DESCRIPTOR
= array
.array('B')
1880 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJ2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbXBvc2l0ZUZpbHRlchMaCG9wZXJhdG9yIAEoADAFOAJoABQTGgZmaWx0ZXIgAigCMAs4A0oeYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRmlsdGVyowGqAQVjdHlwZbIBBnByb3RvMqQBFHN6CE9wZXJhdG9yiwGSAQNBTkSYAQGMAXTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
1881 if _net_proto___parse__python
is not None:
1882 _net_proto___parse__python
.RegisterType(
1883 _SERIALIZED_DESCRIPTOR
.tostring())
1885 class PropertyFilter(ProtocolBuffer
.ProtocolMessage
):
1889 LESS_THAN_OR_EQUAL
= 2
1891 GREATER_THAN_OR_EQUAL
= 4
1897 2: "LESS_THAN_OR_EQUAL",
1899 4: "GREATER_THAN_OR_EQUAL",
1904 def Operator_Name(cls
, x
): return cls
._Operator
_NAMES
.get(x
, "")
1905 Operator_Name
= classmethod(Operator_Name
)
1912 def __init__(self
, contents
=None):
1913 self
.property_
= PropertyReference()
1914 self
.value_
= google
.appengine
.datastore
.entity_v4_pb
.Value()
1915 if contents
is not None: self
.MergeFromString(contents
)
1917 def property(self
): return self
.property_
1919 def mutable_property(self
): self
.has_property_
= 1; return self
.property_
1921 def clear_property(self
):self
.has_property_
= 0; self
.property_
.Clear()
1923 def has_property(self
): return self
.has_property_
1925 def operator(self
): return self
.operator_
1927 def set_operator(self
, x
):
1928 self
.has_operator_
= 1
1931 def clear_operator(self
):
1932 if self
.has_operator_
:
1933 self
.has_operator_
= 0
1936 def has_operator(self
): return self
.has_operator_
1938 def value(self
): return self
.value_
1940 def mutable_value(self
): self
.has_value_
= 1; return self
.value_
1942 def clear_value(self
):self
.has_value_
= 0; self
.value_
.Clear()
1944 def has_value(self
): return self
.has_value_
1947 def MergeFrom(self
, x
):
1948 assert x
is not self
1949 if (x
.has_property()): self
.mutable_property().MergeFrom(x
.property())
1950 if (x
.has_operator()): self
.set_operator(x
.operator())
1951 if (x
.has_value()): self
.mutable_value().MergeFrom(x
.value())
1953 if _net_proto___parse__python
is not None:
1954 def _CMergeFromString(self
, s
):
1955 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.PropertyFilter', s
)
1957 if _net_proto___parse__python
is not None:
1959 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.PropertyFilter')
1961 if _net_proto___parse__python
is not None:
1962 def _CEncodePartial(self
):
1963 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.PropertyFilter')
1965 if _net_proto___parse__python
is not None:
1966 def _CToASCII(self
, output_format
):
1967 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.PropertyFilter', output_format
)
1970 if _net_proto___parse__python
is not None:
1971 def ParseASCII(self
, s
):
1972 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.PropertyFilter', s
)
1975 if _net_proto___parse__python
is not None:
1976 def ParseASCIIIgnoreUnknown(self
, s
):
1977 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.PropertyFilter', s
)
1980 def Equals(self
, x
):
1981 if x
is self
: return 1
1982 if self
.has_property_
!= x
.has_property_
: return 0
1983 if self
.has_property_
and self
.property_
!= x
.property_
: return 0
1984 if self
.has_operator_
!= x
.has_operator_
: return 0
1985 if self
.has_operator_
and self
.operator_
!= x
.operator_
: return 0
1986 if self
.has_value_
!= x
.has_value_
: return 0
1987 if self
.has_value_
and self
.value_
!= x
.value_
: return 0
1990 def IsInitialized(self
, debug_strs
=None):
1992 if (not self
.has_property_
):
1994 if debug_strs
is not None:
1995 debug_strs
.append('Required field: property not set.')
1996 elif not self
.property_
.IsInitialized(debug_strs
): initialized
= 0
1997 if (not self
.has_operator_
):
1999 if debug_strs
is not None:
2000 debug_strs
.append('Required field: operator not set.')
2001 if (not self
.has_value_
):
2003 if debug_strs
is not None:
2004 debug_strs
.append('Required field: value not set.')
2005 elif not self
.value_
.IsInitialized(debug_strs
): initialized
= 0
2010 n
+= self
.lengthString(self
.property_
.ByteSize())
2011 n
+= self
.lengthVarInt64(self
.operator_
)
2012 n
+= self
.lengthString(self
.value_
.ByteSize())
2015 def ByteSizePartial(self
):
2017 if (self
.has_property_
):
2019 n
+= self
.lengthString(self
.property_
.ByteSizePartial())
2020 if (self
.has_operator_
):
2022 n
+= self
.lengthVarInt64(self
.operator_
)
2023 if (self
.has_value_
):
2025 n
+= self
.lengthString(self
.value_
.ByteSizePartial())
2029 self
.clear_property()
2030 self
.clear_operator()
2033 def OutputUnchecked(self
, out
):
2035 out
.putVarInt32(self
.property_
.ByteSize())
2036 self
.property_
.OutputUnchecked(out
)
2038 out
.putVarInt32(self
.operator_
)
2040 out
.putVarInt32(self
.value_
.ByteSize())
2041 self
.value_
.OutputUnchecked(out
)
2043 def OutputPartial(self
, out
):
2044 if (self
.has_property_
):
2046 out
.putVarInt32(self
.property_
.ByteSizePartial())
2047 self
.property_
.OutputPartial(out
)
2048 if (self
.has_operator_
):
2050 out
.putVarInt32(self
.operator_
)
2051 if (self
.has_value_
):
2053 out
.putVarInt32(self
.value_
.ByteSizePartial())
2054 self
.value_
.OutputPartial(out
)
2056 def TryMerge(self
, d
):
2057 while d
.avail() > 0:
2058 tt
= d
.getVarInt32()
2060 length
= d
.getVarInt32()
2061 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2063 self
.mutable_property().TryMerge(tmp
)
2066 self
.set_operator(d
.getVarInt32())
2069 length
= d
.getVarInt32()
2070 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2072 self
.mutable_value().TryMerge(tmp
)
2076 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
2080 def __str__(self
, prefix
="", printElemNumber
=0):
2082 if self
.has_property_
:
2083 res
+=prefix
+"property <\n"
2084 res
+=self
.property_
.__str
__(prefix
+ " ", printElemNumber
)
2086 if self
.has_operator_
: res
+=prefix
+("operator: %s\n" % self
.DebugFormatInt32(self
.operator_
))
2088 res
+=prefix
+"value <\n"
2089 res
+=self
.value_
.__str
__(prefix
+ " ", printElemNumber
)
2094 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
2095 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
2101 _TEXT
= _BuildTagLookupTable({
2108 _TYPES
= _BuildTagLookupTable({
2109 0: ProtocolBuffer
.Encoder
.NUMERIC
,
2110 1: ProtocolBuffer
.Encoder
.STRING
,
2111 2: ProtocolBuffer
.Encoder
.NUMERIC
,
2112 3: ProtocolBuffer
.Encoder
.STRING
,
2113 }, 3, ProtocolBuffer
.Encoder
.MAX_TYPE
)
2117 _STYLE_CONTENT_TYPE
= """"""
2118 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.PropertyFilter'
2119 _SERIALIZED_DESCRIPTOR
= array
.array('B')
2120 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlByb3BlcnR5RmlsdGVyExoIcHJvcGVydHkgASgCMAs4AkopYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUHJvcGVydHlSZWZlcmVuY2WjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoIb3BlcmF0b3IgAigAMAU4AmgAFBMaBXZhbHVlIAMoAjALOAJKHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlZhbHVlowGqAQVjdHlwZbIBBnByb3RvMqQBFHN6CE9wZXJhdG9yiwGSAQlMRVNTX1RIQU6YAQGMAYsBkgESTEVTU19USEFOX09SX0VRVUFMmAECjAGLAZIBDEdSRUFURVJfVEhBTpgBA4wBiwGSARVHUkVBVEVSX1RIQU5fT1JfRVFVQUyYAQSMAYsBkgEFRVFVQUyYAQWMAYsBkgEMSEFTX0FOQ0VTVE9SmAELjAF0wgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
2121 if _net_proto___parse__python
is not None:
2122 _net_proto___parse__python
.RegisterType(
2123 _SERIALIZED_DESCRIPTOR
.tostring())
2125 class GqlQuery(ProtocolBuffer
.ProtocolMessage
):
2126 has_query_string_
= 0
2128 has_allow_literal_
= 0
2131 def __init__(self
, contents
=None):
2133 self
.number_arg_
= []
2134 if contents
is not None: self
.MergeFromString(contents
)
2136 def query_string(self
): return self
.query_string_
2138 def set_query_string(self
, x
):
2139 self
.has_query_string_
= 1
2140 self
.query_string_
= x
2142 def clear_query_string(self
):
2143 if self
.has_query_string_
:
2144 self
.has_query_string_
= 0
2145 self
.query_string_
= ""
2147 def has_query_string(self
): return self
.has_query_string_
2149 def allow_literal(self
): return self
.allow_literal_
2151 def set_allow_literal(self
, x
):
2152 self
.has_allow_literal_
= 1
2153 self
.allow_literal_
= x
2155 def clear_allow_literal(self
):
2156 if self
.has_allow_literal_
:
2157 self
.has_allow_literal_
= 0
2158 self
.allow_literal_
= 0
2160 def has_allow_literal(self
): return self
.has_allow_literal_
2162 def name_arg_size(self
): return len(self
.name_arg_
)
2163 def name_arg_list(self
): return self
.name_arg_
2165 def name_arg(self
, i
):
2166 return self
.name_arg_
[i
]
2168 def mutable_name_arg(self
, i
):
2169 return self
.name_arg_
[i
]
2171 def add_name_arg(self
):
2173 self
.name_arg_
.append(x
)
2176 def clear_name_arg(self
):
2178 def number_arg_size(self
): return len(self
.number_arg_
)
2179 def number_arg_list(self
): return self
.number_arg_
2181 def number_arg(self
, i
):
2182 return self
.number_arg_
[i
]
2184 def mutable_number_arg(self
, i
):
2185 return self
.number_arg_
[i
]
2187 def add_number_arg(self
):
2189 self
.number_arg_
.append(x
)
2192 def clear_number_arg(self
):
2193 self
.number_arg_
= []
2195 def MergeFrom(self
, x
):
2196 assert x
is not self
2197 if (x
.has_query_string()): self
.set_query_string(x
.query_string())
2198 if (x
.has_allow_literal()): self
.set_allow_literal(x
.allow_literal())
2199 for i
in xrange(x
.name_arg_size()): self
.add_name_arg().CopyFrom(x
.name_arg(i
))
2200 for i
in xrange(x
.number_arg_size()): self
.add_number_arg().CopyFrom(x
.number_arg(i
))
2202 if _net_proto___parse__python
is not None:
2203 def _CMergeFromString(self
, s
):
2204 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.GqlQuery', s
)
2206 if _net_proto___parse__python
is not None:
2208 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.GqlQuery')
2210 if _net_proto___parse__python
is not None:
2211 def _CEncodePartial(self
):
2212 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.GqlQuery')
2214 if _net_proto___parse__python
is not None:
2215 def _CToASCII(self
, output_format
):
2216 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.GqlQuery', output_format
)
2219 if _net_proto___parse__python
is not None:
2220 def ParseASCII(self
, s
):
2221 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.GqlQuery', s
)
2224 if _net_proto___parse__python
is not None:
2225 def ParseASCIIIgnoreUnknown(self
, s
):
2226 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.GqlQuery', s
)
2229 def Equals(self
, x
):
2230 if x
is self
: return 1
2231 if self
.has_query_string_
!= x
.has_query_string_
: return 0
2232 if self
.has_query_string_
and self
.query_string_
!= x
.query_string_
: return 0
2233 if self
.has_allow_literal_
!= x
.has_allow_literal_
: return 0
2234 if self
.has_allow_literal_
and self
.allow_literal_
!= x
.allow_literal_
: return 0
2235 if len(self
.name_arg_
) != len(x
.name_arg_
): return 0
2236 for e1
, e2
in zip(self
.name_arg_
, x
.name_arg_
):
2237 if e1
!= e2
: return 0
2238 if len(self
.number_arg_
) != len(x
.number_arg_
): return 0
2239 for e1
, e2
in zip(self
.number_arg_
, x
.number_arg_
):
2240 if e1
!= e2
: return 0
2243 def IsInitialized(self
, debug_strs
=None):
2245 if (not self
.has_query_string_
):
2247 if debug_strs
is not None:
2248 debug_strs
.append('Required field: query_string not set.')
2249 for p
in self
.name_arg_
:
2250 if not p
.IsInitialized(debug_strs
): initialized
=0
2251 for p
in self
.number_arg_
:
2252 if not p
.IsInitialized(debug_strs
): initialized
=0
2257 n
+= self
.lengthString(len(self
.query_string_
))
2258 if (self
.has_allow_literal_
): n
+= 2
2259 n
+= 1 * len(self
.name_arg_
)
2260 for i
in xrange(len(self
.name_arg_
)): n
+= self
.lengthString(self
.name_arg_
[i
].ByteSize())
2261 n
+= 1 * len(self
.number_arg_
)
2262 for i
in xrange(len(self
.number_arg_
)): n
+= self
.lengthString(self
.number_arg_
[i
].ByteSize())
2265 def ByteSizePartial(self
):
2267 if (self
.has_query_string_
):
2269 n
+= self
.lengthString(len(self
.query_string_
))
2270 if (self
.has_allow_literal_
): n
+= 2
2271 n
+= 1 * len(self
.name_arg_
)
2272 for i
in xrange(len(self
.name_arg_
)): n
+= self
.lengthString(self
.name_arg_
[i
].ByteSizePartial())
2273 n
+= 1 * len(self
.number_arg_
)
2274 for i
in xrange(len(self
.number_arg_
)): n
+= self
.lengthString(self
.number_arg_
[i
].ByteSizePartial())
2278 self
.clear_query_string()
2279 self
.clear_allow_literal()
2280 self
.clear_name_arg()
2281 self
.clear_number_arg()
2283 def OutputUnchecked(self
, out
):
2285 out
.putPrefixedString(self
.query_string_
)
2286 if (self
.has_allow_literal_
):
2288 out
.putBoolean(self
.allow_literal_
)
2289 for i
in xrange(len(self
.name_arg_
)):
2291 out
.putVarInt32(self
.name_arg_
[i
].ByteSize())
2292 self
.name_arg_
[i
].OutputUnchecked(out
)
2293 for i
in xrange(len(self
.number_arg_
)):
2295 out
.putVarInt32(self
.number_arg_
[i
].ByteSize())
2296 self
.number_arg_
[i
].OutputUnchecked(out
)
2298 def OutputPartial(self
, out
):
2299 if (self
.has_query_string_
):
2301 out
.putPrefixedString(self
.query_string_
)
2302 if (self
.has_allow_literal_
):
2304 out
.putBoolean(self
.allow_literal_
)
2305 for i
in xrange(len(self
.name_arg_
)):
2307 out
.putVarInt32(self
.name_arg_
[i
].ByteSizePartial())
2308 self
.name_arg_
[i
].OutputPartial(out
)
2309 for i
in xrange(len(self
.number_arg_
)):
2311 out
.putVarInt32(self
.number_arg_
[i
].ByteSizePartial())
2312 self
.number_arg_
[i
].OutputPartial(out
)
2314 def TryMerge(self
, d
):
2315 while d
.avail() > 0:
2316 tt
= d
.getVarInt32()
2318 self
.set_query_string(d
.getPrefixedString())
2321 self
.set_allow_literal(d
.getBoolean())
2324 length
= d
.getVarInt32()
2325 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2327 self
.add_name_arg().TryMerge(tmp
)
2330 length
= d
.getVarInt32()
2331 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2333 self
.add_number_arg().TryMerge(tmp
)
2337 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
2341 def __str__(self
, prefix
="", printElemNumber
=0):
2343 if self
.has_query_string_
: res
+=prefix
+("query_string: %s\n" % self
.DebugFormatString(self
.query_string_
))
2344 if self
.has_allow_literal_
: res
+=prefix
+("allow_literal: %s\n" % self
.DebugFormatBool(self
.allow_literal_
))
2346 for e
in self
.name_arg_
:
2348 if printElemNumber
: elm
="(%d)" % cnt
2349 res
+=prefix
+("name_arg%s <\n" % elm
)
2350 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
2354 for e
in self
.number_arg_
:
2356 if printElemNumber
: elm
="(%d)" % cnt
2357 res
+=prefix
+("number_arg%s <\n" % elm
)
2358 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
2364 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
2365 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
2372 _TEXT
= _BuildTagLookupTable({
2380 _TYPES
= _BuildTagLookupTable({
2381 0: ProtocolBuffer
.Encoder
.NUMERIC
,
2382 1: ProtocolBuffer
.Encoder
.STRING
,
2383 2: ProtocolBuffer
.Encoder
.NUMERIC
,
2384 3: ProtocolBuffer
.Encoder
.STRING
,
2385 4: ProtocolBuffer
.Encoder
.STRING
,
2386 }, 4, ProtocolBuffer
.Encoder
.MAX_TYPE
)
2390 _STYLE_CONTENT_TYPE
= """"""
2391 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.GqlQuery'
2392 _SERIALIZED_DESCRIPTOR
= array
.array('B')
2393 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KIGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkdxbFF1ZXJ5ExoMcXVlcnlfc3RyaW5nIAEoAjAJOAIUExoNYWxsb3dfbGl0ZXJhbCACKAAwCDgBQgVmYWxzZaMBqgEHZGVmYXVsdLIBBWZhbHNlpAEUExoIbmFtZV9hcmcgAygCMAs4A0ojYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuR3FsUXVlcnlBcmejAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoKbnVtYmVyX2FyZyAEKAIwCzgDSiNhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5HcWxRdWVyeUFyZ6MBqgEFY3R5cGWyAQZwcm90bzKkARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
2394 if _net_proto___parse__python
is not None:
2395 _net_proto___parse__python
.RegisterType(
2396 _SERIALIZED_DESCRIPTOR
.tostring())
2398 class GqlQueryArg(ProtocolBuffer
.ProtocolMessage
):
2406 def __init__(self
, contents
=None):
2407 self
.lazy_init_lock_
= thread
.allocate_lock()
2408 if contents
is not None: self
.MergeFromString(contents
)
2410 def name(self
): return self
.name_
2412 def set_name(self
, x
):
2416 def clear_name(self
):
2421 def has_name(self
): return self
.has_name_
2424 if self
.value_
is None:
2425 self
.lazy_init_lock_
.acquire()
2427 if self
.value_
is None: self
.value_
= google
.appengine
.datastore
.entity_v4_pb
.Value()
2429 self
.lazy_init_lock_
.release()
2432 def mutable_value(self
): self
.has_value_
= 1; return self
.value()
2434 def clear_value(self
):
2437 self
.has_value_
= 0;
2438 if self
.value_
is not None: self
.value_
.Clear()
2440 def has_value(self
): return self
.has_value_
2442 def cursor(self
): return self
.cursor_
2444 def set_cursor(self
, x
):
2445 self
.has_cursor_
= 1
2448 def clear_cursor(self
):
2449 if self
.has_cursor_
:
2450 self
.has_cursor_
= 0
2453 def has_cursor(self
): return self
.has_cursor_
2456 def MergeFrom(self
, x
):
2457 assert x
is not self
2458 if (x
.has_name()): self
.set_name(x
.name())
2459 if (x
.has_value()): self
.mutable_value().MergeFrom(x
.value())
2460 if (x
.has_cursor()): self
.set_cursor(x
.cursor())
2462 if _net_proto___parse__python
is not None:
2463 def _CMergeFromString(self
, s
):
2464 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.GqlQueryArg', s
)
2466 if _net_proto___parse__python
is not None:
2468 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.GqlQueryArg')
2470 if _net_proto___parse__python
is not None:
2471 def _CEncodePartial(self
):
2472 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.GqlQueryArg')
2474 if _net_proto___parse__python
is not None:
2475 def _CToASCII(self
, output_format
):
2476 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.GqlQueryArg', output_format
)
2479 if _net_proto___parse__python
is not None:
2480 def ParseASCII(self
, s
):
2481 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.GqlQueryArg', s
)
2484 if _net_proto___parse__python
is not None:
2485 def ParseASCIIIgnoreUnknown(self
, s
):
2486 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.GqlQueryArg', s
)
2489 def Equals(self
, x
):
2490 if x
is self
: return 1
2491 if self
.has_name_
!= x
.has_name_
: return 0
2492 if self
.has_name_
and self
.name_
!= x
.name_
: return 0
2493 if self
.has_value_
!= x
.has_value_
: return 0
2494 if self
.has_value_
and self
.value_
!= x
.value_
: return 0
2495 if self
.has_cursor_
!= x
.has_cursor_
: return 0
2496 if self
.has_cursor_
and self
.cursor_
!= x
.cursor_
: return 0
2499 def IsInitialized(self
, debug_strs
=None):
2501 if (self
.has_value_
and not self
.value_
.IsInitialized(debug_strs
)): initialized
= 0
2506 if (self
.has_name_
): n
+= 1 + self
.lengthString(len(self
.name_
))
2507 if (self
.has_value_
): n
+= 1 + self
.lengthString(self
.value_
.ByteSize())
2508 if (self
.has_cursor_
): n
+= 1 + self
.lengthString(len(self
.cursor_
))
2511 def ByteSizePartial(self
):
2513 if (self
.has_name_
): n
+= 1 + self
.lengthString(len(self
.name_
))
2514 if (self
.has_value_
): n
+= 1 + self
.lengthString(self
.value_
.ByteSizePartial())
2515 if (self
.has_cursor_
): n
+= 1 + self
.lengthString(len(self
.cursor_
))
2523 def OutputUnchecked(self
, out
):
2524 if (self
.has_name_
):
2526 out
.putPrefixedString(self
.name_
)
2527 if (self
.has_value_
):
2529 out
.putVarInt32(self
.value_
.ByteSize())
2530 self
.value_
.OutputUnchecked(out
)
2531 if (self
.has_cursor_
):
2533 out
.putPrefixedString(self
.cursor_
)
2535 def OutputPartial(self
, out
):
2536 if (self
.has_name_
):
2538 out
.putPrefixedString(self
.name_
)
2539 if (self
.has_value_
):
2541 out
.putVarInt32(self
.value_
.ByteSizePartial())
2542 self
.value_
.OutputPartial(out
)
2543 if (self
.has_cursor_
):
2545 out
.putPrefixedString(self
.cursor_
)
2547 def TryMerge(self
, d
):
2548 while d
.avail() > 0:
2549 tt
= d
.getVarInt32()
2551 self
.set_name(d
.getPrefixedString())
2554 length
= d
.getVarInt32()
2555 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2557 self
.mutable_value().TryMerge(tmp
)
2560 self
.set_cursor(d
.getPrefixedString())
2564 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
2568 def __str__(self
, prefix
="", printElemNumber
=0):
2570 if self
.has_name_
: res
+=prefix
+("name: %s\n" % self
.DebugFormatString(self
.name_
))
2572 res
+=prefix
+"value <\n"
2573 res
+=self
.value_
.__str
__(prefix
+ " ", printElemNumber
)
2575 if self
.has_cursor_
: res
+=prefix
+("cursor: %s\n" % self
.DebugFormatString(self
.cursor_
))
2579 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
2580 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
2586 _TEXT
= _BuildTagLookupTable({
2593 _TYPES
= _BuildTagLookupTable({
2594 0: ProtocolBuffer
.Encoder
.NUMERIC
,
2595 1: ProtocolBuffer
.Encoder
.STRING
,
2596 2: ProtocolBuffer
.Encoder
.STRING
,
2597 3: ProtocolBuffer
.Encoder
.STRING
,
2598 }, 3, ProtocolBuffer
.Encoder
.MAX_TYPE
)
2602 _STYLE_CONTENT_TYPE
= """"""
2603 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.GqlQueryArg'
2604 _SERIALIZED_DESCRIPTOR
= array
.array('B')
2605 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KI2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkdxbFF1ZXJ5QXJnExoEbmFtZSABKAIwCTgBFBMaBXZhbHVlIAIoAjALOAFKHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlZhbHVlowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaBmN1cnNvciADKAIwCTgBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
2606 if _net_proto___parse__python
is not None:
2607 _net_proto___parse__python
.RegisterType(
2608 _SERIALIZED_DESCRIPTOR
.tostring())
2610 class QueryResultBatch(ProtocolBuffer
.ProtocolMessage
):
2614 MORE_RESULTS_AFTER_LIMIT
= 2
2617 _MoreResultsType_NAMES
= {
2619 2: "MORE_RESULTS_AFTER_LIMIT",
2620 3: "NO_MORE_RESULTS",
2623 def MoreResultsType_Name(cls
, x
): return cls
._MoreResultsType
_NAMES
.get(x
, "")
2624 MoreResultsType_Name
= classmethod(MoreResultsType_Name
)
2626 has_entity_result_type_
= 0
2627 entity_result_type_
= 0
2630 has_more_results_
= 0
2632 has_skipped_results_
= 0
2633 skipped_results_
= 0
2635 def __init__(self
, contents
=None):
2636 self
.entity_result_
= []
2637 if contents
is not None: self
.MergeFromString(contents
)
2639 def entity_result_type(self
): return self
.entity_result_type_
2641 def set_entity_result_type(self
, x
):
2642 self
.has_entity_result_type_
= 1
2643 self
.entity_result_type_
= x
2645 def clear_entity_result_type(self
):
2646 if self
.has_entity_result_type_
:
2647 self
.has_entity_result_type_
= 0
2648 self
.entity_result_type_
= 0
2650 def has_entity_result_type(self
): return self
.has_entity_result_type_
2652 def entity_result_size(self
): return len(self
.entity_result_
)
2653 def entity_result_list(self
): return self
.entity_result_
2655 def entity_result(self
, i
):
2656 return self
.entity_result_
[i
]
2658 def mutable_entity_result(self
, i
):
2659 return self
.entity_result_
[i
]
2661 def add_entity_result(self
):
2663 self
.entity_result_
.append(x
)
2666 def clear_entity_result(self
):
2667 self
.entity_result_
= []
2668 def end_cursor(self
): return self
.end_cursor_
2670 def set_end_cursor(self
, x
):
2671 self
.has_end_cursor_
= 1
2672 self
.end_cursor_
= x
2674 def clear_end_cursor(self
):
2675 if self
.has_end_cursor_
:
2676 self
.has_end_cursor_
= 0
2677 self
.end_cursor_
= ""
2679 def has_end_cursor(self
): return self
.has_end_cursor_
2681 def more_results(self
): return self
.more_results_
2683 def set_more_results(self
, x
):
2684 self
.has_more_results_
= 1
2685 self
.more_results_
= x
2687 def clear_more_results(self
):
2688 if self
.has_more_results_
:
2689 self
.has_more_results_
= 0
2690 self
.more_results_
= 0
2692 def has_more_results(self
): return self
.has_more_results_
2694 def skipped_results(self
): return self
.skipped_results_
2696 def set_skipped_results(self
, x
):
2697 self
.has_skipped_results_
= 1
2698 self
.skipped_results_
= x
2700 def clear_skipped_results(self
):
2701 if self
.has_skipped_results_
:
2702 self
.has_skipped_results_
= 0
2703 self
.skipped_results_
= 0
2705 def has_skipped_results(self
): return self
.has_skipped_results_
2708 def MergeFrom(self
, x
):
2709 assert x
is not self
2710 if (x
.has_entity_result_type()): self
.set_entity_result_type(x
.entity_result_type())
2711 for i
in xrange(x
.entity_result_size()): self
.add_entity_result().CopyFrom(x
.entity_result(i
))
2712 if (x
.has_end_cursor()): self
.set_end_cursor(x
.end_cursor())
2713 if (x
.has_more_results()): self
.set_more_results(x
.more_results())
2714 if (x
.has_skipped_results()): self
.set_skipped_results(x
.skipped_results())
2716 if _net_proto___parse__python
is not None:
2717 def _CMergeFromString(self
, s
):
2718 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.QueryResultBatch', s
)
2720 if _net_proto___parse__python
is not None:
2722 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.QueryResultBatch')
2724 if _net_proto___parse__python
is not None:
2725 def _CEncodePartial(self
):
2726 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.QueryResultBatch')
2728 if _net_proto___parse__python
is not None:
2729 def _CToASCII(self
, output_format
):
2730 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.QueryResultBatch', output_format
)
2733 if _net_proto___parse__python
is not None:
2734 def ParseASCII(self
, s
):
2735 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.QueryResultBatch', s
)
2738 if _net_proto___parse__python
is not None:
2739 def ParseASCIIIgnoreUnknown(self
, s
):
2740 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.QueryResultBatch', s
)
2743 def Equals(self
, x
):
2744 if x
is self
: return 1
2745 if self
.has_entity_result_type_
!= x
.has_entity_result_type_
: return 0
2746 if self
.has_entity_result_type_
and self
.entity_result_type_
!= x
.entity_result_type_
: return 0
2747 if len(self
.entity_result_
) != len(x
.entity_result_
): return 0
2748 for e1
, e2
in zip(self
.entity_result_
, x
.entity_result_
):
2749 if e1
!= e2
: return 0
2750 if self
.has_end_cursor_
!= x
.has_end_cursor_
: return 0
2751 if self
.has_end_cursor_
and self
.end_cursor_
!= x
.end_cursor_
: return 0
2752 if self
.has_more_results_
!= x
.has_more_results_
: return 0
2753 if self
.has_more_results_
and self
.more_results_
!= x
.more_results_
: return 0
2754 if self
.has_skipped_results_
!= x
.has_skipped_results_
: return 0
2755 if self
.has_skipped_results_
and self
.skipped_results_
!= x
.skipped_results_
: return 0
2758 def IsInitialized(self
, debug_strs
=None):
2760 if (not self
.has_entity_result_type_
):
2762 if debug_strs
is not None:
2763 debug_strs
.append('Required field: entity_result_type not set.')
2764 for p
in self
.entity_result_
:
2765 if not p
.IsInitialized(debug_strs
): initialized
=0
2766 if (not self
.has_more_results_
):
2768 if debug_strs
is not None:
2769 debug_strs
.append('Required field: more_results not set.')
2774 n
+= self
.lengthVarInt64(self
.entity_result_type_
)
2775 n
+= 1 * len(self
.entity_result_
)
2776 for i
in xrange(len(self
.entity_result_
)): n
+= self
.lengthString(self
.entity_result_
[i
].ByteSize())
2777 if (self
.has_end_cursor_
): n
+= 1 + self
.lengthString(len(self
.end_cursor_
))
2778 n
+= self
.lengthVarInt64(self
.more_results_
)
2779 if (self
.has_skipped_results_
): n
+= 1 + self
.lengthVarInt64(self
.skipped_results_
)
2782 def ByteSizePartial(self
):
2784 if (self
.has_entity_result_type_
):
2786 n
+= self
.lengthVarInt64(self
.entity_result_type_
)
2787 n
+= 1 * len(self
.entity_result_
)
2788 for i
in xrange(len(self
.entity_result_
)): n
+= self
.lengthString(self
.entity_result_
[i
].ByteSizePartial())
2789 if (self
.has_end_cursor_
): n
+= 1 + self
.lengthString(len(self
.end_cursor_
))
2790 if (self
.has_more_results_
):
2792 n
+= self
.lengthVarInt64(self
.more_results_
)
2793 if (self
.has_skipped_results_
): n
+= 1 + self
.lengthVarInt64(self
.skipped_results_
)
2797 self
.clear_entity_result_type()
2798 self
.clear_entity_result()
2799 self
.clear_end_cursor()
2800 self
.clear_more_results()
2801 self
.clear_skipped_results()
2803 def OutputUnchecked(self
, out
):
2805 out
.putVarInt32(self
.entity_result_type_
)
2806 for i
in xrange(len(self
.entity_result_
)):
2808 out
.putVarInt32(self
.entity_result_
[i
].ByteSize())
2809 self
.entity_result_
[i
].OutputUnchecked(out
)
2810 if (self
.has_end_cursor_
):
2812 out
.putPrefixedString(self
.end_cursor_
)
2814 out
.putVarInt32(self
.more_results_
)
2815 if (self
.has_skipped_results_
):
2817 out
.putVarInt32(self
.skipped_results_
)
2819 def OutputPartial(self
, out
):
2820 if (self
.has_entity_result_type_
):
2822 out
.putVarInt32(self
.entity_result_type_
)
2823 for i
in xrange(len(self
.entity_result_
)):
2825 out
.putVarInt32(self
.entity_result_
[i
].ByteSizePartial())
2826 self
.entity_result_
[i
].OutputPartial(out
)
2827 if (self
.has_end_cursor_
):
2829 out
.putPrefixedString(self
.end_cursor_
)
2830 if (self
.has_more_results_
):
2832 out
.putVarInt32(self
.more_results_
)
2833 if (self
.has_skipped_results_
):
2835 out
.putVarInt32(self
.skipped_results_
)
2837 def TryMerge(self
, d
):
2838 while d
.avail() > 0:
2839 tt
= d
.getVarInt32()
2841 self
.set_entity_result_type(d
.getVarInt32())
2844 length
= d
.getVarInt32()
2845 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
2847 self
.add_entity_result().TryMerge(tmp
)
2850 self
.set_end_cursor(d
.getPrefixedString())
2853 self
.set_more_results(d
.getVarInt32())
2856 self
.set_skipped_results(d
.getVarInt32())
2860 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
2864 def __str__(self
, prefix
="", printElemNumber
=0):
2866 if self
.has_entity_result_type_
: res
+=prefix
+("entity_result_type: %s\n" % self
.DebugFormatInt32(self
.entity_result_type_
))
2868 for e
in self
.entity_result_
:
2870 if printElemNumber
: elm
="(%d)" % cnt
2871 res
+=prefix
+("entity_result%s <\n" % elm
)
2872 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
2875 if self
.has_end_cursor_
: res
+=prefix
+("end_cursor: %s\n" % self
.DebugFormatString(self
.end_cursor_
))
2876 if self
.has_more_results_
: res
+=prefix
+("more_results: %s\n" % self
.DebugFormatInt32(self
.more_results_
))
2877 if self
.has_skipped_results_
: res
+=prefix
+("skipped_results: %s\n" % self
.DebugFormatInt32(self
.skipped_results_
))
2881 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
2882 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
2884 kentity_result_type
= 1
2888 kskipped_results
= 6
2890 _TEXT
= _BuildTagLookupTable({
2892 1: "entity_result_type",
2896 6: "skipped_results",
2899 _TYPES
= _BuildTagLookupTable({
2900 0: ProtocolBuffer
.Encoder
.NUMERIC
,
2901 1: ProtocolBuffer
.Encoder
.NUMERIC
,
2902 2: ProtocolBuffer
.Encoder
.STRING
,
2903 4: ProtocolBuffer
.Encoder
.STRING
,
2904 5: ProtocolBuffer
.Encoder
.NUMERIC
,
2905 6: ProtocolBuffer
.Encoder
.NUMERIC
,
2906 }, 6, ProtocolBuffer
.Encoder
.MAX_TYPE
)
2910 _STYLE_CONTENT_TYPE
= """"""
2911 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.QueryResultBatch'
2912 _SERIALIZED_DESCRIPTOR
= array
.array('B')
2913 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlF1ZXJ5UmVzdWx0QmF0Y2gTGhJlbnRpdHlfcmVzdWx0X3R5cGUgASgAMAU4AhQTGg1lbnRpdHlfcmVzdWx0IAIoAjALOANKJGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eVJlc3VsdKMBqgEFY3R5cGWyAQZwcm90bzKkARQTGgplbmRfY3Vyc29yIAQoAjAJOAEUExoMbW9yZV9yZXN1bHRzIAUoADAFOAJoABQTGg9za2lwcGVkX3Jlc3VsdHMgBigAMAU4AUIBMKMBqgEHZGVmYXVsdLIBATCkARRzeg9Nb3JlUmVzdWx0c1R5cGWLAZIBDE5PVF9GSU5JU0hFRJgBAYwBiwGSARhNT1JFX1JFU1VMVFNfQUZURVJfTElNSVSYAQKMAYsBkgEPTk9fTU9SRV9SRVNVTFRTmAEDjAF0wgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
2914 if _net_proto___parse__python
is not None:
2915 _net_proto___parse__python
.RegisterType(
2916 _SERIALIZED_DESCRIPTOR
.tostring())
2918 class Mutation(ProtocolBuffer
.ProtocolMessage
):
2922 def __init__(self
, contents
=None):
2926 self
.insert_auto_id_
= []
2928 if contents
is not None: self
.MergeFromString(contents
)
2930 def upsert_size(self
): return len(self
.upsert_
)
2931 def upsert_list(self
): return self
.upsert_
2933 def upsert(self
, i
):
2934 return self
.upsert_
[i
]
2936 def mutable_upsert(self
, i
):
2937 return self
.upsert_
[i
]
2939 def add_upsert(self
):
2940 x
= google
.appengine
.datastore
.entity_v4_pb
.Entity()
2941 self
.upsert_
.append(x
)
2944 def clear_upsert(self
):
2946 def update_size(self
): return len(self
.update_
)
2947 def update_list(self
): return self
.update_
2949 def update(self
, i
):
2950 return self
.update_
[i
]
2952 def mutable_update(self
, i
):
2953 return self
.update_
[i
]
2955 def add_update(self
):
2956 x
= google
.appengine
.datastore
.entity_v4_pb
.Entity()
2957 self
.update_
.append(x
)
2960 def clear_update(self
):
2962 def insert_size(self
): return len(self
.insert_
)
2963 def insert_list(self
): return self
.insert_
2965 def insert(self
, i
):
2966 return self
.insert_
[i
]
2968 def mutable_insert(self
, i
):
2969 return self
.insert_
[i
]
2971 def add_insert(self
):
2972 x
= google
.appengine
.datastore
.entity_v4_pb
.Entity()
2973 self
.insert_
.append(x
)
2976 def clear_insert(self
):
2978 def insert_auto_id_size(self
): return len(self
.insert_auto_id_
)
2979 def insert_auto_id_list(self
): return self
.insert_auto_id_
2981 def insert_auto_id(self
, i
):
2982 return self
.insert_auto_id_
[i
]
2984 def mutable_insert_auto_id(self
, i
):
2985 return self
.insert_auto_id_
[i
]
2987 def add_insert_auto_id(self
):
2988 x
= google
.appengine
.datastore
.entity_v4_pb
.Entity()
2989 self
.insert_auto_id_
.append(x
)
2992 def clear_insert_auto_id(self
):
2993 self
.insert_auto_id_
= []
2994 def delete_size(self
): return len(self
.delete_
)
2995 def delete_list(self
): return self
.delete_
2997 def delete(self
, i
):
2998 return self
.delete_
[i
]
3000 def mutable_delete(self
, i
):
3001 return self
.delete_
[i
]
3003 def add_delete(self
):
3004 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
3005 self
.delete_
.append(x
)
3008 def clear_delete(self
):
3010 def force(self
): return self
.force_
3012 def set_force(self
, x
):
3016 def clear_force(self
):
3021 def has_force(self
): return self
.has_force_
3024 def MergeFrom(self
, x
):
3025 assert x
is not self
3026 for i
in xrange(x
.upsert_size()): self
.add_upsert().CopyFrom(x
.upsert(i
))
3027 for i
in xrange(x
.update_size()): self
.add_update().CopyFrom(x
.update(i
))
3028 for i
in xrange(x
.insert_size()): self
.add_insert().CopyFrom(x
.insert(i
))
3029 for i
in xrange(x
.insert_auto_id_size()): self
.add_insert_auto_id().CopyFrom(x
.insert_auto_id(i
))
3030 for i
in xrange(x
.delete_size()): self
.add_delete().CopyFrom(x
.delete(i
))
3031 if (x
.has_force()): self
.set_force(x
.force())
3033 if _net_proto___parse__python
is not None:
3034 def _CMergeFromString(self
, s
):
3035 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.Mutation', s
)
3037 if _net_proto___parse__python
is not None:
3039 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.Mutation')
3041 if _net_proto___parse__python
is not None:
3042 def _CEncodePartial(self
):
3043 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.Mutation')
3045 if _net_proto___parse__python
is not None:
3046 def _CToASCII(self
, output_format
):
3047 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.Mutation', output_format
)
3050 if _net_proto___parse__python
is not None:
3051 def ParseASCII(self
, s
):
3052 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.Mutation', s
)
3055 if _net_proto___parse__python
is not None:
3056 def ParseASCIIIgnoreUnknown(self
, s
):
3057 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.Mutation', s
)
3060 def Equals(self
, x
):
3061 if x
is self
: return 1
3062 if len(self
.upsert_
) != len(x
.upsert_
): return 0
3063 for e1
, e2
in zip(self
.upsert_
, x
.upsert_
):
3064 if e1
!= e2
: return 0
3065 if len(self
.update_
) != len(x
.update_
): return 0
3066 for e1
, e2
in zip(self
.update_
, x
.update_
):
3067 if e1
!= e2
: return 0
3068 if len(self
.insert_
) != len(x
.insert_
): return 0
3069 for e1
, e2
in zip(self
.insert_
, x
.insert_
):
3070 if e1
!= e2
: return 0
3071 if len(self
.insert_auto_id_
) != len(x
.insert_auto_id_
): return 0
3072 for e1
, e2
in zip(self
.insert_auto_id_
, x
.insert_auto_id_
):
3073 if e1
!= e2
: return 0
3074 if len(self
.delete_
) != len(x
.delete_
): return 0
3075 for e1
, e2
in zip(self
.delete_
, x
.delete_
):
3076 if e1
!= e2
: return 0
3077 if self
.has_force_
!= x
.has_force_
: return 0
3078 if self
.has_force_
and self
.force_
!= x
.force_
: return 0
3081 def IsInitialized(self
, debug_strs
=None):
3083 for p
in self
.upsert_
:
3084 if not p
.IsInitialized(debug_strs
): initialized
=0
3085 for p
in self
.update_
:
3086 if not p
.IsInitialized(debug_strs
): initialized
=0
3087 for p
in self
.insert_
:
3088 if not p
.IsInitialized(debug_strs
): initialized
=0
3089 for p
in self
.insert_auto_id_
:
3090 if not p
.IsInitialized(debug_strs
): initialized
=0
3091 for p
in self
.delete_
:
3092 if not p
.IsInitialized(debug_strs
): initialized
=0
3097 n
+= 1 * len(self
.upsert_
)
3098 for i
in xrange(len(self
.upsert_
)): n
+= self
.lengthString(self
.upsert_
[i
].ByteSize())
3099 n
+= 1 * len(self
.update_
)
3100 for i
in xrange(len(self
.update_
)): n
+= self
.lengthString(self
.update_
[i
].ByteSize())
3101 n
+= 1 * len(self
.insert_
)
3102 for i
in xrange(len(self
.insert_
)): n
+= self
.lengthString(self
.insert_
[i
].ByteSize())
3103 n
+= 1 * len(self
.insert_auto_id_
)
3104 for i
in xrange(len(self
.insert_auto_id_
)): n
+= self
.lengthString(self
.insert_auto_id_
[i
].ByteSize())
3105 n
+= 1 * len(self
.delete_
)
3106 for i
in xrange(len(self
.delete_
)): n
+= self
.lengthString(self
.delete_
[i
].ByteSize())
3107 if (self
.has_force_
): n
+= 2
3110 def ByteSizePartial(self
):
3112 n
+= 1 * len(self
.upsert_
)
3113 for i
in xrange(len(self
.upsert_
)): n
+= self
.lengthString(self
.upsert_
[i
].ByteSizePartial())
3114 n
+= 1 * len(self
.update_
)
3115 for i
in xrange(len(self
.update_
)): n
+= self
.lengthString(self
.update_
[i
].ByteSizePartial())
3116 n
+= 1 * len(self
.insert_
)
3117 for i
in xrange(len(self
.insert_
)): n
+= self
.lengthString(self
.insert_
[i
].ByteSizePartial())
3118 n
+= 1 * len(self
.insert_auto_id_
)
3119 for i
in xrange(len(self
.insert_auto_id_
)): n
+= self
.lengthString(self
.insert_auto_id_
[i
].ByteSizePartial())
3120 n
+= 1 * len(self
.delete_
)
3121 for i
in xrange(len(self
.delete_
)): n
+= self
.lengthString(self
.delete_
[i
].ByteSizePartial())
3122 if (self
.has_force_
): n
+= 2
3129 self
.clear_insert_auto_id()
3133 def OutputUnchecked(self
, out
):
3134 for i
in xrange(len(self
.upsert_
)):
3136 out
.putVarInt32(self
.upsert_
[i
].ByteSize())
3137 self
.upsert_
[i
].OutputUnchecked(out
)
3138 for i
in xrange(len(self
.update_
)):
3140 out
.putVarInt32(self
.update_
[i
].ByteSize())
3141 self
.update_
[i
].OutputUnchecked(out
)
3142 for i
in xrange(len(self
.insert_
)):
3144 out
.putVarInt32(self
.insert_
[i
].ByteSize())
3145 self
.insert_
[i
].OutputUnchecked(out
)
3146 for i
in xrange(len(self
.insert_auto_id_
)):
3148 out
.putVarInt32(self
.insert_auto_id_
[i
].ByteSize())
3149 self
.insert_auto_id_
[i
].OutputUnchecked(out
)
3150 for i
in xrange(len(self
.delete_
)):
3152 out
.putVarInt32(self
.delete_
[i
].ByteSize())
3153 self
.delete_
[i
].OutputUnchecked(out
)
3154 if (self
.has_force_
):
3156 out
.putBoolean(self
.force_
)
3158 def OutputPartial(self
, out
):
3159 for i
in xrange(len(self
.upsert_
)):
3161 out
.putVarInt32(self
.upsert_
[i
].ByteSizePartial())
3162 self
.upsert_
[i
].OutputPartial(out
)
3163 for i
in xrange(len(self
.update_
)):
3165 out
.putVarInt32(self
.update_
[i
].ByteSizePartial())
3166 self
.update_
[i
].OutputPartial(out
)
3167 for i
in xrange(len(self
.insert_
)):
3169 out
.putVarInt32(self
.insert_
[i
].ByteSizePartial())
3170 self
.insert_
[i
].OutputPartial(out
)
3171 for i
in xrange(len(self
.insert_auto_id_
)):
3173 out
.putVarInt32(self
.insert_auto_id_
[i
].ByteSizePartial())
3174 self
.insert_auto_id_
[i
].OutputPartial(out
)
3175 for i
in xrange(len(self
.delete_
)):
3177 out
.putVarInt32(self
.delete_
[i
].ByteSizePartial())
3178 self
.delete_
[i
].OutputPartial(out
)
3179 if (self
.has_force_
):
3181 out
.putBoolean(self
.force_
)
3183 def TryMerge(self
, d
):
3184 while d
.avail() > 0:
3185 tt
= d
.getVarInt32()
3187 length
= d
.getVarInt32()
3188 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3190 self
.add_upsert().TryMerge(tmp
)
3193 length
= d
.getVarInt32()
3194 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3196 self
.add_update().TryMerge(tmp
)
3199 length
= d
.getVarInt32()
3200 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3202 self
.add_insert().TryMerge(tmp
)
3205 length
= d
.getVarInt32()
3206 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3208 self
.add_insert_auto_id().TryMerge(tmp
)
3211 length
= d
.getVarInt32()
3212 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3214 self
.add_delete().TryMerge(tmp
)
3217 self
.set_force(d
.getBoolean())
3221 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
3225 def __str__(self
, prefix
="", printElemNumber
=0):
3228 for e
in self
.upsert_
:
3230 if printElemNumber
: elm
="(%d)" % cnt
3231 res
+=prefix
+("upsert%s <\n" % elm
)
3232 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3236 for e
in self
.update_
:
3238 if printElemNumber
: elm
="(%d)" % cnt
3239 res
+=prefix
+("update%s <\n" % elm
)
3240 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3244 for e
in self
.insert_
:
3246 if printElemNumber
: elm
="(%d)" % cnt
3247 res
+=prefix
+("insert%s <\n" % elm
)
3248 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3252 for e
in self
.insert_auto_id_
:
3254 if printElemNumber
: elm
="(%d)" % cnt
3255 res
+=prefix
+("insert_auto_id%s <\n" % elm
)
3256 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3260 for e
in self
.delete_
:
3262 if printElemNumber
: elm
="(%d)" % cnt
3263 res
+=prefix
+("delete%s <\n" % elm
)
3264 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3267 if self
.has_force_
: res
+=prefix
+("force: %s\n" % self
.DebugFormatBool(self
.force_
))
3271 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
3272 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
3281 _TEXT
= _BuildTagLookupTable({
3286 4: "insert_auto_id",
3291 _TYPES
= _BuildTagLookupTable({
3292 0: ProtocolBuffer
.Encoder
.NUMERIC
,
3293 1: ProtocolBuffer
.Encoder
.STRING
,
3294 2: ProtocolBuffer
.Encoder
.STRING
,
3295 3: ProtocolBuffer
.Encoder
.STRING
,
3296 4: ProtocolBuffer
.Encoder
.STRING
,
3297 5: ProtocolBuffer
.Encoder
.STRING
,
3298 6: ProtocolBuffer
.Encoder
.NUMERIC
,
3299 }, 6, ProtocolBuffer
.Encoder
.MAX_TYPE
)
3303 _STYLE_CONTENT_TYPE
= """"""
3304 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.Mutation'
3305 _SERIALIZED_DESCRIPTOR
= array
.array('B')
3306 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KIGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lk11dGF0aW9uExoGdXBzZXJ0IAEoAjALOANKHmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVudGl0eaMBqgEFY3R5cGWyAQZwcm90bzKkARQTGgZ1cGRhdGUgAigCMAs4A0oeYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5owGqAQVjdHlwZbIBBnByb3RvMqQBFBMaBmluc2VydCADKAIwCzgDSh5hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FbnRpdHmjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoOaW5zZXJ0X2F1dG9faWQgBCgCMAs4A0oeYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5owGqAQVjdHlwZbIBBnByb3RvMqQBFBMaBmRlbGV0ZSAFKAIwCzgDShthcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LZXmjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoFZm9yY2UgBigAMAg4ARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
3307 if _net_proto___parse__python
is not None:
3308 _net_proto___parse__python
.RegisterType(
3309 _SERIALIZED_DESCRIPTOR
.tostring())
3311 class MutationResult(ProtocolBuffer
.ProtocolMessage
):
3312 has_index_updates_
= 0
3315 def __init__(self
, contents
=None):
3316 self
.insert_auto_id_key_
= []
3317 self
.upsert_version_
= []
3318 self
.update_version_
= []
3319 self
.insert_version_
= []
3320 self
.insert_auto_id_version_
= []
3321 self
.delete_version_
= []
3322 if contents
is not None: self
.MergeFromString(contents
)
3324 def index_updates(self
): return self
.index_updates_
3326 def set_index_updates(self
, x
):
3327 self
.has_index_updates_
= 1
3328 self
.index_updates_
= x
3330 def clear_index_updates(self
):
3331 if self
.has_index_updates_
:
3332 self
.has_index_updates_
= 0
3333 self
.index_updates_
= 0
3335 def has_index_updates(self
): return self
.has_index_updates_
3337 def insert_auto_id_key_size(self
): return len(self
.insert_auto_id_key_
)
3338 def insert_auto_id_key_list(self
): return self
.insert_auto_id_key_
3340 def insert_auto_id_key(self
, i
):
3341 return self
.insert_auto_id_key_
[i
]
3343 def mutable_insert_auto_id_key(self
, i
):
3344 return self
.insert_auto_id_key_
[i
]
3346 def add_insert_auto_id_key(self
):
3347 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
3348 self
.insert_auto_id_key_
.append(x
)
3351 def clear_insert_auto_id_key(self
):
3352 self
.insert_auto_id_key_
= []
3353 def upsert_version_size(self
): return len(self
.upsert_version_
)
3354 def upsert_version_list(self
): return self
.upsert_version_
3356 def upsert_version(self
, i
):
3357 return self
.upsert_version_
[i
]
3359 def set_upsert_version(self
, i
, x
):
3360 self
.upsert_version_
[i
] = x
3362 def add_upsert_version(self
, x
):
3363 self
.upsert_version_
.append(x
)
3365 def clear_upsert_version(self
):
3366 self
.upsert_version_
= []
3368 def update_version_size(self
): return len(self
.update_version_
)
3369 def update_version_list(self
): return self
.update_version_
3371 def update_version(self
, i
):
3372 return self
.update_version_
[i
]
3374 def set_update_version(self
, i
, x
):
3375 self
.update_version_
[i
] = x
3377 def add_update_version(self
, x
):
3378 self
.update_version_
.append(x
)
3380 def clear_update_version(self
):
3381 self
.update_version_
= []
3383 def insert_version_size(self
): return len(self
.insert_version_
)
3384 def insert_version_list(self
): return self
.insert_version_
3386 def insert_version(self
, i
):
3387 return self
.insert_version_
[i
]
3389 def set_insert_version(self
, i
, x
):
3390 self
.insert_version_
[i
] = x
3392 def add_insert_version(self
, x
):
3393 self
.insert_version_
.append(x
)
3395 def clear_insert_version(self
):
3396 self
.insert_version_
= []
3398 def insert_auto_id_version_size(self
): return len(self
.insert_auto_id_version_
)
3399 def insert_auto_id_version_list(self
): return self
.insert_auto_id_version_
3401 def insert_auto_id_version(self
, i
):
3402 return self
.insert_auto_id_version_
[i
]
3404 def set_insert_auto_id_version(self
, i
, x
):
3405 self
.insert_auto_id_version_
[i
] = x
3407 def add_insert_auto_id_version(self
, x
):
3408 self
.insert_auto_id_version_
.append(x
)
3410 def clear_insert_auto_id_version(self
):
3411 self
.insert_auto_id_version_
= []
3413 def delete_version_size(self
): return len(self
.delete_version_
)
3414 def delete_version_list(self
): return self
.delete_version_
3416 def delete_version(self
, i
):
3417 return self
.delete_version_
[i
]
3419 def set_delete_version(self
, i
, x
):
3420 self
.delete_version_
[i
] = x
3422 def add_delete_version(self
, x
):
3423 self
.delete_version_
.append(x
)
3425 def clear_delete_version(self
):
3426 self
.delete_version_
= []
3429 def MergeFrom(self
, x
):
3430 assert x
is not self
3431 if (x
.has_index_updates()): self
.set_index_updates(x
.index_updates())
3432 for i
in xrange(x
.insert_auto_id_key_size()): self
.add_insert_auto_id_key().CopyFrom(x
.insert_auto_id_key(i
))
3433 for i
in xrange(x
.upsert_version_size()): self
.add_upsert_version(x
.upsert_version(i
))
3434 for i
in xrange(x
.update_version_size()): self
.add_update_version(x
.update_version(i
))
3435 for i
in xrange(x
.insert_version_size()): self
.add_insert_version(x
.insert_version(i
))
3436 for i
in xrange(x
.insert_auto_id_version_size()): self
.add_insert_auto_id_version(x
.insert_auto_id_version(i
))
3437 for i
in xrange(x
.delete_version_size()): self
.add_delete_version(x
.delete_version(i
))
3439 if _net_proto___parse__python
is not None:
3440 def _CMergeFromString(self
, s
):
3441 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.MutationResult', s
)
3443 if _net_proto___parse__python
is not None:
3445 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.MutationResult')
3447 if _net_proto___parse__python
is not None:
3448 def _CEncodePartial(self
):
3449 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.MutationResult')
3451 if _net_proto___parse__python
is not None:
3452 def _CToASCII(self
, output_format
):
3453 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.MutationResult', output_format
)
3456 if _net_proto___parse__python
is not None:
3457 def ParseASCII(self
, s
):
3458 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.MutationResult', s
)
3461 if _net_proto___parse__python
is not None:
3462 def ParseASCIIIgnoreUnknown(self
, s
):
3463 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.MutationResult', s
)
3466 def Equals(self
, x
):
3467 if x
is self
: return 1
3468 if self
.has_index_updates_
!= x
.has_index_updates_
: return 0
3469 if self
.has_index_updates_
and self
.index_updates_
!= x
.index_updates_
: return 0
3470 if len(self
.insert_auto_id_key_
) != len(x
.insert_auto_id_key_
): return 0
3471 for e1
, e2
in zip(self
.insert_auto_id_key_
, x
.insert_auto_id_key_
):
3472 if e1
!= e2
: return 0
3473 if len(self
.upsert_version_
) != len(x
.upsert_version_
): return 0
3474 for e1
, e2
in zip(self
.upsert_version_
, x
.upsert_version_
):
3475 if e1
!= e2
: return 0
3476 if len(self
.update_version_
) != len(x
.update_version_
): return 0
3477 for e1
, e2
in zip(self
.update_version_
, x
.update_version_
):
3478 if e1
!= e2
: return 0
3479 if len(self
.insert_version_
) != len(x
.insert_version_
): return 0
3480 for e1
, e2
in zip(self
.insert_version_
, x
.insert_version_
):
3481 if e1
!= e2
: return 0
3482 if len(self
.insert_auto_id_version_
) != len(x
.insert_auto_id_version_
): return 0
3483 for e1
, e2
in zip(self
.insert_auto_id_version_
, x
.insert_auto_id_version_
):
3484 if e1
!= e2
: return 0
3485 if len(self
.delete_version_
) != len(x
.delete_version_
): return 0
3486 for e1
, e2
in zip(self
.delete_version_
, x
.delete_version_
):
3487 if e1
!= e2
: return 0
3490 def IsInitialized(self
, debug_strs
=None):
3492 if (not self
.has_index_updates_
):
3494 if debug_strs
is not None:
3495 debug_strs
.append('Required field: index_updates not set.')
3496 for p
in self
.insert_auto_id_key_
:
3497 if not p
.IsInitialized(debug_strs
): initialized
=0
3502 n
+= self
.lengthVarInt64(self
.index_updates_
)
3503 n
+= 1 * len(self
.insert_auto_id_key_
)
3504 for i
in xrange(len(self
.insert_auto_id_key_
)): n
+= self
.lengthString(self
.insert_auto_id_key_
[i
].ByteSize())
3505 n
+= 1 * len(self
.upsert_version_
)
3506 for i
in xrange(len(self
.upsert_version_
)): n
+= self
.lengthVarInt64(self
.upsert_version_
[i
])
3507 n
+= 1 * len(self
.update_version_
)
3508 for i
in xrange(len(self
.update_version_
)): n
+= self
.lengthVarInt64(self
.update_version_
[i
])
3509 n
+= 1 * len(self
.insert_version_
)
3510 for i
in xrange(len(self
.insert_version_
)): n
+= self
.lengthVarInt64(self
.insert_version_
[i
])
3511 n
+= 1 * len(self
.insert_auto_id_version_
)
3512 for i
in xrange(len(self
.insert_auto_id_version_
)): n
+= self
.lengthVarInt64(self
.insert_auto_id_version_
[i
])
3513 n
+= 1 * len(self
.delete_version_
)
3514 for i
in xrange(len(self
.delete_version_
)): n
+= self
.lengthVarInt64(self
.delete_version_
[i
])
3517 def ByteSizePartial(self
):
3519 if (self
.has_index_updates_
):
3521 n
+= self
.lengthVarInt64(self
.index_updates_
)
3522 n
+= 1 * len(self
.insert_auto_id_key_
)
3523 for i
in xrange(len(self
.insert_auto_id_key_
)): n
+= self
.lengthString(self
.insert_auto_id_key_
[i
].ByteSizePartial())
3524 n
+= 1 * len(self
.upsert_version_
)
3525 for i
in xrange(len(self
.upsert_version_
)): n
+= self
.lengthVarInt64(self
.upsert_version_
[i
])
3526 n
+= 1 * len(self
.update_version_
)
3527 for i
in xrange(len(self
.update_version_
)): n
+= self
.lengthVarInt64(self
.update_version_
[i
])
3528 n
+= 1 * len(self
.insert_version_
)
3529 for i
in xrange(len(self
.insert_version_
)): n
+= self
.lengthVarInt64(self
.insert_version_
[i
])
3530 n
+= 1 * len(self
.insert_auto_id_version_
)
3531 for i
in xrange(len(self
.insert_auto_id_version_
)): n
+= self
.lengthVarInt64(self
.insert_auto_id_version_
[i
])
3532 n
+= 1 * len(self
.delete_version_
)
3533 for i
in xrange(len(self
.delete_version_
)): n
+= self
.lengthVarInt64(self
.delete_version_
[i
])
3537 self
.clear_index_updates()
3538 self
.clear_insert_auto_id_key()
3539 self
.clear_upsert_version()
3540 self
.clear_update_version()
3541 self
.clear_insert_version()
3542 self
.clear_insert_auto_id_version()
3543 self
.clear_delete_version()
3545 def OutputUnchecked(self
, out
):
3547 out
.putVarInt32(self
.index_updates_
)
3548 for i
in xrange(len(self
.insert_auto_id_key_
)):
3550 out
.putVarInt32(self
.insert_auto_id_key_
[i
].ByteSize())
3551 self
.insert_auto_id_key_
[i
].OutputUnchecked(out
)
3552 for i
in xrange(len(self
.upsert_version_
)):
3554 out
.putVarInt64(self
.upsert_version_
[i
])
3555 for i
in xrange(len(self
.update_version_
)):
3557 out
.putVarInt64(self
.update_version_
[i
])
3558 for i
in xrange(len(self
.insert_version_
)):
3560 out
.putVarInt64(self
.insert_version_
[i
])
3561 for i
in xrange(len(self
.insert_auto_id_version_
)):
3563 out
.putVarInt64(self
.insert_auto_id_version_
[i
])
3564 for i
in xrange(len(self
.delete_version_
)):
3566 out
.putVarInt64(self
.delete_version_
[i
])
3568 def OutputPartial(self
, out
):
3569 if (self
.has_index_updates_
):
3571 out
.putVarInt32(self
.index_updates_
)
3572 for i
in xrange(len(self
.insert_auto_id_key_
)):
3574 out
.putVarInt32(self
.insert_auto_id_key_
[i
].ByteSizePartial())
3575 self
.insert_auto_id_key_
[i
].OutputPartial(out
)
3576 for i
in xrange(len(self
.upsert_version_
)):
3578 out
.putVarInt64(self
.upsert_version_
[i
])
3579 for i
in xrange(len(self
.update_version_
)):
3581 out
.putVarInt64(self
.update_version_
[i
])
3582 for i
in xrange(len(self
.insert_version_
)):
3584 out
.putVarInt64(self
.insert_version_
[i
])
3585 for i
in xrange(len(self
.insert_auto_id_version_
)):
3587 out
.putVarInt64(self
.insert_auto_id_version_
[i
])
3588 for i
in xrange(len(self
.delete_version_
)):
3590 out
.putVarInt64(self
.delete_version_
[i
])
3592 def TryMerge(self
, d
):
3593 while d
.avail() > 0:
3594 tt
= d
.getVarInt32()
3596 self
.set_index_updates(d
.getVarInt32())
3599 length
= d
.getVarInt32()
3600 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
3602 self
.add_insert_auto_id_key().TryMerge(tmp
)
3605 self
.add_upsert_version(d
.getVarInt64())
3608 self
.add_update_version(d
.getVarInt64())
3611 self
.add_insert_version(d
.getVarInt64())
3614 self
.add_insert_auto_id_version(d
.getVarInt64())
3617 self
.add_delete_version(d
.getVarInt64())
3621 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
3625 def __str__(self
, prefix
="", printElemNumber
=0):
3627 if self
.has_index_updates_
: res
+=prefix
+("index_updates: %s\n" % self
.DebugFormatInt32(self
.index_updates_
))
3629 for e
in self
.insert_auto_id_key_
:
3631 if printElemNumber
: elm
="(%d)" % cnt
3632 res
+=prefix
+("insert_auto_id_key%s <\n" % elm
)
3633 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
3637 for e
in self
.upsert_version_
:
3639 if printElemNumber
: elm
="(%d)" % cnt
3640 res
+=prefix
+("upsert_version%s: %s\n" % (elm
, self
.DebugFormatInt64(e
)))
3643 for e
in self
.update_version_
:
3645 if printElemNumber
: elm
="(%d)" % cnt
3646 res
+=prefix
+("update_version%s: %s\n" % (elm
, self
.DebugFormatInt64(e
)))
3649 for e
in self
.insert_version_
:
3651 if printElemNumber
: elm
="(%d)" % cnt
3652 res
+=prefix
+("insert_version%s: %s\n" % (elm
, self
.DebugFormatInt64(e
)))
3655 for e
in self
.insert_auto_id_version_
:
3657 if printElemNumber
: elm
="(%d)" % cnt
3658 res
+=prefix
+("insert_auto_id_version%s: %s\n" % (elm
, self
.DebugFormatInt64(e
)))
3661 for e
in self
.delete_version_
:
3663 if printElemNumber
: elm
="(%d)" % cnt
3664 res
+=prefix
+("delete_version%s: %s\n" % (elm
, self
.DebugFormatInt64(e
)))
3669 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
3670 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
3673 kinsert_auto_id_key
= 2
3677 kinsert_auto_id_version
= 6
3680 _TEXT
= _BuildTagLookupTable({
3683 2: "insert_auto_id_key",
3684 3: "upsert_version",
3685 4: "update_version",
3686 5: "insert_version",
3687 6: "insert_auto_id_version",
3688 7: "delete_version",
3691 _TYPES
= _BuildTagLookupTable({
3692 0: ProtocolBuffer
.Encoder
.NUMERIC
,
3693 1: ProtocolBuffer
.Encoder
.NUMERIC
,
3694 2: ProtocolBuffer
.Encoder
.STRING
,
3695 3: ProtocolBuffer
.Encoder
.NUMERIC
,
3696 4: ProtocolBuffer
.Encoder
.NUMERIC
,
3697 5: ProtocolBuffer
.Encoder
.NUMERIC
,
3698 6: ProtocolBuffer
.Encoder
.NUMERIC
,
3699 7: ProtocolBuffer
.Encoder
.NUMERIC
,
3700 }, 7, ProtocolBuffer
.Encoder
.MAX_TYPE
)
3704 _STYLE_CONTENT_TYPE
= """"""
3705 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.MutationResult'
3706 _SERIALIZED_DESCRIPTOR
= array
.array('B')
3707 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lk11dGF0aW9uUmVzdWx0ExoNaW5kZXhfdXBkYXRlcyABKAAwBTgCFBMaEmluc2VydF9hdXRvX2lkX2tleSACKAIwCzgDShthcHBob3N0aW5nLmRhdGFzdG9yZS52NC5LZXmjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoOdXBzZXJ0X3ZlcnNpb24gAygAMAM4AxQTGg51cGRhdGVfdmVyc2lvbiAEKAAwAzgDFBMaDmluc2VydF92ZXJzaW9uIAUoADADOAMUExoWaW5zZXJ0X2F1dG9faWRfdmVyc2lvbiAGKAAwAzgDFBMaDmRlbGV0ZV92ZXJzaW9uIAcoADADOAMUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
3708 if _net_proto___parse__python
is not None:
3709 _net_proto___parse__python
.RegisterType(
3710 _SERIALIZED_DESCRIPTOR
.tostring())
3712 class ReadOptions(ProtocolBuffer
.ProtocolMessage
):
3719 _ReadConsistency_NAMES
= {
3725 def ReadConsistency_Name(cls
, x
): return cls
._ReadConsistency
_NAMES
.get(x
, "")
3726 ReadConsistency_Name
= classmethod(ReadConsistency_Name
)
3728 has_read_consistency_
= 0
3729 read_consistency_
= 0
3730 has_transaction_
= 0
3733 def __init__(self
, contents
=None):
3734 if contents
is not None: self
.MergeFromString(contents
)
3736 def read_consistency(self
): return self
.read_consistency_
3738 def set_read_consistency(self
, x
):
3739 self
.has_read_consistency_
= 1
3740 self
.read_consistency_
= x
3742 def clear_read_consistency(self
):
3743 if self
.has_read_consistency_
:
3744 self
.has_read_consistency_
= 0
3745 self
.read_consistency_
= 0
3747 def has_read_consistency(self
): return self
.has_read_consistency_
3749 def transaction(self
): return self
.transaction_
3751 def set_transaction(self
, x
):
3752 self
.has_transaction_
= 1
3753 self
.transaction_
= x
3755 def clear_transaction(self
):
3756 if self
.has_transaction_
:
3757 self
.has_transaction_
= 0
3758 self
.transaction_
= ""
3760 def has_transaction(self
): return self
.has_transaction_
3763 def MergeFrom(self
, x
):
3764 assert x
is not self
3765 if (x
.has_read_consistency()): self
.set_read_consistency(x
.read_consistency())
3766 if (x
.has_transaction()): self
.set_transaction(x
.transaction())
3768 if _net_proto___parse__python
is not None:
3769 def _CMergeFromString(self
, s
):
3770 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.ReadOptions', s
)
3772 if _net_proto___parse__python
is not None:
3774 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.ReadOptions')
3776 if _net_proto___parse__python
is not None:
3777 def _CEncodePartial(self
):
3778 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.ReadOptions')
3780 if _net_proto___parse__python
is not None:
3781 def _CToASCII(self
, output_format
):
3782 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.ReadOptions', output_format
)
3785 if _net_proto___parse__python
is not None:
3786 def ParseASCII(self
, s
):
3787 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.ReadOptions', s
)
3790 if _net_proto___parse__python
is not None:
3791 def ParseASCIIIgnoreUnknown(self
, s
):
3792 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.ReadOptions', s
)
3795 def Equals(self
, x
):
3796 if x
is self
: return 1
3797 if self
.has_read_consistency_
!= x
.has_read_consistency_
: return 0
3798 if self
.has_read_consistency_
and self
.read_consistency_
!= x
.read_consistency_
: return 0
3799 if self
.has_transaction_
!= x
.has_transaction_
: return 0
3800 if self
.has_transaction_
and self
.transaction_
!= x
.transaction_
: return 0
3803 def IsInitialized(self
, debug_strs
=None):
3809 if (self
.has_read_consistency_
): n
+= 1 + self
.lengthVarInt64(self
.read_consistency_
)
3810 if (self
.has_transaction_
): n
+= 1 + self
.lengthString(len(self
.transaction_
))
3813 def ByteSizePartial(self
):
3815 if (self
.has_read_consistency_
): n
+= 1 + self
.lengthVarInt64(self
.read_consistency_
)
3816 if (self
.has_transaction_
): n
+= 1 + self
.lengthString(len(self
.transaction_
))
3820 self
.clear_read_consistency()
3821 self
.clear_transaction()
3823 def OutputUnchecked(self
, out
):
3824 if (self
.has_read_consistency_
):
3826 out
.putVarInt32(self
.read_consistency_
)
3827 if (self
.has_transaction_
):
3829 out
.putPrefixedString(self
.transaction_
)
3831 def OutputPartial(self
, out
):
3832 if (self
.has_read_consistency_
):
3834 out
.putVarInt32(self
.read_consistency_
)
3835 if (self
.has_transaction_
):
3837 out
.putPrefixedString(self
.transaction_
)
3839 def TryMerge(self
, d
):
3840 while d
.avail() > 0:
3841 tt
= d
.getVarInt32()
3843 self
.set_read_consistency(d
.getVarInt32())
3846 self
.set_transaction(d
.getPrefixedString())
3850 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
3854 def __str__(self
, prefix
="", printElemNumber
=0):
3856 if self
.has_read_consistency_
: res
+=prefix
+("read_consistency: %s\n" % self
.DebugFormatInt32(self
.read_consistency_
))
3857 if self
.has_transaction_
: res
+=prefix
+("transaction: %s\n" % self
.DebugFormatString(self
.transaction_
))
3861 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
3862 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
3864 kread_consistency
= 1
3867 _TEXT
= _BuildTagLookupTable({
3869 1: "read_consistency",
3873 _TYPES
= _BuildTagLookupTable({
3874 0: ProtocolBuffer
.Encoder
.NUMERIC
,
3875 1: ProtocolBuffer
.Encoder
.NUMERIC
,
3876 2: ProtocolBuffer
.Encoder
.STRING
,
3877 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
3881 _STYLE_CONTENT_TYPE
= """"""
3882 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.ReadOptions'
3883 _SERIALIZED_DESCRIPTOR
= array
.array('B')
3884 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KI2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJlYWRPcHRpb25zExoQcmVhZF9jb25zaXN0ZW5jeSABKAAwBTgBQgEwaACjAaoBB2RlZmF1bHSyAQdERUZBVUxUpAEUExoLdHJhbnNhY3Rpb24gAigCMAk4ARRzeg9SZWFkQ29uc2lzdGVuY3mLAZIBB0RFRkFVTFSYAQCMAYsBkgEGU1RST05HmAEBjAGLAZIBCEVWRU5UVUFMmAECjAF0wgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
3885 if _net_proto___parse__python
is not None:
3886 _net_proto___parse__python
.RegisterType(
3887 _SERIALIZED_DESCRIPTOR
.tostring())
3889 class LookupRequest(ProtocolBuffer
.ProtocolMessage
):
3890 has_read_options_
= 0
3891 read_options_
= None
3893 def __init__(self
, contents
=None):
3895 self
.lazy_init_lock_
= thread
.allocate_lock()
3896 if contents
is not None: self
.MergeFromString(contents
)
3898 def read_options(self
):
3899 if self
.read_options_
is None:
3900 self
.lazy_init_lock_
.acquire()
3902 if self
.read_options_
is None: self
.read_options_
= ReadOptions()
3904 self
.lazy_init_lock_
.release()
3905 return self
.read_options_
3907 def mutable_read_options(self
): self
.has_read_options_
= 1; return self
.read_options()
3909 def clear_read_options(self
):
3911 if self
.has_read_options_
:
3912 self
.has_read_options_
= 0;
3913 if self
.read_options_
is not None: self
.read_options_
.Clear()
3915 def has_read_options(self
): return self
.has_read_options_
3917 def key_size(self
): return len(self
.key_
)
3918 def key_list(self
): return self
.key_
3923 def mutable_key(self
, i
):
3927 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
3931 def clear_key(self
):
3934 def MergeFrom(self
, x
):
3935 assert x
is not self
3936 if (x
.has_read_options()): self
.mutable_read_options().MergeFrom(x
.read_options())
3937 for i
in xrange(x
.key_size()): self
.add_key().CopyFrom(x
.key(i
))
3939 if _net_proto___parse__python
is not None:
3940 def _CMergeFromString(self
, s
):
3941 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.LookupRequest', s
)
3943 if _net_proto___parse__python
is not None:
3945 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.LookupRequest')
3947 if _net_proto___parse__python
is not None:
3948 def _CEncodePartial(self
):
3949 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.LookupRequest')
3951 if _net_proto___parse__python
is not None:
3952 def _CToASCII(self
, output_format
):
3953 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.LookupRequest', output_format
)
3956 if _net_proto___parse__python
is not None:
3957 def ParseASCII(self
, s
):
3958 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.LookupRequest', s
)
3961 if _net_proto___parse__python
is not None:
3962 def ParseASCIIIgnoreUnknown(self
, s
):
3963 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.LookupRequest', s
)
3966 def Equals(self
, x
):
3967 if x
is self
: return 1
3968 if self
.has_read_options_
!= x
.has_read_options_
: return 0
3969 if self
.has_read_options_
and self
.read_options_
!= x
.read_options_
: return 0
3970 if len(self
.key_
) != len(x
.key_
): return 0
3971 for e1
, e2
in zip(self
.key_
, x
.key_
):
3972 if e1
!= e2
: return 0
3975 def IsInitialized(self
, debug_strs
=None):
3977 if (self
.has_read_options_
and not self
.read_options_
.IsInitialized(debug_strs
)): initialized
= 0
3979 if not p
.IsInitialized(debug_strs
): initialized
=0
3984 if (self
.has_read_options_
): n
+= 1 + self
.lengthString(self
.read_options_
.ByteSize())
3985 n
+= 1 * len(self
.key_
)
3986 for i
in xrange(len(self
.key_
)): n
+= self
.lengthString(self
.key_
[i
].ByteSize())
3989 def ByteSizePartial(self
):
3991 if (self
.has_read_options_
): n
+= 1 + self
.lengthString(self
.read_options_
.ByteSizePartial())
3992 n
+= 1 * len(self
.key_
)
3993 for i
in xrange(len(self
.key_
)): n
+= self
.lengthString(self
.key_
[i
].ByteSizePartial())
3997 self
.clear_read_options()
4000 def OutputUnchecked(self
, out
):
4001 if (self
.has_read_options_
):
4003 out
.putVarInt32(self
.read_options_
.ByteSize())
4004 self
.read_options_
.OutputUnchecked(out
)
4005 for i
in xrange(len(self
.key_
)):
4007 out
.putVarInt32(self
.key_
[i
].ByteSize())
4008 self
.key_
[i
].OutputUnchecked(out
)
4010 def OutputPartial(self
, out
):
4011 if (self
.has_read_options_
):
4013 out
.putVarInt32(self
.read_options_
.ByteSizePartial())
4014 self
.read_options_
.OutputPartial(out
)
4015 for i
in xrange(len(self
.key_
)):
4017 out
.putVarInt32(self
.key_
[i
].ByteSizePartial())
4018 self
.key_
[i
].OutputPartial(out
)
4020 def TryMerge(self
, d
):
4021 while d
.avail() > 0:
4022 tt
= d
.getVarInt32()
4024 length
= d
.getVarInt32()
4025 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4027 self
.mutable_read_options().TryMerge(tmp
)
4030 length
= d
.getVarInt32()
4031 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4033 self
.add_key().TryMerge(tmp
)
4037 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
4041 def __str__(self
, prefix
="", printElemNumber
=0):
4043 if self
.has_read_options_
:
4044 res
+=prefix
+"read_options <\n"
4045 res
+=self
.read_options_
.__str
__(prefix
+ " ", printElemNumber
)
4050 if printElemNumber
: elm
="(%d)" % cnt
4051 res
+=prefix
+("key%s <\n" % elm
)
4052 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
4058 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
4059 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
4064 _TEXT
= _BuildTagLookupTable({
4070 _TYPES
= _BuildTagLookupTable({
4071 0: ProtocolBuffer
.Encoder
.NUMERIC
,
4072 1: ProtocolBuffer
.Encoder
.STRING
,
4073 3: ProtocolBuffer
.Encoder
.STRING
,
4074 }, 3, ProtocolBuffer
.Encoder
.MAX_TYPE
)
4078 _STYLE_CONTENT_TYPE
= """"""
4079 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.LookupRequest'
4080 _SERIALIZED_DESCRIPTOR
= array
.array('B')
4081 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lkxvb2t1cFJlcXVlc3QTGgxyZWFkX29wdGlvbnMgASgCMAs4AUojYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUmVhZE9wdGlvbnOjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoDa2V5IAMoAjALOANKG2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktleaMBqgEFY3R5cGWyAQZwcm90bzKkARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
4082 if _net_proto___parse__python
is not None:
4083 _net_proto___parse__python
.RegisterType(
4084 _SERIALIZED_DESCRIPTOR
.tostring())
4086 class LookupResponse(ProtocolBuffer
.ProtocolMessage
):
4088 def __init__(self
, contents
=None):
4092 if contents
is not None: self
.MergeFromString(contents
)
4094 def found_size(self
): return len(self
.found_
)
4095 def found_list(self
): return self
.found_
4098 return self
.found_
[i
]
4100 def mutable_found(self
, i
):
4101 return self
.found_
[i
]
4103 def add_found(self
):
4105 self
.found_
.append(x
)
4108 def clear_found(self
):
4110 def missing_size(self
): return len(self
.missing_
)
4111 def missing_list(self
): return self
.missing_
4113 def missing(self
, i
):
4114 return self
.missing_
[i
]
4116 def mutable_missing(self
, i
):
4117 return self
.missing_
[i
]
4119 def add_missing(self
):
4121 self
.missing_
.append(x
)
4124 def clear_missing(self
):
4126 def deferred_size(self
): return len(self
.deferred_
)
4127 def deferred_list(self
): return self
.deferred_
4129 def deferred(self
, i
):
4130 return self
.deferred_
[i
]
4132 def mutable_deferred(self
, i
):
4133 return self
.deferred_
[i
]
4135 def add_deferred(self
):
4136 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
4137 self
.deferred_
.append(x
)
4140 def clear_deferred(self
):
4143 def MergeFrom(self
, x
):
4144 assert x
is not self
4145 for i
in xrange(x
.found_size()): self
.add_found().CopyFrom(x
.found(i
))
4146 for i
in xrange(x
.missing_size()): self
.add_missing().CopyFrom(x
.missing(i
))
4147 for i
in xrange(x
.deferred_size()): self
.add_deferred().CopyFrom(x
.deferred(i
))
4149 if _net_proto___parse__python
is not None:
4150 def _CMergeFromString(self
, s
):
4151 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.LookupResponse', s
)
4153 if _net_proto___parse__python
is not None:
4155 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.LookupResponse')
4157 if _net_proto___parse__python
is not None:
4158 def _CEncodePartial(self
):
4159 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.LookupResponse')
4161 if _net_proto___parse__python
is not None:
4162 def _CToASCII(self
, output_format
):
4163 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.LookupResponse', output_format
)
4166 if _net_proto___parse__python
is not None:
4167 def ParseASCII(self
, s
):
4168 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.LookupResponse', s
)
4171 if _net_proto___parse__python
is not None:
4172 def ParseASCIIIgnoreUnknown(self
, s
):
4173 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.LookupResponse', s
)
4176 def Equals(self
, x
):
4177 if x
is self
: return 1
4178 if len(self
.found_
) != len(x
.found_
): return 0
4179 for e1
, e2
in zip(self
.found_
, x
.found_
):
4180 if e1
!= e2
: return 0
4181 if len(self
.missing_
) != len(x
.missing_
): return 0
4182 for e1
, e2
in zip(self
.missing_
, x
.missing_
):
4183 if e1
!= e2
: return 0
4184 if len(self
.deferred_
) != len(x
.deferred_
): return 0
4185 for e1
, e2
in zip(self
.deferred_
, x
.deferred_
):
4186 if e1
!= e2
: return 0
4189 def IsInitialized(self
, debug_strs
=None):
4191 for p
in self
.found_
:
4192 if not p
.IsInitialized(debug_strs
): initialized
=0
4193 for p
in self
.missing_
:
4194 if not p
.IsInitialized(debug_strs
): initialized
=0
4195 for p
in self
.deferred_
:
4196 if not p
.IsInitialized(debug_strs
): initialized
=0
4201 n
+= 1 * len(self
.found_
)
4202 for i
in xrange(len(self
.found_
)): n
+= self
.lengthString(self
.found_
[i
].ByteSize())
4203 n
+= 1 * len(self
.missing_
)
4204 for i
in xrange(len(self
.missing_
)): n
+= self
.lengthString(self
.missing_
[i
].ByteSize())
4205 n
+= 1 * len(self
.deferred_
)
4206 for i
in xrange(len(self
.deferred_
)): n
+= self
.lengthString(self
.deferred_
[i
].ByteSize())
4209 def ByteSizePartial(self
):
4211 n
+= 1 * len(self
.found_
)
4212 for i
in xrange(len(self
.found_
)): n
+= self
.lengthString(self
.found_
[i
].ByteSizePartial())
4213 n
+= 1 * len(self
.missing_
)
4214 for i
in xrange(len(self
.missing_
)): n
+= self
.lengthString(self
.missing_
[i
].ByteSizePartial())
4215 n
+= 1 * len(self
.deferred_
)
4216 for i
in xrange(len(self
.deferred_
)): n
+= self
.lengthString(self
.deferred_
[i
].ByteSizePartial())
4221 self
.clear_missing()
4222 self
.clear_deferred()
4224 def OutputUnchecked(self
, out
):
4225 for i
in xrange(len(self
.found_
)):
4227 out
.putVarInt32(self
.found_
[i
].ByteSize())
4228 self
.found_
[i
].OutputUnchecked(out
)
4229 for i
in xrange(len(self
.missing_
)):
4231 out
.putVarInt32(self
.missing_
[i
].ByteSize())
4232 self
.missing_
[i
].OutputUnchecked(out
)
4233 for i
in xrange(len(self
.deferred_
)):
4235 out
.putVarInt32(self
.deferred_
[i
].ByteSize())
4236 self
.deferred_
[i
].OutputUnchecked(out
)
4238 def OutputPartial(self
, out
):
4239 for i
in xrange(len(self
.found_
)):
4241 out
.putVarInt32(self
.found_
[i
].ByteSizePartial())
4242 self
.found_
[i
].OutputPartial(out
)
4243 for i
in xrange(len(self
.missing_
)):
4245 out
.putVarInt32(self
.missing_
[i
].ByteSizePartial())
4246 self
.missing_
[i
].OutputPartial(out
)
4247 for i
in xrange(len(self
.deferred_
)):
4249 out
.putVarInt32(self
.deferred_
[i
].ByteSizePartial())
4250 self
.deferred_
[i
].OutputPartial(out
)
4252 def TryMerge(self
, d
):
4253 while d
.avail() > 0:
4254 tt
= d
.getVarInt32()
4256 length
= d
.getVarInt32()
4257 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4259 self
.add_found().TryMerge(tmp
)
4262 length
= d
.getVarInt32()
4263 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4265 self
.add_missing().TryMerge(tmp
)
4268 length
= d
.getVarInt32()
4269 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4271 self
.add_deferred().TryMerge(tmp
)
4275 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
4279 def __str__(self
, prefix
="", printElemNumber
=0):
4282 for e
in self
.found_
:
4284 if printElemNumber
: elm
="(%d)" % cnt
4285 res
+=prefix
+("found%s <\n" % elm
)
4286 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
4290 for e
in self
.missing_
:
4292 if printElemNumber
: elm
="(%d)" % cnt
4293 res
+=prefix
+("missing%s <\n" % elm
)
4294 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
4298 for e
in self
.deferred_
:
4300 if printElemNumber
: elm
="(%d)" % cnt
4301 res
+=prefix
+("deferred%s <\n" % elm
)
4302 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
4308 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
4309 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
4315 _TEXT
= _BuildTagLookupTable({
4322 _TYPES
= _BuildTagLookupTable({
4323 0: ProtocolBuffer
.Encoder
.NUMERIC
,
4324 1: ProtocolBuffer
.Encoder
.STRING
,
4325 2: ProtocolBuffer
.Encoder
.STRING
,
4326 3: ProtocolBuffer
.Encoder
.STRING
,
4327 }, 3, ProtocolBuffer
.Encoder
.MAX_TYPE
)
4331 _STYLE_CONTENT_TYPE
= """"""
4332 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.LookupResponse'
4333 _SERIALIZED_DESCRIPTOR
= array
.array('B')
4334 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lkxvb2t1cFJlc3BvbnNlExoFZm91bmQgASgCMAs4A0okYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5UmVzdWx0owGqAQVjdHlwZbIBBnByb3RvMqQBFBMaB21pc3NpbmcgAigCMAs4A0okYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRW50aXR5UmVzdWx0owGqAQVjdHlwZbIBBnByb3RvMqQBFBMaCGRlZmVycmVkIAMoAjALOANKG2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktleaMBqgEFY3R5cGWyAQZwcm90bzKkARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
4335 if _net_proto___parse__python
is not None:
4336 _net_proto___parse__python
.RegisterType(
4337 _SERIALIZED_DESCRIPTOR
.tostring())
4339 class RunQueryRequest(ProtocolBuffer
.ProtocolMessage
):
4340 has_read_options_
= 0
4341 read_options_
= None
4342 has_partition_id_
= 0
4343 partition_id_
= None
4348 has_min_safe_time_seconds_
= 0
4349 min_safe_time_seconds_
= 0
4350 has_suggested_batch_size_
= 0
4351 suggested_batch_size_
= 0
4353 def __init__(self
, contents
=None):
4354 self
.lazy_init_lock_
= thread
.allocate_lock()
4355 if contents
is not None: self
.MergeFromString(contents
)
4357 def read_options(self
):
4358 if self
.read_options_
is None:
4359 self
.lazy_init_lock_
.acquire()
4361 if self
.read_options_
is None: self
.read_options_
= ReadOptions()
4363 self
.lazy_init_lock_
.release()
4364 return self
.read_options_
4366 def mutable_read_options(self
): self
.has_read_options_
= 1; return self
.read_options()
4368 def clear_read_options(self
):
4370 if self
.has_read_options_
:
4371 self
.has_read_options_
= 0;
4372 if self
.read_options_
is not None: self
.read_options_
.Clear()
4374 def has_read_options(self
): return self
.has_read_options_
4376 def partition_id(self
):
4377 if self
.partition_id_
is None:
4378 self
.lazy_init_lock_
.acquire()
4380 if self
.partition_id_
is None: self
.partition_id_
= google
.appengine
.datastore
.entity_v4_pb
.PartitionId()
4382 self
.lazy_init_lock_
.release()
4383 return self
.partition_id_
4385 def mutable_partition_id(self
): self
.has_partition_id_
= 1; return self
.partition_id()
4387 def clear_partition_id(self
):
4389 if self
.has_partition_id_
:
4390 self
.has_partition_id_
= 0;
4391 if self
.partition_id_
is not None: self
.partition_id_
.Clear()
4393 def has_partition_id(self
): return self
.has_partition_id_
4396 if self
.query_
is None:
4397 self
.lazy_init_lock_
.acquire()
4399 if self
.query_
is None: self
.query_
= Query()
4401 self
.lazy_init_lock_
.release()
4404 def mutable_query(self
): self
.has_query_
= 1; return self
.query()
4406 def clear_query(self
):
4409 self
.has_query_
= 0;
4410 if self
.query_
is not None: self
.query_
.Clear()
4412 def has_query(self
): return self
.has_query_
4414 def gql_query(self
):
4415 if self
.gql_query_
is None:
4416 self
.lazy_init_lock_
.acquire()
4418 if self
.gql_query_
is None: self
.gql_query_
= GqlQuery()
4420 self
.lazy_init_lock_
.release()
4421 return self
.gql_query_
4423 def mutable_gql_query(self
): self
.has_gql_query_
= 1; return self
.gql_query()
4425 def clear_gql_query(self
):
4427 if self
.has_gql_query_
:
4428 self
.has_gql_query_
= 0;
4429 if self
.gql_query_
is not None: self
.gql_query_
.Clear()
4431 def has_gql_query(self
): return self
.has_gql_query_
4433 def min_safe_time_seconds(self
): return self
.min_safe_time_seconds_
4435 def set_min_safe_time_seconds(self
, x
):
4436 self
.has_min_safe_time_seconds_
= 1
4437 self
.min_safe_time_seconds_
= x
4439 def clear_min_safe_time_seconds(self
):
4440 if self
.has_min_safe_time_seconds_
:
4441 self
.has_min_safe_time_seconds_
= 0
4442 self
.min_safe_time_seconds_
= 0
4444 def has_min_safe_time_seconds(self
): return self
.has_min_safe_time_seconds_
4446 def suggested_batch_size(self
): return self
.suggested_batch_size_
4448 def set_suggested_batch_size(self
, x
):
4449 self
.has_suggested_batch_size_
= 1
4450 self
.suggested_batch_size_
= x
4452 def clear_suggested_batch_size(self
):
4453 if self
.has_suggested_batch_size_
:
4454 self
.has_suggested_batch_size_
= 0
4455 self
.suggested_batch_size_
= 0
4457 def has_suggested_batch_size(self
): return self
.has_suggested_batch_size_
4460 def MergeFrom(self
, x
):
4461 assert x
is not self
4462 if (x
.has_read_options()): self
.mutable_read_options().MergeFrom(x
.read_options())
4463 if (x
.has_partition_id()): self
.mutable_partition_id().MergeFrom(x
.partition_id())
4464 if (x
.has_query()): self
.mutable_query().MergeFrom(x
.query())
4465 if (x
.has_gql_query()): self
.mutable_gql_query().MergeFrom(x
.gql_query())
4466 if (x
.has_min_safe_time_seconds()): self
.set_min_safe_time_seconds(x
.min_safe_time_seconds())
4467 if (x
.has_suggested_batch_size()): self
.set_suggested_batch_size(x
.suggested_batch_size())
4469 if _net_proto___parse__python
is not None:
4470 def _CMergeFromString(self
, s
):
4471 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.RunQueryRequest', s
)
4473 if _net_proto___parse__python
is not None:
4475 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.RunQueryRequest')
4477 if _net_proto___parse__python
is not None:
4478 def _CEncodePartial(self
):
4479 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.RunQueryRequest')
4481 if _net_proto___parse__python
is not None:
4482 def _CToASCII(self
, output_format
):
4483 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.RunQueryRequest', output_format
)
4486 if _net_proto___parse__python
is not None:
4487 def ParseASCII(self
, s
):
4488 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.RunQueryRequest', s
)
4491 if _net_proto___parse__python
is not None:
4492 def ParseASCIIIgnoreUnknown(self
, s
):
4493 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.RunQueryRequest', s
)
4496 def Equals(self
, x
):
4497 if x
is self
: return 1
4498 if self
.has_read_options_
!= x
.has_read_options_
: return 0
4499 if self
.has_read_options_
and self
.read_options_
!= x
.read_options_
: return 0
4500 if self
.has_partition_id_
!= x
.has_partition_id_
: return 0
4501 if self
.has_partition_id_
and self
.partition_id_
!= x
.partition_id_
: return 0
4502 if self
.has_query_
!= x
.has_query_
: return 0
4503 if self
.has_query_
and self
.query_
!= x
.query_
: return 0
4504 if self
.has_gql_query_
!= x
.has_gql_query_
: return 0
4505 if self
.has_gql_query_
and self
.gql_query_
!= x
.gql_query_
: return 0
4506 if self
.has_min_safe_time_seconds_
!= x
.has_min_safe_time_seconds_
: return 0
4507 if self
.has_min_safe_time_seconds_
and self
.min_safe_time_seconds_
!= x
.min_safe_time_seconds_
: return 0
4508 if self
.has_suggested_batch_size_
!= x
.has_suggested_batch_size_
: return 0
4509 if self
.has_suggested_batch_size_
and self
.suggested_batch_size_
!= x
.suggested_batch_size_
: return 0
4512 def IsInitialized(self
, debug_strs
=None):
4514 if (self
.has_read_options_
and not self
.read_options_
.IsInitialized(debug_strs
)): initialized
= 0
4515 if (self
.has_partition_id_
and not self
.partition_id_
.IsInitialized(debug_strs
)): initialized
= 0
4516 if (self
.has_query_
and not self
.query_
.IsInitialized(debug_strs
)): initialized
= 0
4517 if (self
.has_gql_query_
and not self
.gql_query_
.IsInitialized(debug_strs
)): initialized
= 0
4522 if (self
.has_read_options_
): n
+= 1 + self
.lengthString(self
.read_options_
.ByteSize())
4523 if (self
.has_partition_id_
): n
+= 1 + self
.lengthString(self
.partition_id_
.ByteSize())
4524 if (self
.has_query_
): n
+= 1 + self
.lengthString(self
.query_
.ByteSize())
4525 if (self
.has_gql_query_
): n
+= 1 + self
.lengthString(self
.gql_query_
.ByteSize())
4526 if (self
.has_min_safe_time_seconds_
): n
+= 1 + self
.lengthVarInt64(self
.min_safe_time_seconds_
)
4527 if (self
.has_suggested_batch_size_
): n
+= 1 + self
.lengthVarInt64(self
.suggested_batch_size_
)
4530 def ByteSizePartial(self
):
4532 if (self
.has_read_options_
): n
+= 1 + self
.lengthString(self
.read_options_
.ByteSizePartial())
4533 if (self
.has_partition_id_
): n
+= 1 + self
.lengthString(self
.partition_id_
.ByteSizePartial())
4534 if (self
.has_query_
): n
+= 1 + self
.lengthString(self
.query_
.ByteSizePartial())
4535 if (self
.has_gql_query_
): n
+= 1 + self
.lengthString(self
.gql_query_
.ByteSizePartial())
4536 if (self
.has_min_safe_time_seconds_
): n
+= 1 + self
.lengthVarInt64(self
.min_safe_time_seconds_
)
4537 if (self
.has_suggested_batch_size_
): n
+= 1 + self
.lengthVarInt64(self
.suggested_batch_size_
)
4541 self
.clear_read_options()
4542 self
.clear_partition_id()
4544 self
.clear_gql_query()
4545 self
.clear_min_safe_time_seconds()
4546 self
.clear_suggested_batch_size()
4548 def OutputUnchecked(self
, out
):
4549 if (self
.has_read_options_
):
4551 out
.putVarInt32(self
.read_options_
.ByteSize())
4552 self
.read_options_
.OutputUnchecked(out
)
4553 if (self
.has_partition_id_
):
4555 out
.putVarInt32(self
.partition_id_
.ByteSize())
4556 self
.partition_id_
.OutputUnchecked(out
)
4557 if (self
.has_query_
):
4559 out
.putVarInt32(self
.query_
.ByteSize())
4560 self
.query_
.OutputUnchecked(out
)
4561 if (self
.has_min_safe_time_seconds_
):
4563 out
.putVarInt64(self
.min_safe_time_seconds_
)
4564 if (self
.has_suggested_batch_size_
):
4566 out
.putVarInt32(self
.suggested_batch_size_
)
4567 if (self
.has_gql_query_
):
4569 out
.putVarInt32(self
.gql_query_
.ByteSize())
4570 self
.gql_query_
.OutputUnchecked(out
)
4572 def OutputPartial(self
, out
):
4573 if (self
.has_read_options_
):
4575 out
.putVarInt32(self
.read_options_
.ByteSizePartial())
4576 self
.read_options_
.OutputPartial(out
)
4577 if (self
.has_partition_id_
):
4579 out
.putVarInt32(self
.partition_id_
.ByteSizePartial())
4580 self
.partition_id_
.OutputPartial(out
)
4581 if (self
.has_query_
):
4583 out
.putVarInt32(self
.query_
.ByteSizePartial())
4584 self
.query_
.OutputPartial(out
)
4585 if (self
.has_min_safe_time_seconds_
):
4587 out
.putVarInt64(self
.min_safe_time_seconds_
)
4588 if (self
.has_suggested_batch_size_
):
4590 out
.putVarInt32(self
.suggested_batch_size_
)
4591 if (self
.has_gql_query_
):
4593 out
.putVarInt32(self
.gql_query_
.ByteSizePartial())
4594 self
.gql_query_
.OutputPartial(out
)
4596 def TryMerge(self
, d
):
4597 while d
.avail() > 0:
4598 tt
= d
.getVarInt32()
4600 length
= d
.getVarInt32()
4601 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4603 self
.mutable_read_options().TryMerge(tmp
)
4606 length
= d
.getVarInt32()
4607 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4609 self
.mutable_partition_id().TryMerge(tmp
)
4612 length
= d
.getVarInt32()
4613 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4615 self
.mutable_query().TryMerge(tmp
)
4618 self
.set_min_safe_time_seconds(d
.getVarInt64())
4621 self
.set_suggested_batch_size(d
.getVarInt32())
4624 length
= d
.getVarInt32()
4625 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4627 self
.mutable_gql_query().TryMerge(tmp
)
4631 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
4635 def __str__(self
, prefix
="", printElemNumber
=0):
4637 if self
.has_read_options_
:
4638 res
+=prefix
+"read_options <\n"
4639 res
+=self
.read_options_
.__str
__(prefix
+ " ", printElemNumber
)
4641 if self
.has_partition_id_
:
4642 res
+=prefix
+"partition_id <\n"
4643 res
+=self
.partition_id_
.__str
__(prefix
+ " ", printElemNumber
)
4646 res
+=prefix
+"query <\n"
4647 res
+=self
.query_
.__str
__(prefix
+ " ", printElemNumber
)
4649 if self
.has_gql_query_
:
4650 res
+=prefix
+"gql_query <\n"
4651 res
+=self
.gql_query_
.__str
__(prefix
+ " ", printElemNumber
)
4653 if self
.has_min_safe_time_seconds_
: res
+=prefix
+("min_safe_time_seconds: %s\n" % self
.DebugFormatInt64(self
.min_safe_time_seconds_
))
4654 if self
.has_suggested_batch_size_
: res
+=prefix
+("suggested_batch_size: %s\n" % self
.DebugFormatInt32(self
.suggested_batch_size_
))
4658 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
4659 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
4665 kmin_safe_time_seconds
= 4
4666 ksuggested_batch_size
= 5
4668 _TEXT
= _BuildTagLookupTable({
4673 4: "min_safe_time_seconds",
4674 5: "suggested_batch_size",
4678 _TYPES
= _BuildTagLookupTable({
4679 0: ProtocolBuffer
.Encoder
.NUMERIC
,
4680 1: ProtocolBuffer
.Encoder
.STRING
,
4681 2: ProtocolBuffer
.Encoder
.STRING
,
4682 3: ProtocolBuffer
.Encoder
.STRING
,
4683 4: ProtocolBuffer
.Encoder
.NUMERIC
,
4684 5: ProtocolBuffer
.Encoder
.NUMERIC
,
4685 7: ProtocolBuffer
.Encoder
.STRING
,
4686 }, 7, ProtocolBuffer
.Encoder
.MAX_TYPE
)
4690 _STYLE_CONTENT_TYPE
= """"""
4691 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.RunQueryRequest'
4692 _SERIALIZED_DESCRIPTOR
= array
.array('B')
4693 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJ2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJ1blF1ZXJ5UmVxdWVzdBMaDHJlYWRfb3B0aW9ucyABKAIwCzgBSiNhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5SZWFkT3B0aW9uc6MBqgEFY3R5cGWyAQZwcm90bzKkARQTGgxwYXJ0aXRpb25faWQgAigCMAs4AUojYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUGFydGl0aW9uSWSjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoFcXVlcnkgAygCMAs4AUodYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuUXVlcnmjAaoBBWN0eXBlsgEGcHJvdG8ypAEUExoJZ3FsX3F1ZXJ5IAcoAjALOAFKIGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkdxbFF1ZXJ5owGqAQVjdHlwZbIBBnByb3RvMqQBFBMaFW1pbl9zYWZlX3RpbWVfc2Vjb25kcyAEKAAwAzgBFBMaFHN1Z2dlc3RlZF9iYXRjaF9zaXplIAUoADAFOAEUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
4694 if _net_proto___parse__python
is not None:
4695 _net_proto___parse__python
.RegisterType(
4696 _SERIALIZED_DESCRIPTOR
.tostring())
4698 class RunQueryResponse(ProtocolBuffer
.ProtocolMessage
):
4700 has_query_handle_
= 0
4703 def __init__(self
, contents
=None):
4704 self
.batch_
= QueryResultBatch()
4705 if contents
is not None: self
.MergeFromString(contents
)
4707 def batch(self
): return self
.batch_
4709 def mutable_batch(self
): self
.has_batch_
= 1; return self
.batch_
4711 def clear_batch(self
):self
.has_batch_
= 0; self
.batch_
.Clear()
4713 def has_batch(self
): return self
.has_batch_
4715 def query_handle(self
): return self
.query_handle_
4717 def set_query_handle(self
, x
):
4718 self
.has_query_handle_
= 1
4719 self
.query_handle_
= x
4721 def clear_query_handle(self
):
4722 if self
.has_query_handle_
:
4723 self
.has_query_handle_
= 0
4724 self
.query_handle_
= ""
4726 def has_query_handle(self
): return self
.has_query_handle_
4729 def MergeFrom(self
, x
):
4730 assert x
is not self
4731 if (x
.has_batch()): self
.mutable_batch().MergeFrom(x
.batch())
4732 if (x
.has_query_handle()): self
.set_query_handle(x
.query_handle())
4734 if _net_proto___parse__python
is not None:
4735 def _CMergeFromString(self
, s
):
4736 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.RunQueryResponse', s
)
4738 if _net_proto___parse__python
is not None:
4740 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.RunQueryResponse')
4742 if _net_proto___parse__python
is not None:
4743 def _CEncodePartial(self
):
4744 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.RunQueryResponse')
4746 if _net_proto___parse__python
is not None:
4747 def _CToASCII(self
, output_format
):
4748 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.RunQueryResponse', output_format
)
4751 if _net_proto___parse__python
is not None:
4752 def ParseASCII(self
, s
):
4753 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.RunQueryResponse', s
)
4756 if _net_proto___parse__python
is not None:
4757 def ParseASCIIIgnoreUnknown(self
, s
):
4758 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.RunQueryResponse', s
)
4761 def Equals(self
, x
):
4762 if x
is self
: return 1
4763 if self
.has_batch_
!= x
.has_batch_
: return 0
4764 if self
.has_batch_
and self
.batch_
!= x
.batch_
: return 0
4765 if self
.has_query_handle_
!= x
.has_query_handle_
: return 0
4766 if self
.has_query_handle_
and self
.query_handle_
!= x
.query_handle_
: return 0
4769 def IsInitialized(self
, debug_strs
=None):
4771 if (not self
.has_batch_
):
4773 if debug_strs
is not None:
4774 debug_strs
.append('Required field: batch not set.')
4775 elif not self
.batch_
.IsInitialized(debug_strs
): initialized
= 0
4780 n
+= self
.lengthString(self
.batch_
.ByteSize())
4781 if (self
.has_query_handle_
): n
+= 1 + self
.lengthString(len(self
.query_handle_
))
4784 def ByteSizePartial(self
):
4786 if (self
.has_batch_
):
4788 n
+= self
.lengthString(self
.batch_
.ByteSizePartial())
4789 if (self
.has_query_handle_
): n
+= 1 + self
.lengthString(len(self
.query_handle_
))
4794 self
.clear_query_handle()
4796 def OutputUnchecked(self
, out
):
4798 out
.putVarInt32(self
.batch_
.ByteSize())
4799 self
.batch_
.OutputUnchecked(out
)
4800 if (self
.has_query_handle_
):
4802 out
.putPrefixedString(self
.query_handle_
)
4804 def OutputPartial(self
, out
):
4805 if (self
.has_batch_
):
4807 out
.putVarInt32(self
.batch_
.ByteSizePartial())
4808 self
.batch_
.OutputPartial(out
)
4809 if (self
.has_query_handle_
):
4811 out
.putPrefixedString(self
.query_handle_
)
4813 def TryMerge(self
, d
):
4814 while d
.avail() > 0:
4815 tt
= d
.getVarInt32()
4817 length
= d
.getVarInt32()
4818 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
4820 self
.mutable_batch().TryMerge(tmp
)
4823 self
.set_query_handle(d
.getPrefixedString())
4827 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
4831 def __str__(self
, prefix
="", printElemNumber
=0):
4834 res
+=prefix
+"batch <\n"
4835 res
+=self
.batch_
.__str
__(prefix
+ " ", printElemNumber
)
4837 if self
.has_query_handle_
: res
+=prefix
+("query_handle: %s\n" % self
.DebugFormatString(self
.query_handle_
))
4841 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
4842 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
4847 _TEXT
= _BuildTagLookupTable({
4853 _TYPES
= _BuildTagLookupTable({
4854 0: ProtocolBuffer
.Encoder
.NUMERIC
,
4855 1: ProtocolBuffer
.Encoder
.STRING
,
4856 2: ProtocolBuffer
.Encoder
.STRING
,
4857 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
4861 _STYLE_CONTENT_TYPE
= """"""
4862 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.RunQueryResponse'
4863 _SERIALIZED_DESCRIPTOR
= array
.array('B')
4864 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJ1blF1ZXJ5UmVzcG9uc2UTGgViYXRjaCABKAIwCzgCSihhcHBob3N0aW5nLmRhdGFzdG9yZS52NC5RdWVyeVJlc3VsdEJhdGNoowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaDHF1ZXJ5X2hhbmRsZSACKAIwCTgBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
4865 if _net_proto___parse__python
is not None:
4866 _net_proto___parse__python
.RegisterType(
4867 _SERIALIZED_DESCRIPTOR
.tostring())
4869 class ContinueQueryRequest(ProtocolBuffer
.ProtocolMessage
):
4870 has_query_handle_
= 0
4873 def __init__(self
, contents
=None):
4874 if contents
is not None: self
.MergeFromString(contents
)
4876 def query_handle(self
): return self
.query_handle_
4878 def set_query_handle(self
, x
):
4879 self
.has_query_handle_
= 1
4880 self
.query_handle_
= x
4882 def clear_query_handle(self
):
4883 if self
.has_query_handle_
:
4884 self
.has_query_handle_
= 0
4885 self
.query_handle_
= ""
4887 def has_query_handle(self
): return self
.has_query_handle_
4890 def MergeFrom(self
, x
):
4891 assert x
is not self
4892 if (x
.has_query_handle()): self
.set_query_handle(x
.query_handle())
4894 if _net_proto___parse__python
is not None:
4895 def _CMergeFromString(self
, s
):
4896 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.ContinueQueryRequest', s
)
4898 if _net_proto___parse__python
is not None:
4900 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.ContinueQueryRequest')
4902 if _net_proto___parse__python
is not None:
4903 def _CEncodePartial(self
):
4904 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.ContinueQueryRequest')
4906 if _net_proto___parse__python
is not None:
4907 def _CToASCII(self
, output_format
):
4908 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.ContinueQueryRequest', output_format
)
4911 if _net_proto___parse__python
is not None:
4912 def ParseASCII(self
, s
):
4913 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.ContinueQueryRequest', s
)
4916 if _net_proto___parse__python
is not None:
4917 def ParseASCIIIgnoreUnknown(self
, s
):
4918 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.ContinueQueryRequest', s
)
4921 def Equals(self
, x
):
4922 if x
is self
: return 1
4923 if self
.has_query_handle_
!= x
.has_query_handle_
: return 0
4924 if self
.has_query_handle_
and self
.query_handle_
!= x
.query_handle_
: return 0
4927 def IsInitialized(self
, debug_strs
=None):
4929 if (not self
.has_query_handle_
):
4931 if debug_strs
is not None:
4932 debug_strs
.append('Required field: query_handle not set.')
4937 n
+= self
.lengthString(len(self
.query_handle_
))
4940 def ByteSizePartial(self
):
4942 if (self
.has_query_handle_
):
4944 n
+= self
.lengthString(len(self
.query_handle_
))
4948 self
.clear_query_handle()
4950 def OutputUnchecked(self
, out
):
4952 out
.putPrefixedString(self
.query_handle_
)
4954 def OutputPartial(self
, out
):
4955 if (self
.has_query_handle_
):
4957 out
.putPrefixedString(self
.query_handle_
)
4959 def TryMerge(self
, d
):
4960 while d
.avail() > 0:
4961 tt
= d
.getVarInt32()
4963 self
.set_query_handle(d
.getPrefixedString())
4967 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
4971 def __str__(self
, prefix
="", printElemNumber
=0):
4973 if self
.has_query_handle_
: res
+=prefix
+("query_handle: %s\n" % self
.DebugFormatString(self
.query_handle_
))
4977 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
4978 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
4982 _TEXT
= _BuildTagLookupTable({
4987 _TYPES
= _BuildTagLookupTable({
4988 0: ProtocolBuffer
.Encoder
.NUMERIC
,
4989 1: ProtocolBuffer
.Encoder
.STRING
,
4990 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
4994 _STYLE_CONTENT_TYPE
= """"""
4995 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.ContinueQueryRequest'
4996 _SERIALIZED_DESCRIPTOR
= array
.array('B')
4997 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KLGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbnRpbnVlUXVlcnlSZXF1ZXN0ExoMcXVlcnlfaGFuZGxlIAEoAjAJOAIUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
4998 if _net_proto___parse__python
is not None:
4999 _net_proto___parse__python
.RegisterType(
5000 _SERIALIZED_DESCRIPTOR
.tostring())
5002 class ContinueQueryResponse(ProtocolBuffer
.ProtocolMessage
):
5005 def __init__(self
, contents
=None):
5006 self
.batch_
= QueryResultBatch()
5007 if contents
is not None: self
.MergeFromString(contents
)
5009 def batch(self
): return self
.batch_
5011 def mutable_batch(self
): self
.has_batch_
= 1; return self
.batch_
5013 def clear_batch(self
):self
.has_batch_
= 0; self
.batch_
.Clear()
5015 def has_batch(self
): return self
.has_batch_
5018 def MergeFrom(self
, x
):
5019 assert x
is not self
5020 if (x
.has_batch()): self
.mutable_batch().MergeFrom(x
.batch())
5022 if _net_proto___parse__python
is not None:
5023 def _CMergeFromString(self
, s
):
5024 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.ContinueQueryResponse', s
)
5026 if _net_proto___parse__python
is not None:
5028 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.ContinueQueryResponse')
5030 if _net_proto___parse__python
is not None:
5031 def _CEncodePartial(self
):
5032 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.ContinueQueryResponse')
5034 if _net_proto___parse__python
is not None:
5035 def _CToASCII(self
, output_format
):
5036 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.ContinueQueryResponse', output_format
)
5039 if _net_proto___parse__python
is not None:
5040 def ParseASCII(self
, s
):
5041 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.ContinueQueryResponse', s
)
5044 if _net_proto___parse__python
is not None:
5045 def ParseASCIIIgnoreUnknown(self
, s
):
5046 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.ContinueQueryResponse', s
)
5049 def Equals(self
, x
):
5050 if x
is self
: return 1
5051 if self
.has_batch_
!= x
.has_batch_
: return 0
5052 if self
.has_batch_
and self
.batch_
!= x
.batch_
: return 0
5055 def IsInitialized(self
, debug_strs
=None):
5057 if (not self
.has_batch_
):
5059 if debug_strs
is not None:
5060 debug_strs
.append('Required field: batch not set.')
5061 elif not self
.batch_
.IsInitialized(debug_strs
): initialized
= 0
5066 n
+= self
.lengthString(self
.batch_
.ByteSize())
5069 def ByteSizePartial(self
):
5071 if (self
.has_batch_
):
5073 n
+= self
.lengthString(self
.batch_
.ByteSizePartial())
5079 def OutputUnchecked(self
, out
):
5081 out
.putVarInt32(self
.batch_
.ByteSize())
5082 self
.batch_
.OutputUnchecked(out
)
5084 def OutputPartial(self
, out
):
5085 if (self
.has_batch_
):
5087 out
.putVarInt32(self
.batch_
.ByteSizePartial())
5088 self
.batch_
.OutputPartial(out
)
5090 def TryMerge(self
, d
):
5091 while d
.avail() > 0:
5092 tt
= d
.getVarInt32()
5094 length
= d
.getVarInt32()
5095 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
5097 self
.mutable_batch().TryMerge(tmp
)
5101 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5105 def __str__(self
, prefix
="", printElemNumber
=0):
5108 res
+=prefix
+"batch <\n"
5109 res
+=self
.batch_
.__str
__(prefix
+ " ", printElemNumber
)
5114 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5115 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5119 _TEXT
= _BuildTagLookupTable({
5124 _TYPES
= _BuildTagLookupTable({
5125 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5126 1: ProtocolBuffer
.Encoder
.STRING
,
5127 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5131 _STYLE_CONTENT_TYPE
= """"""
5132 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.ContinueQueryResponse'
5133 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5134 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KLWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbnRpbnVlUXVlcnlSZXNwb25zZRMaBWJhdGNoIAEoAjALOAJKKGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlF1ZXJ5UmVzdWx0QmF0Y2ijAaoBBWN0eXBlsgEGcHJvdG8ypAEUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
5135 if _net_proto___parse__python
is not None:
5136 _net_proto___parse__python
.RegisterType(
5137 _SERIALIZED_DESCRIPTOR
.tostring())
5139 class BeginTransactionRequest(ProtocolBuffer
.ProtocolMessage
):
5140 has_cross_group_
= 0
5142 has_cross_request_
= 0
5145 def __init__(self
, contents
=None):
5146 if contents
is not None: self
.MergeFromString(contents
)
5148 def cross_group(self
): return self
.cross_group_
5150 def set_cross_group(self
, x
):
5151 self
.has_cross_group_
= 1
5152 self
.cross_group_
= x
5154 def clear_cross_group(self
):
5155 if self
.has_cross_group_
:
5156 self
.has_cross_group_
= 0
5157 self
.cross_group_
= 0
5159 def has_cross_group(self
): return self
.has_cross_group_
5161 def cross_request(self
): return self
.cross_request_
5163 def set_cross_request(self
, x
):
5164 self
.has_cross_request_
= 1
5165 self
.cross_request_
= x
5167 def clear_cross_request(self
):
5168 if self
.has_cross_request_
:
5169 self
.has_cross_request_
= 0
5170 self
.cross_request_
= 0
5172 def has_cross_request(self
): return self
.has_cross_request_
5175 def MergeFrom(self
, x
):
5176 assert x
is not self
5177 if (x
.has_cross_group()): self
.set_cross_group(x
.cross_group())
5178 if (x
.has_cross_request()): self
.set_cross_request(x
.cross_request())
5180 if _net_proto___parse__python
is not None:
5181 def _CMergeFromString(self
, s
):
5182 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.BeginTransactionRequest', s
)
5184 if _net_proto___parse__python
is not None:
5186 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.BeginTransactionRequest')
5188 if _net_proto___parse__python
is not None:
5189 def _CEncodePartial(self
):
5190 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.BeginTransactionRequest')
5192 if _net_proto___parse__python
is not None:
5193 def _CToASCII(self
, output_format
):
5194 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.BeginTransactionRequest', output_format
)
5197 if _net_proto___parse__python
is not None:
5198 def ParseASCII(self
, s
):
5199 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.BeginTransactionRequest', s
)
5202 if _net_proto___parse__python
is not None:
5203 def ParseASCIIIgnoreUnknown(self
, s
):
5204 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.BeginTransactionRequest', s
)
5207 def Equals(self
, x
):
5208 if x
is self
: return 1
5209 if self
.has_cross_group_
!= x
.has_cross_group_
: return 0
5210 if self
.has_cross_group_
and self
.cross_group_
!= x
.cross_group_
: return 0
5211 if self
.has_cross_request_
!= x
.has_cross_request_
: return 0
5212 if self
.has_cross_request_
and self
.cross_request_
!= x
.cross_request_
: return 0
5215 def IsInitialized(self
, debug_strs
=None):
5221 if (self
.has_cross_group_
): n
+= 2
5222 if (self
.has_cross_request_
): n
+= 2
5225 def ByteSizePartial(self
):
5227 if (self
.has_cross_group_
): n
+= 2
5228 if (self
.has_cross_request_
): n
+= 2
5232 self
.clear_cross_group()
5233 self
.clear_cross_request()
5235 def OutputUnchecked(self
, out
):
5236 if (self
.has_cross_group_
):
5238 out
.putBoolean(self
.cross_group_
)
5239 if (self
.has_cross_request_
):
5241 out
.putBoolean(self
.cross_request_
)
5243 def OutputPartial(self
, out
):
5244 if (self
.has_cross_group_
):
5246 out
.putBoolean(self
.cross_group_
)
5247 if (self
.has_cross_request_
):
5249 out
.putBoolean(self
.cross_request_
)
5251 def TryMerge(self
, d
):
5252 while d
.avail() > 0:
5253 tt
= d
.getVarInt32()
5255 self
.set_cross_group(d
.getBoolean())
5258 self
.set_cross_request(d
.getBoolean())
5262 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5266 def __str__(self
, prefix
="", printElemNumber
=0):
5268 if self
.has_cross_group_
: res
+=prefix
+("cross_group: %s\n" % self
.DebugFormatBool(self
.cross_group_
))
5269 if self
.has_cross_request_
: res
+=prefix
+("cross_request: %s\n" % self
.DebugFormatBool(self
.cross_request_
))
5273 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5274 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5279 _TEXT
= _BuildTagLookupTable({
5285 _TYPES
= _BuildTagLookupTable({
5286 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5287 1: ProtocolBuffer
.Encoder
.NUMERIC
,
5288 2: ProtocolBuffer
.Encoder
.NUMERIC
,
5289 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5293 _STYLE_CONTENT_TYPE
= """"""
5294 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.BeginTransactionRequest'
5295 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5296 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KL2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkJlZ2luVHJhbnNhY3Rpb25SZXF1ZXN0ExoLY3Jvc3NfZ3JvdXAgASgAMAg4AUIFZmFsc2WjAaoBB2RlZmF1bHSyAQVmYWxzZaQBFBMaDWNyb3NzX3JlcXVlc3QgAigAMAg4AUIFZmFsc2WjAaoBB2RlZmF1bHSyAQVmYWxzZaQBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
5297 if _net_proto___parse__python
is not None:
5298 _net_proto___parse__python
.RegisterType(
5299 _SERIALIZED_DESCRIPTOR
.tostring())
5301 class BeginTransactionResponse(ProtocolBuffer
.ProtocolMessage
):
5302 has_transaction_
= 0
5305 def __init__(self
, contents
=None):
5306 if contents
is not None: self
.MergeFromString(contents
)
5308 def transaction(self
): return self
.transaction_
5310 def set_transaction(self
, x
):
5311 self
.has_transaction_
= 1
5312 self
.transaction_
= x
5314 def clear_transaction(self
):
5315 if self
.has_transaction_
:
5316 self
.has_transaction_
= 0
5317 self
.transaction_
= ""
5319 def has_transaction(self
): return self
.has_transaction_
5322 def MergeFrom(self
, x
):
5323 assert x
is not self
5324 if (x
.has_transaction()): self
.set_transaction(x
.transaction())
5326 if _net_proto___parse__python
is not None:
5327 def _CMergeFromString(self
, s
):
5328 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.BeginTransactionResponse', s
)
5330 if _net_proto___parse__python
is not None:
5332 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.BeginTransactionResponse')
5334 if _net_proto___parse__python
is not None:
5335 def _CEncodePartial(self
):
5336 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.BeginTransactionResponse')
5338 if _net_proto___parse__python
is not None:
5339 def _CToASCII(self
, output_format
):
5340 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.BeginTransactionResponse', output_format
)
5343 if _net_proto___parse__python
is not None:
5344 def ParseASCII(self
, s
):
5345 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.BeginTransactionResponse', s
)
5348 if _net_proto___parse__python
is not None:
5349 def ParseASCIIIgnoreUnknown(self
, s
):
5350 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.BeginTransactionResponse', s
)
5353 def Equals(self
, x
):
5354 if x
is self
: return 1
5355 if self
.has_transaction_
!= x
.has_transaction_
: return 0
5356 if self
.has_transaction_
and self
.transaction_
!= x
.transaction_
: return 0
5359 def IsInitialized(self
, debug_strs
=None):
5361 if (not self
.has_transaction_
):
5363 if debug_strs
is not None:
5364 debug_strs
.append('Required field: transaction not set.')
5369 n
+= self
.lengthString(len(self
.transaction_
))
5372 def ByteSizePartial(self
):
5374 if (self
.has_transaction_
):
5376 n
+= self
.lengthString(len(self
.transaction_
))
5380 self
.clear_transaction()
5382 def OutputUnchecked(self
, out
):
5384 out
.putPrefixedString(self
.transaction_
)
5386 def OutputPartial(self
, out
):
5387 if (self
.has_transaction_
):
5389 out
.putPrefixedString(self
.transaction_
)
5391 def TryMerge(self
, d
):
5392 while d
.avail() > 0:
5393 tt
= d
.getVarInt32()
5395 self
.set_transaction(d
.getPrefixedString())
5399 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5403 def __str__(self
, prefix
="", printElemNumber
=0):
5405 if self
.has_transaction_
: res
+=prefix
+("transaction: %s\n" % self
.DebugFormatString(self
.transaction_
))
5409 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5410 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5414 _TEXT
= _BuildTagLookupTable({
5419 _TYPES
= _BuildTagLookupTable({
5420 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5421 1: ProtocolBuffer
.Encoder
.STRING
,
5422 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5426 _STYLE_CONTENT_TYPE
= """"""
5427 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.BeginTransactionResponse'
5428 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5429 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KMGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkJlZ2luVHJhbnNhY3Rpb25SZXNwb25zZRMaC3RyYW5zYWN0aW9uIAEoAjAJOAIUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
5430 if _net_proto___parse__python
is not None:
5431 _net_proto___parse__python
.RegisterType(
5432 _SERIALIZED_DESCRIPTOR
.tostring())
5434 class RollbackRequest(ProtocolBuffer
.ProtocolMessage
):
5435 has_transaction_
= 0
5438 def __init__(self
, contents
=None):
5439 if contents
is not None: self
.MergeFromString(contents
)
5441 def transaction(self
): return self
.transaction_
5443 def set_transaction(self
, x
):
5444 self
.has_transaction_
= 1
5445 self
.transaction_
= x
5447 def clear_transaction(self
):
5448 if self
.has_transaction_
:
5449 self
.has_transaction_
= 0
5450 self
.transaction_
= ""
5452 def has_transaction(self
): return self
.has_transaction_
5455 def MergeFrom(self
, x
):
5456 assert x
is not self
5457 if (x
.has_transaction()): self
.set_transaction(x
.transaction())
5459 if _net_proto___parse__python
is not None:
5460 def _CMergeFromString(self
, s
):
5461 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.RollbackRequest', s
)
5463 if _net_proto___parse__python
is not None:
5465 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.RollbackRequest')
5467 if _net_proto___parse__python
is not None:
5468 def _CEncodePartial(self
):
5469 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.RollbackRequest')
5471 if _net_proto___parse__python
is not None:
5472 def _CToASCII(self
, output_format
):
5473 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.RollbackRequest', output_format
)
5476 if _net_proto___parse__python
is not None:
5477 def ParseASCII(self
, s
):
5478 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.RollbackRequest', s
)
5481 if _net_proto___parse__python
is not None:
5482 def ParseASCIIIgnoreUnknown(self
, s
):
5483 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.RollbackRequest', s
)
5486 def Equals(self
, x
):
5487 if x
is self
: return 1
5488 if self
.has_transaction_
!= x
.has_transaction_
: return 0
5489 if self
.has_transaction_
and self
.transaction_
!= x
.transaction_
: return 0
5492 def IsInitialized(self
, debug_strs
=None):
5494 if (not self
.has_transaction_
):
5496 if debug_strs
is not None:
5497 debug_strs
.append('Required field: transaction not set.')
5502 n
+= self
.lengthString(len(self
.transaction_
))
5505 def ByteSizePartial(self
):
5507 if (self
.has_transaction_
):
5509 n
+= self
.lengthString(len(self
.transaction_
))
5513 self
.clear_transaction()
5515 def OutputUnchecked(self
, out
):
5517 out
.putPrefixedString(self
.transaction_
)
5519 def OutputPartial(self
, out
):
5520 if (self
.has_transaction_
):
5522 out
.putPrefixedString(self
.transaction_
)
5524 def TryMerge(self
, d
):
5525 while d
.avail() > 0:
5526 tt
= d
.getVarInt32()
5528 self
.set_transaction(d
.getPrefixedString())
5532 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5536 def __str__(self
, prefix
="", printElemNumber
=0):
5538 if self
.has_transaction_
: res
+=prefix
+("transaction: %s\n" % self
.DebugFormatString(self
.transaction_
))
5542 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5543 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5547 _TEXT
= _BuildTagLookupTable({
5552 _TYPES
= _BuildTagLookupTable({
5553 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5554 1: ProtocolBuffer
.Encoder
.STRING
,
5555 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5559 _STYLE_CONTENT_TYPE
= """"""
5560 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.RollbackRequest'
5561 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5562 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJ2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJvbGxiYWNrUmVxdWVzdBMaC3RyYW5zYWN0aW9uIAEoAjAJOAIUwgEdYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuRXJyb3I="))
5563 if _net_proto___parse__python
is not None:
5564 _net_proto___parse__python
.RegisterType(
5565 _SERIALIZED_DESCRIPTOR
.tostring())
5567 class RollbackResponse(ProtocolBuffer
.ProtocolMessage
):
5569 def __init__(self
, contents
=None):
5571 if contents
is not None: self
.MergeFromString(contents
)
5574 def MergeFrom(self
, x
):
5575 assert x
is not self
5577 if _net_proto___parse__python
is not None:
5578 def _CMergeFromString(self
, s
):
5579 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.RollbackResponse', s
)
5581 if _net_proto___parse__python
is not None:
5583 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.RollbackResponse')
5585 if _net_proto___parse__python
is not None:
5586 def _CEncodePartial(self
):
5587 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.RollbackResponse')
5589 if _net_proto___parse__python
is not None:
5590 def _CToASCII(self
, output_format
):
5591 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.RollbackResponse', output_format
)
5594 if _net_proto___parse__python
is not None:
5595 def ParseASCII(self
, s
):
5596 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.RollbackResponse', s
)
5599 if _net_proto___parse__python
is not None:
5600 def ParseASCIIIgnoreUnknown(self
, s
):
5601 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.RollbackResponse', s
)
5604 def Equals(self
, x
):
5605 if x
is self
: return 1
5608 def IsInitialized(self
, debug_strs
=None):
5616 def ByteSizePartial(self
):
5623 def OutputUnchecked(self
, out
):
5626 def OutputPartial(self
, out
):
5629 def TryMerge(self
, d
):
5630 while d
.avail() > 0:
5631 tt
= d
.getVarInt32()
5634 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5638 def __str__(self
, prefix
="", printElemNumber
=0):
5643 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5644 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5647 _TEXT
= _BuildTagLookupTable({
5651 _TYPES
= _BuildTagLookupTable({
5652 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5653 }, 0, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5657 _STYLE_CONTENT_TYPE
= """"""
5658 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.RollbackResponse'
5659 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5660 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LlJvbGxiYWNrUmVzcG9uc2XCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
5661 if _net_proto___parse__python
is not None:
5662 _net_proto___parse__python
.RegisterType(
5663 _SERIALIZED_DESCRIPTOR
.tostring())
5665 class CommitRequest(ProtocolBuffer
.ProtocolMessage
):
5669 NON_TRANSACTIONAL
= 2
5673 2: "NON_TRANSACTIONAL",
5676 def Mode_Name(cls
, x
): return cls
._Mode
_NAMES
.get(x
, "")
5677 Mode_Name
= classmethod(Mode_Name
)
5679 has_transaction_
= 0
5686 def __init__(self
, contents
=None):
5687 self
.lazy_init_lock_
= thread
.allocate_lock()
5688 if contents
is not None: self
.MergeFromString(contents
)
5690 def transaction(self
): return self
.transaction_
5692 def set_transaction(self
, x
):
5693 self
.has_transaction_
= 1
5694 self
.transaction_
= x
5696 def clear_transaction(self
):
5697 if self
.has_transaction_
:
5698 self
.has_transaction_
= 0
5699 self
.transaction_
= ""
5701 def has_transaction(self
): return self
.has_transaction_
5704 if self
.mutation_
is None:
5705 self
.lazy_init_lock_
.acquire()
5707 if self
.mutation_
is None: self
.mutation_
= Mutation()
5709 self
.lazy_init_lock_
.release()
5710 return self
.mutation_
5712 def mutable_mutation(self
): self
.has_mutation_
= 1; return self
.mutation()
5714 def clear_mutation(self
):
5716 if self
.has_mutation_
:
5717 self
.has_mutation_
= 0;
5718 if self
.mutation_
is not None: self
.mutation_
.Clear()
5720 def has_mutation(self
): return self
.has_mutation_
5722 def mode(self
): return self
.mode_
5724 def set_mode(self
, x
):
5728 def clear_mode(self
):
5733 def has_mode(self
): return self
.has_mode_
5736 def MergeFrom(self
, x
):
5737 assert x
is not self
5738 if (x
.has_transaction()): self
.set_transaction(x
.transaction())
5739 if (x
.has_mutation()): self
.mutable_mutation().MergeFrom(x
.mutation())
5740 if (x
.has_mode()): self
.set_mode(x
.mode())
5742 if _net_proto___parse__python
is not None:
5743 def _CMergeFromString(self
, s
):
5744 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.CommitRequest', s
)
5746 if _net_proto___parse__python
is not None:
5748 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.CommitRequest')
5750 if _net_proto___parse__python
is not None:
5751 def _CEncodePartial(self
):
5752 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.CommitRequest')
5754 if _net_proto___parse__python
is not None:
5755 def _CToASCII(self
, output_format
):
5756 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.CommitRequest', output_format
)
5759 if _net_proto___parse__python
is not None:
5760 def ParseASCII(self
, s
):
5761 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.CommitRequest', s
)
5764 if _net_proto___parse__python
is not None:
5765 def ParseASCIIIgnoreUnknown(self
, s
):
5766 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.CommitRequest', s
)
5769 def Equals(self
, x
):
5770 if x
is self
: return 1
5771 if self
.has_transaction_
!= x
.has_transaction_
: return 0
5772 if self
.has_transaction_
and self
.transaction_
!= x
.transaction_
: return 0
5773 if self
.has_mutation_
!= x
.has_mutation_
: return 0
5774 if self
.has_mutation_
and self
.mutation_
!= x
.mutation_
: return 0
5775 if self
.has_mode_
!= x
.has_mode_
: return 0
5776 if self
.has_mode_
and self
.mode_
!= x
.mode_
: return 0
5779 def IsInitialized(self
, debug_strs
=None):
5781 if (self
.has_mutation_
and not self
.mutation_
.IsInitialized(debug_strs
)): initialized
= 0
5786 if (self
.has_transaction_
): n
+= 1 + self
.lengthString(len(self
.transaction_
))
5787 if (self
.has_mutation_
): n
+= 1 + self
.lengthString(self
.mutation_
.ByteSize())
5788 if (self
.has_mode_
): n
+= 1 + self
.lengthVarInt64(self
.mode_
)
5791 def ByteSizePartial(self
):
5793 if (self
.has_transaction_
): n
+= 1 + self
.lengthString(len(self
.transaction_
))
5794 if (self
.has_mutation_
): n
+= 1 + self
.lengthString(self
.mutation_
.ByteSizePartial())
5795 if (self
.has_mode_
): n
+= 1 + self
.lengthVarInt64(self
.mode_
)
5799 self
.clear_transaction()
5800 self
.clear_mutation()
5803 def OutputUnchecked(self
, out
):
5804 if (self
.has_transaction_
):
5806 out
.putPrefixedString(self
.transaction_
)
5807 if (self
.has_mutation_
):
5809 out
.putVarInt32(self
.mutation_
.ByteSize())
5810 self
.mutation_
.OutputUnchecked(out
)
5811 if (self
.has_mode_
):
5813 out
.putVarInt32(self
.mode_
)
5815 def OutputPartial(self
, out
):
5816 if (self
.has_transaction_
):
5818 out
.putPrefixedString(self
.transaction_
)
5819 if (self
.has_mutation_
):
5821 out
.putVarInt32(self
.mutation_
.ByteSizePartial())
5822 self
.mutation_
.OutputPartial(out
)
5823 if (self
.has_mode_
):
5825 out
.putVarInt32(self
.mode_
)
5827 def TryMerge(self
, d
):
5828 while d
.avail() > 0:
5829 tt
= d
.getVarInt32()
5831 self
.set_transaction(d
.getPrefixedString())
5834 length
= d
.getVarInt32()
5835 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
5837 self
.mutable_mutation().TryMerge(tmp
)
5840 self
.set_mode(d
.getVarInt32())
5844 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
5848 def __str__(self
, prefix
="", printElemNumber
=0):
5850 if self
.has_transaction_
: res
+=prefix
+("transaction: %s\n" % self
.DebugFormatString(self
.transaction_
))
5851 if self
.has_mutation_
:
5852 res
+=prefix
+"mutation <\n"
5853 res
+=self
.mutation_
.__str
__(prefix
+ " ", printElemNumber
)
5855 if self
.has_mode_
: res
+=prefix
+("mode: %s\n" % self
.DebugFormatInt32(self
.mode_
))
5859 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
5860 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
5866 _TEXT
= _BuildTagLookupTable({
5873 _TYPES
= _BuildTagLookupTable({
5874 0: ProtocolBuffer
.Encoder
.NUMERIC
,
5875 1: ProtocolBuffer
.Encoder
.STRING
,
5876 2: ProtocolBuffer
.Encoder
.STRING
,
5877 4: ProtocolBuffer
.Encoder
.NUMERIC
,
5878 }, 4, ProtocolBuffer
.Encoder
.MAX_TYPE
)
5882 _STYLE_CONTENT_TYPE
= """"""
5883 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.CommitRequest'
5884 _SERIALIZED_DESCRIPTOR
= array
.array('B')
5885 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbW1pdFJlcXVlc3QTGgt0cmFuc2FjdGlvbiABKAIwCTgBFBMaCG11dGF0aW9uIAIoAjALOAFKIGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lk11dGF0aW9uowGqAQVjdHlwZbIBBnByb3RvMqQBFBMaBG1vZGUgBCgAMAU4AUIBMWgAowGqAQdkZWZhdWx0sgENVFJBTlNBQ1RJT05BTKQBFHN6BE1vZGWLAZIBDVRSQU5TQUNUSU9OQUyYAQGMAYsBkgERTk9OX1RSQU5TQUNUSU9OQUyYAQKMAXTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
5886 if _net_proto___parse__python
is not None:
5887 _net_proto___parse__python
.RegisterType(
5888 _SERIALIZED_DESCRIPTOR
.tostring())
5890 class CommitResponse(ProtocolBuffer
.ProtocolMessage
):
5891 has_mutation_result_
= 0
5892 mutation_result_
= None
5894 def __init__(self
, contents
=None):
5895 self
.lazy_init_lock_
= thread
.allocate_lock()
5896 if contents
is not None: self
.MergeFromString(contents
)
5898 def mutation_result(self
):
5899 if self
.mutation_result_
is None:
5900 self
.lazy_init_lock_
.acquire()
5902 if self
.mutation_result_
is None: self
.mutation_result_
= MutationResult()
5904 self
.lazy_init_lock_
.release()
5905 return self
.mutation_result_
5907 def mutable_mutation_result(self
): self
.has_mutation_result_
= 1; return self
.mutation_result()
5909 def clear_mutation_result(self
):
5911 if self
.has_mutation_result_
:
5912 self
.has_mutation_result_
= 0;
5913 if self
.mutation_result_
is not None: self
.mutation_result_
.Clear()
5915 def has_mutation_result(self
): return self
.has_mutation_result_
5918 def MergeFrom(self
, x
):
5919 assert x
is not self
5920 if (x
.has_mutation_result()): self
.mutable_mutation_result().MergeFrom(x
.mutation_result())
5922 if _net_proto___parse__python
is not None:
5923 def _CMergeFromString(self
, s
):
5924 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.CommitResponse', s
)
5926 if _net_proto___parse__python
is not None:
5928 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.CommitResponse')
5930 if _net_proto___parse__python
is not None:
5931 def _CEncodePartial(self
):
5932 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.CommitResponse')
5934 if _net_proto___parse__python
is not None:
5935 def _CToASCII(self
, output_format
):
5936 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.CommitResponse', output_format
)
5939 if _net_proto___parse__python
is not None:
5940 def ParseASCII(self
, s
):
5941 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.CommitResponse', s
)
5944 if _net_proto___parse__python
is not None:
5945 def ParseASCIIIgnoreUnknown(self
, s
):
5946 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.CommitResponse', s
)
5949 def Equals(self
, x
):
5950 if x
is self
: return 1
5951 if self
.has_mutation_result_
!= x
.has_mutation_result_
: return 0
5952 if self
.has_mutation_result_
and self
.mutation_result_
!= x
.mutation_result_
: return 0
5955 def IsInitialized(self
, debug_strs
=None):
5957 if (self
.has_mutation_result_
and not self
.mutation_result_
.IsInitialized(debug_strs
)): initialized
= 0
5962 if (self
.has_mutation_result_
): n
+= 1 + self
.lengthString(self
.mutation_result_
.ByteSize())
5965 def ByteSizePartial(self
):
5967 if (self
.has_mutation_result_
): n
+= 1 + self
.lengthString(self
.mutation_result_
.ByteSizePartial())
5971 self
.clear_mutation_result()
5973 def OutputUnchecked(self
, out
):
5974 if (self
.has_mutation_result_
):
5976 out
.putVarInt32(self
.mutation_result_
.ByteSize())
5977 self
.mutation_result_
.OutputUnchecked(out
)
5979 def OutputPartial(self
, out
):
5980 if (self
.has_mutation_result_
):
5982 out
.putVarInt32(self
.mutation_result_
.ByteSizePartial())
5983 self
.mutation_result_
.OutputPartial(out
)
5985 def TryMerge(self
, d
):
5986 while d
.avail() > 0:
5987 tt
= d
.getVarInt32()
5989 length
= d
.getVarInt32()
5990 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
5992 self
.mutable_mutation_result().TryMerge(tmp
)
5996 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
6000 def __str__(self
, prefix
="", printElemNumber
=0):
6002 if self
.has_mutation_result_
:
6003 res
+=prefix
+"mutation_result <\n"
6004 res
+=self
.mutation_result_
.__str
__(prefix
+ " ", printElemNumber
)
6009 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
6010 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
6012 kmutation_result
= 1
6014 _TEXT
= _BuildTagLookupTable({
6016 1: "mutation_result",
6019 _TYPES
= _BuildTagLookupTable({
6020 0: ProtocolBuffer
.Encoder
.NUMERIC
,
6021 1: ProtocolBuffer
.Encoder
.STRING
,
6022 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
6026 _STYLE_CONTENT_TYPE
= """"""
6027 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.CommitResponse'
6028 _SERIALIZED_DESCRIPTOR
= array
.array('B')
6029 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkNvbW1pdFJlc3BvbnNlExoPbXV0YXRpb25fcmVzdWx0IAEoAjALOAFKJmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lk11dGF0aW9uUmVzdWx0owGqAQVjdHlwZbIBBnByb3RvMqQBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
6030 if _net_proto___parse__python
is not None:
6031 _net_proto___parse__python
.RegisterType(
6032 _SERIALIZED_DESCRIPTOR
.tostring())
6034 class AllocateIdsRequest(ProtocolBuffer
.ProtocolMessage
):
6036 def __init__(self
, contents
=None):
6039 if contents
is not None: self
.MergeFromString(contents
)
6041 def allocate_size(self
): return len(self
.allocate_
)
6042 def allocate_list(self
): return self
.allocate_
6044 def allocate(self
, i
):
6045 return self
.allocate_
[i
]
6047 def mutable_allocate(self
, i
):
6048 return self
.allocate_
[i
]
6050 def add_allocate(self
):
6051 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
6052 self
.allocate_
.append(x
)
6055 def clear_allocate(self
):
6057 def reserve_size(self
): return len(self
.reserve_
)
6058 def reserve_list(self
): return self
.reserve_
6060 def reserve(self
, i
):
6061 return self
.reserve_
[i
]
6063 def mutable_reserve(self
, i
):
6064 return self
.reserve_
[i
]
6066 def add_reserve(self
):
6067 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
6068 self
.reserve_
.append(x
)
6071 def clear_reserve(self
):
6074 def MergeFrom(self
, x
):
6075 assert x
is not self
6076 for i
in xrange(x
.allocate_size()): self
.add_allocate().CopyFrom(x
.allocate(i
))
6077 for i
in xrange(x
.reserve_size()): self
.add_reserve().CopyFrom(x
.reserve(i
))
6079 if _net_proto___parse__python
is not None:
6080 def _CMergeFromString(self
, s
):
6081 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.AllocateIdsRequest', s
)
6083 if _net_proto___parse__python
is not None:
6085 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.AllocateIdsRequest')
6087 if _net_proto___parse__python
is not None:
6088 def _CEncodePartial(self
):
6089 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.AllocateIdsRequest')
6091 if _net_proto___parse__python
is not None:
6092 def _CToASCII(self
, output_format
):
6093 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.AllocateIdsRequest', output_format
)
6096 if _net_proto___parse__python
is not None:
6097 def ParseASCII(self
, s
):
6098 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.AllocateIdsRequest', s
)
6101 if _net_proto___parse__python
is not None:
6102 def ParseASCIIIgnoreUnknown(self
, s
):
6103 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.AllocateIdsRequest', s
)
6106 def Equals(self
, x
):
6107 if x
is self
: return 1
6108 if len(self
.allocate_
) != len(x
.allocate_
): return 0
6109 for e1
, e2
in zip(self
.allocate_
, x
.allocate_
):
6110 if e1
!= e2
: return 0
6111 if len(self
.reserve_
) != len(x
.reserve_
): return 0
6112 for e1
, e2
in zip(self
.reserve_
, x
.reserve_
):
6113 if e1
!= e2
: return 0
6116 def IsInitialized(self
, debug_strs
=None):
6118 for p
in self
.allocate_
:
6119 if not p
.IsInitialized(debug_strs
): initialized
=0
6120 for p
in self
.reserve_
:
6121 if not p
.IsInitialized(debug_strs
): initialized
=0
6126 n
+= 1 * len(self
.allocate_
)
6127 for i
in xrange(len(self
.allocate_
)): n
+= self
.lengthString(self
.allocate_
[i
].ByteSize())
6128 n
+= 1 * len(self
.reserve_
)
6129 for i
in xrange(len(self
.reserve_
)): n
+= self
.lengthString(self
.reserve_
[i
].ByteSize())
6132 def ByteSizePartial(self
):
6134 n
+= 1 * len(self
.allocate_
)
6135 for i
in xrange(len(self
.allocate_
)): n
+= self
.lengthString(self
.allocate_
[i
].ByteSizePartial())
6136 n
+= 1 * len(self
.reserve_
)
6137 for i
in xrange(len(self
.reserve_
)): n
+= self
.lengthString(self
.reserve_
[i
].ByteSizePartial())
6141 self
.clear_allocate()
6142 self
.clear_reserve()
6144 def OutputUnchecked(self
, out
):
6145 for i
in xrange(len(self
.allocate_
)):
6147 out
.putVarInt32(self
.allocate_
[i
].ByteSize())
6148 self
.allocate_
[i
].OutputUnchecked(out
)
6149 for i
in xrange(len(self
.reserve_
)):
6151 out
.putVarInt32(self
.reserve_
[i
].ByteSize())
6152 self
.reserve_
[i
].OutputUnchecked(out
)
6154 def OutputPartial(self
, out
):
6155 for i
in xrange(len(self
.allocate_
)):
6157 out
.putVarInt32(self
.allocate_
[i
].ByteSizePartial())
6158 self
.allocate_
[i
].OutputPartial(out
)
6159 for i
in xrange(len(self
.reserve_
)):
6161 out
.putVarInt32(self
.reserve_
[i
].ByteSizePartial())
6162 self
.reserve_
[i
].OutputPartial(out
)
6164 def TryMerge(self
, d
):
6165 while d
.avail() > 0:
6166 tt
= d
.getVarInt32()
6168 length
= d
.getVarInt32()
6169 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
6171 self
.add_allocate().TryMerge(tmp
)
6174 length
= d
.getVarInt32()
6175 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
6177 self
.add_reserve().TryMerge(tmp
)
6181 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
6185 def __str__(self
, prefix
="", printElemNumber
=0):
6188 for e
in self
.allocate_
:
6190 if printElemNumber
: elm
="(%d)" % cnt
6191 res
+=prefix
+("allocate%s <\n" % elm
)
6192 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
6196 for e
in self
.reserve_
:
6198 if printElemNumber
: elm
="(%d)" % cnt
6199 res
+=prefix
+("reserve%s <\n" % elm
)
6200 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
6206 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
6207 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
6212 _TEXT
= _BuildTagLookupTable({
6218 _TYPES
= _BuildTagLookupTable({
6219 0: ProtocolBuffer
.Encoder
.NUMERIC
,
6220 1: ProtocolBuffer
.Encoder
.STRING
,
6221 2: ProtocolBuffer
.Encoder
.STRING
,
6222 }, 2, ProtocolBuffer
.Encoder
.MAX_TYPE
)
6226 _STYLE_CONTENT_TYPE
= """"""
6227 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.AllocateIdsRequest'
6228 _SERIALIZED_DESCRIPTOR
= array
.array('B')
6229 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KKmFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkFsbG9jYXRlSWRzUmVxdWVzdBMaCGFsbG9jYXRlIAEoAjALOANKG2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktleaMBqgEFY3R5cGWyAQZwcm90bzKkARQTGgdyZXNlcnZlIAIoAjALOANKG2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LktleaMBqgEFY3R5cGWyAQZwcm90bzKkARTCAR1hcHBob3N0aW5nLmRhdGFzdG9yZS52NC5FcnJvcg=="))
6230 if _net_proto___parse__python
is not None:
6231 _net_proto___parse__python
.RegisterType(
6232 _SERIALIZED_DESCRIPTOR
.tostring())
6234 class AllocateIdsResponse(ProtocolBuffer
.ProtocolMessage
):
6236 def __init__(self
, contents
=None):
6237 self
.allocated_
= []
6238 if contents
is not None: self
.MergeFromString(contents
)
6240 def allocated_size(self
): return len(self
.allocated_
)
6241 def allocated_list(self
): return self
.allocated_
6243 def allocated(self
, i
):
6244 return self
.allocated_
[i
]
6246 def mutable_allocated(self
, i
):
6247 return self
.allocated_
[i
]
6249 def add_allocated(self
):
6250 x
= google
.appengine
.datastore
.entity_v4_pb
.Key()
6251 self
.allocated_
.append(x
)
6254 def clear_allocated(self
):
6255 self
.allocated_
= []
6257 def MergeFrom(self
, x
):
6258 assert x
is not self
6259 for i
in xrange(x
.allocated_size()): self
.add_allocated().CopyFrom(x
.allocated(i
))
6261 if _net_proto___parse__python
is not None:
6262 def _CMergeFromString(self
, s
):
6263 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.AllocateIdsResponse', s
)
6265 if _net_proto___parse__python
is not None:
6267 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.AllocateIdsResponse')
6269 if _net_proto___parse__python
is not None:
6270 def _CEncodePartial(self
):
6271 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.AllocateIdsResponse')
6273 if _net_proto___parse__python
is not None:
6274 def _CToASCII(self
, output_format
):
6275 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.AllocateIdsResponse', output_format
)
6278 if _net_proto___parse__python
is not None:
6279 def ParseASCII(self
, s
):
6280 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.AllocateIdsResponse', s
)
6283 if _net_proto___parse__python
is not None:
6284 def ParseASCIIIgnoreUnknown(self
, s
):
6285 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.AllocateIdsResponse', s
)
6288 def Equals(self
, x
):
6289 if x
is self
: return 1
6290 if len(self
.allocated_
) != len(x
.allocated_
): return 0
6291 for e1
, e2
in zip(self
.allocated_
, x
.allocated_
):
6292 if e1
!= e2
: return 0
6295 def IsInitialized(self
, debug_strs
=None):
6297 for p
in self
.allocated_
:
6298 if not p
.IsInitialized(debug_strs
): initialized
=0
6303 n
+= 1 * len(self
.allocated_
)
6304 for i
in xrange(len(self
.allocated_
)): n
+= self
.lengthString(self
.allocated_
[i
].ByteSize())
6307 def ByteSizePartial(self
):
6309 n
+= 1 * len(self
.allocated_
)
6310 for i
in xrange(len(self
.allocated_
)): n
+= self
.lengthString(self
.allocated_
[i
].ByteSizePartial())
6314 self
.clear_allocated()
6316 def OutputUnchecked(self
, out
):
6317 for i
in xrange(len(self
.allocated_
)):
6319 out
.putVarInt32(self
.allocated_
[i
].ByteSize())
6320 self
.allocated_
[i
].OutputUnchecked(out
)
6322 def OutputPartial(self
, out
):
6323 for i
in xrange(len(self
.allocated_
)):
6325 out
.putVarInt32(self
.allocated_
[i
].ByteSizePartial())
6326 self
.allocated_
[i
].OutputPartial(out
)
6328 def TryMerge(self
, d
):
6329 while d
.avail() > 0:
6330 tt
= d
.getVarInt32()
6332 length
= d
.getVarInt32()
6333 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
6335 self
.add_allocated().TryMerge(tmp
)
6339 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
6343 def __str__(self
, prefix
="", printElemNumber
=0):
6346 for e
in self
.allocated_
:
6348 if printElemNumber
: elm
="(%d)" % cnt
6349 res
+=prefix
+("allocated%s <\n" % elm
)
6350 res
+=e
.__str
__(prefix
+ " ", printElemNumber
)
6356 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
6357 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
6361 _TEXT
= _BuildTagLookupTable({
6366 _TYPES
= _BuildTagLookupTable({
6367 0: ProtocolBuffer
.Encoder
.NUMERIC
,
6368 1: ProtocolBuffer
.Encoder
.STRING
,
6369 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
6373 _STYLE_CONTENT_TYPE
= """"""
6374 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.AllocateIdsResponse'
6375 _SERIALIZED_DESCRIPTOR
= array
.array('B')
6376 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KK2FwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkFsbG9jYXRlSWRzUmVzcG9uc2UTGglhbGxvY2F0ZWQgASgCMAs4A0obYXBwaG9zdGluZy5kYXRhc3RvcmUudjQuS2V5owGqAQVjdHlwZbIBBnByb3RvMqQBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
6377 if _net_proto___parse__python
is not None:
6378 _net_proto___parse__python
.RegisterType(
6379 _SERIALIZED_DESCRIPTOR
.tostring())
6381 class WriteRequest(ProtocolBuffer
.ProtocolMessage
):
6384 def __init__(self
, contents
=None):
6385 self
.mutation_
= Mutation()
6386 if contents
is not None: self
.MergeFromString(contents
)
6388 def mutation(self
): return self
.mutation_
6390 def mutable_mutation(self
): self
.has_mutation_
= 1; return self
.mutation_
6392 def clear_mutation(self
):self
.has_mutation_
= 0; self
.mutation_
.Clear()
6394 def has_mutation(self
): return self
.has_mutation_
6397 def MergeFrom(self
, x
):
6398 assert x
is not self
6399 if (x
.has_mutation()): self
.mutable_mutation().MergeFrom(x
.mutation())
6401 if _net_proto___parse__python
is not None:
6402 def _CMergeFromString(self
, s
):
6403 _net_proto___parse__python
.MergeFromString(self
, 'apphosting.datastore.v4.WriteRequest', s
)
6405 if _net_proto___parse__python
is not None:
6407 return _net_proto___parse__python
.Encode(self
, 'apphosting.datastore.v4.WriteRequest')
6409 if _net_proto___parse__python
is not None:
6410 def _CEncodePartial(self
):
6411 return _net_proto___parse__python
.EncodePartial(self
, 'apphosting.datastore.v4.WriteRequest')
6413 if _net_proto___parse__python
is not None:
6414 def _CToASCII(self
, output_format
):
6415 return _net_proto___parse__python
.ToASCII(self
, 'apphosting.datastore.v4.WriteRequest', output_format
)
6418 if _net_proto___parse__python
is not None:
6419 def ParseASCII(self
, s
):
6420 _net_proto___parse__python
.ParseASCII(self
, 'apphosting.datastore.v4.WriteRequest', s
)
6423 if _net_proto___parse__python
is not None:
6424 def ParseASCIIIgnoreUnknown(self
, s
):
6425 _net_proto___parse__python
.ParseASCIIIgnoreUnknown(self
, 'apphosting.datastore.v4.WriteRequest', s
)
6428 def Equals(self
, x
):
6429 if x
is self
: return 1
6430 if self
.has_mutation_
!= x
.has_mutation_
: return 0
6431 if self
.has_mutation_
and self
.mutation_
!= x
.mutation_
: return 0
6434 def IsInitialized(self
, debug_strs
=None):
6436 if (not self
.has_mutation_
):
6438 if debug_strs
is not None:
6439 debug_strs
.append('Required field: mutation not set.')
6440 elif not self
.mutation_
.IsInitialized(debug_strs
): initialized
= 0
6445 n
+= self
.lengthString(self
.mutation_
.ByteSize())
6448 def ByteSizePartial(self
):
6450 if (self
.has_mutation_
):
6452 n
+= self
.lengthString(self
.mutation_
.ByteSizePartial())
6456 self
.clear_mutation()
6458 def OutputUnchecked(self
, out
):
6460 out
.putVarInt32(self
.mutation_
.ByteSize())
6461 self
.mutation_
.OutputUnchecked(out
)
6463 def OutputPartial(self
, out
):
6464 if (self
.has_mutation_
):
6466 out
.putVarInt32(self
.mutation_
.ByteSizePartial())
6467 self
.mutation_
.OutputPartial(out
)
6469 def TryMerge(self
, d
):
6470 while d
.avail() > 0:
6471 tt
= d
.getVarInt32()
6473 length
= d
.getVarInt32()
6474 tmp
= ProtocolBuffer
.Decoder(d
.buffer(), d
.pos(), d
.pos() + length
)
6476 self
.mutable_mutation().TryMerge(tmp
)
6480 if (tt
== 0): raise ProtocolBuffer
.ProtocolBufferDecodeError
6484 def __str__(self
, prefix
="", printElemNumber
=0):
6486 if self
.has_mutation_
:
6487 res
+=prefix
+"mutation <\n"
6488 res
+=self
.mutation_
.__str
__(prefix
+ " ", printElemNumber
)
6493 def _BuildTagLookupTable(sparse
, maxtag
, default
=None):
6494 return tuple([sparse
.get(i
, default
) for i
in xrange(0, 1+maxtag
)])
6498 _TEXT
= _BuildTagLookupTable({
6503 _TYPES
= _BuildTagLookupTable({
6504 0: ProtocolBuffer
.Encoder
.NUMERIC
,
6505 1: ProtocolBuffer
.Encoder
.STRING
,
6506 }, 1, ProtocolBuffer
.Encoder
.MAX_TYPE
)
6510 _STYLE_CONTENT_TYPE
= """"""
6511 _PROTO_DESCRIPTOR_NAME
= 'apphosting.datastore.v4.WriteRequest'
6512 _SERIALIZED_DESCRIPTOR
= array
.array('B')
6513 _SERIALIZED_DESCRIPTOR
.fromstring(base64
.decodestring("WidhcHBob3N0aW5nL2RhdGFzdG9yZS9kYXRhc3RvcmVfdjQucHJvdG8KJGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LldyaXRlUmVxdWVzdBMaCG11dGF0aW9uIAEoAjALOAJKIGFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0Lk11dGF0aW9uowGqAQVjdHlwZbIBBnByb3RvMqQBFMIBHWFwcGhvc3RpbmcuZGF0YXN0b3JlLnY0LkVycm9y"))
6514 if _net_proto___parse__python
is not None:
6515 _net_proto___parse__python
.RegisterType(
6516 _SERIALIZED_DESCRIPTOR
.tostring())
6520 class _DatastoreV4Service_ClientBaseStub(_client_stub_base_class
):
6521 """Makes Stubby RPC calls to a DatastoreV4Service server."""
6524 '_protorpc_BeginTransaction', '_full_name_BeginTransaction',
6525 '_protorpc_Rollback', '_full_name_Rollback',
6526 '_protorpc_Commit', '_full_name_Commit',
6527 '_protorpc_RunQuery', '_full_name_RunQuery',
6528 '_protorpc_ContinueQuery', '_full_name_ContinueQuery',
6529 '_protorpc_Lookup', '_full_name_Lookup',
6530 '_protorpc_AllocateIds', '_full_name_AllocateIds',
6531 '_protorpc_Get', '_full_name_Get',
6532 '_protorpc_Write', '_full_name_Write',
6535 def __init__(self
, rpc_stub
):
6536 self
._stub
= rpc_stub
6538 self
._protorpc
_BeginTransaction
= pywraprpc
.RPC()
6539 self
._full
_name
_BeginTransaction
= self
._stub
.GetFullMethodName(
6542 self
._protorpc
_Rollback
= pywraprpc
.RPC()
6543 self
._full
_name
_Rollback
= self
._stub
.GetFullMethodName(
6546 self
._protorpc
_Commit
= pywraprpc
.RPC()
6547 self
._full
_name
_Commit
= self
._stub
.GetFullMethodName(
6550 self
._protorpc
_RunQuery
= pywraprpc
.RPC()
6551 self
._full
_name
_RunQuery
= self
._stub
.GetFullMethodName(
6554 self
._protorpc
_ContinueQuery
= pywraprpc
.RPC()
6555 self
._full
_name
_ContinueQuery
= self
._stub
.GetFullMethodName(
6558 self
._protorpc
_Lookup
= pywraprpc
.RPC()
6559 self
._full
_name
_Lookup
= self
._stub
.GetFullMethodName(
6562 self
._protorpc
_AllocateIds
= pywraprpc
.RPC()
6563 self
._full
_name
_AllocateIds
= self
._stub
.GetFullMethodName(
6566 self
._protorpc
_Get
= pywraprpc
.RPC()
6567 self
._full
_name
_Get
= self
._stub
.GetFullMethodName(
6570 self
._protorpc
_Write
= pywraprpc
.RPC()
6571 self
._full
_name
_Write
= self
._stub
.GetFullMethodName(
6574 def BeginTransaction(self
, request
, rpc
=None, callback
=None, response
=None):
6575 """Make a BeginTransaction RPC call.
6578 request: a BeginTransactionRequest instance.
6579 rpc: Optional RPC instance to use for the call.
6580 callback: Optional final callback. Will be called as
6581 callback(rpc, result) when the rpc completes. If None, the
6582 call is synchronous.
6583 response: Optional ProtocolMessage to be filled in with response.
6586 The BeginTransactionResponse if callback is None. Otherwise, returns None.
6589 if response
is None:
6590 response
= BeginTransactionResponse
6591 return self
._MakeCall
(rpc
,
6592 self
._full
_name
_BeginTransaction
,
6597 self
._protorpc
_BeginTransaction
)
6599 def Rollback(self
, request
, rpc
=None, callback
=None, response
=None):
6600 """Make a Rollback RPC call.
6603 request: a RollbackRequest instance.
6604 rpc: Optional RPC instance to use for the call.
6605 callback: Optional final callback. Will be called as
6606 callback(rpc, result) when the rpc completes. If None, the
6607 call is synchronous.
6608 response: Optional ProtocolMessage to be filled in with response.
6611 The RollbackResponse if callback is None. Otherwise, returns None.
6614 if response
is None:
6615 response
= RollbackResponse
6616 return self
._MakeCall
(rpc
,
6617 self
._full
_name
_Rollback
,
6622 self
._protorpc
_Rollback
)
6624 def Commit(self
, request
, rpc
=None, callback
=None, response
=None):
6625 """Make a Commit RPC call.
6628 request: a CommitRequest instance.
6629 rpc: Optional RPC instance to use for the call.
6630 callback: Optional final callback. Will be called as
6631 callback(rpc, result) when the rpc completes. If None, the
6632 call is synchronous.
6633 response: Optional ProtocolMessage to be filled in with response.
6636 The CommitResponse if callback is None. Otherwise, returns None.
6639 if response
is None:
6640 response
= CommitResponse
6641 return self
._MakeCall
(rpc
,
6642 self
._full
_name
_Commit
,
6647 self
._protorpc
_Commit
)
6649 def RunQuery(self
, request
, rpc
=None, callback
=None, response
=None):
6650 """Make a RunQuery RPC call.
6653 request: a RunQueryRequest instance.
6654 rpc: Optional RPC instance to use for the call.
6655 callback: Optional final callback. Will be called as
6656 callback(rpc, result) when the rpc completes. If None, the
6657 call is synchronous.
6658 response: Optional ProtocolMessage to be filled in with response.
6661 The RunQueryResponse if callback is None. Otherwise, returns None.
6664 if response
is None:
6665 response
= RunQueryResponse
6666 return self
._MakeCall
(rpc
,
6667 self
._full
_name
_RunQuery
,
6672 self
._protorpc
_RunQuery
)
6674 def ContinueQuery(self
, request
, rpc
=None, callback
=None, response
=None):
6675 """Make a ContinueQuery RPC call.
6678 request: a ContinueQueryRequest instance.
6679 rpc: Optional RPC instance to use for the call.
6680 callback: Optional final callback. Will be called as
6681 callback(rpc, result) when the rpc completes. If None, the
6682 call is synchronous.
6683 response: Optional ProtocolMessage to be filled in with response.
6686 The ContinueQueryResponse if callback is None. Otherwise, returns None.
6689 if response
is None:
6690 response
= ContinueQueryResponse
6691 return self
._MakeCall
(rpc
,
6692 self
._full
_name
_ContinueQuery
,
6697 self
._protorpc
_ContinueQuery
)
6699 def Lookup(self
, request
, rpc
=None, callback
=None, response
=None):
6700 """Make a Lookup RPC call.
6703 request: a LookupRequest instance.
6704 rpc: Optional RPC instance to use for the call.
6705 callback: Optional final callback. Will be called as
6706 callback(rpc, result) when the rpc completes. If None, the
6707 call is synchronous.
6708 response: Optional ProtocolMessage to be filled in with response.
6711 The LookupResponse if callback is None. Otherwise, returns None.
6714 if response
is None:
6715 response
= LookupResponse
6716 return self
._MakeCall
(rpc
,
6717 self
._full
_name
_Lookup
,
6722 self
._protorpc
_Lookup
)
6724 def AllocateIds(self
, request
, rpc
=None, callback
=None, response
=None):
6725 """Make a AllocateIds RPC call.
6728 request: a AllocateIdsRequest instance.
6729 rpc: Optional RPC instance to use for the call.
6730 callback: Optional final callback. Will be called as
6731 callback(rpc, result) when the rpc completes. If None, the
6732 call is synchronous.
6733 response: Optional ProtocolMessage to be filled in with response.
6736 The AllocateIdsResponse if callback is None. Otherwise, returns None.
6739 if response
is None:
6740 response
= AllocateIdsResponse
6741 return self
._MakeCall
(rpc
,
6742 self
._full
_name
_AllocateIds
,
6747 self
._protorpc
_AllocateIds
)
6749 def Get(self
, request
, rpc
=None, callback
=None, response
=None):
6750 """Make a Get RPC call.
6753 request: a LookupRequest instance.
6754 rpc: Optional RPC instance to use for the call.
6755 callback: Optional final callback. Will be called as
6756 callback(rpc, result) when the rpc completes. If None, the
6757 call is synchronous.
6758 response: Optional ProtocolMessage to be filled in with response.
6761 The LookupResponse if callback is None. Otherwise, returns None.
6764 if response
is None:
6765 response
= LookupResponse
6766 return self
._MakeCall
(rpc
,
6767 self
._full
_name
_Get
,
6774 def Write(self
, request
, rpc
=None, callback
=None, response
=None):
6775 """Make a Write RPC call.
6778 request: a WriteRequest instance.
6779 rpc: Optional RPC instance to use for the call.
6780 callback: Optional final callback. Will be called as
6781 callback(rpc, result) when the rpc completes. If None, the
6782 call is synchronous.
6783 response: Optional ProtocolMessage to be filled in with response.
6786 The CommitResponse if callback is None. Otherwise, returns None.
6789 if response
is None:
6790 response
= CommitResponse
6791 return self
._MakeCall
(rpc
,
6792 self
._full
_name
_Write
,
6797 self
._protorpc
_Write
)
6800 class _DatastoreV4Service_ClientStub(_DatastoreV4Service_ClientBaseStub
):
6801 __slots__
= ('_params',)
6802 def __init__(self
, rpc_stub_parameters
, service_name
):
6803 if service_name
is None:
6804 service_name
= 'DatastoreV4Service'
6805 _DatastoreV4Service_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, rpc_stub_parameters
))
6806 self
._params
= rpc_stub_parameters
6809 class _DatastoreV4Service_RPC2ClientStub(_DatastoreV4Service_ClientBaseStub
):
6811 def __init__(self
, server
, channel
, service_name
):
6812 if service_name
is None:
6813 service_name
= 'DatastoreV4Service'
6814 if channel
is not None:
6815 if channel
.version() == 1:
6816 raise RuntimeError('Expecting an RPC2 channel to create the stub')
6817 _DatastoreV4Service_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, channel
))
6818 elif server
is not None:
6819 _DatastoreV4Service_ClientBaseStub
.__init
__(self
, pywraprpc
.RPC_GenericStub(service_name
, pywraprpc
.NewClientChannel(server
)))
6821 raise RuntimeError('Invalid argument combination to create a stub')
6824 class DatastoreV4Service(_server_stub_base_class
):
6825 """Base class for DatastoreV4Service Stubby servers."""
6828 def _MethodSignatures(cls
):
6829 """Returns a dict of {<method-name>: (<request-type>, <response-type>)}."""
6831 'BeginTransaction': (BeginTransactionRequest
, BeginTransactionResponse
),
6832 'Rollback': (RollbackRequest
, RollbackResponse
),
6833 'Commit': (CommitRequest
, CommitResponse
),
6834 'RunQuery': (RunQueryRequest
, RunQueryResponse
),
6835 'ContinueQuery': (ContinueQueryRequest
, ContinueQueryResponse
),
6836 'Lookup': (LookupRequest
, LookupResponse
),
6837 'AllocateIds': (AllocateIdsRequest
, AllocateIdsResponse
),
6838 'Get': (LookupRequest
, LookupResponse
),
6839 'Write': (WriteRequest
, CommitResponse
),
6843 def _StreamMethodSignatures(cls
):
6844 """Returns a dict of {<method-name>: (<request-type>, <stream-type>, <response-type>)}."""
6848 def __init__(self
, *args
, **kwargs
):
6849 """Creates a Stubby RPC server.
6851 See BaseRpcServer.__init__ in rpcserver.py for detail on arguments.
6853 if _server_stub_base_class
is object:
6854 raise NotImplementedError('Add //net/rpc/python:rpcserver as a '
6855 'dependency for Stubby server support.')
6856 _server_stub_base_class
.__init
__(self
, 'apphosting.datastore.v4.DatastoreV4Service', *args
, **kwargs
)
6859 def NewStub(rpc_stub_parameters
, service_name
=None):
6860 """Creates a new DatastoreV4Service Stubby client stub.
6863 rpc_stub_parameters: an RPC_StubParameter instance.
6864 service_name: the service name used by the Stubby server.
6867 if _client_stub_base_class
is object:
6868 raise RuntimeError('Add //net/rpc/python as a dependency to use Stubby')
6869 return _DatastoreV4Service_ClientStub(rpc_stub_parameters
, service_name
)
6872 def NewRPC2Stub(server
=None, channel
=None, service_name
=None):
6873 """Creates a new DatastoreV4Service Stubby2 client stub.
6876 server: host:port or bns address.
6877 channel: directly use a channel to create a stub. Will ignore server
6878 argument if this is specified.
6879 service_name: the service name used by the Stubby server.
6882 if _client_stub_base_class
is object:
6883 raise RuntimeError('Add //net/rpc/python as a dependency to use Stubby')
6884 return _DatastoreV4Service_RPC2ClientStub(server
, channel
, service_name
)
6886 def BeginTransaction(self
, rpc
, request
, response
):
6887 """Handles a BeginTransaction RPC call. You should override this.
6890 rpc: a Stubby RPC object
6891 request: a BeginTransactionRequest that contains the client request
6892 response: a BeginTransactionResponse that should be modified to send the response
6894 raise NotImplementedError
6897 def Rollback(self
, rpc
, request
, response
):
6898 """Handles a Rollback RPC call. You should override this.
6901 rpc: a Stubby RPC object
6902 request: a RollbackRequest that contains the client request
6903 response: a RollbackResponse that should be modified to send the response
6905 raise NotImplementedError
6908 def Commit(self
, rpc
, request
, response
):
6909 """Handles a Commit RPC call. You should override this.
6912 rpc: a Stubby RPC object
6913 request: a CommitRequest that contains the client request
6914 response: a CommitResponse that should be modified to send the response
6916 raise NotImplementedError
6919 def RunQuery(self
, rpc
, request
, response
):
6920 """Handles a RunQuery RPC call. You should override this.
6923 rpc: a Stubby RPC object
6924 request: a RunQueryRequest that contains the client request
6925 response: a RunQueryResponse that should be modified to send the response
6927 raise NotImplementedError
6930 def ContinueQuery(self
, rpc
, request
, response
):
6931 """Handles a ContinueQuery RPC call. You should override this.
6934 rpc: a Stubby RPC object
6935 request: a ContinueQueryRequest that contains the client request
6936 response: a ContinueQueryResponse that should be modified to send the response
6938 raise NotImplementedError
6941 def Lookup(self
, rpc
, request
, response
):
6942 """Handles a Lookup RPC call. You should override this.
6945 rpc: a Stubby RPC object
6946 request: a LookupRequest that contains the client request
6947 response: a LookupResponse that should be modified to send the response
6949 raise NotImplementedError
6952 def AllocateIds(self
, rpc
, request
, response
):
6953 """Handles a AllocateIds RPC call. You should override this.
6956 rpc: a Stubby RPC object
6957 request: a AllocateIdsRequest that contains the client request
6958 response: a AllocateIdsResponse that should be modified to send the response
6960 raise NotImplementedError
6963 def Get(self
, rpc
, request
, response
):
6964 """Handles a Get RPC call. You should override this.
6967 rpc: a Stubby RPC object
6968 request: a LookupRequest that contains the client request
6969 response: a LookupResponse that should be modified to send the response
6971 raise NotImplementedError
6974 def Write(self
, rpc
, request
, response
):
6975 """Handles a Write RPC call. You should override this.
6978 rpc: a Stubby RPC object
6979 request: a WriteRequest that contains the client request
6980 response: a CommitResponse that should be modified to send the response
6982 raise NotImplementedError
6984 def _AddMethodAttributes(self
):
6985 """Sets attributes on Python RPC handlers.
6987 See BaseRpcServer in rpcserver.py for details.
6989 rpcserver
._GetHandlerDecorator
(
6990 self
.BeginTransaction
.im_func
,
6991 BeginTransactionRequest
,
6992 BeginTransactionResponse
,
6995 rpcserver
._GetHandlerDecorator
(
6996 self
.Rollback
.im_func
,
7001 rpcserver
._GetHandlerDecorator
(
7002 self
.Commit
.im_func
,
7007 rpcserver
._GetHandlerDecorator
(
7008 self
.RunQuery
.im_func
,
7013 rpcserver
._GetHandlerDecorator
(
7014 self
.ContinueQuery
.im_func
,
7015 ContinueQueryRequest
,
7016 ContinueQueryResponse
,
7019 rpcserver
._GetHandlerDecorator
(
7020 self
.Lookup
.im_func
,
7025 rpcserver
._GetHandlerDecorator
(
7026 self
.AllocateIds
.im_func
,
7028 AllocateIdsResponse
,
7031 rpcserver
._GetHandlerDecorator
(
7037 rpcserver
._GetHandlerDecorator
(
7044 if _extension_runtime
:
7047 __all__
= ['Error','EntityResult','Query','KindExpression','PropertyReference','PropertyExpression','PropertyOrder','Filter','CompositeFilter','PropertyFilter','GqlQuery','GqlQueryArg','QueryResultBatch','Mutation','MutationResult','ReadOptions','LookupRequest','LookupResponse','RunQueryRequest','RunQueryResponse','ContinueQueryRequest','ContinueQueryResponse','BeginTransactionRequest','BeginTransactionResponse','RollbackRequest','RollbackResponse','CommitRequest','CommitResponse','AllocateIdsRequest','AllocateIdsResponse','WriteRequest','DatastoreV4Service']