"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from ...models.components import user as components_user
from dataclasses_json import Undefined, dataclass_json
from formancesdkauth import utils
from typing import Callable, List, Optional


@dataclasses.dataclass
class UsersListRequest:
    cursor: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'cursor', 'style': 'form', 'explode': True }})
    page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class UsersListCursor:
    data: List[components_user.User] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }})
    next: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class UsersListResponseBody:
    r"""The request has succeeded."""
    cursor: UsersListCursor = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cursor') }})
    



@dataclasses.dataclass
class UsersListResponse:
    next: Callable[[], Optional[UsersListResponse]] = dataclasses.field()
    result: UsersListResponseBody = dataclasses.field()
    

