from clarabot_nano.common.protocol.request import NanoBaseRequest


class NanoFilesystemGetRequest(NanoBaseRequest):
    TYPE_KEY = "FS-GET"

    PATH = "path"


class NanoFilesystemPeekRequest(NanoBaseRequest):
    TYPE_KEY = "FS-PEEK"

    PATH = "path"


class NanoSearchRequest(NanoBaseRequest):
    TYPE_KEY = "SEARCH"

    QUERY = "query"  # query expression from the user
    LANGUAGE = "lang"  # preferred language for results


class AdminGetInfoRequest(NanoBaseRequest):
    TYPE_KEY = "A-INFO"


class AdminGetRemoteConfigRequest(NanoBaseRequest):
    TYPE_KEY = "A-REM-CFG"


class AdminGetListingRequest(NanoBaseRequest):
    TYPE_KEY = "A-LISTING"

    PATH = "path"  # str


class AdminChangePasswordRequest(NanoBaseRequest):
    TYPE_KEY = "A-CH-PWD"

    NEW_PASSWORD = "new_password"  # str


class AdminCreateDriveRequest(NanoBaseRequest):
    TYPE_KEY = "A-D-CREATE"

    PATH = "path"  # str


class AdminDeleteDriveRequest(NanoBaseRequest):
    TYPE_KEY = "A-D-DELETE"

    PATH = "path"  # str


class AdminAttachDriveRequest(NanoBaseRequest):
    TYPE_KEY = "A-D-ATTACH"

    PATH = "path"  # str
    TARGET_ROOM_ID = "target_room_id"  # str
    ROOM_BLOCKS = "room_blocks"  # [str];  the verified block id-hashes in config-storage format


class AdminDetachDriveRequest(NanoBaseRequest):
    TYPE_KEY = "A-D-DETACH"

    PATH = "path"  # str
    TARGET_ROOM_ID = "target_room_id"  # str


class AdminEditNameRequest(NanoBaseRequest):
    TYPE_KEY = "A-EDIT-N"

    NAME = "name"  # str


class AdminEditDenyAnonymousRequest(NanoBaseRequest):
    TYPE_KEY = "A-EDIT-DENY-ANON"

    VALUE = "value"  # bool
