141 res+=prefix+"default_config <\n" |
141 res+=prefix+"default_config <\n" |
142 res+=self.default_config_.__str__(prefix + " ", printElemNumber) |
142 res+=self.default_config_.__str__(prefix + " ", printElemNumber) |
143 res+=prefix+">\n" |
143 res+=prefix+">\n" |
144 return res |
144 return res |
145 |
145 |
|
146 |
|
147 def _BuildTagLookupTable(sparse, maxtag, default=None): |
|
148 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
|
149 |
146 kconfig = 1 |
150 kconfig = 1 |
147 kdefault_config = 2 |
151 kdefault_config = 2 |
148 |
152 |
149 _TEXT = ( |
153 _TEXT = _BuildTagLookupTable({ |
150 "ErrorCode", |
154 0: "ErrorCode", |
151 "config", |
155 1: "config", |
152 "default_config", |
156 2: "default_config", |
153 ) |
157 }, 2) |
154 |
158 |
155 _TYPES = ( |
159 _TYPES = _BuildTagLookupTable({ |
156 ProtocolBuffer.Encoder.NUMERIC, |
160 0: ProtocolBuffer.Encoder.NUMERIC, |
157 ProtocolBuffer.Encoder.STRING, |
161 1: ProtocolBuffer.Encoder.STRING, |
158 |
162 2: ProtocolBuffer.Encoder.STRING, |
159 ProtocolBuffer.Encoder.STRING, |
163 }, 2, ProtocolBuffer.Encoder.MAX_TYPE) |
160 |
|
161 ) |
|
162 |
164 |
163 _STYLE = """""" |
165 _STYLE = """""" |
164 _STYLE_CONTENT_TYPE = """""" |
166 _STYLE_CONTENT_TYPE = """""" |
165 class CapabilityConfig(ProtocolBuffer.ProtocolMessage): |
167 class CapabilityConfig(ProtocolBuffer.ProtocolMessage): |
166 |
168 |
407 if self.has_internal_message_: res+=prefix+("internal_message: %s\n" % self.DebugFormatString(self.internal_message_)) |
409 if self.has_internal_message_: res+=prefix+("internal_message: %s\n" % self.DebugFormatString(self.internal_message_)) |
408 if self.has_admin_message_: res+=prefix+("admin_message: %s\n" % self.DebugFormatString(self.admin_message_)) |
410 if self.has_admin_message_: res+=prefix+("admin_message: %s\n" % self.DebugFormatString(self.admin_message_)) |
409 if self.has_error_message_: res+=prefix+("error_message: %s\n" % self.DebugFormatString(self.error_message_)) |
411 if self.has_error_message_: res+=prefix+("error_message: %s\n" % self.DebugFormatString(self.error_message_)) |
410 return res |
412 return res |
411 |
413 |
|
414 |
|
415 def _BuildTagLookupTable(sparse, maxtag, default=None): |
|
416 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
|
417 |
412 kpackage = 1 |
418 kpackage = 1 |
413 kcapability = 2 |
419 kcapability = 2 |
414 kstatus = 3 |
420 kstatus = 3 |
415 kscheduled_time = 7 |
421 kscheduled_time = 7 |
416 kinternal_message = 4 |
422 kinternal_message = 4 |
417 kadmin_message = 5 |
423 kadmin_message = 5 |
418 kerror_message = 6 |
424 kerror_message = 6 |
419 |
425 |
420 _TEXT = ( |
426 _TEXT = _BuildTagLookupTable({ |
421 "ErrorCode", |
427 0: "ErrorCode", |
422 "package", |
428 1: "package", |
423 "capability", |
429 2: "capability", |
424 "status", |
430 3: "status", |
425 "internal_message", |
431 4: "internal_message", |
426 "admin_message", |
432 5: "admin_message", |
427 "error_message", |
433 6: "error_message", |
428 "scheduled_time", |
434 7: "scheduled_time", |
429 ) |
435 }, 7) |
430 |
436 |
431 _TYPES = ( |
437 _TYPES = _BuildTagLookupTable({ |
432 ProtocolBuffer.Encoder.NUMERIC, |
438 0: ProtocolBuffer.Encoder.NUMERIC, |
433 ProtocolBuffer.Encoder.STRING, |
439 1: ProtocolBuffer.Encoder.STRING, |
434 |
440 2: ProtocolBuffer.Encoder.STRING, |
435 ProtocolBuffer.Encoder.STRING, |
441 3: ProtocolBuffer.Encoder.NUMERIC, |
436 |
442 4: ProtocolBuffer.Encoder.STRING, |
437 ProtocolBuffer.Encoder.NUMERIC, |
443 5: ProtocolBuffer.Encoder.STRING, |
438 |
444 6: ProtocolBuffer.Encoder.STRING, |
439 ProtocolBuffer.Encoder.STRING, |
445 7: ProtocolBuffer.Encoder.STRING, |
440 |
446 }, 7, ProtocolBuffer.Encoder.MAX_TYPE) |
441 ProtocolBuffer.Encoder.STRING, |
|
442 |
|
443 ProtocolBuffer.Encoder.STRING, |
|
444 |
|
445 ProtocolBuffer.Encoder.STRING, |
|
446 |
|
447 ) |
|
448 |
447 |
449 _STYLE = """""" |
448 _STYLE = """""" |
450 _STYLE_CONTENT_TYPE = """""" |
449 _STYLE_CONTENT_TYPE = """""" |
451 |
450 |
452 __all__ = ['CapabilityConfigList','CapabilityConfig'] |
451 __all__ = ['CapabilityConfigList','CapabilityConfig'] |