"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/tax.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.TaxServiceDefinition = exports.Tax = exports.TaxResponse = exports.TaxListResponse = exports.TaxList = exports.RoundMode = exports.protobufPackage = void 0;
exports.roundModeFromJSON = roundModeFromJSON;
exports.roundModeToJSON = roundModeToJSON;
exports.roundModeToNumber = roundModeToNumber;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const auth_1 = require("./auth");
const country_1 = require("./country");
const meta_1 = require("./meta");
const options_1 = require("./options");
const resource_base_1 = require("./resource_base");
const status_1 = require("./status");
const tax_type_1 = require("./tax_type");
exports.protobufPackage = "io.restorecommerce.tax";
var RoundMode;
(function (RoundMode) {
    RoundMode["HALF"] = "HALF";
    RoundMode["CEIL"] = "CEIL";
    RoundMode["FLOOR"] = "FLOOR";
    RoundMode["UNRECOGNIZED"] = "UNRECOGNIZED";
})(RoundMode || (exports.RoundMode = RoundMode = {}));
function roundModeFromJSON(object) {
    switch (object) {
        case 0:
        case "HALF":
            return RoundMode.HALF;
        case 1:
        case "CEIL":
            return RoundMode.CEIL;
        case 2:
        case "FLOOR":
            return RoundMode.FLOOR;
        case -1:
        case "UNRECOGNIZED":
        default:
            return RoundMode.UNRECOGNIZED;
    }
}
function roundModeToJSON(object) {
    switch (object) {
        case RoundMode.HALF:
            return "HALF";
        case RoundMode.CEIL:
            return "CEIL";
        case RoundMode.FLOOR:
            return "FLOOR";
        case RoundMode.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function roundModeToNumber(object) {
    switch (object) {
        case RoundMode.HALF:
            return 0;
        case RoundMode.CEIL:
            return 1;
        case RoundMode.FLOOR:
            return 2;
        case RoundMode.UNRECOGNIZED:
        default:
            return -1;
    }
}
function createBaseTaxList() {
    return {};
}
exports.TaxList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.Tax.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 = createBaseTaxList();
        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.Tax.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.Tax.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.Tax.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.TaxList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTaxList();
        message.items = object.items?.map((e) => exports.Tax.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 createBaseTaxListResponse() {
    return {};
}
exports.TaxListResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.TaxResponse.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 = createBaseTaxListResponse();
        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.TaxResponse.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.TaxResponse.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.TaxResponse.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.TaxListResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTaxListResponse();
        message.items = object.items?.map((e) => exports.TaxResponse.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 createBaseTaxResponse() {
    return {};
}
exports.TaxResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.payload !== undefined) {
            exports.Tax.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 = createBaseTaxResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.payload = exports.Tax.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.Tax.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.Tax.toJSON(message.payload);
        }
        if (message.status !== undefined) {
            obj.status = status_1.Status.toJSON(message.status);
        }
        return obj;
    },
    create(base) {
        return exports.TaxResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTaxResponse();
        message.payload = (object.payload !== undefined && object.payload !== null)
            ? exports.Tax.fromPartial(object.payload)
            : undefined;
        message.status = (object.status !== undefined && object.status !== null)
            ? status_1.Status.fromPartial(object.status)
            : undefined;
        return message;
    },
};
function createBaseTax() {
    return {};
}
exports.Tax = {
    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();
        }
        if (message.countryId !== undefined) {
            writer.uint32(26).string(message.countryId);
        }
        if (message.rate !== undefined) {
            writer.uint32(33).double(message.rate);
        }
        if (message.variant !== undefined) {
            writer.uint32(42).string(message.variant);
        }
        if (message.typeId !== undefined) {
            writer.uint32(50).string(message.typeId);
        }
        if (message.name !== undefined) {
            writer.uint32(58).string(message.name);
        }
        if (message.abbreviation !== undefined) {
            writer.uint32(66).string(message.abbreviation);
        }
        if (message.roundMode !== undefined) {
            writer.uint32(72).int32(roundModeToNumber(message.roundMode));
        }
        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 = createBaseTax();
        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;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.countryId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 33) {
                        break;
                    }
                    message.rate = reader.double();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.variant = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.typeId = reader.string();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.abbreviation = reader.string();
                    continue;
                }
                case 9: {
                    if (tag !== 72) {
                        break;
                    }
                    message.roundMode = roundModeFromJSON(reader.int32());
                    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,
            countryId: isSet(object.countryId)
                ? globalThis.String(object.countryId)
                : isSet(object.country_id)
                    ? globalThis.String(object.country_id)
                    : undefined,
            rate: isSet(object.rate) ? globalThis.Number(object.rate) : undefined,
            variant: isSet(object.variant) ? globalThis.String(object.variant) : undefined,
            typeId: isSet(object.typeId)
                ? globalThis.String(object.typeId)
                : isSet(object.type_id)
                    ? globalThis.String(object.type_id)
                    : undefined,
            name: isSet(object.name) ? globalThis.String(object.name) : undefined,
            abbreviation: isSet(object.abbreviation) ? globalThis.String(object.abbreviation) : undefined,
            roundMode: isSet(object.roundMode)
                ? roundModeFromJSON(object.roundMode)
                : isSet(object.round_mode)
                    ? roundModeFromJSON(object.round_mode)
                    : 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);
        }
        if (message.countryId !== undefined) {
            obj.countryId = message.countryId;
        }
        if (message.rate !== undefined) {
            obj.rate = message.rate;
        }
        if (message.variant !== undefined) {
            obj.variant = message.variant;
        }
        if (message.typeId !== undefined) {
            obj.typeId = message.typeId;
        }
        if (message.name !== undefined) {
            obj.name = message.name;
        }
        if (message.abbreviation !== undefined) {
            obj.abbreviation = message.abbreviation;
        }
        if (message.roundMode !== undefined) {
            obj.roundMode = roundModeToJSON(message.roundMode);
        }
        return obj;
    },
    create(base) {
        return exports.Tax.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTax();
        message.id = object.id ?? undefined;
        message.meta = (object.meta !== undefined && object.meta !== null) ? meta_1.Meta.fromPartial(object.meta) : undefined;
        message.countryId = object.countryId ?? undefined;
        message.rate = object.rate ?? undefined;
        message.variant = object.variant ?? undefined;
        message.typeId = object.typeId ?? undefined;
        message.name = object.name ?? undefined;
        message.abbreviation = object.abbreviation ?? undefined;
        message.roundMode = object.roundMode ?? undefined;
        return message;
    },
};
exports.TaxServiceDefinition = {
    name: "TaxService",
    fullName: "io.restorecommerce.tax.TaxService",
    methods: {
        read: {
            name: "Read",
            requestType: resource_base_1.ReadRequest,
            requestStream: false,
            responseType: exports.TaxListResponse,
            responseStream: false,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
        create: {
            name: "Create",
            requestType: exports.TaxList,
            requestStream: false,
            responseType: exports.TaxListResponse,
            responseStream: false,
            options: {},
        },
        delete: {
            name: "Delete",
            requestType: resource_base_1.DeleteRequest,
            requestStream: false,
            responseType: resource_base_1.DeleteResponse,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: exports.TaxList,
            requestStream: false,
            responseType: exports.TaxListResponse,
            responseStream: false,
            options: {},
        },
        upsert: {
            name: "Upsert",
            requestType: exports.TaxList,
            requestStream: false,
            responseType: exports.TaxListResponse,
            responseStream: false,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/tax.proto",
        "package": "io.restorecommerce.tax",
        "dependency": [
            "io/restorecommerce/resource_base.proto",
            "io/restorecommerce/meta.proto",
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/status.proto",
            "io/restorecommerce/options.proto",
            "io/restorecommerce/country.proto",
            "io/restorecommerce/tax_type.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "TaxList",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.tax.Tax",
                        "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": "TaxListResponse",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.tax.TaxResponse",
                        "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": "TaxResponse",
                "field": [{
                        "name": "payload",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.tax.Tax",
                        "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": "Tax",
                "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,
                    }, {
                        "name": "country_id",
                        "number": 3,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "countryId",
                        "options": {
                            "ctype": 0,
                            "packed": false,
                            "jstype": 0,
                            "lazy": false,
                            "unverifiedLazy": false,
                            "deprecated": false,
                            "weak": false,
                            "debugRedact": false,
                            "retention": 0,
                            "targets": [],
                            "editionDefaults": [],
                            "features": undefined,
                            "featureSupport": undefined,
                            "uninterpretedOption": [],
                        },
                        "proto3Optional": true,
                    }, {
                        "name": "rate",
                        "number": 4,
                        "label": 1,
                        "type": 1,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "rate",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "variant",
                        "number": 5,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 4,
                        "jsonName": "variant",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "type_id",
                        "number": 6,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 5,
                        "jsonName": "typeId",
                        "options": {
                            "ctype": 0,
                            "packed": false,
                            "jstype": 0,
                            "lazy": false,
                            "unverifiedLazy": false,
                            "deprecated": false,
                            "weak": false,
                            "debugRedact": false,
                            "retention": 0,
                            "targets": [],
                            "editionDefaults": [],
                            "features": undefined,
                            "featureSupport": undefined,
                            "uninterpretedOption": [],
                        },
                        "proto3Optional": true,
                    }, {
                        "name": "name",
                        "number": 7,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 6,
                        "jsonName": "name",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "abbreviation",
                        "number": 8,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 7,
                        "jsonName": "abbreviation",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "round_mode",
                        "number": 9,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.tax.RoundMode",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 8,
                        "jsonName": "roundMode",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [
                    { "name": "_id", "options": undefined },
                    { "name": "_meta", "options": undefined },
                    { "name": "_country_id", "options": undefined },
                    { "name": "_rate", "options": undefined },
                    { "name": "_variant", "options": undefined },
                    { "name": "_type_id", "options": undefined },
                    { "name": "_name", "options": undefined },
                    { "name": "_abbreviation", "options": undefined },
                    { "name": "_round_mode", "options": undefined },
                ],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [{
                "name": "RoundMode",
                "value": [{ "name": "HALF", "number": 0, "options": undefined }, {
                        "name": "CEIL",
                        "number": 1,
                        "options": undefined,
                    }, { "name": "FLOOR", "number": 2, "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "service": [{
                "name": "TaxService",
                "method": [{
                        "name": "Read",
                        "inputType": ".io.restorecommerce.resourcebase.ReadRequest",
                        "outputType": ".io.restorecommerce.tax.TaxListResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Create",
                        "inputType": ".io.restorecommerce.tax.TaxList",
                        "outputType": ".io.restorecommerce.tax.TaxListResponse",
                        "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.tax.TaxList",
                        "outputType": ".io.restorecommerce.tax.TaxListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Upsert",
                        "inputType": ".io.restorecommerce.tax.TaxList",
                        "outputType": ".io.restorecommerce.tax.TaxListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [3, 5],
                    "span": [11, 0, 42],
                    "leadingComments": " Used by resolvers\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [6, 0],
                    "span": [17, 0, 25, 1],
                    "leadingComments": "\n Microservice definition.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.tax.RoundMode": RoundMode,
        ".io.restorecommerce.tax.TaxList": exports.TaxList,
        ".io.restorecommerce.tax.TaxListResponse": exports.TaxListResponse,
        ".io.restorecommerce.tax.TaxResponse": exports.TaxResponse,
        ".io.restorecommerce.tax.Tax": exports.Tax,
    },
    dependencies: [
        resource_base_1.protoMetadata,
        meta_1.protoMetadata,
        auth_1.protoMetadata,
        status_1.protoMetadata,
        options_1.protoMetadata,
        country_1.protoMetadata,
        tax_type_1.protoMetadata,
    ],
    options: {
        messages: {
            "Tax": {
                fields: {
                    "country_id": {
                        "resolver": options_1.Resolver.decode(Buffer.from("CiMuaW8ucmVzdG9yZWNvbW1lcmNlLmNvdW50cnkuQ291bnRyeRILbWFzdGVyX2RhdGEaB2NvdW50cnkiBFJlYWQqB2NvdW50cnk=", "base64")),
                    },
                    "type_id": {
                        "resolver": options_1.Resolver.decode(Buffer.from("CiQuaW8ucmVzdG9yZWNvbW1lcmNlLnRheF90eXBlLlRheFR5cGUSC21hc3Rlcl9kYXRhGgh0YXhfdHlwZSIEUmVhZCoEdHlwZQ==", "base64")),
                    },
                },
            },
        },
        services: { "TaxService": { methods: { "Read": { "is_query": true } } } },
    },
};
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=tax.js.map