#
# Autogenerated by Thrift for thrift/compiler/test/fixtures/py3/src/module.thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#  @generated
#

from thrift.py3.reflection import (
  ArgumentSpec as __ArgumentSpec,
  InterfaceSpec as __InterfaceSpec,
  MethodSpec as __MethodSpec,
  NumberType as __NumberType,
)

import folly.iobuf as _fbthrift_iobuf


import module.types as _module_types


def get_reflection__SimpleService(for_clients: bool):
    spec: __InterfaceSpec = __InterfaceSpec(
        name="SimpleService",
        methods=None,
        annotations={
        },
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_five",
            arguments=(
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="add_five",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="num",
                    type=int,
                    kind=__NumberType.I32,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="do_nothing",
            arguments=(
            ),
            result=None,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="concat",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="first",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="second",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=str,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_value",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="simple_struct",
                    type=_module_types.SimpleStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="negate",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="input",
                    type=bool,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=bool,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="tiny",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="input",
                    type=int,
                    kind=__NumberType.BYTE,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.BYTE,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="small",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="input",
                    type=int,
                    kind=__NumberType.I16,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I16,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="big",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="input",
                    type=int,
                    kind=__NumberType.I64,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I64,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="two",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="input",
                    type=float,
                    kind=__NumberType.DOUBLE,
                    annotations={
                    },
                ),
            ),
            result=float,
            result_kind=__NumberType.DOUBLE,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="expected_exception",
            arguments=(
            ),
            result=None,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
                _module_types.SimpleException,
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="unexpected_exception",
            arguments=(
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="sum_i16_list",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="numbers",
                    type=_module_types.List__i16,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="sum_i32_list",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="numbers",
                    type=_module_types.List__i32,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="sum_i64_list",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="numbers",
                    type=_module_types.List__i64,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="concat_many",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="words",
                    type=_module_types.List__string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=str,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="count_structs",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="items",
                    type=_module_types.List__SimpleStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="sum_set",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="numbers",
                    type=_module_types.Set__i32,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="contains_word",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="words",
                    type=_module_types.Set__string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="word",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=bool,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_map_value",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="words",
                    type=_module_types.Map__string_string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="key",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=str,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="map_length",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="items",
                    type=_module_types.Map__string_SimpleStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I16,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="sum_map_values",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="items",
                    type=_module_types.Map__string_i16,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I16,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="complex_sum_i32",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="counter",
                    type=_module_types.ComplexStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="repeat_name",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="counter",
                    type=_module_types.ComplexStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=str,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_struct",
            arguments=(
            ),
            result=_module_types.SimpleStruct,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="fib",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="n",
                    type=int,
                    kind=__NumberType.I16,
                    annotations={
                    },
                ),
            ),
            result=_module_types.List__i32,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="unique_words",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="words",
                    type=_module_types.List__string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Set__string,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="words_count",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="words",
                    type=_module_types.List__string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Map__string_i16,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="set_enum",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="in_enum",
                    type=_module_types.AnEnum,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.AnEnum,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="list_of_lists",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="num_lists",
                    type=int,
                    kind=__NumberType.I16,
                    annotations={
                    },
                ),
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="num_items",
                    type=int,
                    kind=__NumberType.I16,
                    annotations={
                    },
                ),
            ),
            result=_module_types.List__List__i32,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="word_character_frequency",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="sentence",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Map__string_Map__string_i32,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="list_of_sets",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="some_words",
                    type=str,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.List__Set__string,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="nested_map_argument",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="struct_map",
                    type=_module_types.Map__string_List__SimpleStruct,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="make_sentence",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="word_chars",
                    type=_module_types.List__List__string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=str,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_union",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="sets",
                    type=_module_types.List__Set__i32,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Set__i32,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_keys",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="string_map",
                    type=_module_types.List__Map__string_string,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Set__string,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="lookup_double",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="key",
                    type=int,
                    kind=__NumberType.I32,
                    annotations={
                    },
                ),
            ),
            result=float,
            result_kind=__NumberType.DOUBLE,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="retrieve_binary",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="something",
                    type=bytes,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=bytes,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="contain_binary",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="binaries",
                    type=_module_types.List__binary,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.Set__binary,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="contain_enum",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="the_enum",
                    type=_module_types.List__AnEnum,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.List__AnEnum,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_binary_union_struct",
            arguments=(
                __ArgumentSpec.__new__(
                    __ArgumentSpec,
                    name="u",
                    type=_module_types.BinaryUnion,
                    kind=__NumberType.NOT_A_NUMBER,
                    annotations={
                    },
                ),
            ),
            result=_module_types.BinaryUnionStruct,
            result_kind=__NumberType.NOT_A_NUMBER,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    return spec


def get_reflection__DerivedService(for_clients: bool):
    spec: __InterfaceSpec = __InterfaceSpec(
        name="DerivedService",
        methods=None,
        annotations={
            """bar""": """1""",            """foo""": """\"\"\"""",        },
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_six",
            arguments=(
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    return spec


def get_reflection__RederivedService(for_clients: bool):
    spec: __InterfaceSpec = __InterfaceSpec(
        name="RederivedService",
        methods=None,
        annotations={
        },
    )
    spec.add_method(
        __MethodSpec.__new__(
            __MethodSpec,
            name="get_seven",
            arguments=(
            ),
            result=int,
            result_kind=__NumberType.I32,
            exceptions=(
            ),
            annotations={
            },
        )
    )
    return spec
