from typing import Final
from string import ascii_letters, digits, punctuation
from dataclasses import dataclass


@dataclass(frozen=True)
class MessageTypeIndicators:
    AUTHORIZATION_REQUEST: Final[str] = "0100"
    AUTHORIZATION_RESPONSE: Final[str] = "0110"
    FINANCIAL_REQUEST: Final[str] = "0200"
    FINANCIAL_RESPONSE: Final[str] = "0210"
    FINANCIAL_ADVICE_REQUEST: Final[str] = "0220"
    FINANCIAL_ADVICE_RESPONSE: Final[str] = "0230"
    FINANCIAL_ADVICE_REPEAT_REQUEST: Final[str] = "0221"
    FINANCIAL_ADVICE_REPEAT_RESPONSE: Final[str] = "0231"
    REVERSAL_REQUEST: Final[str] = "0400"
    REVERSAL_RESPONSE: Final[str] = "0400"
    REVERSAL_REPEAT_REQUEST: Final[str] = "0401"
    REVERSAL_REPEAT_RESPONSE: Final[str] = "0411"
    REVERSAL_ADVICE_REQUEST: Final[str] = "0420"
    REVERSAL_ADVICE_RESPONSE: Final[str] = "0430"
    REVERSAL_ADVICE_REPEAT_REQUEST: Final[str] = "0421"
    REVERSAL_ADVICE_REPEAT_RESPONSE: Final[str] = "0431"
    SERVICE_TRANSACTION_REQUEST: Final[str] = "0360"
    SERVICE_TRANSACTION_RESPONSE: Final[str] = "0370"
    SMS_OR_EMAIL_NOTIFICATION_REQUEST: Final[str] = "0303"
    SMS_OR_EMAIL_NOTIFICATION_RESPONSE: Final[str] = "0313"
    NETWORK_MANAGEMENT_REQUEST: Final[str] = "0800"
    NETWORK_MANAGEMENT_RESPONSE: Final[str] = "0810"


