# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: steps/sp_steps_custom.proto, steps/sp_steps_decode.proto, steps/sp_steps_detective.proto, steps/sp_steps_encode.proto, steps/sp_steps_httprequest.proto, steps/sp_steps_kv.proto, steps/sp_steps_transform.proto
# plugin: python-betterproto
# This file has been @generated

from dataclasses import dataclass
from typing import (
    Dict,
    List,
    Optional,
)

import betterproto


class DetectiveType(betterproto.Enum):
    DETECTIVE_TYPE_UNKNOWN = 0
    DETECTIVE_TYPE_IS_EMPTY = 1000
    DETECTIVE_TYPE_HAS_FIELD = 1001
    DETECTIVE_TYPE_IS_TYPE = 1002
    DETECTIVE_TYPE_STRING_CONTAINS_ANY = 1003
    DETECTIVE_TYPE_STRING_CONTAINS_ALL = 1004
    DETECTIVE_TYPE_STRING_EQUAL = 1005
    DETECTIVE_TYPE_IPV4_ADDRESS = 1006
    DETECTIVE_TYPE_IPV6_ADDRESS = 1007
    DETECTIVE_TYPE_MAC_ADDRESS = 1008
    DETECTIVE_TYPE_REGEX = 1009
    DETECTIVE_TYPE_TIMESTAMP_RFC3339 = 1010
    DETECTIVE_TYPE_TIMESTAMP_UNIX_NANO = 1011
    DETECTIVE_TYPE_TIMESTAMP_UNIX = 1012
    DETECTIVE_TYPE_BOOLEAN_TRUE = 1013
    DETECTIVE_TYPE_BOOLEAN_FALSE = 1014
    DETECTIVE_TYPE_UUID = 1015
    DETECTIVE_TYPE_URL = 1016
    DETECTIVE_TYPE_HOSTNAME = 1017
    DETECTIVE_TYPE_STRING_LENGTH_MIN = 1018
    DETECTIVE_TYPE_STRING_LENGTH_MAX = 1019
    DETECTIVE_TYPE_STRING_LENGTH_RANGE = 1020
    DETECTIVE_TYPE_SEMVER = 2021
    DETECTIVE_TYPE_PII_ANY = 2000
    """/ Payloads containing values with any PII - runs all PII matchers"""

    DETECTIVE_TYPE_PII_CREDIT_CARD = 2001
    """Payloads containing values with a credit card number"""

    DETECTIVE_TYPE_PII_SSN = 2002
    """Payloads containing values with a social security number"""

    DETECTIVE_TYPE_PII_EMAIL = 2003
    """Payloads containing values with an email address"""

    DETECTIVE_TYPE_PII_PHONE = 2004
    """Payloads containing values with a phone number"""

    DETECTIVE_TYPE_PII_DRIVER_LICENSE = 2005
    """Payloads containing values with a driver's license"""

    DETECTIVE_TYPE_PII_PASSPORT_ID = 2006
    """Payloads containing values with a passport ID"""

    DETECTIVE_TYPE_PII_VIN_NUMBER = 2007
    """Payloads containing values with a VIN number"""

    DETECTIVE_TYPE_PII_SERIAL_NUMBER = 2008
    """Payloads containing values with various serial number formats"""

    DETECTIVE_TYPE_PII_LOGIN = 2009
    """
    Payloads containing fields named "login", "username", "user", "userid",
    "user_id", "user", "password", "pass", "passwd", "pwd"
    """

    DETECTIVE_TYPE_PII_TAXPAYER_ID = 2010
    """
    Payloads containing fields named "taxpayer_id", "tax_id", "taxpayerid",
    "taxid"
    """

    DETECTIVE_TYPE_PII_ADDRESS = 2011
    """
    Payloads containing fields named "address", "street", "city", "state",
    "zip", "zipcode", "zip_code", "country"
    """

    DETECTIVE_TYPE_PII_SIGNATURE = 2012
    """
    Payloads containing fields named "signature", "signature_image",
    "signature_image_url", "signature_image_uri"
    """

    DETECTIVE_TYPE_PII_GEOLOCATION = 2013
    """
    Payloads containing values that contain GPS data or coordinates like "lat",
    "lon", "latitude", "longitude"
    """

    DETECTIVE_TYPE_PII_EDUCATION = 2014
    """
    Payloads containing fields like "school", "university", "college",
    "education"
    """

    DETECTIVE_TYPE_PII_FINANCIAL = 2015
    """
    Payloads containing fields like "account", "bank", "credit", "debit",
    "financial", "finance"
    """

    DETECTIVE_TYPE_PII_HEALTH = 2016
    """
    Payloads containing fields like "patient", "health", "healthcare", "health
    care", "medical"
    """

    DETECTIVE_TYPE_NUMERIC_EQUAL_TO = 3000
    DETECTIVE_TYPE_NUMERIC_GREATER_THAN = 3001
    DETECTIVE_TYPE_NUMERIC_GREATER_EQUAL = 3002
    DETECTIVE_TYPE_NUMERIC_LESS_THAN = 3003
    DETECTIVE_TYPE_NUMERIC_LESS_EQUAL = 3004
    DETECTIVE_TYPE_NUMERIC_RANGE = 3005
    DETECTIVE_TYPE_NUMERIC_MIN = 3006
    DETECTIVE_TYPE_NUMERIC_MAX = 3007


class HttpRequestMethod(betterproto.Enum):
    HTTP_REQUEST_METHOD_UNSET = 0
    HTTP_REQUEST_METHOD_GET = 1
    HTTP_REQUEST_METHOD_POST = 2
    HTTP_REQUEST_METHOD_PUT = 3
    HTTP_REQUEST_METHOD_DELETE = 4


class KvExistsMode(betterproto.Enum):
    """
    Used by frontend when constructing a pipeline that contains a KV step that
    performs a KVExists request. protolint:disable:next ENUM_FIELD_NAMES_PREFIX
    """

    KV_EXISTS_MODE_UNSET = 0
    KV_EXISTS_MODE_STATIC = 1
    """Will cause the KV lookup to use the key string as-is for the lookup"""

    KV_EXISTS_MODE_DYNAMIC = 2
    """
    DYNAMIC mode will cause the KV lookup WASM to use the key to lookup the
    associated value and use the result for the key existence check. For
    example, if "key" in KVExistsRequest is set to "foo", KV WASM will do the
    following: 1. Lookup the value of "foo" in the payload (which is "bar") 2.
    Use "bar" as the "key" for the KV lookup
    """


class TransformType(betterproto.Enum):
    TRANSFORM_TYPE_UNKNOWN = 0
    TRANSFORM_TYPE_REPLACE_VALUE = 1
    TRANSFORM_TYPE_DELETE_FIELD = 2
    TRANSFORM_TYPE_OBFUSCATE_VALUE = 3
    TRANSFORM_TYPE_MASK_VALUE = 4


@dataclass(eq=False, repr=False)
class CustomStep(betterproto.Message):
    """WIP -- Custom WASM exec?"""

    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class DecodeStep(betterproto.Message):
    """WIP"""

    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class DetectiveStep(betterproto.Message):
    path: Optional[str] = betterproto.string_field(1, optional=True, group="_path")
    args: List[str] = betterproto.string_field(2)
    negate: Optional[bool] = betterproto.bool_field(3, optional=True, group="_negate")
    type: "DetectiveType" = betterproto.enum_field(4)


@dataclass(eq=False, repr=False)
class EncodeStep(betterproto.Message):
    """WIP"""

    id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class HttpRequest(betterproto.Message):
    method: "HttpRequestMethod" = betterproto.enum_field(1)
    url: str = betterproto.string_field(2)
    body: bytes = betterproto.bytes_field(3)
    headers: Dict[str, str] = betterproto.map_field(
        4, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class HttpResponse(betterproto.Message):
    code: int = betterproto.int32_field(1)
    body: bytes = betterproto.bytes_field(2)
    headers: Dict[str, str] = betterproto.map_field(
        3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class HttpRequestStep(betterproto.Message):
    request: "HttpRequest" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class KvExistsRequest(betterproto.Message):
    """Encoded in KVStep; also used as param to HostFuncKVExists() in SDK"""

    key: str = betterproto.string_field(1)
    mode: "KvExistsMode" = betterproto.enum_field(2)


@dataclass(eq=False, repr=False)
class KvExistsResponse(betterproto.Message):
    """Returned by HostFuncKVExists() in SDK"""

    exists: bool = betterproto.bool_field(1)
    """Whether the key exists"""

    is_error: bool = betterproto.bool_field(2)
    """Whether the request resulted in an error"""

    message: str = betterproto.string_field(3)
    """Potential message containing debug or error info"""


@dataclass(eq=False, repr=False)
class KvStep(betterproto.Message):
    """Used in PipelineSteps"""

    kv_exists_request: "KvExistsRequest" = betterproto.message_field(1, group="request")


@dataclass(eq=False, repr=False)
class TransformStep(betterproto.Message):
    path: str = betterproto.string_field(1)
    value: str = betterproto.string_field(2)
    type: "TransformType" = betterproto.enum_field(3)
