from collections.abc import Mapping
from enum import IntEnum
from types import MappingProxyType
from typing import Final


class AbuseCategory(IntEnum):
    DNS_COMPROMISE = 1
    DNS_POISONING = 2
    FRAUD_ORDERS = 3
    DDOS_ATTACK = 4
    FTP_BRUTE_FORCE = 5
    PING_OF_DEATH = 6
    PHISHING = 7
    FRAUD_VOIP = 8
    OPEN_PROXY = 9
    WEB_SPAM = 10
    EMAIL_SPAM = 11
    BLOG_SPAM = 12
    VPN_IP = 13
    PORT_SCAN = 14
    HACKING = 15
    SQL_INJECTION = 16
    SPOOFING = 17
    BRUTE_FORCE = 18
    BAD_WEB_BOT = 19
    EXPLOITED_HOST = 20
    WEB_APP_ATTACK = 21
    SSH = 22
    IOT_TARGETED = 23


CATEGORIES: Final[Mapping[str, int]] = MappingProxyType(
    {
        "DNS_Compromise": 1,
        "DNS_Poisoning": 2,
        "Fraud_Orders": 3,
        "DDoS_Attack": 4,
        "FTP_Brute_Force": 5,
        "Ping_of_Death": 6,
        "Phishing": 7,
        "Fraud_VoIP": 8,
        "Open_Proxy": 9,
        "Web_Spam": 10,
        "Email_Spam": 11,
        "Blog_Spam": 12,
        "VPN_IP": 13,
        "Port_Scan": 14,
        "Hacking": 15,
        "SQL_Injection": 16,
        "Spoofing": 17,
        "Brute_Force": 18,
        "Bad_Web_Bot": 19,
        "Exploited_Host": 20,
        "Web_App_Attack": 21,
        "SSH": 22,
        "IoT_Targeted": 23,
    }
)

ENDPOINTS: Final[Mapping[str, str]] = MappingProxyType(
    {
        "check": "GET",
        "reports": "GET",
        "blacklist": "GET",
        "report": "POST",
        "check-block": "GET",
        "bulk-report": "POST",
        "clear-address": "DELETE",
    }
)
