"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/oauth.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.protoMetadata = exports.OAuthServiceDefinition = exports.GetTokenResponse = exports.GetTokenRequest = exports.ExchangeCodeResponse = exports.ExchangeCodeRequest = exports.GenerateLinksResponse_LinksEntry = exports.GenerateLinksResponse = exports.ServicesResponse = exports.protobufPackage = void 0;
/* eslint-disable */
const wire_1 = require("@bufbuild/protobuf/wire");
const empty_1 = require("../../google/protobuf/empty");
const auth_1 = require("./auth");
const options_1 = require("./options");
const status_1 = require("./status");
const user_1 = require("./user");
exports.protobufPackage = "io.restorecommerce.oauth";
function createBaseServicesResponse() {
    return {};
}
exports.ServicesResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.services !== undefined && message.services.length !== 0) {
            for (const v of message.services) {
                writer.uint32(10).string(v);
            }
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseServicesResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    if (message.services === undefined) {
                        message.services = [];
                    }
                    const el = reader.string();
                    if (el !== undefined) {
                        message.services.push(el);
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            services: globalThis.Array.isArray(object?.services)
                ? object.services.map((e) => globalThis.String(e))
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.services?.length) {
            obj.services = message.services;
        }
        return obj;
    },
    create(base) {
        return exports.ServicesResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseServicesResponse();
        message.services = object.services?.map((e) => e) || undefined;
        return message;
    },
};
function createBaseGenerateLinksResponse() {
    return {};
}
exports.GenerateLinksResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        globalThis.Object.entries(message.links || {}).forEach(([key, value]) => {
            exports.GenerateLinksResponse_LinksEntry.encode({ key: key, value }, writer.uint32(10).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 = createBaseGenerateLinksResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    const entry1 = exports.GenerateLinksResponse_LinksEntry.decode(reader, reader.uint32());
                    if (entry1.value !== undefined) {
                        if (message.links === undefined) {
                            message.links = {};
                        }
                        message.links[entry1.key] = entry1.value;
                    }
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            links: isObject(object.links)
                ? globalThis.Object.entries(object.links).reduce((acc, [key, value]) => {
                    acc[key] = globalThis.String(value);
                    return acc;
                }, {})
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.links) {
            const entries = globalThis.Object.entries(message.links);
            if (entries.length > 0) {
                obj.links = {};
                entries.forEach(([k, v]) => {
                    obj.links[k] = v;
                });
            }
        }
        return obj;
    },
    create(base) {
        return exports.GenerateLinksResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGenerateLinksResponse();
        message.links = (object.links === undefined || object.links === null)
            ? undefined
            : globalThis.Object.entries(object.links ?? {}).reduce((acc, [key, value]) => {
                if (value !== undefined) {
                    acc[key] = globalThis.String(value);
                }
                return acc;
            }, {});
        return message;
    },
};
function createBaseGenerateLinksResponse_LinksEntry() {
    return { key: "", value: "" };
}
exports.GenerateLinksResponse_LinksEntry = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== "") {
            writer.uint32(18).string(message.value);
        }
        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 = createBaseGenerateLinksResponse_LinksEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.key = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.value = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? globalThis.String(object.key) : "",
            value: isSet(object.value) ? globalThis.String(object.value) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.key !== "") {
            obj.key = message.key;
        }
        if (message.value !== "") {
            obj.value = message.value;
        }
        return obj;
    },
    create(base) {
        return exports.GenerateLinksResponse_LinksEntry.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGenerateLinksResponse_LinksEntry();
        message.key = object.key ?? "";
        message.value = object.value ?? "";
        return message;
    },
};
function createBaseExchangeCodeRequest() {
    return {};
}
exports.ExchangeCodeRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.service !== undefined) {
            writer.uint32(10).string(message.service);
        }
        if (message.code !== undefined) {
            writer.uint32(18).string(message.code);
        }
        if (message.state !== undefined) {
            writer.uint32(26).string(message.state);
        }
        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 = createBaseExchangeCodeRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.service = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.code = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.state = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            service: isSet(object.service) ? globalThis.String(object.service) : undefined,
            code: isSet(object.code) ? globalThis.String(object.code) : undefined,
            state: isSet(object.state) ? globalThis.String(object.state) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.service !== undefined) {
            obj.service = message.service;
        }
        if (message.code !== undefined) {
            obj.code = message.code;
        }
        if (message.state !== undefined) {
            obj.state = message.state;
        }
        return obj;
    },
    create(base) {
        return exports.ExchangeCodeRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseExchangeCodeRequest();
        message.service = object.service ?? undefined;
        message.code = object.code ?? undefined;
        message.state = object.state ?? undefined;
        return message;
    },
};
function createBaseExchangeCodeResponse() {
    return {};
}
exports.ExchangeCodeResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.user !== undefined) {
            user_1.UserResponse.encode(message.user, writer.uint32(10).fork()).join();
        }
        if (message.email !== undefined) {
            writer.uint32(18).string(message.email);
        }
        if (message.token !== undefined) {
            auth_1.Tokens.encode(message.token, 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 = createBaseExchangeCodeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = user_1.UserResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.email = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.token = auth_1.Tokens.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            user: isSet(object.user) ? user_1.UserResponse.fromJSON(object.user) : undefined,
            email: isSet(object.email) ? globalThis.String(object.email) : undefined,
            token: isSet(object.token) ? auth_1.Tokens.fromJSON(object.token) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.user !== undefined) {
            obj.user = user_1.UserResponse.toJSON(message.user);
        }
        if (message.email !== undefined) {
            obj.email = message.email;
        }
        if (message.token !== undefined) {
            obj.token = auth_1.Tokens.toJSON(message.token);
        }
        return obj;
    },
    create(base) {
        return exports.ExchangeCodeResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseExchangeCodeResponse();
        message.user = (object.user !== undefined && object.user !== null)
            ? user_1.UserResponse.fromPartial(object.user)
            : undefined;
        message.email = object.email ?? undefined;
        message.token = (object.token !== undefined && object.token !== null)
            ? auth_1.Tokens.fromPartial(object.token)
            : undefined;
        return message;
    },
};
function createBaseGetTokenRequest() {
    return {};
}
exports.GetTokenRequest = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.subject !== undefined) {
            auth_1.Subject.encode(message.subject, writer.uint32(10).fork()).join();
        }
        if (message.service !== undefined) {
            writer.uint32(18).string(message.service);
        }
        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 = createBaseGetTokenRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.subject = auth_1.Subject.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.service = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            subject: isSet(object.subject) ? auth_1.Subject.fromJSON(object.subject) : undefined,
            service: isSet(object.service) ? globalThis.String(object.service) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.subject !== undefined) {
            obj.subject = auth_1.Subject.toJSON(message.subject);
        }
        if (message.service !== undefined) {
            obj.service = message.service;
        }
        return obj;
    },
    create(base) {
        return exports.GetTokenRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetTokenRequest();
        message.subject = (object.subject !== undefined && object.subject !== null)
            ? auth_1.Subject.fromPartial(object.subject)
            : undefined;
        message.service = object.service ?? undefined;
        return message;
    },
};
function createBaseGetTokenResponse() {
    return {};
}
exports.GetTokenResponse = {
    encode(message, writer = new wire_1.BinaryWriter()) {
        if (message.status !== undefined) {
            status_1.Status.encode(message.status, writer.uint32(10).fork()).join();
        }
        if (message.token !== undefined) {
            writer.uint32(18).string(message.token);
        }
        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 = createBaseGetTokenResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.status = status_1.Status.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.token = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            status: isSet(object.status) ? status_1.Status.fromJSON(object.status) : undefined,
            token: isSet(object.token) ? globalThis.String(object.token) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.status !== undefined) {
            obj.status = status_1.Status.toJSON(message.status);
        }
        if (message.token !== undefined) {
            obj.token = message.token;
        }
        return obj;
    },
    create(base) {
        return exports.GetTokenResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetTokenResponse();
        message.status = (object.status !== undefined && object.status !== null)
            ? status_1.Status.fromPartial(object.status)
            : undefined;
        message.token = object.token ?? undefined;
        return message;
    },
};
exports.OAuthServiceDefinition = {
    name: "OAuthService",
    fullName: "io.restorecommerce.oauth.OAuthService",
    methods: {
        generateLinks: {
            name: "GenerateLinks",
            requestType: empty_1.Empty,
            requestStream: false,
            responseType: exports.GenerateLinksResponse,
            responseStream: false,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
        getToken: {
            name: "GetToken",
            requestType: exports.GetTokenRequest,
            requestStream: false,
            responseType: exports.GetTokenResponse,
            responseStream: false,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
        availableServices: {
            name: "AvailableServices",
            requestType: empty_1.Empty,
            requestStream: false,
            responseType: exports.ServicesResponse,
            responseStream: false,
            options: { _unknownFields: { 248008: [Buffer.from([1])] } },
        },
        exchangeCode: {
            name: "ExchangeCode",
            requestType: exports.ExchangeCodeRequest,
            requestStream: false,
            responseType: exports.ExchangeCodeResponse,
            responseStream: false,
            options: {},
        },
    },
};
exports.protoMetadata = {
    fileDescriptor: {
        "name": "io/restorecommerce/oauth.proto",
        "package": "io.restorecommerce.oauth",
        "dependency": [
            "io/restorecommerce/auth.proto",
            "io/restorecommerce/user.proto",
            "io/restorecommerce/status.proto",
            "io/restorecommerce/options.proto",
            "google/protobuf/empty.proto",
        ],
        "publicDependency": [],
        "weakDependency": [],
        "optionDependency": [],
        "messageType": [{
                "name": "ServicesResponse",
                "field": [{
                        "name": "services",
                        "number": 1,
                        "label": 3,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "services",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "GenerateLinksResponse",
                "field": [{
                        "name": "links",
                        "number": 1,
                        "label": 3,
                        "type": 11,
                        "typeName": ".io.restorecommerce.oauth.GenerateLinksResponse.LinksEntry",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "links",
                        "options": undefined,
                        "proto3Optional": false,
                    }],
                "extension": [],
                "nestedType": [{
                        "name": "LinksEntry",
                        "field": [{
                                "name": "key",
                                "number": 1,
                                "label": 1,
                                "type": 9,
                                "typeName": "",
                                "extendee": "",
                                "defaultValue": "",
                                "oneofIndex": 0,
                                "jsonName": "key",
                                "options": undefined,
                                "proto3Optional": false,
                            }, {
                                "name": "value",
                                "number": 2,
                                "label": 1,
                                "type": 9,
                                "typeName": "",
                                "extendee": "",
                                "defaultValue": "",
                                "oneofIndex": 0,
                                "jsonName": "value",
                                "options": undefined,
                                "proto3Optional": false,
                            }],
                        "extension": [],
                        "nestedType": [],
                        "enumType": [],
                        "extensionRange": [],
                        "oneofDecl": [],
                        "options": {
                            "messageSetWireFormat": false,
                            "noStandardDescriptorAccessor": false,
                            "deprecated": false,
                            "mapEntry": true,
                            "deprecatedLegacyJsonFieldConflicts": false,
                            "features": undefined,
                            "uninterpretedOption": [],
                        },
                        "reservedRange": [],
                        "reservedName": [],
                        "visibility": 0,
                    }],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ExchangeCodeRequest",
                "field": [{
                        "name": "service",
                        "number": 1,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "service",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "code",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "code",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "state",
                        "number": 3,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "state",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_service", "options": undefined }, { "name": "_code", "options": undefined }, {
                        "name": "_state",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "ExchangeCodeResponse",
                "field": [{
                        "name": "user",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.user.UserResponse",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "user",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "email",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "email",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "token",
                        "number": 3,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Tokens",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 2,
                        "jsonName": "token",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_user", "options": undefined }, { "name": "_email", "options": undefined }, {
                        "name": "_token",
                        "options": undefined,
                    }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "GetTokenRequest",
                "field": [{
                        "name": "subject",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.auth.Subject",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "subject",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "service",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "service",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_subject", "options": undefined }, { "name": "_service", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }, {
                "name": "GetTokenResponse",
                "field": [{
                        "name": "status",
                        "number": 1,
                        "label": 1,
                        "type": 11,
                        "typeName": ".io.restorecommerce.status.Status",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 0,
                        "jsonName": "status",
                        "options": undefined,
                        "proto3Optional": true,
                    }, {
                        "name": "token",
                        "number": 2,
                        "label": 1,
                        "type": 9,
                        "typeName": "",
                        "extendee": "",
                        "defaultValue": "",
                        "oneofIndex": 1,
                        "jsonName": "token",
                        "options": undefined,
                        "proto3Optional": true,
                    }],
                "extension": [],
                "nestedType": [],
                "enumType": [],
                "extensionRange": [],
                "oneofDecl": [{ "name": "_status", "options": undefined }, { "name": "_token", "options": undefined }],
                "options": undefined,
                "reservedRange": [],
                "reservedName": [],
                "visibility": 0,
            }],
        "enumType": [],
        "service": [{
                "name": "OAuthService",
                "method": [{
                        "name": "GenerateLinks",
                        "inputType": ".google.protobuf.Empty",
                        "outputType": ".io.restorecommerce.oauth.GenerateLinksResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "GetToken",
                        "inputType": ".io.restorecommerce.oauth.GetTokenRequest",
                        "outputType": ".io.restorecommerce.oauth.GetTokenResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "AvailableServices",
                        "inputType": ".google.protobuf.Empty",
                        "outputType": ".io.restorecommerce.oauth.ServicesResponse",
                        "options": { "deprecated": false, "idempotencyLevel": 0, "features": undefined, "uninterpretedOption": [] },
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }, {
                        "name": "ExchangeCode",
                        "inputType": ".io.restorecommerce.oauth.ExchangeCodeRequest",
                        "outputType": ".io.restorecommerce.oauth.ExchangeCodeResponse",
                        "options": undefined,
                        "clientStreaming": false,
                        "serverStreaming": false,
                    }],
                "options": undefined,
            }],
        "extension": [],
        "options": undefined,
        "sourceCodeInfo": { "location": [] },
        "syntax": "proto3",
        "edition": 0,
    },
    references: {
        ".io.restorecommerce.oauth.ServicesResponse": exports.ServicesResponse,
        ".io.restorecommerce.oauth.GenerateLinksResponse": exports.GenerateLinksResponse,
        ".io.restorecommerce.oauth.GenerateLinksResponse.LinksEntry": exports.GenerateLinksResponse_LinksEntry,
        ".io.restorecommerce.oauth.ExchangeCodeRequest": exports.ExchangeCodeRequest,
        ".io.restorecommerce.oauth.ExchangeCodeResponse": exports.ExchangeCodeResponse,
        ".io.restorecommerce.oauth.GetTokenRequest": exports.GetTokenRequest,
        ".io.restorecommerce.oauth.GetTokenResponse": exports.GetTokenResponse,
    },
    dependencies: [auth_1.protoMetadata, user_1.protoMetadata, status_1.protoMetadata, options_1.protoMetadata, empty_1.protoMetadata],
    options: {
        services: {
            "OAuthService": {
                methods: {
                    "GenerateLinks": { "is_query": true },
                    "GetToken": { "is_query": true },
                    "AvailableServices": { "is_query": true },
                },
            },
        },
    },
};
function isObject(value) {
    return typeof value === "object" && value !== null;
}
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=oauth.js.map