"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/payment_method.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.PaymentMethodServiceDefinition = exports.PaymentMethod = exports.PaymentMethodResponse = exports.PaymentMethodListResponse = exports.PaymentMethodList = exports.Deleted = exports.TransferTypeEnum = exports.PaymentMethodEnum = exports.protobufPackage = void 0;
exports.paymentMethodEnumFromJSON = paymentMethodEnumFromJSON;
exports.paymentMethodEnumToJSON = paymentMethodEnumToJSON;
exports.paymentMethodEnumToNumber = paymentMethodEnumToNumber;
exports.transferTypeEnumFromJSON = transferTypeEnumFromJSON;
exports.transferTypeEnumToJSON = transferTypeEnumToJSON;
exports.transferTypeEnumToNumber = transferTypeEnumToNumber;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const any_1 = require("../../google/protobuf/any");
const auth_1 = require("./auth");
const meta_1 = require("./meta");
const resource_base_1 = require("./resource_base");
const status_1 = require("./status");
exports.protobufPackage = "io.restorecommerce.payment_method";
var PaymentMethodEnum;
(function (PaymentMethodEnum) {
    PaymentMethodEnum["WIRE_TRANSFER"] = "WIRE_TRANSFER";
    PaymentMethodEnum["DIRECT_DEBIT"] = "DIRECT_DEBIT";
    PaymentMethodEnum["PAYPAL"] = "PAYPAL";
    PaymentMethodEnum["UNRECOGNIZED"] = "UNRECOGNIZED";
})(PaymentMethodEnum || (exports.PaymentMethodEnum = PaymentMethodEnum = {}));
function paymentMethodEnumFromJSON(object) {
    switch (object) {
        case 0:
        case "WIRE_TRANSFER":
            return PaymentMethodEnum.WIRE_TRANSFER;
        case 1:
        case "DIRECT_DEBIT":
            return PaymentMethodEnum.DIRECT_DEBIT;
        case 2:
        case "PAYPAL":
            return PaymentMethodEnum.PAYPAL;
        case -1:
        case "UNRECOGNIZED":
        default:
            return PaymentMethodEnum.UNRECOGNIZED;
    }
}
function paymentMethodEnumToJSON(object) {
    switch (object) {
        case PaymentMethodEnum.WIRE_TRANSFER:
            return "WIRE_TRANSFER";
        case PaymentMethodEnum.DIRECT_DEBIT:
            return "DIRECT_DEBIT";
        case PaymentMethodEnum.PAYPAL:
            return "PAYPAL";
        case PaymentMethodEnum.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function paymentMethodEnumToNumber(object) {
    switch (object) {
        case PaymentMethodEnum.WIRE_TRANSFER:
            return 0;
        case PaymentMethodEnum.DIRECT_DEBIT:
            return 1;
        case PaymentMethodEnum.PAYPAL:
            return 2;
        case PaymentMethodEnum.UNRECOGNIZED:
        default:
            return -1;
    }
}
var TransferTypeEnum;
(function (TransferTypeEnum) {
    TransferTypeEnum["RECEIVE"] = "RECEIVE";
    TransferTypeEnum["SEND"] = "SEND";
    TransferTypeEnum["BOTH"] = "BOTH";
    TransferTypeEnum["UNRECOGNIZED"] = "UNRECOGNIZED";
})(TransferTypeEnum || (exports.TransferTypeEnum = TransferTypeEnum = {}));
function transferTypeEnumFromJSON(object) {
    switch (object) {
        case 0:
        case "RECEIVE":
            return TransferTypeEnum.RECEIVE;
        case 1:
        case "SEND":
            return TransferTypeEnum.SEND;
        case 2:
        case "BOTH":
            return TransferTypeEnum.BOTH;
        case -1:
        case "UNRECOGNIZED":
        default:
            return TransferTypeEnum.UNRECOGNIZED;
    }
}
function transferTypeEnumToJSON(object) {
    switch (object) {
        case TransferTypeEnum.RECEIVE:
            return "RECEIVE";
        case TransferTypeEnum.SEND:
            return "SEND";
        case TransferTypeEnum.BOTH:
            return "BOTH";
        case TransferTypeEnum.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function transferTypeEnumToNumber(object) {
    switch (object) {
        case TransferTypeEnum.RECEIVE:
            return 0;
        case TransferTypeEnum.SEND:
            return 1;
        case TransferTypeEnum.BOTH:
            return 2;
        case TransferTypeEnum.UNRECOGNIZED:
        default:
            return -1;
    }
}
function createBaseDeleted() {
    return {};
}
exports.Deleted = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.id !== undefined) {
            writer.uint32(10).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDeleted();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            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 };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== undefined) {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return exports.Deleted.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleted();
        message.id = object.id ?? undefined;
        return message;
    },
};
function createBasePaymentMethodList() {
    return {};
}
exports.PaymentMethodList = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.PaymentMethod.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 = createBasePaymentMethodList();
        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.PaymentMethod.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.PaymentMethod.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.PaymentMethod.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.PaymentMethodList.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePaymentMethodList();
        message.items = object.items?.map((e) => exports.PaymentMethod.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 createBasePaymentMethodListResponse() {
    return {};
}
exports.PaymentMethodListResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.items !== undefined && message.items.length !== 0) {
            for (const v of message.items) {
                exports.PaymentMethodResponse.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 = createBasePaymentMethodListResponse();
        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.PaymentMethodResponse.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.PaymentMethodResponse.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.PaymentMethodResponse.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.PaymentMethodListResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePaymentMethodListResponse();
        message.items = object.items?.map((e) => exports.PaymentMethodResponse.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 createBasePaymentMethodResponse() {
    return {};
}
exports.PaymentMethodResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.payload !== undefined) {
            exports.PaymentMethod.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 = createBasePaymentMethodResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.payload = exports.PaymentMethod.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.PaymentMethod.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.PaymentMethod.toJSON(message.payload);
        }
        if (message.status !== undefined) {
            obj.status = status_1.Status.toJSON(message.status);
        }
        return obj;
    },
    create(base) {
        return exports.PaymentMethodResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePaymentMethodResponse();
        message.payload = (object.payload !== undefined && object.payload !== null)
            ? exports.PaymentMethod.fromPartial(object.payload)
            : undefined;
        message.status = (object.status !== undefined && object.status !== null)
            ? status_1.Status.fromPartial(object.status)
            : undefined;
        return message;
    },
};
function createBasePaymentMethod() {
    return {};
}
exports.PaymentMethod = {
    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.payment_method !== undefined) {
            writer.uint32(24).int32(paymentMethodEnumToNumber(message.payment_method));
        }
        if (message.transfer_type !== undefined) {
            writer.uint32(32).int32(transferTypeEnumToNumber(message.transfer_type));
        }
        if (message.data !== undefined) {
            any_1.Any.encode(message.data, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePaymentMethod();
        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 !== 24) {
                        break;
                    }
                    message.payment_method = paymentMethodEnumFromJSON(reader.int32());
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.transfer_type = transferTypeEnumFromJSON(reader.int32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.data = any_1.Any.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            id: isSet(object.id) ? globalThis.String(object.id) : undefined,
            meta: isSet(object.meta) ? meta_1.Meta.fromJSON(object.meta) : undefined,
            payment_method: isSet(object.paymentMethod)
                ? paymentMethodEnumFromJSON(object.paymentMethod)
                : isSet(object.payment_method)
                    ? paymentMethodEnumFromJSON(object.payment_method)
                    : undefined,
            transfer_type: isSet(object.transferType)
                ? transferTypeEnumFromJSON(object.transferType)
                : isSet(object.transfer_type)
                    ? transferTypeEnumFromJSON(object.transfer_type)
                    : undefined,
            data: isSet(object.data) ? any_1.Any.fromJSON(object.data) : 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.payment_method !== undefined) {
            obj.paymentMethod = paymentMethodEnumToJSON(message.payment_method);
        }
        if (message.transfer_type !== undefined) {
            obj.transferType = transferTypeEnumToJSON(message.transfer_type);
        }
        if (message.data !== undefined) {
            obj.data = any_1.Any.toJSON(message.data);
        }
        return obj;
    },
    create(base) {
        return exports.PaymentMethod.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePaymentMethod();
        message.id = object.id ?? undefined;
        message.meta = (object.meta !== undefined && object.meta !== null) ? meta_1.Meta.fromPartial(object.meta) : undefined;
        message.payment_method = object.payment_method ?? undefined;
        message.transfer_type = object.transfer_type ?? undefined;
        message.data = (object.data !== undefined && object.data !== null) ? any_1.Any.fromPartial(object.data) : undefined;
        return message;
    },
};
exports.PaymentMethodServiceDefinition = {
    name: "PaymentMethodService",
    fullName: "io.restorecommerce.payment_method.PaymentMethodService",
    methods: {
        read: {
            name: "Read",
            requestType: resource_base_1.ReadRequest,
            requestStream: false,
            responseType: exports.PaymentMethodListResponse,
            responseStream: false,
            options: {},
        },
        create: {
            name: "Create",
            requestType: exports.PaymentMethodList,
            requestStream: false,
            responseType: exports.PaymentMethodListResponse,
            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.PaymentMethodList,
            requestStream: false,
            responseType: exports.PaymentMethodListResponse,
            responseStream: false,
            options: {},
        },
        upsert: {
            name: "Upsert",
            requestType: exports.PaymentMethodList,
            requestStream: false,
            responseType: exports.PaymentMethodListResponse,
            responseStream: false,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/payment_method.proto",
        "package": "io.restorecommerce.payment_method",
        "dependency": [
            "io/restorecommerce/resource_base.proto",
            "google/protobuf/any.proto",
            "io/restorecommerce/meta.proto",
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/status.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "Deleted",
                "field": [{
                        "name": "id",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "id",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_id", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "PaymentMethodList",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.payment_method.PaymentMethod",
                        "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": "PaymentMethodListResponse",
                "field": [{
                        "name": "items",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.payment_method.PaymentMethodResponse",
                        "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": "PaymentMethodResponse",
                "field": [{
                        "name": "payload",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.payment_method.PaymentMethod",
                        "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": "PaymentMethod",
                "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": "payment_method",
                        "number": 3,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.payment_method.PaymentMethodEnum",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "paymentMethod",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "transfer_type",
                        "number": 4,
                        "label": 1,
                        "type": 14,
                        "typeName": ".io.restorecommerce.payment_method.TransferTypeEnum",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 3,
                        "jsonName": "transferType",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "data",
                        "number": 5,
                        "label": 1,
                        "type": 11,
                        "typeName": ".google.protobuf.Any",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 4,
                        "jsonName": "data",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [
                    { "name": "_id", "options": undefined },
                    { "name": "_meta", "options": undefined },
                    { "name": "_payment_method", "options": undefined },
                    { "name": "_transfer_type", "options": undefined },
                    { "name": "_data", "options": undefined },
                ],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [{
                "name": "PaymentMethodEnum",
                "value": [{ "name": "WIRE_TRANSFER", "number": 0, "options": undefined }, {
                        "name": "DIRECT_DEBIT",
                        "number": 1,
                        "options": undefined,
                    }, { "name": "PAYPAL", "number": 2, "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "TransferTypeEnum",
                "value": [{ "name": "RECEIVE", "number": 0, "options": undefined }, {
                        "name": "SEND",
                        "number": 1,
                        "options": undefined,
                    }, { "name": "BOTH", "number": 2, "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "service": [{
                "name": "PaymentMethodService",
                "method": [{
                        "name": "Read",
                        "inputType": ".io.restorecommerce.resourcebase.ReadRequest",
                        "outputType": ".io.restorecommerce.payment_method.PaymentMethodListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Create",
                        "inputType": ".io.restorecommerce.payment_method.PaymentMethodList",
                        "outputType": ".io.restorecommerce.payment_method.PaymentMethodListResponse",
                        "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.payment_method.PaymentMethodList",
                        "outputType": ".io.restorecommerce.payment_method.PaymentMethodListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "Upsert",
                        "inputType": ".io.restorecommerce.payment_method.PaymentMethodList",
                        "outputType": ".io.restorecommerce.payment_method.PaymentMethodListResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": {
            "location": [{
                    "path": [6, 0],
                    "span": [13, 0, 19, 1],
                    "leadingComments": "\n Microservice definition.\n",
                    "trailingComments": "",
                    "leadingDetachedComments": [],
                }],
        },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.payment_method.PaymentMethodEnum": PaymentMethodEnum,
        ".io.restorecommerce.payment_method.TransferTypeEnum": TransferTypeEnum,
        ".io.restorecommerce.payment_method.Deleted": exports.Deleted,
        ".io.restorecommerce.payment_method.PaymentMethodList": exports.PaymentMethodList,
        ".io.restorecommerce.payment_method.PaymentMethodListResponse": exports.PaymentMethodListResponse,
        ".io.restorecommerce.payment_method.PaymentMethodResponse": exports.PaymentMethodResponse,
        ".io.restorecommerce.payment_method.PaymentMethod": exports.PaymentMethod,
    },
    dependencies: [resource_base_1.protoMetadata, any_1.protoMetadata, meta_1.protoMetadata, auth_1.protoMetadata, status_1.protoMetadata],
};
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=payment_method.js.map