"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: io/restorecommerce/graph.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.GraphServiceDefinition = exports.TraversalResponse = exports.Filter = exports.Filters = exports.Options = exports.Collection = exports.Vertices = exports.TraversalRequest = exports.Filter_ValueType = exports.Filter_Operation = exports.Filters_Operator = exports.Options_Direction = exports.protobufPackage = void 0;
exports.options_DirectionFromJSON = options_DirectionFromJSON;
exports.options_DirectionToJSON = options_DirectionToJSON;
exports.options_DirectionToNumber = options_DirectionToNumber;
exports.filters_OperatorFromJSON = filters_OperatorFromJSON;
exports.filters_OperatorToJSON = filters_OperatorToJSON;
exports.filters_OperatorToNumber = filters_OperatorToNumber;
exports.filter_OperationFromJSON = filter_OperationFromJSON;
exports.filter_OperationToJSON = filter_OperationToJSON;
exports.filter_OperationToNumber = filter_OperationToNumber;
exports.filter_ValueTypeFromJSON = filter_ValueTypeFromJSON;
exports.filter_ValueTypeToJSON = filter_ValueTypeToJSON;
exports.filter_ValueTypeToNumber = filter_ValueTypeToNumber;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const any_1 = require("../../google/protobuf/any");
const auth_1 = require("./auth");
const options_1 = require("./options");
const resource_base_1 = require("./resource_base");
const status_1 = require("./status");
exports.protobufPackage = "io.restorecommerce.graph";
var Options_Direction;
(function (Options_Direction) {
    Options_Direction["OUTBOUND"] = "OUTBOUND";
    Options_Direction["INBOUND"] = "INBOUND";
    Options_Direction["UNRECOGNIZED"] = "UNRECOGNIZED";
})(Options_Direction || (exports.Options_Direction = Options_Direction = {}));
function options_DirectionFromJSON(object) {
    switch (object) {
        case 0:
        case "OUTBOUND":
            return Options_Direction.OUTBOUND;
        case 1:
        case "INBOUND":
            return Options_Direction.INBOUND;
        case -1:
        case "UNRECOGNIZED":
        default:
            return Options_Direction.UNRECOGNIZED;
    }
}
function options_DirectionToJSON(object) {
    switch (object) {
        case Options_Direction.OUTBOUND:
            return "OUTBOUND";
        case Options_Direction.INBOUND:
            return "INBOUND";
        case Options_Direction.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function options_DirectionToNumber(object) {
    switch (object) {
        case Options_Direction.OUTBOUND:
            return 0;
        case Options_Direction.INBOUND:
            return 1;
        case Options_Direction.UNRECOGNIZED:
        default:
            return -1;
    }
}
var Filters_Operator;
(function (Filters_Operator) {
    Filters_Operator["and"] = "and";
    Filters_Operator["or"] = "or";
    Filters_Operator["UNRECOGNIZED"] = "UNRECOGNIZED";
})(Filters_Operator || (exports.Filters_Operator = Filters_Operator = {}));
function filters_OperatorFromJSON(object) {
    switch (object) {
        case 0:
        case "and":
            return Filters_Operator.and;
        case 1:
        case "or":
            return Filters_Operator.or;
        case -1:
        case "UNRECOGNIZED":
        default:
            return Filters_Operator.UNRECOGNIZED;
    }
}
function filters_OperatorToJSON(object) {
    switch (object) {
        case Filters_Operator.and:
            return "and";
        case Filters_Operator.or:
            return "or";
        case Filters_Operator.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function filters_OperatorToNumber(object) {
    switch (object) {
        case Filters_Operator.and:
            return 0;
        case Filters_Operator.or:
            return 1;
        case Filters_Operator.UNRECOGNIZED:
        default:
            return -1;
    }
}
var Filter_Operation;
(function (Filter_Operation) {
    Filter_Operation["eq"] = "eq";
    Filter_Operation["lt"] = "lt";
    Filter_Operation["lte"] = "lte";
    Filter_Operation["gt"] = "gt";
    Filter_Operation["gte"] = "gte";
    Filter_Operation["isEmpty"] = "isEmpty";
    Filter_Operation["iLike"] = "iLike";
    Filter_Operation["in"] = "in";
    Filter_Operation["neq"] = "neq";
    Filter_Operation["UNRECOGNIZED"] = "UNRECOGNIZED";
})(Filter_Operation || (exports.Filter_Operation = Filter_Operation = {}));
function filter_OperationFromJSON(object) {
    switch (object) {
        case 0:
        case "eq":
            return Filter_Operation.eq;
        case 1:
        case "lt":
            return Filter_Operation.lt;
        case 2:
        case "lte":
            return Filter_Operation.lte;
        case 3:
        case "gt":
            return Filter_Operation.gt;
        case 4:
        case "gte":
            return Filter_Operation.gte;
        case 5:
        case "isEmpty":
            return Filter_Operation.isEmpty;
        case 6:
        case "iLike":
            return Filter_Operation.iLike;
        case 7:
        case "in":
            return Filter_Operation.in;
        case 8:
        case "neq":
            return Filter_Operation.neq;
        case -1:
        case "UNRECOGNIZED":
        default:
            return Filter_Operation.UNRECOGNIZED;
    }
}
function filter_OperationToJSON(object) {
    switch (object) {
        case Filter_Operation.eq:
            return "eq";
        case Filter_Operation.lt:
            return "lt";
        case Filter_Operation.lte:
            return "lte";
        case Filter_Operation.gt:
            return "gt";
        case Filter_Operation.gte:
            return "gte";
        case Filter_Operation.isEmpty:
            return "isEmpty";
        case Filter_Operation.iLike:
            return "iLike";
        case Filter_Operation.in:
            return "in";
        case Filter_Operation.neq:
            return "neq";
        case Filter_Operation.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function filter_OperationToNumber(object) {
    switch (object) {
        case Filter_Operation.eq:
            return 0;
        case Filter_Operation.lt:
            return 1;
        case Filter_Operation.lte:
            return 2;
        case Filter_Operation.gt:
            return 3;
        case Filter_Operation.gte:
            return 4;
        case Filter_Operation.isEmpty:
            return 5;
        case Filter_Operation.iLike:
            return 6;
        case Filter_Operation.in:
            return 7;
        case Filter_Operation.neq:
            return 8;
        case Filter_Operation.UNRECOGNIZED:
        default:
            return -1;
    }
}
var Filter_ValueType;
(function (Filter_ValueType) {
    /** STRING - default value type if not specified */
    Filter_ValueType["STRING"] = "STRING";
    Filter_ValueType["NUMBER"] = "NUMBER";
    Filter_ValueType["BOOLEAN"] = "BOOLEAN";
    Filter_ValueType["DATE"] = "DATE";
    Filter_ValueType["ARRAY"] = "ARRAY";
    Filter_ValueType["UNRECOGNIZED"] = "UNRECOGNIZED";
})(Filter_ValueType || (exports.Filter_ValueType = Filter_ValueType = {}));
function filter_ValueTypeFromJSON(object) {
    switch (object) {
        case 0:
        case "STRING":
            return Filter_ValueType.STRING;
        case 1:
        case "NUMBER":
            return Filter_ValueType.NUMBER;
        case 2:
        case "BOOLEAN":
            return Filter_ValueType.BOOLEAN;
        case 3:
        case "DATE":
            return Filter_ValueType.DATE;
        case 4:
        case "ARRAY":
            return Filter_ValueType.ARRAY;
        case -1:
        case "UNRECOGNIZED":
        default:
            return Filter_ValueType.UNRECOGNIZED;
    }
}
function filter_ValueTypeToJSON(object) {
    switch (object) {
        case Filter_ValueType.STRING:
            return "STRING";
        case Filter_ValueType.NUMBER:
            return "NUMBER";
        case Filter_ValueType.BOOLEAN:
            return "BOOLEAN";
        case Filter_ValueType.DATE:
            return "DATE";
        case Filter_ValueType.ARRAY:
            return "ARRAY";
        case Filter_ValueType.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function filter_ValueTypeToNumber(object) {
    switch (object) {
        case Filter_ValueType.STRING:
            return 0;
        case Filter_ValueType.NUMBER:
            return 1;
        case Filter_ValueType.BOOLEAN:
            return 2;
        case Filter_ValueType.DATE:
            return 3;
        case Filter_ValueType.ARRAY:
            return 4;
        case Filter_ValueType.UNRECOGNIZED:
        default:
            return -1;
    }
}
function createBaseTraversalRequest() {
    return {};
}
exports.TraversalRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.vertices !== undefined) {
            exports.Vertices.encode(message.vertices, writer.uint32(10).fork()).join();
        }
        if (message.collection !== undefined) {
            exports.Collection.encode(message.collection, writer.uint32(18).fork()).join();
        }
        if (message.opts !== undefined) {
            exports.Options.encode(message.opts, writer.uint32(26).fork()).join();
        }
        if (message.path !== undefined) {
            writer.uint32(32).bool(message.path);
        }
        if (message.subject !== undefined) {
            auth_1.Subject.encode(message.subject, writer.uint32(42).fork()).join();
        }
        if (message.filters !== undefined && message.filters.length !== 0) {
            for (const v of message.filters) {
                exports.Filters.encode(v, writer.uint32(50).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 = createBaseTraversalRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.vertices = exports.Vertices.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.collection = exports.Collection.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.opts = exports.Options.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.path = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.subject = auth_1.Subject.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    if (message.filters === undefined) {
                        message.filters = [];
                    }
                    const el = exports.Filters.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.filters.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            vertices: isSet(object.vertices) ? exports.Vertices.fromJSON(object.vertices) : undefined,
            collection: isSet(object.collection) ? exports.Collection.fromJSON(object.collection) : undefined,
            opts: isSet(object.opts) ? exports.Options.fromJSON(object.opts) : undefined,
            path: isSet(object.path) ? globalThis.Boolean(object.path) : undefined,
            subject: isSet(object.subject) ? auth_1.Subject.fromJSON(object.subject) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => exports.Filters.fromJSON(e))
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.vertices !== undefined) {
            obj.vertices = exports.Vertices.toJSON(message.vertices);
        }
        if (message.collection !== undefined) {
            obj.collection = exports.Collection.toJSON(message.collection);
        }
        if (message.opts !== undefined) {
            obj.opts = exports.Options.toJSON(message.opts);
        }
        if (message.path !== undefined) {
            obj.path = message.path;
        }
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => exports.Filters.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return exports.TraversalRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTraversalRequest();
        message.vertices = (object.vertices !== undefined && object.vertices !== null)
            ? exports.Vertices.fromPartial(object.vertices)
            : undefined;
        message.collection = (object.collection !== undefined && object.collection !== null)
            ? exports.Collection.fromPartial(object.collection)
            : undefined;
        message.opts = (object.opts !== undefined && object.opts !== null) ? exports.Options.fromPartial(object.opts) : undefined;
        message.path = object.path ?? undefined;
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        message.filters = object.filters?.map((e) => exports.Filters.fromPartial(e)) || undefined;
        return message;
    },
};
function createBaseVertices() {
    return {};
}
exports.Vertices = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.collection_name !== undefined) {
            writer.uint32(10).string(message.collection_name);
        }
        if (message.start_vertex_ids !== undefined && message.start_vertex_ids.length !== 0) {
            for (const v of message.start_vertex_ids) {
                writer.uint32(18).string(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 = createBaseVertices();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.collection_name = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    if (message.start_vertex_ids === undefined) {
                        message.start_vertex_ids = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.start_vertex_ids.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            collection_name: isSet(object.collectionName)
                ? globalThis.String(object.collectionName)
                : isSet(object.collection_name)
                    ? globalThis.String(object.collection_name)
                    : undefined,
            start_vertex_ids: globalThis.Array.isArray(object?.startVertexIds)
                ? object.startVertexIds.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.start_vertex_ids)
                    ? object.start_vertex_ids.map((e) => globalThis.String(e))
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.collection_name !== undefined) {
            obj.collectionName = message.collection_name;
        }
        if (message.start_vertex_ids?.length) {
            obj.startVertexIds = message.start_vertex_ids;
        }
        return obj;
    },
    create(base) {
        return exports.Vertices.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVertices();
        message.collection_name = object.collection_name ?? undefined;
        message.start_vertex_ids = object.start_vertex_ids?.map((e) => e) || undefined;
        return message;
    },
};
function createBaseCollection() {
    return {};
}
exports.Collection = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.collection_name !== undefined) {
            writer.uint32(10).string(message.collection_name);
        }
        if (message.limit !== undefined) {
            writer.uint32(16).uint32(message.limit);
        }
        if (message.offset !== undefined) {
            writer.uint32(24).uint32(message.offset);
        }
        if (message.sorts !== undefined && message.sorts.length !== 0) {
            for (const v of message.sorts) {
                resource_base_1.Sort.encode(v, writer.uint32(34).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 = createBaseCollection();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.collection_name = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.limit = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.offset = reader.uint32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    if (message.sorts === undefined) {
                        message.sorts = [];
                    }
                    const el = resource_base_1.Sort.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.sorts.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            collection_name: isSet(object.collectionName)
                ? globalThis.String(object.collectionName)
                : isSet(object.collection_name)
                    ? globalThis.String(object.collection_name)
                    : undefined,
            limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined,
            offset: isSet(object.offset) ? globalThis.Number(object.offset) : undefined,
            sorts: globalThis.Array.isArray(object?.sorts) ? object.sorts.map((e) => resource_base_1.Sort.fromJSON(e)) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.collection_name !== undefined) {
            obj.collectionName = message.collection_name;
        }
        if (message.limit !== undefined) {
            obj.limit = Math.round(message.limit);
        }
        if (message.offset !== undefined) {
            obj.offset = Math.round(message.offset);
        }
        if (message.sorts?.length) {
            obj.sorts = message.sorts.map((e) => resource_base_1.Sort.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return exports.Collection.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCollection();
        message.collection_name = object.collection_name ?? undefined;
        message.limit = object.limit ?? undefined;
        message.offset = object.offset ?? undefined;
        message.sorts = object.sorts?.map((e) => resource_base_1.Sort.fromPartial(e)) || undefined;
        return message;
    },
};
function createBaseOptions() {
    return {};
}
exports.Options = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.include_vertexs !== undefined && message.include_vertexs.length !== 0) {
            for (const v of message.include_vertexs) {
                writer.uint32(10).string(v);
            }
        }
        if (message.exclude_vertexs !== undefined && message.exclude_vertexs.length !== 0) {
            for (const v of message.exclude_vertexs) {
                writer.uint32(18).string(v);
            }
        }
        if (message.include_edges !== undefined && message.include_edges.length !== 0) {
            for (const v of message.include_edges) {
                writer.uint32(26).string(v);
            }
        }
        if (message.exclude_edges !== undefined && message.exclude_edges.length !== 0) {
            for (const v of message.exclude_edges) {
                writer.uint32(34).string(v);
            }
        }
        if (message.direction !== undefined) {
            writer.uint32(40).int32(options_DirectionToNumber(message.direction));
        }
        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 = createBaseOptions();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.include_vertexs === undefined) {
                        message.include_vertexs = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.include_vertexs.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    if (message.exclude_vertexs === undefined) {
                        message.exclude_vertexs = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.exclude_vertexs.push(el);
                    }
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    if (message.include_edges === undefined) {
                        message.include_edges = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.include_edges.push(el);
                    }
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    if (message.exclude_edges === undefined) {
                        message.exclude_edges = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.exclude_edges.push(el);
                    }
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.direction = options_DirectionFromJSON(reader.int32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            include_vertexs: globalThis.Array.isArray(object?.includeVertexs)
                ? object.includeVertexs.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.include_vertexs)
                    ? object.include_vertexs.map((e) => globalThis.String(e))
                    : undefined,
            exclude_vertexs: globalThis.Array.isArray(object?.excludeVertexs)
                ? object.excludeVertexs.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.exclude_vertexs)
                    ? object.exclude_vertexs.map((e) => globalThis.String(e))
                    : undefined,
            include_edges: globalThis.Array.isArray(object?.includeEdges)
                ? object.includeEdges.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.include_edges)
                    ? object.include_edges.map((e) => globalThis.String(e))
                    : undefined,
            exclude_edges: globalThis.Array.isArray(object?.excludeEdges)
                ? object.excludeEdges.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.exclude_edges)
                    ? object.exclude_edges.map((e) => globalThis.String(e))
                    : undefined,
            direction: isSet(object.direction) ? options_DirectionFromJSON(object.direction) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.include_vertexs?.length) {
            obj.includeVertexs = message.include_vertexs;
        }
        if (message.exclude_vertexs?.length) {
            obj.excludeVertexs = message.exclude_vertexs;
        }
        if (message.include_edges?.length) {
            obj.includeEdges = message.include_edges;
        }
        if (message.exclude_edges?.length) {
            obj.excludeEdges = message.exclude_edges;
        }
        if (message.direction !== undefined) {
            obj.direction = options_DirectionToJSON(message.direction);
        }
        return obj;
    },
    create(base) {
        return exports.Options.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseOptions();
        message.include_vertexs = object.include_vertexs?.map((e) => e) || undefined;
        message.exclude_vertexs = object.exclude_vertexs?.map((e) => e) || undefined;
        message.include_edges = object.include_edges?.map((e) => e) || undefined;
        message.exclude_edges = object.exclude_edges?.map((e) => e) || undefined;
        message.direction = object.direction ?? undefined;
        return message;
    },
};
function createBaseFilters() {
    return {};
}
exports.Filters = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.entity !== undefined) {
            writer.uint32(10).string(message.entity);
        }
        if (message.edge !== undefined) {
            writer.uint32(18).string(message.edge);
        }
        if (message.filters !== undefined && message.filters.length !== 0) {
            for (const v of message.filters) {
                exports.Filter.encode(v, writer.uint32(26).fork()).join();
            }
        }
        if (message.operator !== undefined) {
            writer.uint32(32).int32(filters_OperatorToNumber(message.operator));
        }
        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 = createBaseFilters();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.entity = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.edge = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    if (message.filters === undefined) {
                        message.filters = [];
                    }
                    const el = exports.Filter.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.filters.push(el);
                    }
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.operator = filters_OperatorFromJSON(reader.int32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            entity: isSet(object.entity) ? globalThis.String(object.entity) : undefined,
            edge: isSet(object.edge) ? globalThis.String(object.edge) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => exports.Filter.fromJSON(e))
                : undefined,
            operator: isSet(object.operator) ? filters_OperatorFromJSON(object.operator) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.entity !== undefined) {
            obj.entity = message.entity;
        }
        if (message.edge !== undefined) {
            obj.edge = message.edge;
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => exports.Filter.toJSON(e));
        }
        if (message.operator !== undefined) {
            obj.operator = filters_OperatorToJSON(message.operator);
        }
        return obj;
    },
    create(base) {
        return exports.Filters.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFilters();
        message.entity = object.entity ?? undefined;
        message.edge = object.edge ?? undefined;
        message.filters = object.filters?.map((e) => exports.Filter.fromPartial(e)) || undefined;
        message.operator = object.operator ?? undefined;
        return message;
    },
};
function createBaseFilter() {
    return {};
}
exports.Filter = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.field !== undefined) {
            writer.uint32(10).string(message.field);
        }
        if (message.operation !== undefined) {
            writer.uint32(16).int32(filter_OperationToNumber(message.operation));
        }
        if (message.value !== undefined) {
            writer.uint32(26).string(message.value);
        }
        if (message.type !== undefined) {
            writer.uint32(32).int32(filter_ValueTypeToNumber(message.type));
        }
        if (message.filters !== undefined && message.filters.length !== 0) {
            for (const v of message.filters) {
                exports.Filters.encode(v, writer.uint32(42).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 = createBaseFilter();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.field = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.operation = filter_OperationFromJSON(reader.int32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.value = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.type = filter_ValueTypeFromJSON(reader.int32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    if (message.filters === undefined) {
                        message.filters = [];
                    }
                    const el = exports.Filters.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.filters.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            field: isSet(object.field) ? globalThis.String(object.field) : undefined,
            operation: isSet(object.operation) ? filter_OperationFromJSON(object.operation) : undefined,
            value: isSet(object.value) ? globalThis.String(object.value) : undefined,
            type: isSet(object.type) ? filter_ValueTypeFromJSON(object.type) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => exports.Filters.fromJSON(e))
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.field !== undefined) {
            obj.field = message.field;
        }
        if (message.operation !== undefined) {
            obj.operation = filter_OperationToJSON(message.operation);
        }
        if (message.value !== undefined) {
            obj.value = message.value;
        }
        if (message.type !== undefined) {
            obj.type = filter_ValueTypeToJSON(message.type);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => exports.Filters.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return exports.Filter.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFilter();
        message.field = object.field ?? undefined;
        message.operation = object.operation ?? undefined;
        message.value = object.value ?? undefined;
        message.type = object.type ?? undefined;
        message.filters = object.filters?.map((e) => exports.Filters.fromPartial(e)) || undefined;
        return message;
    },
};
function createBaseTraversalResponse() {
    return {};
}
exports.TraversalResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.data !== undefined) {
            any_1.Any.encode(message.data, writer.uint32(10).fork()).join();
        }
        if (message.paths !== undefined) {
            any_1.Any.encode(message.paths, writer.uint32(18).fork()).join();
        }
        if (message.operation_status !== undefined) {
            status_1.OperationStatus.encode(message.operation_status, writer.uint32(26).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 = createBaseTraversalResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.data = any_1.Any.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.paths = any_1.Any.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.operation_status = status_1.OperationStatus.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            data: isSet(object.data) ? any_1.Any.fromJSON(object.data) : undefined,
            paths: isSet(object.paths) ? any_1.Any.fromJSON(object.paths) : undefined,
            operation_status: isSet(object.operationStatus)
                ? status_1.OperationStatus.fromJSON(object.operationStatus)
                : isSet(object.operation_status)
                    ? status_1.OperationStatus.fromJSON(object.operation_status)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.data !== undefined) {
            obj.data = any_1.Any.toJSON(message.data);
        }
        if (message.paths !== undefined) {
            obj.paths = any_1.Any.toJSON(message.paths);
        }
        if (message.operation_status !== undefined) {
            obj.operationStatus = status_1.OperationStatus.toJSON(message.operation_status);
        }
        return obj;
    },
    create(base) {
        return exports.TraversalResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTraversalResponse();
        message.data = (object.data !== undefined && object.data !== null) ? any_1.Any.fromPartial(object.data) : undefined;
        message.paths = (object.paths !== undefined && object.paths !== null) ? any_1.Any.fromPartial(object.paths) : undefined;
        message.operation_status = (object.operation_status !== undefined && object.operation_status !== null)
            ? status_1.OperationStatus.fromPartial(object.operation_status)
            : undefined;
        return message;
    },
};
exports.GraphServiceDefinition = {
    name: "GraphService",
    fullName: "io.restorecommerce.graph.GraphService",
    methods: {
        traversal: {
            name: "Traversal",
            requestType: exports.TraversalRequest,
            requestStream: false,
            responseType: exports.TraversalResponse,
            responseStream: true,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/graph.proto",
        "package": "io.restorecommerce.graph",
        "dependency": [
            "google/protobuf/any.proto",
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/status.proto",
            "io/restorecommerce/resource_base.proto",
            "io/restorecommerce/options.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "TraversalRequest",
                "field": [{
                        "name": "vertices",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Vertices",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "vertices",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "collection",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Collection",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "collection",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "opts",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Options",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "opts",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "path",
                        "number": 4,
                        "label": 1,
                        "type": 8,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "path",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "subject",
                        "number": 5,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Subject",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "subject",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "filters",
                        "number": 6,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Filters",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "filters",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "vertex", "options": undefined }, { "name": "_opts", "options": undefined }, {
                        "name": "_path",
                        "options": undefined,
                    }, { "name": "_subject", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Vertices",
                "field": [{
                        "name": "collection_name",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "collectionName",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "start_vertex_ids",
                        "number": 2,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "startVertexIds",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_collection_name", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Collection",
                "field": [{
                        "name": "collection_name",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "collectionName",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "limit",
                        "number": 2,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "limit",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "offset",
                        "number": 3,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "offset",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "sorts",
                        "number": 4,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Sort",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "sorts",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_collection_name", "options": undefined }, { "name": "_limit", "options": undefined }, {
                        "name": "_offset",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Options",
                "field": [{
                        "name": "include_vertexs",
                        "number": 1,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "includeVertexs",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "exclude_vertexs",
                        "number": 2,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "excludeVertexs",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "include_edges",
                        "number": 3,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "includeEdges",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "exclude_edges",
                        "number": 4,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "excludeEdges",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "direction",
                        "number": 5,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.graph.Options.Direction",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "direction",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [{
                        "name": "Direction",
                        "value": [{ "name": "OUTBOUND", "number": 0, "options": undefined }, {
                                "name": "INBOUND",
                                "number": 1,
                                "options": undefined,
                            }],
                        "options": undefined,
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_direction", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Filters",
                "field": [{
                        "name": "entity",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "entity",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "edge",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "edge",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "filters",
                        "number": 3,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Filter",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "filters",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "operator",
                        "number": 4,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.graph.Filters.Operator",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "operator",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [{
                        "name": "Operator",
                        "value": [{ "name": "and", "number": 0, "options": undefined }, {
                                "name": "or",
                                "number": 1,
                                "options": undefined,
                            }],
                        "options": undefined,
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_entity", "options": undefined }, { "name": "_edge", "options": undefined }, {
                        "name": "_operator",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Filter",
                "field": [{
                        "name": "field",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "field",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "operation",
                        "number": 2,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.graph.Filter.Operation",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "operation",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "value",
                        "number": 3,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "value",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "type",
                        "number": 4,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.graph.Filter.ValueType",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "type",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "filters",
                        "number": 5,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.graph.Filters",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "filters",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [{
                        "name": "Operation",
                        "value": [
                            { "name": "eq", "number": 0, "options": undefined },
                            { "name": "lt", "number": 1, "options": undefined },
                            { "name": "lte", "number": 2, "options": undefined },
                            { "name": "gt", "number": 3, "options": undefined },
                            { "name": "gte", "number": 4, "options": undefined },
                            { "name": "isEmpty", "number": 5, "options": undefined },
                            { "name": "iLike", "number": 6, "options": undefined },
                            { "name": "in", "number": 7, "options": undefined },
                            { "name": "neq", "number": 8, "options": undefined },
                        ],
                        "options": undefined,
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }, {
                        "name": "ValueType",
                        "value": [
                            { "name": "STRING", "number": 0, "options": undefined },
                            { "name": "NUMBER", "number": 1, "options": undefined },
                            { "name": "BOOLEAN", "number": 2, "options": undefined },
                            { "name": "DATE", "number": 3, "options": undefined },
                            { "name": "ARRAY", "number": 4, "options": undefined },
                        ],
                        "options": undefined,
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_field", "options": undefined }, { "name": "_operation", "options": undefined }, {
                        "name": "_value",
                        "options": undefined,
                    }, { "name": "_type", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "TraversalResponse",
                "field": [{
                        "name": "data",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".google.protobuf.Any",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "data",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "paths",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".google.protobuf.Any",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "paths",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "operation_status",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.OperationStatus",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "operationStatus",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_data", "options": undefined }, { "name": "_paths", "options": undefined }, {
                        "name": "_operation_status",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [],
        "service": [{
                "name": "GraphService",
                "method": [{
                        "name": "Traversal",
                        "inputType": ".io.restorecommerce.graph.TraversalRequest",
                        "outputType": ".io.restorecommerce.graph.TraversalResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": true,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [6, 0],
                    "span": [10, 0, 14, 1],
                    "leadingComments": " Service provides the CRUD operations\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 0, 8, 0],
                    "span": [18, 2, 21, 3],
                    "leadingComments": " Document handle either _id or _key value\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 0],
                    "span": [41, 1, 37],
                    "leadingComments": "",
                    "trailingComments": " to include vertices\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 1],
                    "span": [42, 1, 37],
                    "leadingComments": "",
                    "trailingComments": " to exclude vertices\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 2],
                    "span": [43, 1, 35],
                    "leadingComments": "",
                    "trailingComments": " to include vertices\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 3],
                    "span": [44, 1, 35],
                    "leadingComments": "",
                    "trailingComments": " to exclude vertices\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 4],
                    "span": [45, 1, 34],
                    "leadingComments": "",
                    "trailingComments": " either inbound or outbound, defaults to outbound direction\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 0],
                    "span": [54, 2, 29],
                    "leadingComments": "",
                    "trailingComments": " entity on which the filters are applied\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 1],
                    "span": [55, 2, 27],
                    "leadingComments": "",
                    "trailingComments": " if edge is specified depending on the direction filter are applied only for those entities\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5, 4, 1, 2, 0],
                    "span": [80, 4, 15],
                    "leadingComments": "",
                    "trailingComments": " default value type if not specified\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 0],
                    "span": [91, 2, 40],
                    "leadingComments": "",
                    "trailingComments": " vertices\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 1],
                    "span": [92, 2, 41],
                    "leadingComments": "",
                    "trailingComments": " traversed vertices paths\n",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.graph.TraversalRequest": exports.TraversalRequest,
        ".io.restorecommerce.graph.Vertices": exports.Vertices,
        ".io.restorecommerce.graph.Collection": exports.Collection,
        ".io.restorecommerce.graph.Options": exports.Options,
        ".io.restorecommerce.graph.Options.Direction": Options_Direction,
        ".io.restorecommerce.graph.Filters": exports.Filters,
        ".io.restorecommerce.graph.Filters.Operator": Filters_Operator,
        ".io.restorecommerce.graph.Filter": exports.Filter,
        ".io.restorecommerce.graph.Filter.Operation": Filter_Operation,
        ".io.restorecommerce.graph.Filter.ValueType": Filter_ValueType,
        ".io.restorecommerce.graph.TraversalResponse": exports.TraversalResponse,
    },
    dependencies: [any_1.protoMetadata, auth_1.protoMetadata, status_1.protoMetadata, resource_base_1.protoMetadata, options_1.protoMetadata],
    options: { services: { "GraphService": { methods: { "Traversal": { "is_query": true } } } } },
};
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=graph.js.map