@dataclass(frozen=True)
class FieldSet:
    FIELD_001_BITMAP_SECONDARY: Final[str] = "1"
    FIELD_002_PRIMARY_ACCOUNT_NUMBER: Final[str] = "2"
    FIELD_003_PROCESSING_CODE: Final[str] = "3"
    FIELD_004_TRANSACTION_AMOUNT: Final[str] = "4"
    FIELD_005_RESERVED_FOR_FUTURE: Final[str] = "5"
    FIELD_006_AMOUNT_CARDHOLDER_BILLING: Final[str] = "6"
    FIELD_007_TRANSMISSION_DATE_AND_TIME: Final[str] = "7"
    FIELD_008_RESERVED_FOR_FUTURE: Final[str] = "8"
    FIELD_009_RESERVED_FOR_FUTURE: Final[str] = "9"
    FIELD_010_CONVERSION_RATE_CARDHOLDER_BILLING: Final[str] = "10"
    FIELD_011_SYSTEM_TRACE_AUDIT_NUMBER: Final[str] = "11"
    FIELD_012_TRANSACTION_LOCAL_DATE_AND_TIME: Final[str] = "12"
    FIELD_013_RESERVED_FOR_FUTURE: Final[str] = "13"
    FIELD_014_EXPIRATION_DATE_YYMM: Final[str] = "14"
    FIELD_015_SETTELMENT_DATE_YYMMDD: Final[str] = "15"
    FIELD_016_RESERVED_FOR_FUTURE: Final[str] = "16"
    FIELD_017_RESERVED_FOR_FUTURE: Final[str] = "17"
    FIELD_018_MERCHANT_CATEGORY_CODE: Final[str] = "18"
    FIELD_019_RESERVED_FOR_FUTURE: Final[str] = "19"
    FIELD_020_RESERVED_FOR_FUTURE: Final[str] = "20"
    FIELD_021_RESERVED_FOR_FUTURE: Final[str] = "21"
    FIELD_022_POINT_OF_SERVICE_DATA_CODE: Final[str] = "22"
    FIELD_023_CARD_SEQUENCE_NUMBER: Final[str] = "23"
    FIELD_024_FUNCTION_CODE: Final[str] = "24"
    FIELD_025_POINT_OF_SERVICE_CONDITION_CODE: Final[str] = "25"
    FIELD_026_RESERVED_FOR_FUTURE: Final[str] = "26"
    FIELD_027_RESERVED_FOR_FUTURE: Final[str] = "27"
    FIELD_028_TRANSACTION_FEE_AMOUNT: Final[str] = "28"
    FIELD_029_RESERVED_FOR_FUTURE: Final[str] = "29"
    FIELD_030_RESERVED_FOR_FUTURE: Final[str] = "30"
    FIELD_031_RESERVED_FOR_FUTURE: Final[str] = "31"
    FIELD_032_ACQUIRING_INSTITUTION_ID_CODE: Final[str] = "32"
    FIELD_033_RESERVED_FOR_FUTURE: Final[str] = "33"
    FIELD_034_PRIMARY_ACCOUNT_NUMBER_EXTENDED: Final[str] = "34"
    FIELD_035_TRACK2_DATA: Final[str] = "35"
    FIELD_036_RESERVED_FOR_FUTURE: Final[str] = "36"
    FIELD_037_RETRIEVAL_REFERENCE_NUMBER: Final[str] = "37"
    FIELD_038_AUTHORIZATION_ID_CODE: Final[str] = "38"
    FIELD_039_AUTHORIZATION_RESPONSE_CODE: Final[str] = "39"
    FIELD_040_SERVICE_CODE: Final[str] = "40"
    FIELD_041_CARD_ACCEPTOR_TERMINAL_ID: Final[str] = "41"
    FIELD_042_MERCHANT_ID: Final[str] = "42"
    FIELD_043_CARD_ACCEPTOR_NAME_AND_LOCATION: Final[str] = "43"
    FIELD_044_RESERVED_FOR_FUTURE: Final[str] = "44"
    FIELD_045_RESERVED_FOR_FUTURE: Final[str] = "45"
    FIELD_046_RESERVED_FOR_FUTURE: Final[str] = "46"
    FIELD_047_PROPRIETARY_FIELD: Final[str] = "47"
    FIELD_048_PRIVATE_ADDITIONAL_DATA: Final[str] = "48"
    FIELD_049_CURRENCY: Final[str] = "49"
    FIELD_050_RESERVED_FOR_FUTURE: Final[str] = "50"
    FIELD_051_RESERVED_FOR_FUTURE: Final[str] = "51"
    FIELD_052_PERSONAL_IDENTIFICATION_DATA: Final[str] = "52"
    FIELD_053_SECURITY_CONTROL_INFORMATION: Final[str] = "53"
    FIELD_054_ADDITIONAL_AMOUNTS: Final[str] = "54"
    FIELD_055_EMV_DATA: Final[str] = "55"
    FIELD_056_PAYMENT_ACCOUNT_DATA: Final[str] = "56"
    FIELD_057_RESERVED_FOR_FUTURE: Final[str] = "57"
    FIELD_058_RESERVED_FOR_FUTURE: Final[str] = "58"
    FIELD_059_RESERVED_FOR_FUTURE: Final[str] = "59"
    FIELD_060_RESERVED_FOR_FUTURE: Final[str] = "60"
    FIELD_061_RESERVED_FOR_FUTURE: Final[str] = "61"
    FIELD_062_MULTIPLE_PRIVATE_DATA: Final[str] = "62"
    FIELD_063_RESERVED_FOR_FUTURE: Final[str] = "63"
    FIELD_064_MULTIPLE_PRIVATE_DATA: Final[str] = "64"
    FIELD_065_RESERVED_FOR_FUTURE: Final[str] = "65"
    FIELD_066_RESERVED_FOR_FUTURE: Final[str] = "66"
    FIELD_067_RESERVED_FOR_FUTURE: Final[str] = "67"
    FIELD_068_RESERVED_FOR_FUTURE: Final[str] = "68"
    FIELD_069_RESERVED_FOR_FUTURE: Final[str] = "69"
    FIELD_070_NETWORK_MANAGEMENT_CODE: Final[str] = "70"
    FIELD_071_RESERVED_FOR_FUTURE: Final[str] = "71"
    FIELD_072_RESERVED_FOR_FUTURE: Final[str] = "72"
    FIELD_073_RESERVED_FOR_FUTURE: Final[str] = "73"
    FIELD_074_RESERVED_FOR_FUTURE: Final[str] = "74"
    FIELD_075_RESERVED_FOR_FUTURE: Final[str] = "75"
    FIELD_076_RESERVED_FOR_FUTURE: Final[str] = "76"
    FIELD_077_RESERVED_FOR_FUTURE: Final[str] = "77"
    FIELD_078_RESERVED_FOR_FUTURE: Final[str] = "78"
    FIELD_079_RESERVED_FOR_FUTURE: Final[str] = "79"
    FIELD_080_RESERVED_FOR_FUTURE: Final[str] = "80"
    FIELD_081_RESERVED_FOR_FUTURE: Final[str] = "81"
    FIELD_082_RESERVED_FOR_FUTURE: Final[str] = "82"
    FIELD_083_RESERVED_FOR_FUTURE: Final[str] = "83"
    FIELD_084_RESERVED_FOR_FUTURE: Final[str] = "84"
    FIELD_085_RESERVED_FOR_FUTURE: Final[str] = "85"
    FIELD_086_RESERVED_FOR_FUTURE: Final[str] = "86"
    FIELD_087_RESERVED_FOR_FUTURE: Final[str] = "87"
    FIELD_088_RESERVED_FOR_FUTURE: Final[str] = "88"
    FIELD_089_RESERVED_FOR_FUTURE: Final[str] = "89"
    FIELD_090_ORIGINAL_DATA_ELEMENTS: Final[str] = "90"
    FIELD_091_ACTION_CODE: Final[str] = "91"
    FIELD_092_RESERVED_FOR_FUTURE: Final[str] = "92"
    FIELD_093_RESERVED_FOR_FUTURE: Final[str] = "93"
    FIELD_094_RESERVED_FOR_FUTURE: Final[str] = "94"
    FIELD_095_REPLACEMENT_AMOUNTS: Final[str] = "95"
    FIELD_096_RESERVED_FOR_FUTURE: Final[str] = "96"
    FIELD_097_RESERVED_FOR_FUTURE: Final[str] = "97"
    FIELD_098_RESERVED_FOR_FUTURE: Final[str] = "98"
    FIELD_099_RESERVED_FOR_FUTURE: Final[str] = "99"
    FIELD_100_RESERVED_FOR_FUTURE: Final[str] = "100"
    FIELD_101_RESERVED_FOR_FUTURE: Final[str] = "101"
    FIELD_102_ACCOUNT_IDENTIFICATION: Final[str] = "102"
    FIELD_103_RESERVED_FOR_FUTURE: Final[str] = "103"
    FIELD_104_RESERVED_FOR_FUTURE: Final[str] = "104"
    FIELD_105_RESERVED_FOR_FUTURE: Final[str] = "105"
    FIELD_106_RESERVED_FOR_FUTURE: Final[str] = "106"
    FIELD_107_RESERVED_FOR_FUTURE: Final[str] = "107"
    FIELD_108_RESERVED_FOR_FUTURE: Final[str] = "108"
    FIELD_109_RESERVED_FOR_FUTURE: Final[str] = "109"
    FIELD_110_RESERVED_FOR_FUTURE: Final[str] = "110"
    FIELD_111_RESERVED_FOR_FUTURE: Final[str] = "111"
    FIELD_112_RESERVED_FOR_FUTURE: Final[str] = "112"
    FIELD_113_RESERVED_FOR_FUTURE: Final[str] = "113"
    FIELD_114_ADDITIONAL_SETS_OF_PRIVATE_DATA: Final[str] = "114"
    FIELD_115_RESERVED_FOR_FUTURE: Final[str] = "115"
    FIELD_116_RESERVED_FOR_FUTURE: Final[str] = "116"
    FIELD_117_RESERVED_FOR_FUTURE: Final[str] = "117"
    FIELD_118_RESERVED_FOR_FUTURE: Final[str] = "118"
    FIELD_119_RESERVED_FOR_FUTURE: Final[str] = "119"
    FIELD_120_EXPANDED_ADDITIONAL_ACCOUNTS: Final[str] = "120"
    FIELD_121_RESERVED_FOR_FUTURE: Final[str] = "121"
    FIELD_122_RESERVED_FOR_FUTURE: Final[str] = "122"
    FIELD_123_RESERVED_FOR_FUTURE: Final[str] = "123"
    FIELD_124_RESERVED_FOR_FUTURE: Final[str] = "124"
    FIELD_125_RESERVED_FOR_FUTURE: Final[str] = "125"
    FIELD_126_RESERVED_FOR_FUTURE: Final[str] = "126"
    FIELD_127_RESERVED_FOR_FUTURE: Final[str] = "127"
    FIELD_128_SECONDARY_MAC_DATA: Final[str] = "128"


