# coding: utf-8

"""
Waybiller External API - with fixes

The **Waybiller External API** is a feature that allows companies to access **Waybiller** data as JSON objects and create **Waybiller** instances out of their own data.  To make integration easier for the companies, the external API provides mapping support - it is possible to create company-specific mappings for object identifiers (such as destination and origin).  These mappings will be used for representing companies data from external API, and for converting the values during the creation of **Waybiller** instances (such as transport orders and waybills).  Most of the API responses contain mapped values, which may be null if the company doesn't have a mapping for this object.  Unique **Waybiller** identifiers and values can be accessed via the `raw_data` key.  The API is HTTPS and JSON based.  ### Pagination  By default, list endpoint responses are presented in pages of 30 items.  It is possible to control the page size using the `limit` parameter: `/external-api/<some-list-endpoint>/?limit=<number>`, where `<number>` is an integer between 1 and 1000.

The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501

import warnings
from typing import Any, Dict, List, Optional, Tuple, Union

from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
from typing_extensions import Annotated

from pywaybiller.openapi_client.api_client import ApiClient, RequestSerialized
from pywaybiller.openapi_client.api_response import ApiResponse
from pywaybiller.openapi_client.models.external_api_origin_assortment import (
    ExternalAPIOriginAssortment,
)
from pywaybiller.openapi_client.models.paginated_external_api_origin_assortment_list import (
    PaginatedExternalAPIOriginAssortmentList,
)
from pywaybiller.openapi_client.rest import RESTResponseType


class OriginAssortmentsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_call
    def origin_assortments_list(
        self,
        assortment__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-sensitive)"
            ),
        ] = None,
        assortment__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        assortment__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        assortment__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-insensitive)"
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(description="Maximum number of objects to return per page"),
        ] = None,
        offset: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=0)]],
            Field(description="The initial index from which to return the results"),
        ] = None,
        origin__id: Annotated[
            Optional[StrictInt],
            Field(description="Filters origin assortments by exact origin ID"),
        ] = None,
        origin__id__gt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than the specified value"
            ),
        ] = None,
        origin__id__gte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than or equal to the specified value"
            ),
        ] = None,
        origin__id__in: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments by a comma-separated list of origin IDs"
            ),
        ] = None,
        origin__id__lt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than the specified value"
            ),
        ] = None,
        origin__id__lte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than or equal to the specified value"
            ),
        ] = None,
        origin__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-sensitive)"
            ),
        ] = None,
        origin__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        origin__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        origin__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-insensitive)"
            ),
        ] = None,
        subset__value: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-sensitive)"
            ),
        ] = None,
        subset__value__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__value__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__value__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-insensitive)"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedExternalAPIOriginAssortmentList:
        """Querying origin assortments

        Returns all origin assortments associated with your company based on specified filters.  Available assortments include: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param assortment__name: Filters origin assortments by exact assortment name (case-sensitive)
        :type assortment__name: str
        :param assortment__name__contains: Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)
        :type assortment__name__contains: str
        :param assortment__name__icontains: Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)
        :type assortment__name__icontains: str
        :param assortment__name__iexact: Filters origin assortments by exact assortment name (case-insensitive)
        :type assortment__name__iexact: str
        :param limit: Maximum number of objects to return per page
        :type limit: int
        :param offset: The initial index from which to return the results
        :type offset: int
        :param origin__id: Filters origin assortments by exact origin ID
        :type origin__id: int
        :param origin__id__gt: Filters origin assortments where origin ID is greater than the specified value
        :type origin__id__gt: int
        :param origin__id__gte: Filters origin assortments where origin ID is greater than or equal to the specified value
        :type origin__id__gte: int
        :param origin__id__in: Filters origin assortments by a comma-separated list of origin IDs
        :type origin__id__in: int
        :param origin__id__lt: Filters origin assortments where origin ID is less than the specified value
        :type origin__id__lt: int
        :param origin__id__lte: Filters origin assortments where origin ID is less than or equal to the specified value
        :type origin__id__lte: int
        :param origin__name: Filters origin assortments by exact origin name (case-sensitive)
        :type origin__name: str
        :param origin__name__contains: Filters origin assortments where the origin name contains the specified keyword (case-sensitive)
        :type origin__name__contains: str
        :param origin__name__icontains: Filters origin assortments where the origin name contains the specified keyword (case-insensitive)
        :type origin__name__icontains: str
        :param origin__name__iexact: Filters origin assortments by exact origin name (case-insensitive)
        :type origin__name__iexact: str
        :param subset__subset_type__name: Filters origin assortments by exact subset type name (case-sensitive)
        :type subset__subset_type__name: str
        :param subset__subset_type__name__contains: Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)
        :type subset__subset_type__name__contains: str
        :param subset__subset_type__name__icontains: Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)
        :type subset__subset_type__name__icontains: str
        :param subset__subset_type__name__iexact: Filters origin assortments by exact subset type name (case-insensitive)
        :type subset__subset_type__name__iexact: str
        :param subset__value: Filters origin assortments by exact subset value (case-sensitive)
        :type subset__value: str
        :param subset__value__contains: Filters origin assortments where the subset value contains the specified keyword (case-sensitive)
        :type subset__value__contains: str
        :param subset__value__icontains: Filters origin assortments where the subset value contains the specified keyword (case-insensitive)
        :type subset__value__icontains: str
        :param subset__value__iexact: Filters origin assortments by exact subset value (case-insensitive)
        :type subset__value__iexact: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_list_serialize(
            assortment__name=assortment__name,
            assortment__name__contains=assortment__name__contains,
            assortment__name__icontains=assortment__name__icontains,
            assortment__name__iexact=assortment__name__iexact,
            limit=limit,
            offset=offset,
            origin__id=origin__id,
            origin__id__gt=origin__id__gt,
            origin__id__gte=origin__id__gte,
            origin__id__in=origin__id__in,
            origin__id__lt=origin__id__lt,
            origin__id__lte=origin__id__lte,
            origin__name=origin__name,
            origin__name__contains=origin__name__contains,
            origin__name__icontains=origin__name__icontains,
            origin__name__iexact=origin__name__iexact,
            subset__subset_type__name=subset__subset_type__name,
            subset__subset_type__name__contains=subset__subset_type__name__contains,
            subset__subset_type__name__icontains=subset__subset_type__name__icontains,
            subset__subset_type__name__iexact=subset__subset_type__name__iexact,
            subset__value=subset__value,
            subset__value__contains=subset__value__contains,
            subset__value__icontains=subset__value__icontains,
            subset__value__iexact=subset__value__iexact,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedExternalAPIOriginAssortmentList",
            "403": "DestinationsList403Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def origin_assortments_list_with_http_info(
        self,
        assortment__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-sensitive)"
            ),
        ] = None,
        assortment__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        assortment__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        assortment__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-insensitive)"
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(description="Maximum number of objects to return per page"),
        ] = None,
        offset: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=0)]],
            Field(description="The initial index from which to return the results"),
        ] = None,
        origin__id: Annotated[
            Optional[StrictInt],
            Field(description="Filters origin assortments by exact origin ID"),
        ] = None,
        origin__id__gt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than the specified value"
            ),
        ] = None,
        origin__id__gte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than or equal to the specified value"
            ),
        ] = None,
        origin__id__in: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments by a comma-separated list of origin IDs"
            ),
        ] = None,
        origin__id__lt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than the specified value"
            ),
        ] = None,
        origin__id__lte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than or equal to the specified value"
            ),
        ] = None,
        origin__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-sensitive)"
            ),
        ] = None,
        origin__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        origin__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        origin__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-insensitive)"
            ),
        ] = None,
        subset__value: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-sensitive)"
            ),
        ] = None,
        subset__value__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__value__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__value__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-insensitive)"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedExternalAPIOriginAssortmentList]:
        """Querying origin assortments

        Returns all origin assortments associated with your company based on specified filters.  Available assortments include: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param assortment__name: Filters origin assortments by exact assortment name (case-sensitive)
        :type assortment__name: str
        :param assortment__name__contains: Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)
        :type assortment__name__contains: str
        :param assortment__name__icontains: Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)
        :type assortment__name__icontains: str
        :param assortment__name__iexact: Filters origin assortments by exact assortment name (case-insensitive)
        :type assortment__name__iexact: str
        :param limit: Maximum number of objects to return per page
        :type limit: int
        :param offset: The initial index from which to return the results
        :type offset: int
        :param origin__id: Filters origin assortments by exact origin ID
        :type origin__id: int
        :param origin__id__gt: Filters origin assortments where origin ID is greater than the specified value
        :type origin__id__gt: int
        :param origin__id__gte: Filters origin assortments where origin ID is greater than or equal to the specified value
        :type origin__id__gte: int
        :param origin__id__in: Filters origin assortments by a comma-separated list of origin IDs
        :type origin__id__in: int
        :param origin__id__lt: Filters origin assortments where origin ID is less than the specified value
        :type origin__id__lt: int
        :param origin__id__lte: Filters origin assortments where origin ID is less than or equal to the specified value
        :type origin__id__lte: int
        :param origin__name: Filters origin assortments by exact origin name (case-sensitive)
        :type origin__name: str
        :param origin__name__contains: Filters origin assortments where the origin name contains the specified keyword (case-sensitive)
        :type origin__name__contains: str
        :param origin__name__icontains: Filters origin assortments where the origin name contains the specified keyword (case-insensitive)
        :type origin__name__icontains: str
        :param origin__name__iexact: Filters origin assortments by exact origin name (case-insensitive)
        :type origin__name__iexact: str
        :param subset__subset_type__name: Filters origin assortments by exact subset type name (case-sensitive)
        :type subset__subset_type__name: str
        :param subset__subset_type__name__contains: Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)
        :type subset__subset_type__name__contains: str
        :param subset__subset_type__name__icontains: Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)
        :type subset__subset_type__name__icontains: str
        :param subset__subset_type__name__iexact: Filters origin assortments by exact subset type name (case-insensitive)
        :type subset__subset_type__name__iexact: str
        :param subset__value: Filters origin assortments by exact subset value (case-sensitive)
        :type subset__value: str
        :param subset__value__contains: Filters origin assortments where the subset value contains the specified keyword (case-sensitive)
        :type subset__value__contains: str
        :param subset__value__icontains: Filters origin assortments where the subset value contains the specified keyword (case-insensitive)
        :type subset__value__icontains: str
        :param subset__value__iexact: Filters origin assortments by exact subset value (case-insensitive)
        :type subset__value__iexact: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_list_serialize(
            assortment__name=assortment__name,
            assortment__name__contains=assortment__name__contains,
            assortment__name__icontains=assortment__name__icontains,
            assortment__name__iexact=assortment__name__iexact,
            limit=limit,
            offset=offset,
            origin__id=origin__id,
            origin__id__gt=origin__id__gt,
            origin__id__gte=origin__id__gte,
            origin__id__in=origin__id__in,
            origin__id__lt=origin__id__lt,
            origin__id__lte=origin__id__lte,
            origin__name=origin__name,
            origin__name__contains=origin__name__contains,
            origin__name__icontains=origin__name__icontains,
            origin__name__iexact=origin__name__iexact,
            subset__subset_type__name=subset__subset_type__name,
            subset__subset_type__name__contains=subset__subset_type__name__contains,
            subset__subset_type__name__icontains=subset__subset_type__name__icontains,
            subset__subset_type__name__iexact=subset__subset_type__name__iexact,
            subset__value=subset__value,
            subset__value__contains=subset__value__contains,
            subset__value__icontains=subset__value__icontains,
            subset__value__iexact=subset__value__iexact,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedExternalAPIOriginAssortmentList",
            "403": "DestinationsList403Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def origin_assortments_list_without_preload_content(
        self,
        assortment__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-sensitive)"
            ),
        ] = None,
        assortment__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        assortment__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        assortment__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact assortment name (case-insensitive)"
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(description="Maximum number of objects to return per page"),
        ] = None,
        offset: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=0)]],
            Field(description="The initial index from which to return the results"),
        ] = None,
        origin__id: Annotated[
            Optional[StrictInt],
            Field(description="Filters origin assortments by exact origin ID"),
        ] = None,
        origin__id__gt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than the specified value"
            ),
        ] = None,
        origin__id__gte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is greater than or equal to the specified value"
            ),
        ] = None,
        origin__id__in: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments by a comma-separated list of origin IDs"
            ),
        ] = None,
        origin__id__lt: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than the specified value"
            ),
        ] = None,
        origin__id__lte: Annotated[
            Optional[StrictInt],
            Field(
                description="Filters origin assortments where origin ID is less than or equal to the specified value"
            ),
        ] = None,
        origin__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-sensitive)"
            ),
        ] = None,
        origin__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        origin__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the origin name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        origin__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact origin name (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__subset_type__name__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__subset_type__name__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset type name (case-insensitive)"
            ),
        ] = None,
        subset__value: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-sensitive)"
            ),
        ] = None,
        subset__value__contains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-sensitive)"
            ),
        ] = None,
        subset__value__icontains: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments where the subset value contains the specified keyword (case-insensitive)"
            ),
        ] = None,
        subset__value__iexact: Annotated[
            Optional[StrictStr],
            Field(
                description="Filters origin assortments by exact subset value (case-insensitive)"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Querying origin assortments

        Returns all origin assortments associated with your company based on specified filters.  Available assortments include: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param assortment__name: Filters origin assortments by exact assortment name (case-sensitive)
        :type assortment__name: str
        :param assortment__name__contains: Filters origin assortments where the assortment name contains the specified keyword (case-sensitive)
        :type assortment__name__contains: str
        :param assortment__name__icontains: Filters origin assortments where the assortment name contains the specified keyword (case-insensitive)
        :type assortment__name__icontains: str
        :param assortment__name__iexact: Filters origin assortments by exact assortment name (case-insensitive)
        :type assortment__name__iexact: str
        :param limit: Maximum number of objects to return per page
        :type limit: int
        :param offset: The initial index from which to return the results
        :type offset: int
        :param origin__id: Filters origin assortments by exact origin ID
        :type origin__id: int
        :param origin__id__gt: Filters origin assortments where origin ID is greater than the specified value
        :type origin__id__gt: int
        :param origin__id__gte: Filters origin assortments where origin ID is greater than or equal to the specified value
        :type origin__id__gte: int
        :param origin__id__in: Filters origin assortments by a comma-separated list of origin IDs
        :type origin__id__in: int
        :param origin__id__lt: Filters origin assortments where origin ID is less than the specified value
        :type origin__id__lt: int
        :param origin__id__lte: Filters origin assortments where origin ID is less than or equal to the specified value
        :type origin__id__lte: int
        :param origin__name: Filters origin assortments by exact origin name (case-sensitive)
        :type origin__name: str
        :param origin__name__contains: Filters origin assortments where the origin name contains the specified keyword (case-sensitive)
        :type origin__name__contains: str
        :param origin__name__icontains: Filters origin assortments where the origin name contains the specified keyword (case-insensitive)
        :type origin__name__icontains: str
        :param origin__name__iexact: Filters origin assortments by exact origin name (case-insensitive)
        :type origin__name__iexact: str
        :param subset__subset_type__name: Filters origin assortments by exact subset type name (case-sensitive)
        :type subset__subset_type__name: str
        :param subset__subset_type__name__contains: Filters origin assortments where the subset type name contains the specified keyword (case-sensitive)
        :type subset__subset_type__name__contains: str
        :param subset__subset_type__name__icontains: Filters origin assortments where the subset type name contains the specified keyword (case-insensitive)
        :type subset__subset_type__name__icontains: str
        :param subset__subset_type__name__iexact: Filters origin assortments by exact subset type name (case-insensitive)
        :type subset__subset_type__name__iexact: str
        :param subset__value: Filters origin assortments by exact subset value (case-sensitive)
        :type subset__value: str
        :param subset__value__contains: Filters origin assortments where the subset value contains the specified keyword (case-sensitive)
        :type subset__value__contains: str
        :param subset__value__icontains: Filters origin assortments where the subset value contains the specified keyword (case-insensitive)
        :type subset__value__icontains: str
        :param subset__value__iexact: Filters origin assortments by exact subset value (case-insensitive)
        :type subset__value__iexact: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_list_serialize(
            assortment__name=assortment__name,
            assortment__name__contains=assortment__name__contains,
            assortment__name__icontains=assortment__name__icontains,
            assortment__name__iexact=assortment__name__iexact,
            limit=limit,
            offset=offset,
            origin__id=origin__id,
            origin__id__gt=origin__id__gt,
            origin__id__gte=origin__id__gte,
            origin__id__in=origin__id__in,
            origin__id__lt=origin__id__lt,
            origin__id__lte=origin__id__lte,
            origin__name=origin__name,
            origin__name__contains=origin__name__contains,
            origin__name__icontains=origin__name__icontains,
            origin__name__iexact=origin__name__iexact,
            subset__subset_type__name=subset__subset_type__name,
            subset__subset_type__name__contains=subset__subset_type__name__contains,
            subset__subset_type__name__icontains=subset__subset_type__name__icontains,
            subset__subset_type__name__iexact=subset__subset_type__name__iexact,
            subset__value=subset__value,
            subset__value__contains=subset__value__contains,
            subset__value__icontains=subset__value__icontains,
            subset__value__iexact=subset__value__iexact,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedExternalAPIOriginAssortmentList",
            "403": "DestinationsList403Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _origin_assortments_list_serialize(
        self,
        assortment__name,
        assortment__name__contains,
        assortment__name__icontains,
        assortment__name__iexact,
        limit,
        offset,
        origin__id,
        origin__id__gt,
        origin__id__gte,
        origin__id__in,
        origin__id__lt,
        origin__id__lte,
        origin__name,
        origin__name__contains,
        origin__name__icontains,
        origin__name__iexact,
        subset__subset_type__name,
        subset__subset_type__name__contains,
        subset__subset_type__name__icontains,
        subset__subset_type__name__iexact,
        subset__value,
        subset__value__contains,
        subset__value__icontains,
        subset__value__iexact,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if assortment__name is not None:
            _query_params.append(("assortment__name", assortment__name))

        if assortment__name__contains is not None:
            _query_params.append(
                ("assortment__name__contains", assortment__name__contains)
            )

        if assortment__name__icontains is not None:
            _query_params.append(
                ("assortment__name__icontains", assortment__name__icontains)
            )

        if assortment__name__iexact is not None:
            _query_params.append(("assortment__name__iexact", assortment__name__iexact))

        if limit is not None:
            _query_params.append(("limit", limit))

        if offset is not None:
            _query_params.append(("offset", offset))

        if origin__id is not None:
            _query_params.append(("origin__id", origin__id))

        if origin__id__gt is not None:
            _query_params.append(("origin__id__gt", origin__id__gt))

        if origin__id__gte is not None:
            _query_params.append(("origin__id__gte", origin__id__gte))

        if origin__id__in is not None:
            _query_params.append(("origin__id__in", origin__id__in))

        if origin__id__lt is not None:
            _query_params.append(("origin__id__lt", origin__id__lt))

        if origin__id__lte is not None:
            _query_params.append(("origin__id__lte", origin__id__lte))

        if origin__name is not None:
            _query_params.append(("origin__name", origin__name))

        if origin__name__contains is not None:
            _query_params.append(("origin__name__contains", origin__name__contains))

        if origin__name__icontains is not None:
            _query_params.append(("origin__name__icontains", origin__name__icontains))

        if origin__name__iexact is not None:
            _query_params.append(("origin__name__iexact", origin__name__iexact))

        if subset__subset_type__name is not None:
            _query_params.append(
                ("subset__subset_type__name", subset__subset_type__name)
            )

        if subset__subset_type__name__contains is not None:
            _query_params.append(
                (
                    "subset__subset_type__name__contains",
                    subset__subset_type__name__contains,
                )
            )

        if subset__subset_type__name__icontains is not None:
            _query_params.append(
                (
                    "subset__subset_type__name__icontains",
                    subset__subset_type__name__icontains,
                )
            )

        if subset__subset_type__name__iexact is not None:
            _query_params.append(
                ("subset__subset_type__name__iexact", subset__subset_type__name__iexact)
            )

        if subset__value is not None:
            _query_params.append(("subset__value", subset__value))

        if subset__value__contains is not None:
            _query_params.append(("subset__value__contains", subset__value__contains))

        if subset__value__icontains is not None:
            _query_params.append(("subset__value__icontains", subset__value__icontains))

        if subset__value__iexact is not None:
            _query_params.append(("subset__value__iexact", subset__value__iexact))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["ApiKeyAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/external-api/origin-assortments/",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def origin_assortments_retrieve(
        self,
        id: Annotated[
            StrictInt,
            Field(
                description="A unique integer value identifying this origin assortment."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ExternalAPIOriginAssortment:
        """Querying a single origin assortment

        Returns a specific origin assortment by ID. Access is limited to origin assortments that your company has permission to view: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param id: A unique integer value identifying this origin assortment. (required)
        :type id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_retrieve_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "ExternalAPIOriginAssortment",
            "403": "DestinationsList403Response",
            "404": "EmploymentsRetrieve404Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def origin_assortments_retrieve_with_http_info(
        self,
        id: Annotated[
            StrictInt,
            Field(
                description="A unique integer value identifying this origin assortment."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ExternalAPIOriginAssortment]:
        """Querying a single origin assortment

        Returns a specific origin assortment by ID. Access is limited to origin assortments that your company has permission to view: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param id: A unique integer value identifying this origin assortment. (required)
        :type id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_retrieve_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "ExternalAPIOriginAssortment",
            "403": "DestinationsList403Response",
            "404": "EmploymentsRetrieve404Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def origin_assortments_retrieve_without_preload_content(
        self,
        id: Annotated[
            StrictInt,
            Field(
                description="A unique integer value identifying this origin assortment."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Querying a single origin assortment

        Returns a specific origin assortment by ID. Access is limited to origin assortments that your company has permission to view: - Your company's origin assortments - Your partner companies' origin assortments - Public origin assortments

        :param id: A unique integer value identifying this origin assortment. (required)
        :type id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._origin_assortments_retrieve_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "ExternalAPIOriginAssortment",
            "403": "DestinationsList403Response",
            "404": "EmploymentsRetrieve404Response",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _origin_assortments_retrieve_serialize(
        self,
        id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params["id"] = id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["ApiKeyAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/external-api/origin-assortments/{id}/",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )
