"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/resource_base.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.ServiceDefinition = exports.Deleted = exports.Resource = exports.ResourceResponse = exports.ResourceListResponse = exports.ResourceList = exports.DeleteResponse = exports.DeleteRequest = exports.ReadRequest = exports.Search = exports.FilterOp = exports.Filter = exports.Sort = exports.FieldFilter = exports.FilterOp_Operator = exports.Filter_ValueType = exports.Filter_Operation = exports.Sort_SortOrder = exports.protobufPackage = void 0;
exports.sort_SortOrderFromJSON = sort_SortOrderFromJSON;
exports.sort_SortOrderToJSON = sort_SortOrderToJSON;
exports.sort_SortOrderToNumber = sort_SortOrderToNumber;
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;
exports.filterOp_OperatorFromJSON = filterOp_OperatorFromJSON;
exports.filterOp_OperatorToJSON = filterOp_OperatorToJSON;
exports.filterOp_OperatorToNumber = filterOp_OperatorToNumber;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const any_1 = require("../../google/protobuf/any");
const auth_1 = require("./auth");
const filter_1 = require("./filter");
const meta_1 = require("./meta");
const status_1 = require("./status");
exports.protobufPackage = "io.restorecommerce.resourcebase";
var Sort_SortOrder;
(function (Sort_SortOrder) {
    Sort_SortOrder["UNSORTED"] = "UNSORTED";
    Sort_SortOrder["ASCENDING"] = "ASCENDING";
    Sort_SortOrder["DESCENDING"] = "DESCENDING";
    Sort_SortOrder["UNRECOGNIZED"] = "UNRECOGNIZED";
})(Sort_SortOrder || (exports.Sort_SortOrder = Sort_SortOrder = {}));
function sort_SortOrderFromJSON(object) {
    switch (object) {
        case 0:
        case "UNSORTED":
            return Sort_SortOrder.UNSORTED;
        case 1:
        case "ASCENDING":
            return Sort_SortOrder.ASCENDING;
        case 2:
        case "DESCENDING":
            return Sort_SortOrder.DESCENDING;
        case -1:
        case "UNRECOGNIZED":
        default:
            return Sort_SortOrder.UNRECOGNIZED;
    }
}
function sort_SortOrderToJSON(object) {
    switch (object) {
        case Sort_SortOrder.UNSORTED:
            return "UNSORTED";
        case Sort_SortOrder.ASCENDING:
            return "ASCENDING";
        case Sort_SortOrder.DESCENDING:
            return "DESCENDING";
        case Sort_SortOrder.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function sort_SortOrderToNumber(object) {
    switch (object) {
        case Sort_SortOrder.UNSORTED:
            return 0;
        case Sort_SortOrder.ASCENDING:
            return 1;
        case Sort_SortOrder.DESCENDING:
            return 2;
        case Sort_SortOrder.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;
    }
}
var FilterOp_Operator;
(function (FilterOp_Operator) {
    FilterOp_Operator["and"] = "and";
    FilterOp_Operator["or"] = "or";
    FilterOp_Operator["UNRECOGNIZED"] = "UNRECOGNIZED";
})(FilterOp_Operator || (exports.FilterOp_Operator = FilterOp_Operator = {}));
function filterOp_OperatorFromJSON(object) {
    switch (object) {
        case 0:
        case "and":
            return FilterOp_Operator.and;
        case 1:
        case "or":
            return FilterOp_Operator.or;
        case -1:
        case "UNRECOGNIZED":
        default:
            return FilterOp_Operator.UNRECOGNIZED;
    }
}
function filterOp_OperatorToJSON(object) {
    switch (object) {
        case FilterOp_Operator.and:
            return "and";
        case FilterOp_Operator.or:
            return "or";
        case FilterOp_Operator.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function filterOp_OperatorToNumber(object) {
    switch (object) {
        case FilterOp_Operator.and:
            return 0;
        case FilterOp_Operator.or:
            return 1;
        case FilterOp_Operator.UNRECOGNIZED:
        default:
            return -1;
    }
}
function createBaseFieldFilter() {
    return {};
}
exports.FieldFilter = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.name !== undefined) {
            writer.uint32(10).string(message.name);
        }
        if (message.include !== undefined) {
            writer.uint32(16).bool(message.include);
        }
        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 = createBaseFieldFilter();
        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 !== 16) {
                        break;
                    }
                    message.include = reader.bool();
                    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,
            include: isSet(object.include) ? globalThis.Boolean(object.include) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.name !== undefined) {
            obj.name = message.name;
        }
        if (message.include !== undefined) {
            obj.include = message.include;
        }
        return obj;
    },
    create(base) {
        return exports.FieldFilter.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFieldFilter();
        message.name = object.name ?? undefined;
        message.include = object.include ?? undefined;
        return message;
    },
};
function createBaseSort() {
    return {};
}
exports.Sort = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.field !== undefined) {
            writer.uint32(10).string(message.field);
        }
        if (message.order !== undefined) {
            writer.uint32(16).int32(sort_SortOrderToNumber(message.order));
        }
        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 = createBaseSort();
        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.order = sort_SortOrderFromJSON(reader.int32());
                    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,
            order: isSet(object.order) ? sort_SortOrderFromJSON(object.order) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.field !== undefined) {
            obj.field = message.field;
        }
        if (message.order !== undefined) {
            obj.order = sort_SortOrderToJSON(message.order);
        }
        return obj;
    },
    create(base) {
        return exports.Sort.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSort();
        message.field = object.field ?? undefined;
        message.order = object.order ?? 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) {
                filter_1.FilterOp.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 = filter_1.FilterOp.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) => filter_1.FilterOp.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) => filter_1.FilterOp.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) => filter_1.FilterOp.fromPartial(e)) || undefined;
        return message;
    },
};
function createBaseFilterOp() {
    return {};
}
exports.FilterOp = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.filters !== undefined && message.filters.length !== 0) {
            for (const v of message.filters) {
                exports.Filter.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.operator !== undefined) {
            writer.uint32(16).int32(filterOp_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 = createBaseFilterOp();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.filters === undefined) {
                        message.filters = [];
                    }
                    const el = exports.Filter.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.filters.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.operator = filterOp_OperatorFromJSON(reader.int32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => exports.Filter.fromJSON(e))
                : undefined,
            operator: isSet(object.operator) ? filterOp_OperatorFromJSON(object.operator) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => exports.Filter.toJSON(e));
        }
        if (message.operator !== undefined) {
            obj.operator = filterOp_OperatorToJSON(message.operator);
        }
        return obj;
    },
    create(base) {
        return exports.FilterOp.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFilterOp();
        message.filters = object.filters?.map((e) => exports.Filter.fromPartial(e)) || undefined;
        message.operator = object.operator ?? undefined;
        return message;
    },
};
function createBaseSearch() {
    return {};
}
exports.Search = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.search !== undefined) {
            writer.uint32(10).string(message.search);
        }
        if (message.fields !== undefined && message.fields.length !== 0) {
            for (const v of message.fields) {
                writer.uint32(18).string(v);
            }
        }
        if (message.caseSensitive !== undefined) {
            writer.uint32(24).bool(message.caseSensitive);
        }
        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 = createBaseSearch();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.search = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    if (message.fields === undefined) {
                        message.fields = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.fields.push(el);
                    }
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.caseSensitive = reader.bool();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            search: isSet(object.search) ? globalThis.String(object.search) : undefined,
            fields: globalThis.Array.isArray(object?.fields)
                ? object.fields.map((e) => globalThis.String(e))
                : undefined,
            caseSensitive: isSet(object.caseSensitive)
                ? globalThis.Boolean(object.caseSensitive)
                : isSet(object.case_sensitive)
                    ? globalThis.Boolean(object.case_sensitive)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.search !== undefined) {
            obj.search = message.search;
        }
        if (message.fields?.length) {
            obj.fields = message.fields;
        }
        if (message.caseSensitive !== undefined) {
            obj.caseSensitive = message.caseSensitive;
        }
        return obj;
    },
    create(base) {
        return exports.Search.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSearch();
        message.search = object.search ?? undefined;
        message.fields = object.fields?.map((e) => e) || undefined;
        message.caseSensitive = object.caseSensitive ?? undefined;
        return message;
    },
};
function createBaseReadRequest() {
    return {};
}
exports.ReadRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.offset !== undefined) {
            writer.uint32(8).uint32(message.offset);
        }
        if (message.limit !== undefined) {
            writer.uint32(16).uint32(message.limit);
        }
        if (message.sorts !== undefined && message.sorts.length !== 0) {
            for (const v of message.sorts) {
                exports.Sort.encode(v, writer.uint32(26).fork()).join();
            }
        }
        if (message.filters !== undefined && message.filters.length !== 0) {
            for (const v of message.filters) {
                exports.FilterOp.encode(v, writer.uint32(34).fork()).join();
            }
        }
        if (message.fields !== undefined && message.fields.length !== 0) {
            for (const v of message.fields) {
                exports.FieldFilter.encode(v, writer.uint32(42).fork()).join();
            }
        }
        if (message.localesLimiter !== undefined && message.localesLimiter.length !== 0) {
            for (const v of message.localesLimiter) {
                writer.uint32(58).string(v);
            }
        }
        if (message.customQueries !== undefined && message.customQueries.length !== 0) {
            for (const v of message.customQueries) {
                writer.uint32(66).string(v);
            }
        }
        if (message.customArguments !== undefined) {
            any_1.Any.encode(message.customArguments, writer.uint32(74).fork()).join();
        }
        if (message.subject !== undefined) {
            auth_1.Subject.encode(message.subject, writer.uint32(82).fork()).join();
        }
        if (message.search !== undefined) {
            exports.Search.encode(message.search, writer.uint32(90).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 = createBaseReadRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.offset = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.limit = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    if (message.sorts === undefined) {
                        message.sorts = [];
                    }
                    const el = exports.Sort.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.sorts.push(el);
                    }
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    if (message.filters === undefined) {
                        message.filters = [];
                    }
                    const el = exports.FilterOp.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.filters.push(el);
                    }
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    if (message.fields === undefined) {
                        message.fields = [];
                    }
                    const el = exports.FieldFilter.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.fields.push(el);
                    }
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    if (message.localesLimiter === undefined) {
                        message.localesLimiter = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.localesLimiter.push(el);
                    }
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    if (message.customQueries === undefined) {
                        message.customQueries = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.customQueries.push(el);
                    }
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    message.customArguments = any_1.Any.decode(reader, reader.uint32());
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    message.subject = auth_1.Subject.decode(reader, reader.uint32());
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    message.search = exports.Search.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            offset: isSet(object.offset) ? globalThis.Number(object.offset) : undefined,
            limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined,
            sorts: globalThis.Array.isArray(object?.sorts) ? object.sorts.map((e) => exports.Sort.fromJSON(e)) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => exports.FilterOp.fromJSON(e))
                : undefined,
            fields: globalThis.Array.isArray(object?.fields)
                ? object.fields.map((e) => exports.FieldFilter.fromJSON(e))
                : undefined,
            localesLimiter: globalThis.Array.isArray(object?.localesLimiter)
                ? object.localesLimiter.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.locales_limiter)
                    ? object.locales_limiter.map((e) => globalThis.String(e))
                    : undefined,
            customQueries: globalThis.Array.isArray(object?.customQueries)
                ? object.customQueries.map((e) => globalThis.String(e))
                : globalThis.Array.isArray(object?.custom_queries)
                    ? object.custom_queries.map((e) => globalThis.String(e))
                    : undefined,
            customArguments: isSet(object.customArguments)
                ? any_1.Any.fromJSON(object.customArguments)
                : isSet(object.custom_arguments)
                    ? any_1.Any.fromJSON(object.custom_arguments)
                    : undefined,
            subject: isSet(object.subject) ? auth_1.Subject.fromJSON(object.subject) : undefined,
            search: isSet(object.search) ? exports.Search.fromJSON(object.search) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.offset !== undefined) {
            obj.offset = Math.round(message.offset);
        }
        if (message.limit !== undefined) {
            obj.limit = Math.round(message.limit);
        }
        if (message.sorts?.length) {
            obj.sorts = message.sorts.map((e) => exports.Sort.toJSON(e));
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => exports.FilterOp.toJSON(e));
        }
        if (message.fields?.length) {
            obj.fields = message.fields.map((e) => exports.FieldFilter.toJSON(e));
        }
        if (message.localesLimiter?.length) {
            obj.localesLimiter = message.localesLimiter;
        }
        if (message.customQueries?.length) {
            obj.customQueries = message.customQueries;
        }
        if (message.customArguments !== undefined) {
            obj.customArguments = any_1.Any.toJSON(message.customArguments);
        }
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        if (message.search !== undefined) {
            obj.search = exports.Search.toJSON(message.search);
        }
        return obj;
    },
    create(base) {
        return exports.ReadRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseReadRequest();
        message.offset = object.offset ?? undefined;
        message.limit = object.limit ?? undefined;
        message.sorts = object.sorts?.map((e) => exports.Sort.fromPartial(e)) || undefined;
        message.filters = object.filters?.map((e) => exports.FilterOp.fromPartial(e)) || undefined;
        message.fields = object.fields?.map((e) => exports.FieldFilter.fromPartial(e)) || undefined;
        message.localesLimiter = object.localesLimiter?.map((e) => e) || undefined;
        message.customQueries = object.customQueries?.map((e) => e) || undefined;
        message.customArguments = (object.customArguments !== undefined && object.customArguments !== null)
            ? any_1.Any.fromPartial(object.customArguments)
            : undefined;
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        message.search = (object.search !== undefined && object.search !== null)
            ? exports.Search.fromPartial(object.search)
            : undefined;
        return message;
    },
};
function createBaseDeleteRequest() {
    return {};
}
exports.DeleteRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.collection !== undefined) {
            writer.uint32(8).bool(message.collection);
        }
        if (message.ids !== undefined && message.ids.length !== 0) {
            for (const v of message.ids) {
                writer.uint32(18).string(v);
            }
        }
        if (message.subject !== undefined) {
            auth_1.Subject.encode(message.subject, writer.uint32(26).fork()).join();
        }
        if (message.views !== undefined && message.views.length !== 0) {
            for (const v of message.views) {
                writer.uint32(34).string(v);
            }
        }
        if (message.analyzers !== undefined && message.analyzers.length !== 0) {
            for (const v of message.analyzers) {
                writer.uint32(42).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 = createBaseDeleteRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.collection = reader.bool();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    if (message.ids === undefined) {
                        message.ids = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.ids.push(el);
                    }
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.subject = auth_1.Subject.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    if (message.views === undefined) {
                        message.views = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.views.push(el);
                    }
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    if (message.analyzers === undefined) {
                        message.analyzers = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.analyzers.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            collection: isSet(object.collection) ? globalThis.Boolean(object.collection) : undefined,
            ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e) => globalThis.String(e)) : undefined,
            subject: isSet(object.subject) ? auth_1.Subject.fromJSON(object.subject) : undefined,
            views: globalThis.Array.isArray(object?.views) ? object.views.map((e) => globalThis.String(e)) : undefined,
            analyzers: globalThis.Array.isArray(object?.analyzers)
                ? object.analyzers.map((e) => globalThis.String(e))
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.collection !== undefined) {
            obj.collection = message.collection;
        }
        if (message.ids?.length) {
            obj.ids = message.ids;
        }
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        if (message.views?.length) {
            obj.views = message.views;
        }
        if (message.analyzers?.length) {
            obj.analyzers = message.analyzers;
        }
        return obj;
    },
    create(base) {
        return exports.DeleteRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteRequest();
        message.collection = object.collection ?? undefined;
        message.ids = object.ids?.map((e) => e) || undefined;
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        message.views = object.views?.map((e) => e) || undefined;
        message.analyzers = object.analyzers?.map((e) => e) || undefined;
        return message;
    },
};
function createBaseDeleteResponse() {
    return {};
}
exports.DeleteResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.status !== undefined && message.status.length !== 0) {
            for (const v of message.status) {
                status_1.Status.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.operationStatus !== undefined) {
            status_1.OperationStatus.encode(message.operationStatus, writer.uint32(18).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 = createBaseDeleteResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.status === undefined) {
                        message.status = [];
                    }
                    const el = status_1.Status.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.status.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.operationStatus = status_1.OperationStatus.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            status: globalThis.Array.isArray(object?.status) ? object.status.map((e) => status_1.Status.fromJSON(e)) : undefined,
            operationStatus: 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.status?.length) {
            obj.status = message.status.map((e) => status_1.Status.toJSON(e));
        }
        if (message.operationStatus !== undefined) {
            obj.operationStatus = status_1.OperationStatus.toJSON(message.operationStatus);
        }
        return obj;
    },
    create(base) {
        return exports.DeleteResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteResponse();
        message.status = object.status?.map((e) => status_1.Status.fromPartial(e)) || undefined;
        message.operationStatus = (object.operationStatus !== undefined && object.operationStatus !== null)
            ? status_1.OperationStatus.fromPartial(object.operationStatus)
            : undefined;
        return message;
    },
};
function createBaseResourceList() {
    return {};
}
exports.ResourceList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.Resource.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.totalCount !== undefined) {
            writer.uint32(16).uint32(message.totalCount);
        }
        if (message.subject !== undefined) {
            auth_1.Subject.encode(message.subject, 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 = createBaseResourceList();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.items === undefined) {
                        message.items = [];
                    }
                    const el = exports.Resource.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.items.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.totalCount = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.subject = auth_1.Subject.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => exports.Resource.fromJSON(e)) : undefined,
            totalCount: isSet(object.totalCount)
                ? globalThis.Number(object.totalCount)
                : isSet(object.total_count)
                    ? globalThis.Number(object.total_count)
                    : undefined,
            subject: isSet(object.subject) ? auth_1.Subject.fromJSON(object.subject) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.items?.length) {
            obj.items = message.items.map((e) => exports.Resource.toJSON(e));
        }
        if (message.totalCount !== undefined) {
            obj.totalCount = Math.round(message.totalCount);
        }
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        return obj;
    },
    create(base) {
        return exports.ResourceList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResourceList();
        message.items = object.items?.map((e) => exports.Resource.fromPartial(e)) || undefined;
        message.totalCount = object.totalCount ?? undefined;
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        return message;
    },
};
function createBaseResourceListResponse() {
    return {};
}
exports.ResourceListResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.ResourceResponse.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.totalCount !== undefined) {
            writer.uint32(16).uint32(message.totalCount);
        }
        if (message.operationStatus !== undefined) {
            status_1.OperationStatus.encode(message.operationStatus, 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 = createBaseResourceListResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.items === undefined) {
                        message.items = [];
                    }
                    const el = exports.ResourceResponse.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.items.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.totalCount = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.operationStatus = status_1.OperationStatus.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            items: globalThis.Array.isArray(object?.items)
                ? object.items.map((e) => exports.ResourceResponse.fromJSON(e))
                : undefined,
            totalCount: isSet(object.totalCount)
                ? globalThis.Number(object.totalCount)
                : isSet(object.total_count)
                    ? globalThis.Number(object.total_count)
                    : undefined,
            operationStatus: 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.items?.length) {
            obj.items = message.items.map((e) => exports.ResourceResponse.toJSON(e));
        }
        if (message.totalCount !== undefined) {
            obj.totalCount = Math.round(message.totalCount);
        }
        if (message.operationStatus !== undefined) {
            obj.operationStatus = status_1.OperationStatus.toJSON(message.operationStatus);
        }
        return obj;
    },
    create(base) {
        return exports.ResourceListResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResourceListResponse();
        message.items = object.items?.map((e) => exports.ResourceResponse.fromPartial(e)) || undefined;
        message.totalCount = object.totalCount ?? undefined;
        message.operationStatus = (object.operationStatus !== undefined && object.operationStatus !== null)
            ? status_1.OperationStatus.fromPartial(object.operationStatus)
            : undefined;
        return message;
    },
};
function createBaseResourceResponse() {
    return {};
}
exports.ResourceResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.payload !== undefined) {
            exports.Resource.encode(message.payload, writer.uint32(10).fork()).join();
        }
        if (message.status !== undefined) {
            status_1.Status.encode(message.status, writer.uint32(18).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 = createBaseResourceResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.payload = exports.Resource.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.status = status_1.Status.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            payload: isSet(object.payload) ? exports.Resource.fromJSON(object.payload) : undefined,
            status: isSet(object.status) ? status_1.Status.fromJSON(object.status) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.payload !== undefined) {
            obj.payload = exports.Resource.toJSON(message.payload);
        }
        if (message.status !== undefined) {
            obj.status = status_1.Status.toJSON(message.status);
        }
        return obj;
    },
    create(base) {
        return exports.ResourceResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResourceResponse();
        message.payload = (object.payload !== undefined && object.payload !== null)
            ? exports.Resource.fromPartial(object.payload)
            : undefined;
        message.status = (object.status !== undefined && object.status !== null)
            ? status_1.Status.fromPartial(object.status)
            : undefined;
        return message;
    },
};
function createBaseResource() {
    return {};
}
exports.Resource = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== undefined) {
            writer.uint32(10).string(message.id);
        }
        if (message.meta !== undefined) {
            meta_1.Meta.encode(message.meta, writer.uint32(18).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 = createBaseResource();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.meta = meta_1.Meta.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            id: isSet(object.id) ? globalThis.String(object.id) : undefined,
            meta: isSet(object.meta) ? meta_1.Meta.fromJSON(object.meta) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== undefined) {
            obj.id = message.id;
        }
        if (message.meta !== undefined) {
            obj.meta = meta_1.Meta.toJSON(message.meta);
        }
        return obj;
    },
    create(base) {
        return exports.Resource.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResource();
        message.id = object.id ?? undefined;
        message.meta = (object.meta !== undefined && object.meta !== null) ? meta_1.Meta.fromPartial(object.meta) : undefined;
        return message;
    },
};
function createBaseDeleted() {
    return {};
}
exports.Deleted = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== undefined) {
            writer.uint32(10).string(message.id);
        }
        if (message.collection !== undefined) {
            writer.uint32(18).string(message.collection);
        }
        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 = createBaseDeleted();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.collection = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            id: isSet(object.id) ? globalThis.String(object.id) : undefined,
            collection: isSet(object.collection) ? globalThis.String(object.collection) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== undefined) {
            obj.id = message.id;
        }
        if (message.collection !== undefined) {
            obj.collection = message.collection;
        }
        return obj;
    },
    create(base) {
        return exports.Deleted.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleted();
        message.id = object.id ?? undefined;
        message.collection = object.collection ?? undefined;
        return message;
    },
};
exports.ServiceDefinition = {
    name: "Service",
    fullName: "io.restorecommerce.resourcebase.Service",
    methods: {
        read: {
            name: "Read",
            requestType: exports.ReadRequest,
            requestStream: false,
            responseType: exports.ResourceListResponse,
            responseStream: false,
            options: {},
        },
        create: {
            name: "Create",
            requestType: exports.ResourceList,
            requestStream: false,
            responseType: exports.ResourceListResponse,
            responseStream: false,
            options: {},
        },
        delete: {
            name: "Delete",
            requestType: exports.DeleteRequest,
            requestStream: false,
            responseType: exports.DeleteResponse,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: exports.ResourceList,
            requestStream: false,
            responseType: exports.ResourceListResponse,
            responseStream: false,
            options: {},
        },
        upsert: {
            name: "Upsert",
            requestType: exports.ResourceList,
            requestStream: false,
            responseType: exports.ResourceListResponse,
            responseStream: false,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/resource_base.proto",
        "package": "io.restorecommerce.resourcebase",
        "dependency": [
            "google/protobuf/any.proto",
            "io/restorecommerce/meta.proto",
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/status.proto",
            "io/restorecommerce/filter.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "FieldFilter",
                "field": [{
                        "name": "name",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "name",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "include",
                        "number": 2,
                        "label": 1,
                        "type": 8,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "include",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_name", "options": undefined }, { "name": "_include", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Sort",
                "field": [{
                        "name": "field",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "field",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "order",
                        "number": 2,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.resourcebase.Sort.SortOrder",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "order",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [{
                        "name": "SortOrder",
                        "value": [{ "name": "UNSORTED", "number": 0, "options": undefined }, {
                                "name": "ASCENDING",
                                "number": 1,
                                "options": undefined,
                            }, { "name": "DESCENDING", "number": 2, "options": undefined }],
                        "options": undefined,
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_field", "options": undefined }, { "name": "_order", "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.resourcebase.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.resourcebase.Filter.ValueType",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "type",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "filters",
                        "number": 5,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.filter.FilterOp",
                        "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": "FilterOp",
                "field": [{
                        "name": "filters",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Filter",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "filters",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "operator",
                        "number": 2,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.resourcebase.FilterOp.Operator",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "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": "_operator", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Search",
                "field": [{
                        "name": "search",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "search",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "fields",
                        "number": 2,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fields",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "case_sensitive",
                        "number": 3,
                        "label": 1,
                        "type": 8,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "caseSensitive",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_search", "options": undefined }, { "name": "_case_sensitive", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ReadRequest",
                "field": [{
                        "name": "offset",
                        "number": 1,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "offset",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "limit",
                        "number": 2,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "limit",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "sorts",
                        "number": 3,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Sort",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "sorts",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "filters",
                        "number": 4,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.FilterOp",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "filters",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "fields",
                        "number": 5,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.FieldFilter",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "fields",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "locales_limiter",
                        "number": 7,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "localesLimiter",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "custom_queries",
                        "number": 8,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "customQueries",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "custom_arguments",
                        "number": 9,
                        "label": 1,
                        "type": 11,
                        "typeName": ".google.protobuf.Any",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "customArguments",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "subject",
                        "number": 10,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Subject",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "subject",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "search",
                        "number": 11,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Search",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 4,
                        "jsonName": "search",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [
                    { "name": "_offset", "options": undefined },
                    { "name": "_limit", "options": undefined },
                    { "name": "_custom_arguments", "options": undefined },
                    { "name": "_subject", "options": undefined },
                    { "name": "_search", "options": undefined },
                ],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "DeleteRequest",
                "field": [{
                        "name": "collection",
                        "number": 1,
                        "label": 1,
                        "type": 8,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "collection",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "ids",
                        "number": 2,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "ids",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "subject",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Subject",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "subject",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "views",
                        "number": 4,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "views",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "analyzers",
                        "number": 5,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "analyzers",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_collection", "options": undefined }, { "name": "_subject", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "DeleteResponse",
                "field": [{
                        "name": "status",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.Status",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "status",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "operation_status",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.OperationStatus",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "operationStatus",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_operation_status", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ResourceList",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Resource",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "items",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "total_count",
                        "number": 2,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "totalCount",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "subject",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Subject",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "subject",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_total_count", "options": undefined }, { "name": "_subject", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ResourceListResponse",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.ResourceResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "items",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "total_count",
                        "number": 2,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "totalCount",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "operation_status",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.OperationStatus",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "operationStatus",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_total_count", "options": undefined }, {
                        "name": "_operation_status",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ResourceResponse",
                "field": [{
                        "name": "payload",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.resourcebase.Resource",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "payload",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "status",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.Status",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "status",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_payload", "options": undefined }, { "name": "_status", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Resource",
                "field": [{
                        "name": "id",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "id",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "meta",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.meta.Meta",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "meta",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_id", "options": undefined }, { "name": "_meta", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Deleted",
                "field": [{
                        "name": "id",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "id",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "collection",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "collection",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_id", "options": undefined }, { "name": "_collection", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [],
        "service": [{
                "name": "Service",
                "method": [{
                        "name": "Read",
                        "inputType": ".io.restorecommerce.resourcebase.ReadRequest",
                        "outputType": ".io.restorecommerce.resourcebase.ResourceListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Create",
                        "inputType": ".io.restorecommerce.resourcebase.ResourceList",
                        "outputType": ".io.restorecommerce.resourcebase.ResourceListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Delete",
                        "inputType": ".io.restorecommerce.resourcebase.DeleteRequest",
                        "outputType": ".io.restorecommerce.resourcebase.DeleteResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Update",
                        "inputType": ".io.restorecommerce.resourcebase.ResourceList",
                        "outputType": ".io.restorecommerce.resourcebase.ResourceListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Upsert",
                        "inputType": ".io.restorecommerce.resourcebase.ResourceList",
                        "outputType": ".io.restorecommerce.resourcebase.ResourceListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [6, 0],
                    "span": [10, 0, 16, 1],
                    "leadingComments": " Service provides the CRUD operations\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 4, 1, 2, 0],
                    "span": [49, 4, 15],
                    "leadingComments": "",
                    "trailingComments": " default value type if not specified\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 2, 2, 4],
                    "span": [56, 2, 58],
                    "leadingComments": "",
                    "trailingComments": " for nested filtering and to make optional its in separate filter.proto file\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 0],
                    "span": [69, 2, 29],
                    "leadingComments": "",
                    "trailingComments": " search string\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 1],
                    "span": [70, 2, 29],
                    "leadingComments": "",
                    "trailingComments": " list of fields to be searched on entity (if not specified all indexed fields will be searched)\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 2],
                    "span": [71, 2, 35],
                    "leadingComments": "",
                    "trailingComments": " default search is case insensitive\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5, 2, 3],
                    "span": [80, 2, 32],
                    "leadingComments": " Filter based on fieldName|operation, value|list\n",
                    "trailingComments": " repeated filters\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5, 2, 4],
                    "span": [83, 2, 34],
                    "leadingComments": " Fields selector\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 5, 2, 5],
                    "span": [92, 2, 38],
                    "leadingComments": "* Check the query parameters of HTTP request.\n If query parameter `locales` is given,\n return all corresponding localized values.\n Otherwise, return always the localized value\n with highest priority.\n Can be empty, single locale or multiple locales.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 0],
                    "span": [102, 2, 31],
                    "leadingComments": " Request to purge the whole collection\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 1],
                    "span": [104, 2, 26],
                    "leadingComments": " Delete specified documents\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 3],
                    "span": [106, 2, 28],
                    "leadingComments": "",
                    "trailingComments": " list of views to be dropped\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 6, 2, 4],
                    "span": [107, 2, 32],
                    "leadingComments": "",
                    "trailingComments": " list of analyzers to be deleted\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 8],
                    "span": [116, 0, 120, 1],
                    "leadingComments": "/ List of resources\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 9],
                    "span": [123, 0, 127, 1],
                    "leadingComments": " ResourceList response\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 10],
                    "span": [130, 0, 133, 1],
                    "leadingComments": " resource read response\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 11],
                    "span": [136, 0, 139, 1],
                    "leadingComments": " Example resource\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.resourcebase.FieldFilter": exports.FieldFilter,
        ".io.restorecommerce.resourcebase.Sort": exports.Sort,
        ".io.restorecommerce.resourcebase.Sort.SortOrder": Sort_SortOrder,
        ".io.restorecommerce.resourcebase.Filter": exports.Filter,
        ".io.restorecommerce.resourcebase.Filter.Operation": Filter_Operation,
        ".io.restorecommerce.resourcebase.Filter.ValueType": Filter_ValueType,
        ".io.restorecommerce.resourcebase.FilterOp": exports.FilterOp,
        ".io.restorecommerce.resourcebase.FilterOp.Operator": FilterOp_Operator,
        ".io.restorecommerce.resourcebase.Search": exports.Search,
        ".io.restorecommerce.resourcebase.ReadRequest": exports.ReadRequest,
        ".io.restorecommerce.resourcebase.DeleteRequest": exports.DeleteRequest,
        ".io.restorecommerce.resourcebase.DeleteResponse": exports.DeleteResponse,
        ".io.restorecommerce.resourcebase.ResourceList": exports.ResourceList,
        ".io.restorecommerce.resourcebase.ResourceListResponse": exports.ResourceListResponse,
        ".io.restorecommerce.resourcebase.ResourceResponse": exports.ResourceResponse,
        ".io.restorecommerce.resourcebase.Resource": exports.Resource,
        ".io.restorecommerce.resourcebase.Deleted": exports.Deleted,
    },
    dependencies: [any_1.protoMetadata, meta_1.protoMetadata, auth_1.protoMetadata, status_1.protoMetadata, filter_1.protoMetadata],
};
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=resource_base.js.map