@dataclass(frozen=True)
class ReservedForFuture:
    FIELD_005_RESERVED_FOR_FUTURE: Final[str] = "5"
    FIELD_008_RESERVED_FOR_FUTURE: Final[str] = "8"
    FIELD_009_RESERVED_FOR_FUTURE: Final[str] = "9"
    FIELD_013_RESERVED_FOR_FUTURE: Final[str] = "13"
    FIELD_016_RESERVED_FOR_FUTURE: Final[str] = "16"
    FIELD_017_RESERVED_FOR_FUTURE: Final[str] = "17"
    FIELD_019_RESERVED_FOR_FUTURE: Final[str] = "19"
    FIELD_020_RESERVED_FOR_FUTURE: Final[str] = "20"
    FIELD_021_RESERVED_FOR_FUTURE: Final[str] = "21"
    FIELD_026_RESERVED_FOR_FUTURE: Final[str] = "26"
    FIELD_027_RESERVED_FOR_FUTURE: Final[str] = "27"
    FIELD_029_RESERVED_FOR_FUTURE: Final[str] = "29"
    FIELD_030_RESERVED_FOR_FUTURE: Final[str] = "30"
    FIELD_031_RESERVED_FOR_FUTURE: Final[str] = "31"
    FIELD_033_RESERVED_FOR_FUTURE: Final[str] = "33"
    FIELD_036_RESERVED_FOR_FUTURE: Final[str] = "36"
    FIELD_044_RESERVED_FOR_FUTURE: Final[str] = "44"
    FIELD_045_RESERVED_FOR_FUTURE: Final[str] = "45"
    FIELD_046_RESERVED_FOR_FUTURE: Final[str] = "46"
    FIELD_050_RESERVED_FOR_FUTURE: Final[str] = "50"
    FIELD_051_RESERVED_FOR_FUTURE: Final[str] = "51"
    FIELD_057_RESERVED_FOR_FUTURE: Final[str] = "57"
    FIELD_058_RESERVED_FOR_FUTURE: Final[str] = "58"
    FIELD_059_RESERVED_FOR_FUTURE: Final[str] = "59"
    FIELD_060_RESERVED_FOR_FUTURE: Final[str] = "60"
    FIELD_061_RESERVED_FOR_FUTURE: Final[str] = "61"
    FIELD_063_RESERVED_FOR_FUTURE: Final[str] = "63"
    FIELD_065_RESERVED_FOR_FUTURE: Final[str] = "65"
    FIELD_066_RESERVED_FOR_FUTURE: Final[str] = "66"
    FIELD_067_RESERVED_FOR_FUTURE: Final[str] = "67"
    FIELD_068_RESERVED_FOR_FUTURE: Final[str] = "68"
    FIELD_069_RESERVED_FOR_FUTURE: Final[str] = "69"
    FIELD_071_RESERVED_FOR_FUTURE: Final[str] = "71"
    FIELD_072_RESERVED_FOR_FUTURE: Final[str] = "72"
    FIELD_073_RESERVED_FOR_FUTURE: Final[str] = "73"
    FIELD_074_RESERVED_FOR_FUTURE: Final[str] = "74"
    FIELD_075_RESERVED_FOR_FUTURE: Final[str] = "75"
    FIELD_076_RESERVED_FOR_FUTURE: Final[str] = "76"
    FIELD_077_RESERVED_FOR_FUTURE: Final[str] = "77"
    FIELD_078_RESERVED_FOR_FUTURE: Final[str] = "78"
    FIELD_079_RESERVED_FOR_FUTURE: Final[str] = "79"
    FIELD_080_RESERVED_FOR_FUTURE: Final[str] = "80"
    FIELD_081_RESERVED_FOR_FUTURE: Final[str] = "81"
    FIELD_082_RESERVED_FOR_FUTURE: Final[str] = "82"
    FIELD_083_RESERVED_FOR_FUTURE: Final[str] = "83"
    FIELD_084_RESERVED_FOR_FUTURE: Final[str] = "84"
    FIELD_085_RESERVED_FOR_FUTURE: Final[str] = "85"
    FIELD_086_RESERVED_FOR_FUTURE: Final[str] = "86"
    FIELD_087_RESERVED_FOR_FUTURE: Final[str] = "87"
    FIELD_088_RESERVED_FOR_FUTURE: Final[str] = "88"
    FIELD_089_RESERVED_FOR_FUTURE: Final[str] = "89"
    FIELD_092_RESERVED_FOR_FUTURE: Final[str] = "92"
    FIELD_093_RESERVED_FOR_FUTURE: Final[str] = "93"
    FIELD_094_RESERVED_FOR_FUTURE: Final[str] = "94"
    FIELD_096_RESERVED_FOR_FUTURE: Final[str] = "96"
    FIELD_097_RESERVED_FOR_FUTURE: Final[str] = "97"
    FIELD_098_RESERVED_FOR_FUTURE: Final[str] = "98"
    FIELD_099_RESERVED_FOR_FUTURE: Final[str] = "99"
    FIELD_100_RESERVED_FOR_FUTURE: Final[str] = "100"
    FIELD_101_RESERVED_FOR_FUTURE: Final[str] = "101"
    FIELD_103_RESERVED_FOR_FUTURE: Final[str] = "103"
    FIELD_104_RESERVED_FOR_FUTURE: Final[str] = "104"
    FIELD_105_RESERVED_FOR_FUTURE: Final[str] = "105"
    FIELD_106_RESERVED_FOR_FUTURE: Final[str] = "106"
    FIELD_107_RESERVED_FOR_FUTURE: Final[str] = "107"
    FIELD_108_RESERVED_FOR_FUTURE: Final[str] = "108"
    FIELD_109_RESERVED_FOR_FUTURE: Final[str] = "109"
    FIELD_110_RESERVED_FOR_FUTURE: Final[str] = "110"
    FIELD_111_RESERVED_FOR_FUTURE: Final[str] = "111"
    FIELD_112_RESERVED_FOR_FUTURE: Final[str] = "112"
    FIELD_113_RESERVED_FOR_FUTURE: Final[str] = "113"
    FIELD_115_RESERVED_FOR_FUTURE: Final[str] = "115"
    FIELD_116_RESERVED_FOR_FUTURE: Final[str] = "116"
    FIELD_117_RESERVED_FOR_FUTURE: Final[str] = "117"
    FIELD_118_RESERVED_FOR_FUTURE: Final[str] = "118"
    FIELD_119_RESERVED_FOR_FUTURE: Final[str] = "119"
    FIELD_121_RESERVED_FOR_FUTURE: Final[str] = "121"
    FIELD_122_RESERVED_FOR_FUTURE: Final[str] = "122"
    FIELD_123_RESERVED_FOR_FUTURE: Final[str] = "123"
    FIELD_124_RESERVED_FOR_FUTURE: Final[str] = "124"
    FIELD_125_RESERVED_FOR_FUTURE: Final[str] = "125"
    FIELD_126_RESERVED_FOR_FUTURE: Final[str] = "126"
    FIELD_127_RESERVED_FOR_FUTURE: Final[str] = "127"


