"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/template.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.TemplateServiceDefinition = exports.Template = exports.Localization = exports.TemplateResponse = exports.TemplateListResponse = exports.TemplateList = exports.TemplateUseCase = exports.protobufPackage = void 0;
exports.templateUseCaseFromJSON = templateUseCaseFromJSON;
exports.templateUseCaseToJSON = templateUseCaseToJSON;
exports.templateUseCaseToNumber = templateUseCaseToNumber;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const attribute_1 = require("./attribute");
const auth_1 = require("./auth");
const file_1 = require("./file");
const image_1 = require("./image");
const meta_1 = require("./meta");
const options_1 = require("./options");
const resource_base_1 = require("./resource_base");
const status_1 = require("./status");
exports.protobufPackage = "io.restorecommerce.template";
var TemplateUseCase;
(function (TemplateUseCase) {
    /** MISCELLANEOUS - may use attributes for use case identication */
    TemplateUseCase["MISCELLANEOUS"] = "MISCELLANEOUS";
    TemplateUseCase["INVOICE_PDF"] = "INVOICE_PDF";
    TemplateUseCase["INVOICE_EMAIL_BODY"] = "INVOICE_EMAIL_BODY";
    TemplateUseCase["INVOICE_EMAIL_SUBJECT"] = "INVOICE_EMAIL_SUBJECT";
    TemplateUseCase["INVITATION_EMAIL_BODY"] = "INVITATION_EMAIL_BODY";
    TemplateUseCase["INVITATION_EMAIL_SUBJECT"] = "INVITATION_EMAIL_SUBJECT";
    TemplateUseCase["REGISTRATION_EMAIL_BODY"] = "REGISTRATION_EMAIL_BODY";
    TemplateUseCase["REGISTRATION_EMAIL_SUBJECT"] = "REGISTRATION_EMAIL_SUBJECT";
    TemplateUseCase["CHANGE_PASSWORD_EMAIL_BODY"] = "CHANGE_PASSWORD_EMAIL_BODY";
    TemplateUseCase["CHANGE_PASSWORD_EMAIL_SUBJECT"] = "CHANGE_PASSWORD_EMAIL_SUBJECT";
    TemplateUseCase["ORDER_PRENDING_EMAIL"] = "ORDER_PRENDING_EMAIL";
    TemplateUseCase["ORDER_SUBMITTED_EMAIL"] = "ORDER_SUBMITTED_EMAIL";
    TemplateUseCase["ORDER_COMPLETION_EMAIL"] = "ORDER_COMPLETION_EMAIL";
    TemplateUseCase["ORDER_CANCELATION_EMAIL"] = "ORDER_CANCELATION_EMAIL";
    TemplateUseCase["ORDER_WITHDRAWN_EMAIL"] = "ORDER_WITHDRAWN_EMAIL";
    TemplateUseCase["ORDER_INVALID_EMAIL"] = "ORDER_INVALID_EMAIL";
    TemplateUseCase["FULFILLMENT_PENDING_EMAIL"] = "FULFILLMENT_PENDING_EMAIL";
    TemplateUseCase["FULFILLMENT_SUBMITTED_EMAIL"] = "FULFILLMENT_SUBMITTED_EMAIL";
    TemplateUseCase["FULFILLMENT_COMPLETION_EMAIL"] = "FULFILLMENT_COMPLETION_EMAIL";
    TemplateUseCase["FULFILLMENT_CANCELATION_EMAIL"] = "FULFILLMENT_CANCELATION_EMAIL";
    TemplateUseCase["FULFILLMENT_WITHDRAWN_EMAIL"] = "FULFILLMENT_WITHDRAWN_EMAIL";
    TemplateUseCase["FULFILLMENT_FAILED_EMAIL"] = "FULFILLMENT_FAILED_EMAIL";
    TemplateUseCase["UNRECOGNIZED"] = "UNRECOGNIZED";
})(TemplateUseCase || (exports.TemplateUseCase = TemplateUseCase = {}));
function templateUseCaseFromJSON(object) {
    switch (object) {
        case 0:
        case "MISCELLANEOUS":
            return TemplateUseCase.MISCELLANEOUS;
        case 1:
        case "INVOICE_PDF":
            return TemplateUseCase.INVOICE_PDF;
        case 2:
        case "INVOICE_EMAIL_BODY":
            return TemplateUseCase.INVOICE_EMAIL_BODY;
        case 3:
        case "INVOICE_EMAIL_SUBJECT":
            return TemplateUseCase.INVOICE_EMAIL_SUBJECT;
        case 4:
        case "INVITATION_EMAIL_BODY":
            return TemplateUseCase.INVITATION_EMAIL_BODY;
        case 5:
        case "INVITATION_EMAIL_SUBJECT":
            return TemplateUseCase.INVITATION_EMAIL_SUBJECT;
        case 6:
        case "REGISTRATION_EMAIL_BODY":
            return TemplateUseCase.REGISTRATION_EMAIL_BODY;
        case 7:
        case "REGISTRATION_EMAIL_SUBJECT":
            return TemplateUseCase.REGISTRATION_EMAIL_SUBJECT;
        case 8:
        case "CHANGE_PASSWORD_EMAIL_BODY":
            return TemplateUseCase.CHANGE_PASSWORD_EMAIL_BODY;
        case 9:
        case "CHANGE_PASSWORD_EMAIL_SUBJECT":
            return TemplateUseCase.CHANGE_PASSWORD_EMAIL_SUBJECT;
        case 10:
        case "ORDER_PRENDING_EMAIL":
            return TemplateUseCase.ORDER_PRENDING_EMAIL;
        case 11:
        case "ORDER_SUBMITTED_EMAIL":
            return TemplateUseCase.ORDER_SUBMITTED_EMAIL;
        case 12:
        case "ORDER_COMPLETION_EMAIL":
            return TemplateUseCase.ORDER_COMPLETION_EMAIL;
        case 13:
        case "ORDER_CANCELATION_EMAIL":
            return TemplateUseCase.ORDER_CANCELATION_EMAIL;
        case 14:
        case "ORDER_WITHDRAWN_EMAIL":
            return TemplateUseCase.ORDER_WITHDRAWN_EMAIL;
        case 15:
        case "ORDER_INVALID_EMAIL":
            return TemplateUseCase.ORDER_INVALID_EMAIL;
        case 16:
        case "FULFILLMENT_PENDING_EMAIL":
            return TemplateUseCase.FULFILLMENT_PENDING_EMAIL;
        case 17:
        case "FULFILLMENT_SUBMITTED_EMAIL":
            return TemplateUseCase.FULFILLMENT_SUBMITTED_EMAIL;
        case 18:
        case "FULFILLMENT_COMPLETION_EMAIL":
            return TemplateUseCase.FULFILLMENT_COMPLETION_EMAIL;
        case 19:
        case "FULFILLMENT_CANCELATION_EMAIL":
            return TemplateUseCase.FULFILLMENT_CANCELATION_EMAIL;
        case 20:
        case "FULFILLMENT_WITHDRAWN_EMAIL":
            return TemplateUseCase.FULFILLMENT_WITHDRAWN_EMAIL;
        case 21:
        case "FULFILLMENT_FAILED_EMAIL":
            return TemplateUseCase.FULFILLMENT_FAILED_EMAIL;
        case -1:
        case "UNRECOGNIZED":
        default:
            return TemplateUseCase.UNRECOGNIZED;
    }
}
function templateUseCaseToJSON(object) {
    switch (object) {
        case TemplateUseCase.MISCELLANEOUS:
            return "MISCELLANEOUS";
        case TemplateUseCase.INVOICE_PDF:
            return "INVOICE_PDF";
        case TemplateUseCase.INVOICE_EMAIL_BODY:
            return "INVOICE_EMAIL_BODY";
        case TemplateUseCase.INVOICE_EMAIL_SUBJECT:
            return "INVOICE_EMAIL_SUBJECT";
        case TemplateUseCase.INVITATION_EMAIL_BODY:
            return "INVITATION_EMAIL_BODY";
        case TemplateUseCase.INVITATION_EMAIL_SUBJECT:
            return "INVITATION_EMAIL_SUBJECT";
        case TemplateUseCase.REGISTRATION_EMAIL_BODY:
            return "REGISTRATION_EMAIL_BODY";
        case TemplateUseCase.REGISTRATION_EMAIL_SUBJECT:
            return "REGISTRATION_EMAIL_SUBJECT";
        case TemplateUseCase.CHANGE_PASSWORD_EMAIL_BODY:
            return "CHANGE_PASSWORD_EMAIL_BODY";
        case TemplateUseCase.CHANGE_PASSWORD_EMAIL_SUBJECT:
            return "CHANGE_PASSWORD_EMAIL_SUBJECT";
        case TemplateUseCase.ORDER_PRENDING_EMAIL:
            return "ORDER_PRENDING_EMAIL";
        case TemplateUseCase.ORDER_SUBMITTED_EMAIL:
            return "ORDER_SUBMITTED_EMAIL";
        case TemplateUseCase.ORDER_COMPLETION_EMAIL:
            return "ORDER_COMPLETION_EMAIL";
        case TemplateUseCase.ORDER_CANCELATION_EMAIL:
            return "ORDER_CANCELATION_EMAIL";
        case TemplateUseCase.ORDER_WITHDRAWN_EMAIL:
            return "ORDER_WITHDRAWN_EMAIL";
        case TemplateUseCase.ORDER_INVALID_EMAIL:
            return "ORDER_INVALID_EMAIL";
        case TemplateUseCase.FULFILLMENT_PENDING_EMAIL:
            return "FULFILLMENT_PENDING_EMAIL";
        case TemplateUseCase.FULFILLMENT_SUBMITTED_EMAIL:
            return "FULFILLMENT_SUBMITTED_EMAIL";
        case TemplateUseCase.FULFILLMENT_COMPLETION_EMAIL:
            return "FULFILLMENT_COMPLETION_EMAIL";
        case TemplateUseCase.FULFILLMENT_CANCELATION_EMAIL:
            return "FULFILLMENT_CANCELATION_EMAIL";
        case TemplateUseCase.FULFILLMENT_WITHDRAWN_EMAIL:
            return "FULFILLMENT_WITHDRAWN_EMAIL";
        case TemplateUseCase.FULFILLMENT_FAILED_EMAIL:
            return "FULFILLMENT_FAILED_EMAIL";
        case TemplateUseCase.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function templateUseCaseToNumber(object) {
    switch (object) {
        case TemplateUseCase.MISCELLANEOUS:
            return 0;
        case TemplateUseCase.INVOICE_PDF:
            return 1;
        case TemplateUseCase.INVOICE_EMAIL_BODY:
            return 2;
        case TemplateUseCase.INVOICE_EMAIL_SUBJECT:
            return 3;
        case TemplateUseCase.INVITATION_EMAIL_BODY:
            return 4;
        case TemplateUseCase.INVITATION_EMAIL_SUBJECT:
            return 5;
        case TemplateUseCase.REGISTRATION_EMAIL_BODY:
            return 6;
        case TemplateUseCase.REGISTRATION_EMAIL_SUBJECT:
            return 7;
        case TemplateUseCase.CHANGE_PASSWORD_EMAIL_BODY:
            return 8;
        case TemplateUseCase.CHANGE_PASSWORD_EMAIL_SUBJECT:
            return 9;
        case TemplateUseCase.ORDER_PRENDING_EMAIL:
            return 10;
        case TemplateUseCase.ORDER_SUBMITTED_EMAIL:
            return 11;
        case TemplateUseCase.ORDER_COMPLETION_EMAIL:
            return 12;
        case TemplateUseCase.ORDER_CANCELATION_EMAIL:
            return 13;
        case TemplateUseCase.ORDER_WITHDRAWN_EMAIL:
            return 14;
        case TemplateUseCase.ORDER_INVALID_EMAIL:
            return 15;
        case TemplateUseCase.FULFILLMENT_PENDING_EMAIL:
            return 16;
        case TemplateUseCase.FULFILLMENT_SUBMITTED_EMAIL:
            return 17;
        case TemplateUseCase.FULFILLMENT_COMPLETION_EMAIL:
            return 18;
        case TemplateUseCase.FULFILLMENT_CANCELATION_EMAIL:
            return 19;
        case TemplateUseCase.FULFILLMENT_WITHDRAWN_EMAIL:
            return 20;
        case TemplateUseCase.FULFILLMENT_FAILED_EMAIL:
            return 21;
        case TemplateUseCase.UNRECOGNIZED:
        default:
            return -1;
    }
}
function createBaseTemplateList() {
    return {};
}
exports.TemplateList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.Template.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.total_count !== undefined) {
            writer.uint32(16).uint32(message.total_count);
        }
        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 = createBaseTemplateList();
        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.Template.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.items.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.total_count = 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.Template.fromJSON(e)) : undefined,
            total_count: 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.Template.toJSON(e));
        }
        if (message.total_count !== undefined) {
            obj.totalCount = Math.round(message.total_count);
        }
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        return obj;
    },
    create(base) {
        return exports.TemplateList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTemplateList();
        message.items = object.items?.map((e) => exports.Template.fromPartial(e)) || undefined;
        message.total_count = object.total_count ?? undefined;
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        return message;
    },
};
function createBaseTemplateListResponse() {
    return {};
}
exports.TemplateListResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.TemplateResponse.encode(v, writer.uint32(10).fork()).join();
            }
        }
        if (message.total_count !== undefined) {
            writer.uint32(16).uint32(message.total_count);
        }
        if (message.operation_status !== undefined) {
            status_1.OperationStatus.encode(message.operation_status, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseTemplateListResponse();
        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.TemplateResponse.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.items.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.total_count = reader.uint32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.operation_status = status_1.OperationStatus.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            items: globalThis.Array.isArray(object?.items)
                ? object.items.map((e) => exports.TemplateResponse.fromJSON(e))
                : undefined,
            total_count: isSet(object.totalCount)
                ? globalThis.Number(object.totalCount)
                : isSet(object.total_count)
                    ? globalThis.Number(object.total_count)
                    : undefined,
            operation_status: isSet(object.operationStatus)
                ? status_1.OperationStatus.fromJSON(object.operationStatus)
                : isSet(object.operation_status)
                    ? status_1.OperationStatus.fromJSON(object.operation_status)
                    : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.items?.length) {
            obj.items = message.items.map((e) => exports.TemplateResponse.toJSON(e));
        }
        if (message.total_count !== undefined) {
            obj.totalCount = Math.round(message.total_count);
        }
        if (message.operation_status !== undefined) {
            obj.operationStatus = status_1.OperationStatus.toJSON(message.operation_status);
        }
        return obj;
    },
    create(base) {
        return exports.TemplateListResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTemplateListResponse();
        message.items = object.items?.map((e) => exports.TemplateResponse.fromPartial(e)) || undefined;
        message.total_count = object.total_count ?? undefined;
        message.operation_status = (object.operation_status !== undefined && object.operation_status !== null)
            ? status_1.OperationStatus.fromPartial(object.operation_status)
            : undefined;
        return message;
    },
};
function createBaseTemplateResponse() {
    return {};
}
exports.TemplateResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.payload !== undefined) {
            exports.Template.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 = createBaseTemplateResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.payload = exports.Template.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.Template.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.Template.toJSON(message.payload);
        }
        if (message.status !== undefined) {
            obj.status = status_1.Status.toJSON(message.status);
        }
        return obj;
    },
    create(base) {
        return exports.TemplateResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTemplateResponse();
        message.payload = (object.payload !== undefined && object.payload !== null)
            ? exports.Template.fromPartial(object.payload)
            : undefined;
        message.status = (object.status !== undefined && object.status !== null)
            ? status_1.Status.fromPartial(object.status)
            : undefined;
        return message;
    },
};
function createBaseLocalization() {
    return {};
}
exports.Localization = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.locales !== undefined && message.locales.length !== 0) {
            for (const v of message.locales) {
                writer.uint32(10).string(v);
            }
        }
        if (message.l10n !== undefined) {
            file_1.File.encode(message.l10n, 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 = createBaseLocalization();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.locales === undefined) {
                        message.locales = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.locales.push(el);
                    }
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.l10n = file_1.File.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            locales: globalThis.Array.isArray(object?.locales)
                ? object.locales.map((e) => globalThis.String(e))
                : undefined,
            l10n: isSet(object.l10n) ? file_1.File.fromJSON(object.l10n) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.locales?.length) {
            obj.locales = message.locales;
        }
        if (message.l10n !== undefined) {
            obj.l10n = file_1.File.toJSON(message.l10n);
        }
        return obj;
    },
    create(base) {
        return exports.Localization.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLocalization();
        message.locales = object.locales?.map((e) => e) || undefined;
        message.l10n = (object.l10n !== undefined && object.l10n !== null) ? file_1.File.fromPartial(object.l10n) : undefined;
        return message;
    },
};
function createBaseTemplate() {
    return {};
}
exports.Template = {
    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.name !== undefined) {
            writer.uint32(26).string(message.name);
        }
        if (message.description !== undefined) {
            writer.uint32(34).string(message.description);
        }
        if (message.use_case !== undefined) {
            writer.uint32(42).string(message.use_case);
        }
        if (message.ordinal !== undefined) {
            writer.uint32(48).uint32(message.ordinal);
        }
        if (message.section !== undefined) {
            writer.uint32(58).string(message.section);
        }
        if (message.bodies !== undefined && message.bodies.length !== 0) {
            for (const v of message.bodies) {
                file_1.File.encode(v, writer.uint32(66).fork()).join();
            }
        }
        if (message.layouts !== undefined && message.layouts.length !== 0) {
            for (const v of message.layouts) {
                file_1.File.encode(v, writer.uint32(74).fork()).join();
            }
        }
        if (message.styles !== undefined && message.styles.length !== 0) {
            for (const v of message.styles) {
                file_1.File.encode(v, writer.uint32(82).fork()).join();
            }
        }
        if (message.images !== undefined && message.images.length !== 0) {
            for (const v of message.images) {
                image_1.Image.encode(v, writer.uint32(90).fork()).join();
            }
        }
        if (message.localizations !== undefined && message.localizations.length !== 0) {
            for (const v of message.localizations) {
                exports.Localization.encode(v, writer.uint32(98).fork()).join();
            }
        }
        if (message.attributes !== undefined && message.attributes.length !== 0) {
            for (const v of message.attributes) {
                attribute_1.Attribute.encode(v, writer.uint32(114).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 = createBaseTemplate();
        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.name = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.description = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.use_case = reader.string();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.ordinal = reader.uint32();
                    continue;
                }
                case 7: {
                    if (tag !== 58) {
                        break;
                    }
                    message.section = reader.string();
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    if (message.bodies === undefined) {
                        message.bodies = [];
                    }
                    const el = file_1.File.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.bodies.push(el);
                    }
                    continue;
                }
                case 9: {
                    if (tag !== 74) {
                        break;
                    }
                    if (message.layouts === undefined) {
                        message.layouts = [];
                    }
                    const el = file_1.File.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.layouts.push(el);
                    }
                    continue;
                }
                case 10: {
                    if (tag !== 82) {
                        break;
                    }
                    if (message.styles === undefined) {
                        message.styles = [];
                    }
                    const el = file_1.File.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.styles.push(el);
                    }
                    continue;
                }
                case 11: {
                    if (tag !== 90) {
                        break;
                    }
                    if (message.images === undefined) {
                        message.images = [];
                    }
                    const el = image_1.Image.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.images.push(el);
                    }
                    continue;
                }
                case 12: {
                    if (tag !== 98) {
                        break;
                    }
                    if (message.localizations === undefined) {
                        message.localizations = [];
                    }
                    const el = exports.Localization.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.localizations.push(el);
                    }
                    continue;
                }
                case 14: {
                    if (tag !== 114) {
                        break;
                    }
                    if (message.attributes === undefined) {
                        message.attributes = [];
                    }
                    const el = attribute_1.Attribute.decode(reader, reader.uint32());
                    if (el !== undefined) {
                        message.attributes.push(el);
                    }
                    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,
            name: isSet(object.name) ? globalThis.String(object.name) : undefined,
            description: isSet(object.description) ? globalThis.String(object.description) : undefined,
            use_case: isSet(object.useCase)
                ? globalThis.String(object.useCase)
                : isSet(object.use_case)
                    ? globalThis.String(object.use_case)
                    : undefined,
            ordinal: isSet(object.ordinal) ? globalThis.Number(object.ordinal) : undefined,
            section: isSet(object.section) ? globalThis.String(object.section) : undefined,
            bodies: globalThis.Array.isArray(object?.bodies) ? object.bodies.map((e) => file_1.File.fromJSON(e)) : undefined,
            layouts: globalThis.Array.isArray(object?.layouts) ? object.layouts.map((e) => file_1.File.fromJSON(e)) : undefined,
            styles: globalThis.Array.isArray(object?.styles) ? object.styles.map((e) => file_1.File.fromJSON(e)) : undefined,
            images: globalThis.Array.isArray(object?.images) ? object.images.map((e) => image_1.Image.fromJSON(e)) : undefined,
            localizations: globalThis.Array.isArray(object?.localizations)
                ? object.localizations.map((e) => exports.Localization.fromJSON(e))
                : undefined,
            attributes: globalThis.Array.isArray(object?.attributes)
                ? object.attributes.map((e) => attribute_1.Attribute.fromJSON(e))
                : 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.name !== undefined) {
            obj.name = message.name;
        }
        if (message.description !== undefined) {
            obj.description = message.description;
        }
        if (message.use_case !== undefined) {
            obj.useCase = message.use_case;
        }
        if (message.ordinal !== undefined) {
            obj.ordinal = Math.round(message.ordinal);
        }
        if (message.section !== undefined) {
            obj.section = message.section;
        }
        if (message.bodies?.length) {
            obj.bodies = message.bodies.map((e) => file_1.File.toJSON(e));
        }
        if (message.layouts?.length) {
            obj.layouts = message.layouts.map((e) => file_1.File.toJSON(e));
        }
        if (message.styles?.length) {
            obj.styles = message.styles.map((e) => file_1.File.toJSON(e));
        }
        if (message.images?.length) {
            obj.images = message.images.map((e) => image_1.Image.toJSON(e));
        }
        if (message.localizations?.length) {
            obj.localizations = message.localizations.map((e) => exports.Localization.toJSON(e));
        }
        if (message.attributes?.length) {
            obj.attributes = message.attributes.map((e) => attribute_1.Attribute.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return exports.Template.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseTemplate();
        message.id = object.id ?? undefined;
        message.meta = (object.meta !== undefined && object.meta !== null) ? meta_1.Meta.fromPartial(object.meta) : undefined;
        message.name = object.name ?? undefined;
        message.description = object.description ?? undefined;
        message.use_case = object.use_case ?? undefined;
        message.ordinal = object.ordinal ?? undefined;
        message.section = object.section ?? undefined;
        message.bodies = object.bodies?.map((e) => file_1.File.fromPartial(e)) || undefined;
        message.layouts = object.layouts?.map((e) => file_1.File.fromPartial(e)) || undefined;
        message.styles = object.styles?.map((e) => file_1.File.fromPartial(e)) || undefined;
        message.images = object.images?.map((e) => image_1.Image.fromPartial(e)) || undefined;
        message.localizations = object.localizations?.map((e) => exports.Localization.fromPartial(e)) || undefined;
        message.attributes = object.attributes?.map((e) => attribute_1.Attribute.fromPartial(e)) || undefined;
        return message;
    },
};
exports.TemplateServiceDefinition = {
    name: "TemplateService",
    fullName: "io.restorecommerce.template.TemplateService",
    methods: {
        read: {
            name: "Read",
            requestType: resource_base_1.ReadRequest,
            requestStream: false,
            responseType: exports.TemplateListResponse,
            responseStream: false,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
        create: {
            name: "Create",
            requestType: exports.TemplateList,
            requestStream: false,
            responseType: exports.TemplateListResponse,
            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.TemplateList,
            requestStream: false,
            responseType: exports.TemplateListResponse,
            responseStream: false,
            options: {},
        },
        upsert: {
            name: "Upsert",
            requestType: exports.TemplateList,
            requestStream: false,
            responseType: exports.TemplateListResponse,
            responseStream: false,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/template.proto",
        "package": "io.restorecommerce.template",
        "dependency": [
            "io/restorecommerce/resource_base.proto",
            "io/restorecommerce/attribute.proto",
            "io/restorecommerce/image.proto",
            "io/restorecommerce/file.proto",
            "io/restorecommerce/meta.proto",
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/status.proto",
            "io/restorecommerce/options.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "TemplateList",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.template.Template",
                        "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": "TemplateListResponse",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.template.TemplateResponse",
                        "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": "TemplateResponse",
                "field": [{
                        "name": "payload",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.template.Template",
                        "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": "Localization",
                "field": [{
                        "name": "locales",
                        "number": 1,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "locales",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "l10n",
                        "number": 2,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.file.File",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "l10n",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_l10n", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "Template",
                "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": "name",
                        "number": 3,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "name",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "description",
                        "number": 4,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "description",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "use_case",
                        "number": 5,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 4,
                        "jsonName": "useCase",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "ordinal",
                        "number": 6,
                        "label": 1,
                        "type": 13,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 5,
                        "jsonName": "ordinal",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "section",
                        "number": 7,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 6,
                        "jsonName": "section",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "bodies",
                        "number": 8,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.file.File",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "bodies",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "layouts",
                        "number": 9,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.file.File",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "layouts",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "styles",
                        "number": 10,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.file.File",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "styles",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "images",
                        "number": 11,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.image.Image",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "images",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "localizations",
                        "number": 12,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.template.Localization",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "localizations",
                        "options": undefined,
                        "proto3Optional": false,
                    }, {
                        "name": "attributes",
                        "number": 14,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.attribute.Attribute",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "attributes",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [
                    { "name": "_id", "options": undefined },
                    { "name": "_meta", "options": undefined },
                    { "name": "_name", "options": undefined },
                    { "name": "_description", "options": undefined },
                    { "name": "_use_case", "options": undefined },
                    { "name": "_ordinal", "options": undefined },
                    { "name": "_section", "options": undefined },
                ],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [{
                "name": "TemplateUseCase",
                "value": [
                    { "name": "MISCELLANEOUS", "number": 0, "options": undefined },
                    { "name": "INVOICE_PDF", "number": 1, "options": undefined },
                    { "name": "INVOICE_EMAIL_BODY", "number": 2, "options": undefined },
                    { "name": "INVOICE_EMAIL_SUBJECT", "number": 3, "options": undefined },
                    { "name": "INVITATION_EMAIL_BODY", "number": 4, "options": undefined },
                    { "name": "INVITATION_EMAIL_SUBJECT", "number": 5, "options": undefined },
                    { "name": "REGISTRATION_EMAIL_BODY", "number": 6, "options": undefined },
                    { "name": "REGISTRATION_EMAIL_SUBJECT", "number": 7, "options": undefined },
                    { "name": "CHANGE_PASSWORD_EMAIL_BODY", "number": 8, "options": undefined },
                    { "name": "CHANGE_PASSWORD_EMAIL_SUBJECT", "number": 9, "options": undefined },
                    { "name": "ORDER_PRENDING_EMAIL", "number": 10, "options": undefined },
                    { "name": "ORDER_SUBMITTED_EMAIL", "number": 11, "options": undefined },
                    { "name": "ORDER_COMPLETION_EMAIL", "number": 12, "options": undefined },
                    { "name": "ORDER_CANCELATION_EMAIL", "number": 13, "options": undefined },
                    { "name": "ORDER_WITHDRAWN_EMAIL", "number": 14, "options": undefined },
                    { "name": "ORDER_INVALID_EMAIL", "number": 15, "options": undefined },
                    { "name": "FULFILLMENT_PENDING_EMAIL", "number": 16, "options": undefined },
                    { "name": "FULFILLMENT_SUBMITTED_EMAIL", "number": 17, "options": undefined },
                    { "name": "FULFILLMENT_COMPLETION_EMAIL", "number": 18, "options": undefined },
                    { "name": "FULFILLMENT_CANCELATION_EMAIL", "number": 19, "options": undefined },
                    { "name": "FULFILLMENT_WITHDRAWN_EMAIL", "number": 20, "options": undefined },
                    { "name": "FULFILLMENT_FAILED_EMAIL", "number": 21, "options": undefined },
                ],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "service": [{
                "name": "TemplateService",
                "method": [{
                        "name": "Read",
                        "inputType": ".io.restorecommerce.resourcebase.ReadRequest",
                        "outputType": ".io.restorecommerce.template.TemplateListResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Create",
                        "inputType": ".io.restorecommerce.template.TemplateList",
                        "outputType": ".io.restorecommerce.template.TemplateListResponse",
                        "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.template.TemplateList",
                        "outputType": ".io.restorecommerce.template.TemplateListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Upsert",
                        "inputType": ".io.restorecommerce.template.TemplateList",
                        "outputType": ".io.restorecommerce.template.TemplateListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [6, 0],
                    "span": [16, 0, 24, 1],
                    "leadingComments": "\n Microservice definition.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }, {
                    "path": [5, 0, 2, 0],
                    "span": [27, 2, 20],
                    "leadingComments": "",
                    "trailingComments": " may use attributes for use case identication\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 0],
                    "span": [69, 2, 30],
                    "leadingComments": "",
                    "trailingComments": " locales suported by this file e.g. en, en_US, en_UK, ...\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 3, 2, 1],
                    "span": [70, 2, 49],
                    "leadingComments": "",
                    "trailingComments": " JSON or CSV\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 4],
                    "span": [78, 2, 31],
                    "leadingComments": "",
                    "trailingComments": " URN or ENUM to identify what this template is used for\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 5],
                    "span": [79, 2, 30],
                    "leadingComments": "",
                    "trailingComments": " sort number\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 6],
                    "span": [80, 2, 30],
                    "leadingComments": "",
                    "trailingComments": " e.g. header, body, footer\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 7],
                    "span": [81, 2, 51],
                    "leadingComments": "",
                    "trailingComments": " e.g. text/html\n",
                    "leadingDetachedComments": [],
                }, {
                    "path": [4, 4, 2, 9],
                    "span": [83, 2, 52],
                    "leadingComments": "",
                    "trailingComments": " e.g. application/css\n",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.template.TemplateUseCase": TemplateUseCase,
        ".io.restorecommerce.template.TemplateList": exports.TemplateList,
        ".io.restorecommerce.template.TemplateListResponse": exports.TemplateListResponse,
        ".io.restorecommerce.template.TemplateResponse": exports.TemplateResponse,
        ".io.restorecommerce.template.Localization": exports.Localization,
        ".io.restorecommerce.template.Template": exports.Template,
    },
    dependencies: [
        resource_base_1.protoMetadata,
        attribute_1.protoMetadata,
        image_1.protoMetadata,
        file_1.protoMetadata,
        meta_1.protoMetadata,
        auth_1.protoMetadata,
        status_1.protoMetadata,
        options_1.protoMetadata,
    ],
    options: { services: { "TemplateService": { methods: { "Read": { "is_query": true } } } } },
};
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=template.js.map