"use strict";
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.11.8
//   protoc               v4.25.9
// source: grpc/reflection/v1alpha/reflection.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.ServerReflectionDefinition = exports.ErrorResponse = exports.ServiceResponse = exports.ListServiceResponse = exports.ExtensionNumberResponse = exports.FileDescriptorResponse = exports.ServerReflectionResponse = exports.ExtensionRequest = exports.ServerReflectionRequest = exports.protobufPackage = void 0;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
exports.protobufPackage = "grpc.reflection.v1alpha";
function createBaseServerReflectionRequest() {
    return {};
}
exports.ServerReflectionRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.host !== undefined && message.host !== "") {
            writer.uint32(10).string(message.host);
        }
        if (message.fileByFilename !== undefined) {
            writer.uint32(26).string(message.fileByFilename);
        }
        if (message.fileContainingSymbol !== undefined) {
            writer.uint32(34).string(message.fileContainingSymbol);
        }
        if (message.fileContainingExtension !== undefined) {
            exports.ExtensionRequest.encode(message.fileContainingExtension, writer.uint32(42).fork()).join();
        }
        if (message.allExtensionNumbersOfType !== undefined) {
            writer.uint32(50).string(message.allExtensionNumbersOfType);
        }
        if (message.listServices !== undefined) {
            writer.uint32(58).string(message.listServices);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseServerReflectionRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.host = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.fileByFilename = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.fileContainingSymbol = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.fileContainingExtension = exports.ExtensionRequest.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.allExtensionNumbersOfType = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.listServices = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            host: isSet(object.host) ? globalThis.String(object.host) : undefined,
            fileByFilename: isSet(object.fileByFilename)
                ? globalThis.String(object.fileByFilename)
                : isSet(object.file_by_filename)
                    ? globalThis.String(object.file_by_filename)
                    : undefined,
            fileContainingSymbol: isSet(object.fileContainingSymbol)
                ? globalThis.String(object.fileContainingSymbol)
                : isSet(object.file_containing_symbol)
                    ? globalThis.String(object.file_containing_symbol)
                    : undefined,
            fileContainingExtension: isSet(object.fileContainingExtension)
                ? exports.ExtensionRequest.fromJSON(object.fileContainingExtension)
                : isSet(object.file_containing_extension)
                    ? exports.ExtensionRequest.fromJSON(object.file_containing_extension)
                    : undefined,
            allExtensionNumbersOfType: isSet(object.allExtensionNumbersOfType)
                ? globalThis.String(object.allExtensionNumbersOfType)
                : isSet(object.all_extension_numbers_of_type)
                    ? globalThis.String(object.all_extension_numbers_of_type)
                    : undefined,
            listServices: isSet(object.listServices)
                ? globalThis.String(object.listServices)
                : isSet(object.list_services)
                    ? globalThis.String(object.list_services)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.host !== undefined && message.host !== "") {
            obj.host = message.host;
        }
        if (message.fileByFilename !== undefined) {
            obj.fileByFilename = message.fileByFilename;
        }
        if (message.fileContainingSymbol !== undefined) {
            obj.fileContainingSymbol = message.fileContainingSymbol;
        }
        if (message.fileContainingExtension !== undefined) {
            obj.fileContainingExtension = exports.ExtensionRequest.toJSON(message.fileContainingExtension);
        }
        if (message.allExtensionNumbersOfType !== undefined) {
            obj.allExtensionNumbersOfType = message.allExtensionNumbersOfType;
        }
        if (message.listServices !== undefined) {
            obj.listServices = message.listServices;
        }
        return obj;
    },
    create(base) {
        return exports.ServerReflectionRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseServerReflectionRequest();
        message.host = object.host ?? undefined;
        message.fileByFilename = object.fileByFilename ?? undefined;
        message.fileContainingSymbol = object.fileContainingSymbol ?? undefined;
        message.fileContainingExtension =
            (object.fileContainingExtension !== undefined && object.fileContainingExtension !== null)
                ? exports.ExtensionRequest.fromPartial(object.fileContainingExtension)
                : undefined;
        message.allExtensionNumbersOfType = object.allExtensionNumbersOfType ?? undefined;
        message.listServices = object.listServices ?? undefined;
        return message;
    },
};
function createBaseExtensionRequest() {
    return {};
}
exports.ExtensionRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.containingType !== undefined && message.containingType !== "") {
            writer.uint32(10).string(message.containingType);
        }
        if (message.extensionNumber !== undefined && message.extensionNumber !== 0) {
            writer.uint32(16).int32(message.extensionNumber);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseExtensionRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.containingType = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.extensionNumber = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            containingType: isSet(object.containingType)
                ? globalThis.String(object.containingType)
                : isSet(object.containing_type)
                    ? globalThis.String(object.containing_type)
                    : undefined,
            extensionNumber: isSet(object.extensionNumber)
                ? globalThis.Number(object.extensionNumber)
                : isSet(object.extension_number)
                    ? globalThis.Number(object.extension_number)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.containingType !== undefined && message.containingType !== "") {
            obj.containingType = message.containingType;
        }
        if (message.extensionNumber !== undefined && message.extensionNumber !== 0) {
            obj.extensionNumber = Math.round(message.extensionNumber);
        }
        return obj;
    },
    create(base) {
        return exports.ExtensionRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseExtensionRequest();
        message.containingType = object.containingType ?? undefined;
        message.extensionNumber = object.extensionNumber ?? undefined;
        return message;
    },
};
function createBaseServerReflectionResponse() {
    return {};
}
exports.ServerReflectionResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.validHost !== undefined && message.validHost !== "") {
            writer.uint32(10).string(message.validHost);
        }
        if (message.originalRequest !== undefined) {
            exports.ServerReflectionRequest.encode(message.originalRequest, writer.uint32(18).fork()).join();
        }
        if (message.fileDescriptorResponse !== undefined) {
            exports.FileDescriptorResponse.encode(message.fileDescriptorResponse, writer.uint32(34).fork()).join();
        }
        if (message.allExtensionNumbersResponse !== undefined) {
            exports.ExtensionNumberResponse.encode(message.allExtensionNumbersResponse, writer.uint32(42).fork()).join();
        }
        if (message.listServicesResponse !== undefined) {
            exports.ListServiceResponse.encode(message.listServicesResponse, writer.uint32(50).fork()).join();
        }
        if (message.errorResponse !== undefined) {
            exports.ErrorResponse.encode(message.errorResponse, writer.uint32(58).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseServerReflectionResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.validHost = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.originalRequest = exports.ServerReflectionRequest.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.fileDescriptorResponse = exports.FileDescriptorResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.allExtensionNumbersResponse = exports.ExtensionNumberResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.listServicesResponse = exports.ListServiceResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.errorResponse = exports.ErrorResponse.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            validHost: isSet(object.validHost)
                ? globalThis.String(object.validHost)
                : isSet(object.valid_host)
                    ? globalThis.String(object.valid_host)
                    : undefined,
            originalRequest: isSet(object.originalRequest)
                ? exports.ServerReflectionRequest.fromJSON(object.originalRequest)
                : isSet(object.original_request)
                    ? exports.ServerReflectionRequest.fromJSON(object.original_request)
                    : undefined,
            fileDescriptorResponse: isSet(object.fileDescriptorResponse)
                ? exports.FileDescriptorResponse.fromJSON(object.fileDescriptorResponse)
                : isSet(object.file_descriptor_response)
                    ? exports.FileDescriptorResponse.fromJSON(object.file_descriptor_response)
                    : undefined,
            allExtensionNumbersResponse: isSet(object.allExtensionNumbersResponse)
                ? exports.ExtensionNumberResponse.fromJSON(object.allExtensionNumbersResponse)
                : isSet(object.all_extension_numbers_response)
                    ? exports.ExtensionNumberResponse.fromJSON(object.all_extension_numbers_response)
                    : undefined,
            listServicesResponse: isSet(object.listServicesResponse)
                ? exports.ListServiceResponse.fromJSON(object.listServicesResponse)
                : isSet(object.list_services_response)
                    ? exports.ListServiceResponse.fromJSON(object.list_services_response)
                    : undefined,
            errorResponse: isSet(object.errorResponse)
                ? exports.ErrorResponse.fromJSON(object.errorResponse)
                : isSet(object.error_response)
                    ? exports.ErrorResponse.fromJSON(object.error_response)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.validHost !== undefined && message.validHost !== "") {
            obj.validHost = message.validHost;
        }
        if (message.originalRequest !== undefined) {
            obj.originalRequest = exports.ServerReflectionRequest.toJSON(message.originalRequest);
        }
        if (message.fileDescriptorResponse !== undefined) {
            obj.fileDescriptorResponse = exports.FileDescriptorResponse.toJSON(message.fileDescriptorResponse);
        }
        if (message.allExtensionNumbersResponse !== undefined) {
            obj.allExtensionNumbersResponse = exports.ExtensionNumberResponse.toJSON(message.allExtensionNumbersResponse);
        }
        if (message.listServicesResponse !== undefined) {
            obj.listServicesResponse = exports.ListServiceResponse.toJSON(message.listServicesResponse);
        }
        if (message.errorResponse !== undefined) {
            obj.errorResponse = exports.ErrorResponse.toJSON(message.errorResponse);
        }
        return obj;
    },
    create(base) {
        return exports.ServerReflectionResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseServerReflectionResponse();
        message.validHost = object.validHost ?? undefined;
        message.originalRequest = (object.originalRequest !== undefined && object.originalRequest !== null)
            ? exports.ServerReflectionRequest.fromPartial(object.originalRequest)
            : undefined;
        message.fileDescriptorResponse =
            (object.fileDescriptorResponse !== undefined && object.fileDescriptorResponse !== null)
                ? exports.FileDescriptorResponse.fromPartial(object.fileDescriptorResponse)
                : undefined;
        message.allExtensionNumbersResponse =
            (object.allExtensionNumbersResponse !== undefined && object.allExtensionNumbersResponse !== null)
                ? exports.ExtensionNumberResponse.fromPartial(object.allExtensionNumbersResponse)
                : undefined;
        message.listServicesResponse = (object.listServicesResponse !== undefined && object.listServicesResponse !== null)
            ? exports.ListServiceResponse.fromPartial(object.listServicesResponse)
            : undefined;
        message.errorResponse = (object.errorResponse !== undefined && object.errorResponse !== null)
            ? exports.ErrorResponse.fromPartial(object.errorResponse)
            : undefined;
        return message;
    },
};
function createBaseFileDescriptorResponse() {
    return {};
}
exports.FileDescriptorResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.fileDescriptorProto !== undefined && message.fileDescriptorProto.length !== 0) {
            for (const v of message.fileDescriptorProto) {
                writer.uint32(10).bytes(v);
            }
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFileDescriptorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.fileDescriptorProto === undefined) {
                        message.fileDescriptorProto = [];
                    }
                    const el = Buffer.from(reader.bytes());
                    if (el !== undefined) {
                        message.fileDescriptorProto.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            fileDescriptorProto: globalThis.Array.isArray(object?.fileDescriptorProto)
                ? object.fileDescriptorProto.map((e) => Buffer.from(bytesFromBase64(e)))
                : globalThis.Array.isArray(object?.file_descriptor_proto)
                    ? object.file_descriptor_proto.map((e) => Buffer.from(bytesFromBase64(e)))
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.fileDescriptorProto?.length) {
            obj.fileDescriptorProto = message.fileDescriptorProto.map((e) => base64FromBytes(e));
        }
        return obj;
    },
    create(base) {
        return exports.FileDescriptorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFileDescriptorResponse();
        message.fileDescriptorProto = object.fileDescriptorProto?.map((e) => e) || undefined;
        return message;
    },
};
function createBaseExtensionNumberResponse() {
    return {};
}
exports.ExtensionNumberResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.baseTypeName !== undefined && message.baseTypeName !== "") {
            writer.uint32(10).string(message.baseTypeName);
        }
        if (message.extensionNumber !== undefined && message.extensionNumber.length !== 0) {
            writer.uint32(18).fork();
            for (const v of message.extensionNumber) {
                writer.int32(v);
            }
            writer.join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseExtensionNumberResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.baseTypeName = reader.string();
                    continue;
                }
                case 2: {
                    if (tag === 16) {
                        if (message.extensionNumber === undefined) {
                            message.extensionNumber = [];
                        }
                        message.extensionNumber.push(reader.int32());
                        continue;
                    }
                    if (tag === 18) {
                        if (message.extensionNumber === undefined) {
                            message.extensionNumber = [];
                        }
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.extensionNumber.push(reader.int32());
                        }
                        continue;
                    }
                    break;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            baseTypeName: isSet(object.baseTypeName)
                ? globalThis.String(object.baseTypeName)
                : isSet(object.base_type_name)
                    ? globalThis.String(object.base_type_name)
                    : undefined,
            extensionNumber: globalThis.Array.isArray(object?.extensionNumber)
                ? object.extensionNumber.map((e) => globalThis.Number(e))
                : globalThis.Array.isArray(object?.extension_number)
                    ? object.extension_number.map((e) => globalThis.Number(e))
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.baseTypeName !== undefined && message.baseTypeName !== "") {
            obj.baseTypeName = message.baseTypeName;
        }
        if (message.extensionNumber?.length) {
            obj.extensionNumber = message.extensionNumber.map((e) => Math.round(e));
        }
        return obj;
    },
    create(base) {
        return exports.ExtensionNumberResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseExtensionNumberResponse();
        message.baseTypeName = object.baseTypeName ?? undefined;
        message.extensionNumber = object.extensionNumber?.map((e) => e) || undefined;
        return message;
    },
};
function createBaseListServiceResponse() {
    return {};
}
exports.ListServiceResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.service !== undefined && message.service.length !== 0) {
            for (const v of message.service) {
                exports.ServiceResponse.encode(v, writer.uint32(10).fork()).join();
            }
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseListServiceResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.service === undefined) {
                        message.service = [];
                    }
                    const el = exports.ServiceResponse.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.service.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            service: globalThis.Array.isArray(object?.service)
                ? object.service.map((e) => exports.ServiceResponse.fromJSON(e))
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.service?.length) {
            obj.service = message.service.map((e) => exports.ServiceResponse.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return exports.ListServiceResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListServiceResponse();
        message.service = object.service?.map((e) => exports.ServiceResponse.fromPartial(e)) || undefined;
        return message;
    },
};
function createBaseServiceResponse() {
    return {};
}
exports.ServiceResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== undefined && message.name !== "") {
            writer.uint32(10).string(message.name);
        }
        if (message.label !== undefined && message.label !== "") {
            writer.uint32(18).string(message.label);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseServiceResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.label = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            name: isSet(object.name) ? globalThis.String(object.name) : undefined,
            label: isSet(object.label) ? globalThis.String(object.label) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.name !== undefined && message.name !== "") {
            obj.name = message.name;
        }
        if (message.label !== undefined && message.label !== "") {
            obj.label = message.label;
        }
        return obj;
    },
    create(base) {
        return exports.ServiceResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseServiceResponse();
        message.name = object.name ?? undefined;
        message.label = object.label ?? undefined;
        return message;
    },
};
function createBaseErrorResponse() {
    return {};
}
exports.ErrorResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.errorCode !== undefined && message.errorCode !== 0) {
            writer.uint32(8).int32(message.errorCode);
        }
        if (message.errorMessage !== undefined && message.errorMessage !== "") {
            writer.uint32(18).string(message.errorMessage);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseErrorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.errorCode = reader.int32();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.errorMessage = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            errorCode: isSet(object.errorCode)
                ? globalThis.Number(object.errorCode)
                : isSet(object.error_code)
                    ? globalThis.Number(object.error_code)
                    : undefined,
            errorMessage: isSet(object.errorMessage)
                ? globalThis.String(object.errorMessage)
                : isSet(object.error_message)
                    ? globalThis.String(object.error_message)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.errorCode !== undefined && message.errorCode !== 0) {
            obj.errorCode = Math.round(message.errorCode);
        }
        if (message.errorMessage !== undefined && message.errorMessage !== "") {
            obj.errorMessage = message.errorMessage;
        }
        return obj;
    },
    create(base) {
        return exports.ErrorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseErrorResponse();
        message.errorCode = object.errorCode ?? undefined;
        message.errorMessage = object.errorMessage ?? undefined;
        return message;
    },
};
exports.ServerReflectionDefinition = {
    name: "ServerReflection",
    fullName: "grpc.reflection.v1alpha.ServerReflection",
    methods: {
        /**
         * / The reflection service is structured as a bidirectional stream, ensuring
         * / all related requests go to a single server.
         */
        serverReflectionInfo: {
            name: "ServerReflectionInfo",
            requestType: exports.ServerReflectionRequest,
            requestStream: true,
            responseType: exports.ServerReflectionResponse,
            responseStream: true,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "grpc/reflection/v1alpha/reflection.proto",
        "package": "grpc.reflection.v1alpha",
        "dependency": [],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "ServerReflectionRequest",
                "field": [{
                        "name": "host",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "host",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "file_by_filename",
                        "number": 3,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fileByFilename",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "file_containing_symbol",
                        "number": 4,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fileContainingSymbol",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "file_containing_extension",
                        "number": 5,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ExtensionRequest",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fileContainingExtension",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "all_extension_numbers_of_type",
                        "number": 6,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "allExtensionNumbersOfType",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "list_services",
                        "number": 7,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "listServices",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "message_request", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ExtensionRequest",
                "field": [{
                        "name": "containing_type",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "containingType",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "extension_number",
                        "number": 2,
                        "label": 1,
                        "type": 5,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "extensionNumber",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ServerReflectionResponse",
                "field": [{
                        "name": "valid_host",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "validHost",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "original_request",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ServerReflectionRequest",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "originalRequest",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "file_descriptor_response",
                        "number": 4,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.FileDescriptorResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fileDescriptorResponse",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "all_extension_numbers_response",
                        "number": 5,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ExtensionNumberResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "allExtensionNumbersResponse",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "list_services_response",
                        "number": 6,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ListServiceResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "listServicesResponse",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "error_response",
                        "number": 7,
                        "label": 1,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ErrorResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "errorResponse",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "message_response", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "FileDescriptorResponse",
                "field": [{
                        "name": "file_descriptor_proto",
                        "number": 1,
                        "label": 3,
                        "type": 12,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fileDescriptorProto",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ExtensionNumberResponse",
                "field": [{
                        "name": "base_type_name",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "baseTypeName",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "extension_number",
                        "number": 2,
                        "label": 3,
                        "type": 5,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "extensionNumber",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ListServiceResponse",
                "field": [{
                        "name": "service",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".grpc.reflection.v1alpha.ServiceResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "service",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ServiceResponse",
                "field": [{
                        "name": "name",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "name",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "label",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "label",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ErrorResponse",
                "field": [{
                        "name": "error_code",
                        "number": 1,
                        "label": 1,
                        "type": 5,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "errorCode",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "error_message",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "errorMessage",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [],
        "service": [{
                "name": "ServerReflection",
                "method": [{
                        "name": "ServerReflectionInfo",
                        "inputType": ".grpc.reflection.v1alpha.ServerReflectionRequest",
                        "outputType": ".grpc.reflection.v1alpha.ServerReflectionResponse",
                        "options": undefined,
                        "clientStreaming": true,
                        "serverStreaming": true,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [6, 0, 2, 0],
                    "span": [38, 2, 39, 48],
                    "leadingComments": "/ The reflection service is structured as a bidirectional stream, ensuring\n/ all related requests go to a single server.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0],
                    "span": [43, 0, 75, 1],
                    "leadingComments": "/ The message sent by the client when calling ServerReflectionInfo method.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 8, 0],
                    "span": [48, 2, 74, 3],
                    "leadingComments": "/ To use reflection service, the client should set one of the following\n/ fields in message_request. The server distinguishes requests by their\n/ defined field and then handles them using corresponding methods.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 2, 1],
                    "span": [50, 4, 32],
                    "leadingComments": "/ Find a proto file by the file name.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 2, 2],
                    "span": [55, 4, 38],
                    "leadingComments": "/ Find the proto file that declares the given fully-qualified symbol name.\n/ This field should be a fully-qualified symbol name\n/ (e.g. <package>.<service>[.<method>] or <package>.<type>).\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 2, 3],
                    "span": [59, 4, 51],
                    "leadingComments": "/ Find the proto file which defines an extension extending the given\n/ message type with the given field number.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 2, 4],
                    "span": [69, 4, 45],
                    "leadingComments": "/ Finds the tag numbers used by all known extensions of extendee_type, and\n/ appends them to ExtensionNumberResponse in an undefined order.\n/ Its corresponding method is best-effort: it's not guaranteed that the\n/ reflection service will implement this method, and it's not guaranteed\n/ that this method will provide all extensions. Returns\n/ StatusCode::UNIMPLEMENTED if it's not implemented.\n/ This field should be a fully-qualified type name. The format is\n/ <package>.<type>\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 2, 5],
                    "span": [73, 4, 29],
                    "leadingComments": "/ List the full names of registered services. The content will not be\n/ checked.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 1],
                    "span": [79, 0, 83, 1],
                    "leadingComments": "/ The type name and extension number sent by the client when requesting\n/ file_containing_extension.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 1, 2, 0],
                    "span": [81, 2, 29],
                    "leadingComments": "/ Fully-qualified type name. The format should be <package>.<type>\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2],
                    "span": [86, 0, 109, 1],
                    "leadingComments": "/ The message sent by the server to answer ServerReflectionInfo method.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 8, 0],
                    "span": [91, 2, 108, 3],
                    "leadingComments": "/ The server set one of the following fields accroding to the message_request\n/ in the request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 2, 2],
                    "span": [98, 4, 56],
                    "leadingComments": "/ This message is used to answer file_by_filename, file_containing_symbol,\n/ file_containing_extension requests with transitive dependencies. As\n/ the repeated label is not allowed in oneof fields, we use a\n/ FileDescriptorResponse message to encapsulate the repeated fields.\n/ The reflection service is allowed to avoid sending FileDescriptorProtos\n/ that were previously sent in response to earlier requests in the stream.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 2, 3],
                    "span": [101, 4, 63],
                    "leadingComments": "/ This message is used to answer all_extension_numbers_of_type requst.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 2, 4],
                    "span": [104, 4, 51],
                    "leadingComments": "/ This message is used to answer list_services request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 2, 5],
                    "span": [107, 4, 37],
                    "leadingComments": "/ This message is used when an error occurs.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3],
                    "span": [114, 0, 119, 1],
                    "leadingComments": "/ Serialized FileDescriptorProto messages sent by the server answering\n/ a file_by_filename, file_containing_symbol, or file_containing_extension\n/ request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 0],
                    "span": [118, 2, 43],
                    "leadingComments": "/ Serialized FileDescriptorProto messages. We avoid taking a dependency on\n/ descriptor.proto, which uses proto2 only features, by making them opaque\n/ bytes instead.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4],
                    "span": [123, 0, 128, 1],
                    "leadingComments": "/ A list of extension numbers sent by the server answering\n/ all_extension_numbers_of_type request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 0],
                    "span": [126, 2, 28],
                    "leadingComments": "/ Full name of the base type, including the package name. The format\n/ is <package>.<type>\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5],
                    "span": [131, 0, 135, 1],
                    "leadingComments": "/ A list of ServiceResponse sent by the server answering list_services request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5, 2, 0],
                    "span": [134, 2, 39],
                    "leadingComments": "/ The information of each service may be expanded in the future, so we use\n/ ServiceResponse message to encapsulate it.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6],
                    "span": [139, 0, 146, 1],
                    "leadingComments": "/ The information of a single service used by ListServiceResponse to answer\n/ list_services request.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 0],
                    "span": [142, 2, 18],
                    "leadingComments": "/ Full name of a registered service, including its package name. The format\n/ is <package>.<service>\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 1],
                    "span": [145, 2, 19],
                    "leadingComments": " Added a label to map for the service name, since the same service name\n could be used across multiple services.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 7],
                    "span": [149, 0, 153, 1],
                    "leadingComments": "/ The error code and error message sent by the server when an error occurs.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 7, 2, 0],
                    "span": [151, 2, 23],
                    "leadingComments": "/ This field uses the error codes defined in grpc::StatusCode.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".grpc.reflection.v1alpha.ServerReflectionRequest": exports.ServerReflectionRequest,
        ".grpc.reflection.v1alpha.ExtensionRequest": exports.ExtensionRequest,
        ".grpc.reflection.v1alpha.ServerReflectionResponse": exports.ServerReflectionResponse,
        ".grpc.reflection.v1alpha.FileDescriptorResponse": exports.FileDescriptorResponse,
        ".grpc.reflection.v1alpha.ExtensionNumberResponse": exports.ExtensionNumberResponse,
        ".grpc.reflection.v1alpha.ListServiceResponse": exports.ListServiceResponse,
        ".grpc.reflection.v1alpha.ServiceResponse": exports.ServiceResponse,
        ".grpc.reflection.v1alpha.ErrorResponse": exports.ErrorResponse,
    },
    dependencies: [],
};
function bytesFromBase64(b64) {
    return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
}
function base64FromBytes(arr) {
    return globalThis.Buffer.from(arr).toString("base64");
}
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=reflection.js.map