@dataclass(frozen=True)
class GeneratedFields:
    FIELD_004_TRANSACTION_AMOUNT: Final[str] = FieldSet.FIELD_004_TRANSACTION_AMOUNT
    FIELD_007_TRANSMISSION_DATE_AND_TIME: Final[str] = FieldSet.FIELD_007_TRANSMISSION_DATE_AND_TIME
    FIELD_011_SYSTEM_TRACE_AUDIT_NUMBER: Final[str] = FieldSet.FIELD_011_SYSTEM_TRACE_AUDIT_NUMBER
    FIELD_012_TRANSACTION_LOCAL_DATE_AND_TIME: Final[str] = FieldSet.FIELD_012_TRANSACTION_LOCAL_DATE_AND_TIME
    FIELD_037_RETRIEVAL_REFERENCE_NUMBER: Final[str] = FieldSet.FIELD_037_RETRIEVAL_REFERENCE_NUMBER


@dataclass(frozen=True)
class DataTypes:
    FIELD_TYPE_ALPHA: Final[str] = "FIELD_TYPE_ALPHA"
    FIELD_TYPE_NUMERIC: Final[str] = "FIELD_TYPE_NUMERIC"
    FIELD_TYPE_SPECIAL: Final[str] = "FIELD_TYPE_SPECIAL"


