thirdparty/google_appengine/google/appengine/datastore/entity_pb.py
changeset 2309 be1b94099f2d
parent 2273 e4cb9c53db3e
child 2864 2e0b0af889be
equal deleted inserted replaced
2307:81c128f487e6 2309:be1b94099f2d
  1017     if (not self.has_value_):
  1017     if (not self.has_value_):
  1018       initialized = 0
  1018       initialized = 0
  1019       if debug_strs is not None:
  1019       if debug_strs is not None:
  1020         debug_strs.append('Required field: value not set.')
  1020         debug_strs.append('Required field: value not set.')
  1021     elif not self.value_.IsInitialized(debug_strs): initialized = 0
  1021     elif not self.value_.IsInitialized(debug_strs): initialized = 0
       
  1022     if (not self.has_multiple_):
       
  1023       initialized = 0
       
  1024       if debug_strs is not None:
       
  1025         debug_strs.append('Required field: multiple not set.')
  1022     return initialized
  1026     return initialized
  1023 
  1027 
  1024   def ByteSize(self):
  1028   def ByteSize(self):
  1025     n = 0
  1029     n = 0
  1026     if (self.has_meaning_): n += 1 + self.lengthVarInt64(self.meaning_)
  1030     if (self.has_meaning_): n += 1 + self.lengthVarInt64(self.meaning_)
  1027     if (self.has_meaning_uri_): n += 1 + self.lengthString(len(self.meaning_uri_))
  1031     if (self.has_meaning_uri_): n += 1 + self.lengthString(len(self.meaning_uri_))
  1028     n += self.lengthString(len(self.name_))
  1032     n += self.lengthString(len(self.name_))
  1029     n += self.lengthString(self.value_.ByteSize())
  1033     n += self.lengthString(self.value_.ByteSize())
  1030     if (self.has_multiple_): n += 2
  1034     return n + 4
  1031     return n + 2
       
  1032 
  1035 
  1033   def Clear(self):
  1036   def Clear(self):
  1034     self.clear_meaning()
  1037     self.clear_meaning()
  1035     self.clear_meaning_uri()
  1038     self.clear_meaning_uri()
  1036     self.clear_name()
  1039     self.clear_name()
  1044     if (self.has_meaning_uri_):
  1047     if (self.has_meaning_uri_):
  1045       out.putVarInt32(18)
  1048       out.putVarInt32(18)
  1046       out.putPrefixedString(self.meaning_uri_)
  1049       out.putPrefixedString(self.meaning_uri_)
  1047     out.putVarInt32(26)
  1050     out.putVarInt32(26)
  1048     out.putPrefixedString(self.name_)
  1051     out.putPrefixedString(self.name_)
  1049     if (self.has_multiple_):
  1052     out.putVarInt32(32)
  1050       out.putVarInt32(32)
  1053     out.putBoolean(self.multiple_)
  1051       out.putBoolean(self.multiple_)
       
  1052     out.putVarInt32(42)
  1054     out.putVarInt32(42)
  1053     out.putVarInt32(self.value_.ByteSize())
  1055     out.putVarInt32(self.value_.ByteSize())
  1054     self.value_.OutputUnchecked(out)
  1056     self.value_.OutputUnchecked(out)
  1055 
  1057 
  1056   def TryMerge(self, d):
  1058   def TryMerge(self, d):