class ProjectConfig(TlvModel): project_id = BytesField(0x80) description = BytesField(0x90) inherit_from = BytesField(0x91) sync_interval = UintField(0x92) ref_configs = RepeatedField(ModelField(0x93, RefConfig)) labels = RepeatedField(ModelField(0x94, LabelConfig))
class Model(TlvModel): name = NameField() int_val = UintField(0x03) bytes_val = BytesField(0x02) bool_val = BoolField(0x01) array = ModelField(0x05, WordArray) flag_val = UintField(0x06, val_base_type=FlagVal) enum_arr = RepeatedField(UintField(0x07, val_base_type=EnumVal)) str_val = BytesField(0x08, is_string=True) str_arr = RepeatedField(BytesField(0x09, is_string=True))
class NotifyAppParam(TlvModel): """ Used to serialize application parameters for PubSub notify interest. """ publisher_prefix = NameField() notify_nonce = BytesField(128) publisher_fwd_hint = ModelField(211, ForwardingHint)
class RepoCommandResponse(TlvModel): name = NameField() start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID) end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID) process_id = BytesField(RepoTypeNumber.PROCESS_ID) status_code = UintField(RepoTypeNumber.STATUS_CODE) insert_num = UintField(RepoTypeNumber.INSERT_NUM) delete_num = UintField(RepoTypeNumber.DELETE_NUM)
class RepoCommandParameter(TlvModel): name = NameField() forwarding_hint = ModelField(RepoTypeNumber.FORWARDING_HINT, ForwardingHint) start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID) end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID) process_id = BytesField(RepoTypeNumber.PROCESS_ID) register_prefix = ModelField(RepoTypeNumber.REGISTER_PREFIX, RegisterPrefix) check_prefix = ModelField(RepoTypeNumber.CHECK_PREFIX, CheckPrefix)
class Comment(TlvModel): comment_id = BytesField(0x87) filename = BytesField(0xa8) line_nbr = UintField(0xa9) author = BytesField(0xaa) written_on = BytesField(0xab) message = BytesField(0xac) rev_id = BytesField(0xad) unsolved = BoolField(0xae)
class AccessItem(TlvModel): prefix = BytesField(1) type = UintField(2) encryption_key = BytesField(3) decryption_key = BytesField(4)
class ServiceItem(TlvModel): service_id = UintField(1) service_name = BytesField(2) exp_time = UintField(3)
class KeyRevocation(TlvModel): key_id = BytesField(0x83) revoke_time = BytesField(0xa4)
class PolicyAddRequest(TlvModel): data_name = BytesField(TLV_POLICY_DATA_STR) key_name = BytesField(TLV_POLICY_KEY_STR)
class CertRequest(TlvModel): identifier = BytesField(TypeNumber.GENERIC_NAME_COMPONENT) ecdh_n2 = BytesField(TLV_AC_ECDH_PUB_N2) anchor_digest = BytesField(TLV_SEC_BOOT_ANCHOR_DIGEST) ecdh_n1 = BytesField(TLV_AC_ECDH_PUB_N1) capabilities = BytesField(TLV_SSP_DEVICE_CAPABILITIES)
class SignOnRequest(TlvModel): identifier = BytesField(TypeNumber.GENERIC_NAME_COMPONENT) capabilities = BytesField(TLV_SEC_BOOT_CAPABILITIES) ecdh_n1 = BytesField(TLV_AC_ECDH_PUB_N1)
class Catalog(TlvModel): entries = RepeatedField(BytesField(0xaf))
class ChangeMeta(TlvModel): change_id = BytesField(0x85) status = UintField(0xa6) patch_set = UintField(0x86) subject = BytesField(0xa7)
class Vote(TlvModel): label = BytesField(0x98) value = UintField(0xa0, fixed_len=1)
class HeadRef(TlvModel): head = BytesField(0x84) change_id = BytesField(0x85) change_id_meta_commit = BytesField(0xa5)
class GroupConfig(TlvModel): group_id = BytesField(0x82) full_name = BytesField(0xa2) owner = BytesField(0xa3) members = RepeatedField(BytesField(0xa4))
class OperationRule(TlvModel): operation = UintField(0x9c) access = UintField(0x9d) user_id = BytesField(0x81) group_id = BytesField(0x82)
class DeviceItem(TlvModel): device_id = BytesField(1) device_info = BytesField(2) device_cert_name = BytesField(3)
class LabelConfig(TlvModel): label = BytesField(0x98) function = UintField(0x99) default_value = UintField(0x9a) values = RepeatedField(ModelField(0x9b, LabelValue))
class SharedSecretsItem(TlvModel): device_identifier = BytesField(1) public_key = BytesField(2) symmetric_key = BytesField(3)
class DatainfoTlvModel(TlvModel): data_name = BytesField(0x02) # string hash = BytesField(0x02) # string desired_copies = UintField(0x03) # int
class SignOnResponse(TlvModel): anchor = BytesField(TypeNumber.DATA) ecdh_n2 = BytesField(TLV_AC_ECDH_PUB_N2) salt = BytesField(TLV_AC_SALT)
class LabelValue(TlvModel): value = UintField(0xa0, fixed_len=1) description = BytesField(0xa1)
class CertResponse(TlvModel): id_cert = BytesField(TypeNumber.DATA) iv = BytesField(TLV_AC_AES_IV) cipher = BytesField(TLV_AC_ENCRYPTED_PAYLOAD)
class DeviceItem(TlvModel): device_id = BytesField(1) device_info = BytesField(2) aes_key = BytesField(3) device_identity_name = NameField()
class CipherBlock(TlvModel): iv = BytesField(TLV_AC_AES_IV) keyid = UintField(TLV_AC_KEYID) cipher = BytesField(TLV_AC_ENCRYPTED_PAYLOAD)
class StateVectorComponentModel(TlvModel): node_id = BytesField(StateVectorModelTypes.KEY.value) seq_num = UintField(StateVectorModelTypes.VALUE.value)
class ServiceMetaItem(TlvModel): service_id = UintField(1) encryption_key = BytesField(3)
class AccountConfig(TlvModel): user_id = BytesField(0x81) full_name = BytesField(0xa2) email = BytesField(0xa3)