@dataclass(frozen=True)
class FieldDataKit:
    FIELD_TYPE_ALPHA: Final[str] = ascii_letters
    FIELD_TYPE_NUMERIC: Final[str] = digits
    FIELD_TYPE_SPECIAL: Final[str] = punctuation + " "


@dataclass(frozen=True)
class FieldDateFormat:
    FIELD_007_TRANSMISSION_DATE_AND_TIME: Final[str] = "%m%d%H%M%S"
    FIELD_012_TRANSACTION_LOCAL_DATE_AND_TIME: Final[str] = "%y%m%d%H%M%S"
    FIELD_014_EXPIRATION_DATE_YYMM: Final[str] = "%y%m"
    FIELD_015_SETTELMENT_DATE_YYMMDD: Final[str] = "%y%m%d"


@dataclass
class EpaySpecificationData:
    FIELD_SET: Final[FieldSet] = FieldSet()
    DATA_TYPES: Final[DataTypes] = DataTypes()
    FIELD_DATA_KIT: Final[FieldDataKit] = FieldDataKit()
    FIELD_DATE_FORMAT: Final[FieldDateFormat] = FieldDateFormat()
    RESERVED_FOR_FUTURE: Final[ReservedForFuture] = ReservedForFuture()
    MESSAGE_TYPE_INDICATORS: Final[MessageTypeIndicators] = MessageTypeIndicators()
    GENERATED_FIELDS: Final[GeneratedFields] = GeneratedFields()
