# !!!
# WARNING: This file is autogenerated
# Only modify code within MANUAL() sections
# or your changes may be overwritten later!
# !!!

from __future__ import annotations

import enum

from stytch.consumer.models.fraud import AddressInformation, DomainInformation
from stytch.core.response_base import ResponseBase


class RiskResponseAction(str, enum.Enum):
    ALLOW = "ALLOW"
    CHALLENGE = "CHALLENGE"
    BLOCK = "BLOCK"


class RiskResponse(ResponseBase):
    """Response type for `Email.risk`.
    Fields:
      - address_information: Information about the email address.
      - domain_information: Information about the email domain.
      - action: The suggested action based on the attributes of the email address. The available actions are:
      * `ALLOW` - This email is most likely safe to send to and not fraudulent.
      * `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user.
      * `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction such as 2FA or other forms of extended user verification before allowing the privileged action to proceed.

      - risk_score: A score from 0 to 100 indicating how risky the email is. 100 is the most risky.
    """  # noqa

    address_information: AddressInformation
    domain_information: DomainInformation
    action: RiskResponseAction
    risk_score: int
