#
# Autogenerated by Thrift
#
# DO NOT EDIT
#  @generated
#

from __future__ import annotations

import typing as _typing

import folly.iobuf as _fbthrift_iobuf
import thrift.python.types as _fbthrift_python_types
import thrift.python.exceptions as _fbthrift_python_exceptions

import include.thrift_types

class _fbthrift_compatible_with_Result:
    pass


class Result(_fbthrift_python_types.Enum, int, _fbthrift_compatible_with_Result):
    OK: Result = ...
    SO_SO: Result = ...
    GOOD: Result = ...
    def _to_python(self) -> Result: ...
    def _to_py3(self) -> "module.types.Result": ...  # type: ignore
    def _to_py_deprecated(self) -> int: ...


class _fbthrift_compatible_with_CustomException:
    pass


class CustomException(_fbthrift_python_exceptions.GeneratedError, _fbthrift_compatible_with_CustomException):
    name: _typing.Final[str] = ...
    result: _typing.Final[Result] = ...
    def __init__(
        self, *,
        name: _typing.Optional[str]=...,
        result: _typing.Optional[_fbthrift_compatible_with_Result]=...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[str, _typing.Union[str, Result]]]: ...
    def _to_python(self) -> _typing.Self: ...
    def _to_mutable_python(self) -> "module.thrift_mutable_types.CustomException": ...  # type: ignore
    def _to_py3(self) -> "module.types.CustomException": ...  # type: ignore
    def _to_py_deprecated(self) -> "module.ttypes.CustomException": ...  # type: ignore


_fbthrift_schema_b747839c13cb3aa5: bytes = ...


class _fbthrift_PrimitivesService_init_args(_fbthrift_python_types.Struct):
    param0: _typing.Final[int] = ...
    param1: _typing.Final[int] = ...

    def __init__(
        self, *,
        param0: _typing.Optional[int]=...,
        param1: _typing.Optional[int]=...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[None, int, int]]]: ...


class _fbthrift_PrimitivesService_init_result(_fbthrift_python_types.Struct):
    success: _typing.Final[int]

    def __init__(
        self, *, success: _typing.Optional[int] = ...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[
            int,
        ]]]: ...


class _fbthrift_PrimitivesService_method_that_throws_args(_fbthrift_python_types.Struct):

    def __init__(
        self,
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[None]]]: ...


class _fbthrift_PrimitivesService_method_that_throws_result(_fbthrift_python_types.Struct):
    success: _typing.Final[Result]
    e: _typing.Final[CustomException]

    def __init__(
        self, *, success: _typing.Optional[Result] = ..., e: _typing.Optional[CustomException]=...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[
            Result,
            CustomException,
        ]]]: ...


class _fbthrift_PrimitivesService_return_void_method_args(_fbthrift_python_types.Struct):
    id: _typing.Final[int] = ...

    def __init__(
        self, *,
        id: _typing.Optional[int]=...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[None, int]]]: ...


class _fbthrift_PrimitivesService_return_void_method_result(_fbthrift_python_types.Struct):
    success: _typing.Final[None]

    def __init__(
        self, *, success: _typing.Optional[None] = ...
    ) -> None: ...

    def __iter__(self) -> _typing.Iterator[_typing.Tuple[
        str,
        _typing.Union[
            None,
        ]]]: ...
