# generated by datamodel-codegen:
#   filename:  multiple_aliases_parameters.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import AliasChoices, BaseModel, Field, RootModel


class Item(BaseModel):
    id: int | None = None
    name: str | None = None


class FilterOptions(BaseModel):
    category: str | None = None


class ListItemsParametersQuery(BaseModel):
    pageSize: int | None = Field(
        None, validation_alias=AliasChoices('page_size', 'pageSize', 'page-size')
    )
    sortOrder: str | None = Field(
        None, validation_alias=AliasChoices('sort_order', 'sortOrder', 'sort-order')
    )
    filterOptions: FilterOptions | None = Field(
        None,
        validation_alias=AliasChoices(
            'filter_options', 'filterOptions', 'filter-options'
        ),
    )
    singleAliasField: str | None = Field(None, alias='single_alias_field')


class ListItemsResponse(RootModel[list[Item]]):
    root: list[Item]
