# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .order import Order


class PayorFields(UniversalBaseModel):
    display: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Flag indicating if the input field will show in container
    """

    fixed: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Flag indicating if the value in input field is read-only or not.
    """

    identifier: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Flag indicating if the input field is a customer identifier
    """

    label: typing.Optional[str] = pydantic.Field(default=None)
    """
    Label to display for field
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of field to show. Should be one of the standard customer fields or a custom field name
    """

    order: typing.Optional[Order] = None
    required: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Flag indicating if the input field is required for validation
    """

    validation: typing.Optional[str] = pydantic.Field(default=None)
    """
    Type of validation to apply to the input field Accepted values:
    
      - alpha for alphabetical
    
      - numbers for numeric
    
      - text for alphanumeric
    
      - email for masked email address input
    
      - phone for US phone numbers
    """

    value: typing.Optional[str] = pydantic.Field(default=None)
    """
    Pre-populated value for field
    """

    width: typing.Optional[int] = pydantic.Field(default=None)
    """
    Numeric value indicating the size of input relative to the container. Accepted values:
    
        - 4 = 1/3
    
        - 6 = 1/2
    
        - 8 = 2/3
    
        - 12 = 3/3
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
