"use strict";
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v1.176.0
//   protoc               v3.19.1
// source: v1/health_weaviate.proto
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WeaviateHealthCheckResponse = exports.WeaviateHealthCheckRequest = exports.WeaviateHealthCheckResponse_ServingStatus = exports.protobufPackage = void 0;
exports.weaviateHealthCheckResponse_ServingStatusFromJSON = weaviateHealthCheckResponse_ServingStatusFromJSON;
exports.weaviateHealthCheckResponse_ServingStatusToJSON = weaviateHealthCheckResponse_ServingStatusToJSON;
/* eslint-disable */
const minimal_js_1 = __importDefault(require("protobufjs/minimal.js"));
exports.protobufPackage = "weaviate.v1";
var WeaviateHealthCheckResponse_ServingStatus;
(function (WeaviateHealthCheckResponse_ServingStatus) {
    WeaviateHealthCheckResponse_ServingStatus[WeaviateHealthCheckResponse_ServingStatus["UNKNOWN"] = 0] = "UNKNOWN";
    WeaviateHealthCheckResponse_ServingStatus[WeaviateHealthCheckResponse_ServingStatus["SERVING"] = 1] = "SERVING";
    WeaviateHealthCheckResponse_ServingStatus[WeaviateHealthCheckResponse_ServingStatus["NOT_SERVING"] = 2] = "NOT_SERVING";
    WeaviateHealthCheckResponse_ServingStatus[WeaviateHealthCheckResponse_ServingStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(WeaviateHealthCheckResponse_ServingStatus || (exports.WeaviateHealthCheckResponse_ServingStatus = WeaviateHealthCheckResponse_ServingStatus = {}));
function weaviateHealthCheckResponse_ServingStatusFromJSON(object) {
    switch (object) {
        case 0:
        case "UNKNOWN":
            return WeaviateHealthCheckResponse_ServingStatus.UNKNOWN;
        case 1:
        case "SERVING":
            return WeaviateHealthCheckResponse_ServingStatus.SERVING;
        case 2:
        case "NOT_SERVING":
            return WeaviateHealthCheckResponse_ServingStatus.NOT_SERVING;
        case -1:
        case "UNRECOGNIZED":
        default:
            return WeaviateHealthCheckResponse_ServingStatus.UNRECOGNIZED;
    }
}
function weaviateHealthCheckResponse_ServingStatusToJSON(object) {
    switch (object) {
        case WeaviateHealthCheckResponse_ServingStatus.UNKNOWN:
            return "UNKNOWN";
        case WeaviateHealthCheckResponse_ServingStatus.SERVING:
            return "SERVING";
        case WeaviateHealthCheckResponse_ServingStatus.NOT_SERVING:
            return "NOT_SERVING";
        case WeaviateHealthCheckResponse_ServingStatus.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function createBaseWeaviateHealthCheckRequest() {
    return { service: "" };
}
exports.WeaviateHealthCheckRequest = {
    encode(message, writer = minimal_js_1.default.Writer.create()) {
        if (message.service !== "") {
            writer.uint32(10).string(message.service);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseWeaviateHealthCheckRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.service = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { service: isSet(object.service) ? globalThis.String(object.service) : "" };
    },
    toJSON(message) {
        const obj = {};
        if (message.service !== "") {
            obj.service = message.service;
        }
        return obj;
    },
    create(base) {
        return exports.WeaviateHealthCheckRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWeaviateHealthCheckRequest();
        message.service = object.service ?? "";
        return message;
    },
};
function createBaseWeaviateHealthCheckResponse() {
    return { status: 0 };
}
exports.WeaviateHealthCheckResponse = {
    encode(message, writer = minimal_js_1.default.Writer.create()) {
        if (message.status !== 0) {
            writer.uint32(8).int32(message.status);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseWeaviateHealthCheckResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 8) {
                        break;
                    }
                    message.status = reader.int32();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { status: isSet(object.status) ? weaviateHealthCheckResponse_ServingStatusFromJSON(object.status) : 0 };
    },
    toJSON(message) {
        const obj = {};
        if (message.status !== 0) {
            obj.status = weaviateHealthCheckResponse_ServingStatusToJSON(message.status);
        }
        return obj;
    },
    create(base) {
        return exports.WeaviateHealthCheckResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseWeaviateHealthCheckResponse();
        message.status = object.status ?? 0;
        return message;
    },
};
function isSet(value) {
    return value !== null && value !== undefined;
}
