2019-05-14 14:22:23 +00:00
|
|
|
# Automatically generated by pb2py
|
|
|
|
# fmt: off
|
|
|
|
from .. import protobuf as p
|
|
|
|
|
2019-07-03 13:02:50 +00:00
|
|
|
if __debug__:
|
|
|
|
try:
|
|
|
|
from typing import Dict, List, Optional
|
2019-08-02 17:06:01 +00:00
|
|
|
from typing_extensions import Literal # noqa: F401
|
|
|
|
EnumTypeResetDeviceBackupType = Literal[0, 1, 2]
|
2019-07-03 13:02:50 +00:00
|
|
|
except ImportError:
|
|
|
|
Dict, List, Optional = None, None, None # type: ignore
|
2019-08-02 17:06:01 +00:00
|
|
|
EnumTypeResetDeviceBackupType = None # type: ignore
|
2019-07-03 13:02:50 +00:00
|
|
|
|
2019-05-14 14:22:23 +00:00
|
|
|
|
|
|
|
class ResetDevice(p.MessageType):
|
|
|
|
MESSAGE_WIRE_TYPE = 14
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
display_random: bool = None,
|
|
|
|
strength: int = None,
|
|
|
|
passphrase_protection: bool = None,
|
|
|
|
pin_protection: bool = None,
|
|
|
|
language: str = None,
|
|
|
|
label: str = None,
|
|
|
|
u2f_counter: int = None,
|
|
|
|
skip_backup: bool = None,
|
|
|
|
no_backup: bool = None,
|
2019-08-02 17:06:01 +00:00
|
|
|
backup_type: EnumTypeResetDeviceBackupType = None,
|
2019-05-14 14:22:23 +00:00
|
|
|
) -> None:
|
|
|
|
self.display_random = display_random
|
|
|
|
self.strength = strength
|
|
|
|
self.passphrase_protection = passphrase_protection
|
|
|
|
self.pin_protection = pin_protection
|
|
|
|
self.language = language
|
|
|
|
self.label = label
|
|
|
|
self.u2f_counter = u2f_counter
|
|
|
|
self.skip_backup = skip_backup
|
|
|
|
self.no_backup = no_backup
|
2019-07-22 09:41:59 +00:00
|
|
|
self.backup_type = backup_type
|
2019-05-14 14:22:23 +00:00
|
|
|
|
|
|
|
@classmethod
|
2019-07-03 13:02:50 +00:00
|
|
|
def get_fields(cls) -> Dict:
|
2019-05-14 14:22:23 +00:00
|
|
|
return {
|
|
|
|
1: ('display_random', p.BoolType, 0),
|
|
|
|
2: ('strength', p.UVarintType, 0), # default=256
|
|
|
|
3: ('passphrase_protection', p.BoolType, 0),
|
|
|
|
4: ('pin_protection', p.BoolType, 0),
|
|
|
|
5: ('language', p.UnicodeType, 0), # default=english
|
|
|
|
6: ('label', p.UnicodeType, 0),
|
|
|
|
7: ('u2f_counter', p.UVarintType, 0),
|
|
|
|
8: ('skip_backup', p.BoolType, 0),
|
|
|
|
9: ('no_backup', p.BoolType, 0),
|
2019-08-02 17:06:01 +00:00
|
|
|
10: ('backup_type', p.EnumType("ResetDeviceBackupType", (0, 1, 2)), 0), # default=ResetDeviceBackupType_Bip39
|
2019-05-14 14:22:23 +00:00
|
|
|
}
|