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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .customer_creation_source import CustomerCreationSource
import pydantic
from .customer_inclusion_exclusion import CustomerInclusionExclusion
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CustomerCreationSourceFilter(UncheckedBaseModel):
    """
    The creation source filter.

    If one or more creation sources are set, customer profiles are included in,
    or excluded from, the result if they match at least one of the filter criteria.
    """

    values: typing.Optional[typing.List[CustomerCreationSource]] = pydantic.Field(default=None)
    """
    The list of creation sources used as filtering criteria.
    See [CustomerCreationSource](#type-customercreationsource) for possible values
    """

    rule: typing.Optional[CustomerInclusionExclusion] = pydantic.Field(default=None)
    """
    Indicates whether a customer profile matching the filter criteria
    should be included in the result or excluded from the result.
    
    Default: `INCLUDE`.
    See [CustomerInclusionExclusion](#type-customerinclusionexclusion) for possible values
    """

    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
