// Generated by the protocol buffer compiler.  DO NOT EDIT!

#include <lwpb/lwpb.h>

#include "test_simple_pb2.h"

// 'PhoneNumber' field descriptors
const struct lwpb_field_desc lwpb_fields_test_phonenumber[] = {
    {
        .number = 1,
        .opts.label = LWPB_REQUIRED,
        .opts.typ = LWPB_STRING,
        .opts.flags = 0,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "number",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.string.str = "",
#endif
    },
    {
        .number = 2,
        .opts.label = LWPB_OPTIONAL,
        .opts.typ = LWPB_ENUM,
        .opts.flags = 0 | LWPB_HAS_DEFAULT,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "type",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.int32 = 1,
#endif
    },
};

// 'Person' field descriptors
const struct lwpb_field_desc lwpb_fields_test_person[] = {
    {
        .number = 1,
        .opts.label = LWPB_REQUIRED,
        .opts.typ = LWPB_STRING,
        .opts.flags = 0,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "name",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.string.str = "",
#endif
    },
    {
        .number = 2,
        .opts.label = LWPB_REQUIRED,
        .opts.typ = LWPB_INT32,
        .opts.flags = 0,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "id",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.int32 = 0,
#endif
    },
    {
        .number = 3,
        .opts.label = LWPB_OPTIONAL,
        .opts.typ = LWPB_STRING,
        .opts.flags = 0 | LWPB_IS_DEPRECATED,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "email",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.string.str = "",
#endif
    },
    {
        .number = 4,
        .opts.label = LWPB_REPEATED,
        .opts.typ = LWPB_MESSAGE,
        .opts.flags = 0,
        .msg_desc = test_PhoneNumber,
#if LWPB_FIELD_NAMES
        .name = "phone",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.null = 0,
#endif
    },
};

// 'LookupResult' field descriptors
const struct lwpb_field_desc lwpb_fields_test_lookupresult[] = {
    {
        .number = 1,
        .opts.label = LWPB_OPTIONAL,
        .opts.typ = LWPB_MESSAGE,
        .opts.flags = 0,
        .msg_desc = test_Person,
#if LWPB_FIELD_NAMES
        .name = "person",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.null = 0,
#endif
    },
};

// 'Name' field descriptors
const struct lwpb_field_desc lwpb_fields_test_name[] = {
    {
        .number = 1,
        .opts.label = LWPB_OPTIONAL,
        .opts.typ = LWPB_STRING,
        .opts.flags = 0,
        .msg_desc = 0,
#if LWPB_FIELD_NAMES
        .name = "name",
#endif
#if LWPB_FIELD_DEFAULTS
        .def.string.str = "",
#endif
    },
};

// Message descriptors
const struct lwpb_msg_desc lwpb_messages_test[] = {
    {
        .num_fields = 2,
        .fields = lwpb_fields_test_phonenumber,
#if LWPB_MESSAGE_NAMES
        .name = "PhoneNumber",
#endif
    },
    {
        .num_fields = 4,
        .fields = lwpb_fields_test_person,
#if LWPB_MESSAGE_NAMES
        .name = "Person",
#endif
    },
    {
        .num_fields = 1,
        .fields = lwpb_fields_test_lookupresult,
#if LWPB_MESSAGE_NAMES
        .name = "LookupResult",
#endif
    },
    {
        .num_fields = 1,
        .fields = lwpb_fields_test_name,
#if LWPB_MESSAGE_NAMES
        .name = "Name",
#endif
    },
};

// 'Search' method descriptors
const struct lwpb_method_desc lwpb_methods_test_search[] = {
    {
        .service = test_Search,
        .req_desc = test_Name,
        .res_desc = test_LookupResult,
#if LWPB_METHOD_NAMES
        .name = "search_by_name",
#endif
    },
};

// Service descriptors
const struct lwpb_service_desc lwpb_services_test[] = {
    {
        .num_methods = 1,
        .methods = lwpb_methods_test_search,
#if LWPB_SERVICE_NAMES
        .name = "Search",
#endif
    },
};

