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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from ...generated_types.types.risk import Risk
from ...generated_types.types.country import Country
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class TradeFilterList(UniversalBaseModel):
    """
    Filter your search on the following attributes.
    """

    buyer_id: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Exact match against the entity_id of the buyer. The buyer is the receiver_of shipments.
    """

    supplier_id: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Exact match against the entity_id of the supplier. The supplier is the shipper_of shipments.
    """

    buyer_name: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Buyers whose name contains the provided string.
    """

    supplier_name: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Shipper whose name contains the provided string.
    """

    buyer_risk: typing.Optional[typing.List[Risk]] = pydantic.Field(default=None)
    """
    Buyer with an exact match for the provided [risk factor](/sayari-library/ontology/risk-factors).
    """

    supplier_risk: typing.Optional[typing.List[Risk]] = pydantic.Field(default=None)
    """
    Shipper with an exact match for the provided [risk factor](/sayari-library/ontology/risk-factors).
    """

    buyer_country: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Buyer with an exact match for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    buyer_city: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Buyer city location
    """

    buyer_state: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Buyer state location
    """

    supplier_country: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Supplier with an exact match for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    supplier_city: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Supplier city location
    """

    supplier_state: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Supplier state location
    """

    departure_country: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Shipment departs from a country with an exact match for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    departure_state: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Shipment departs from a state that contains the provided state name.
    """

    departure_city: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Shipment departs from a city that contains the provided city name.
    """

    arrival_country: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Shipment arrives at a country with an exact match for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    arrival_state: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Shipment arrives at a state that contains the provided state name.
    """

    arrival_city: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Shipment arrives at a city that contains the provided city name.
    """

    hs_code: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The shipment HS code starts with the provided HS code.
    """

    hs_description: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The HS description contains the provided string.
    """

    product_origin: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Product Origin with an exact match for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    supplier_purpose: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The supplier purpose contains the provided string.
    """

    buyer_purpose: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The buyer purpose contains the provided string.
    """

    arrival_date: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The arrival date is within the provided range.
    """

    departure_date: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The departure date is within the provided range.
    """

    shipment_identifier: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The shipment identifier starts with the provided string.
    """

    transit_country: typing.Optional[typing.List[Country]] = pydantic.Field(default=None)
    """
    Countries through which a shipment passes for the provided [country code](/sayari-library/ontology/enumerated-types#country).
    """

    weight: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The shipment weight is within the provided range.
    """

    sources: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    An exact match for the provided sources.
    """

    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
