UNPKG

@zitadel/node

Version:

Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.

10,648 lines 379 kB
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.7.5
//   protoc               unknown
// source: zitadel/resources/user/v3alpha/user_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Struct } from "../../../../google/protobuf/struct.js";
import { Instance, Organization } from "../../../object/v3alpha/object.js";
import { Details, ListDetails, SearchQuery } from "../../object/v3alpha/object.js";
import { AuthenticatorRegistrationCode, IdentityProviderIntent, IDPAuthenticator, IDPInformation, LDAPCredentials, RedirectURLs, ReturnPasswordResetCode, ReturnWebAuthNRegistrationCode, SendPasswordResetEmail, SendPasswordResetSMS, SendWebAuthNRegistrationLink, SetPassword, SetUsername, StartWebAuthNRegistration, VerifyWebAuthNRegistration, } from "./authenticator.js";
import { ReturnEmailVerificationCode, ReturnPhoneVerificationCode, SendEmailVerificationCode, SendPhoneVerificationCode, SetEmail, SetPhone, } from "./communication.js";
import { fieldNameFromJSON, fieldNameToJSON, SearchFilter } from "./query.js";
import { CreateUser, GetUser, PatchUser } from "./user.js";
export const protobufPackage = "zitadel.resources.user.v3alpha";
function createBaseSearchUsersRequest() {
    return { instance: undefined, query: undefined, sortingColumn: 0, filters: [] };
}
export const SearchUsersRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.query !== undefined) {
            SearchQuery.encode(message.query, writer.uint32(18).fork()).join();
        }
        if (message.sortingColumn !== 0) {
            writer.uint32(24).int32(message.sortingColumn);
        }
        for (const v of message.filters) {
            SearchFilter.encode(v, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSearchUsersRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.query = SearchQuery.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.sortingColumn = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.filters.push(SearchFilter.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            query: isSet(object.query) ? SearchQuery.fromJSON(object.query) : undefined,
            sortingColumn: isSet(object.sortingColumn) ? fieldNameFromJSON(object.sortingColumn) : 0,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => SearchFilter.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.query !== undefined) {
            obj.query = SearchQuery.toJSON(message.query);
        }
        if (message.sortingColumn !== 0) {
            obj.sortingColumn = fieldNameToJSON(message.sortingColumn);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => SearchFilter.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return SearchUsersRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSearchUsersRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.query = (object.query !== undefined && object.query !== null)
            ? SearchQuery.fromPartial(object.query)
            : undefined;
        message.sortingColumn = object.sortingColumn ?? 0;
        message.filters = object.filters?.map((e) => SearchFilter.fromPartial(e)) || [];
        return message;
    },
};
function createBaseSearchUsersResponse() {
    return { details: undefined, result: [] };
}
export const SearchUsersResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            ListDetails.encode(message.details, writer.uint32(10).fork()).join();
        }
        for (const v of message.result) {
            GetUser.encode(v, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSearchUsersResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = ListDetails.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.result.push(GetUser.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
            result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => GetUser.fromJSON(e)) : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = ListDetails.toJSON(message.details);
        }
        if (message.result?.length) {
            obj.result = message.result.map((e) => GetUser.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return SearchUsersResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSearchUsersResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? ListDetails.fromPartial(object.details)
            : undefined;
        message.result = object.result?.map((e) => GetUser.fromPartial(e)) || [];
        return message;
    },
};
function createBaseGetUserRequest() {
    return { instance: undefined, id: "" };
}
export const GetUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(18).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return GetUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseGetUserResponse() {
    return { user: undefined };
}
export const GetUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.user !== undefined) {
            GetUser.encode(message.user, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.user = GetUser.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) ? GetUser.fromJSON(object.user) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.user !== undefined) {
            obj.user = GetUser.toJSON(message.user);
        }
        return obj;
    },
    create(base) {
        return GetUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetUserResponse();
        message.user = (object.user !== undefined && object.user !== null) ? GetUser.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBaseCreateUserRequest() {
    return { instance: undefined, organization: undefined, user: undefined };
}
export const CreateUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.user !== undefined) {
            CreateUser.encode(message.user, writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCreateUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.user = CreateUser.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            user: isSet(object.user) ? CreateUser.fromJSON(object.user) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.user !== undefined) {
            obj.user = CreateUser.toJSON(message.user);
        }
        return obj;
    },
    create(base) {
        return CreateUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.user = (object.user !== undefined && object.user !== null)
            ? CreateUser.fromPartial(object.user)
            : undefined;
        return message;
    },
};
function createBaseCreateUserResponse() {
    return { details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const CreateUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.emailCode !== undefined) {
            writer.uint32(18).string(message.emailCode);
        }
        if (message.phoneCode !== undefined) {
            writer.uint32(26).string(message.phoneCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCreateUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.emailCode = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.phoneCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            emailCode: isSet(object.emailCode) ? globalThis.String(object.emailCode) : undefined,
            phoneCode: isSet(object.phoneCode) ? globalThis.String(object.phoneCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.emailCode !== undefined) {
            obj.emailCode = message.emailCode;
        }
        if (message.phoneCode !== undefined) {
            obj.phoneCode = message.phoneCode;
        }
        return obj;
    },
    create(base) {
        return CreateUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.emailCode = object.emailCode ?? undefined;
        message.phoneCode = object.phoneCode ?? undefined;
        return message;
    },
};
function createBasePatchUserRequest() {
    return { instance: undefined, organization: undefined, id: "", user: undefined };
}
export const PatchUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.user !== undefined) {
            PatchUser.encode(message.user, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePatchUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.user = PatchUser.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            user: isSet(object.user) ? PatchUser.fromJSON(object.user) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.user !== undefined) {
            obj.user = PatchUser.toJSON(message.user);
        }
        return obj;
    },
    create(base) {
        return PatchUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePatchUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.user = (object.user !== undefined && object.user !== null) ? PatchUser.fromPartial(object.user) : undefined;
        return message;
    },
};
function createBasePatchUserResponse() {
    return { details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const PatchUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.emailCode !== undefined) {
            writer.uint32(18).string(message.emailCode);
        }
        if (message.phoneCode !== undefined) {
            writer.uint32(26).string(message.phoneCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePatchUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.emailCode = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.phoneCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            emailCode: isSet(object.emailCode) ? globalThis.String(object.emailCode) : undefined,
            phoneCode: isSet(object.phoneCode) ? globalThis.String(object.phoneCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.emailCode !== undefined) {
            obj.emailCode = message.emailCode;
        }
        if (message.phoneCode !== undefined) {
            obj.phoneCode = message.phoneCode;
        }
        return obj;
    },
    create(base) {
        return PatchUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePatchUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.emailCode = object.emailCode ?? undefined;
        message.phoneCode = object.phoneCode ?? undefined;
        return message;
    },
};
function createBaseDeactivateUserRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const DeactivateUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDeactivateUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return DeactivateUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseDeactivateUserResponse() {
    return { details: undefined };
}
export const DeactivateUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDeactivateUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return DeactivateUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseActivateUserRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const ActivateUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseActivateUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return ActivateUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseActivateUserResponse() {
    return { details: undefined };
}
export const ActivateUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseActivateUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return ActivateUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseLockUserRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const LockUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLockUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return LockUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLockUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseLockUserResponse() {
    return { details: undefined };
}
export const LockUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLockUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return LockUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseLockUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseUnlockUserRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const UnlockUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUnlockUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return UnlockUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUnlockUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseUnlockUserResponse() {
    return { details: undefined };
}
export const UnlockUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseUnlockUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return UnlockUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUnlockUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseDeleteUserRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const DeleteUserRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDeleteUserRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return DeleteUserRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteUserRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseDeleteUserResponse() {
    return { details: undefined };
}
export const DeleteUserResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDeleteUserResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return DeleteUserResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteUserResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseSetContactEmailRequest() {
    return { instance: undefined, organization: undefined, id: "", email: undefined };
}
export const SetContactEmailRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.email !== undefined) {
            SetEmail.encode(message.email, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetContactEmailRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.email = SetEmail.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            email: isSet(object.email) ? SetEmail.fromJSON(object.email) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.email !== undefined) {
            obj.email = SetEmail.toJSON(message.email);
        }
        return obj;
    },
    create(base) {
        return SetContactEmailRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetContactEmailRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.email = (object.email !== undefined && object.email !== null)
            ? SetEmail.fromPartial(object.email)
            : undefined;
        return message;
    },
};
function createBaseSetContactEmailResponse() {
    return { details: undefined, verificationCode: undefined };
}
export const SetContactEmailResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(26).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetContactEmailResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return SetContactEmailResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetContactEmailResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseVerifyContactEmailRequest() {
    return { instance: undefined, organization: undefined, id: "", verificationCode: "" };
}
export const VerifyContactEmailRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.verificationCode !== "") {
            writer.uint32(34).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyContactEmailRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.verificationCode !== "") {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return VerifyContactEmailRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyContactEmailRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.verificationCode = object.verificationCode ?? "";
        return message;
    },
};
function createBaseVerifyContactEmailResponse() {
    return { details: undefined };
}
export const VerifyContactEmailResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyContactEmailResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyContactEmailResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyContactEmailResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseResendContactEmailCodeRequest() {
    return { instance: undefined, organization: undefined, id: "", sendCode: undefined, returnCode: undefined };
}
export const ResendContactEmailCodeRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.sendCode !== undefined) {
            SendEmailVerificationCode.encode(message.sendCode, writer.uint32(34).fork()).join();
        }
        if (message.returnCode !== undefined) {
            ReturnEmailVerificationCode.encode(message.returnCode, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResendContactEmailCodeRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sendCode = SendEmailVerificationCode.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.returnCode = ReturnEmailVerificationCode.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            sendCode: isSet(object.sendCode) ? SendEmailVerificationCode.fromJSON(object.sendCode) : undefined,
            returnCode: isSet(object.returnCode) ? ReturnEmailVerificationCode.fromJSON(object.returnCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.sendCode !== undefined) {
            obj.sendCode = SendEmailVerificationCode.toJSON(message.sendCode);
        }
        if (message.returnCode !== undefined) {
            obj.returnCode = ReturnEmailVerificationCode.toJSON(message.returnCode);
        }
        return obj;
    },
    create(base) {
        return ResendContactEmailCodeRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResendContactEmailCodeRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
            ? SendEmailVerificationCode.fromPartial(object.sendCode)
            : undefined;
        message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
            ? ReturnEmailVerificationCode.fromPartial(object.returnCode)
            : undefined;
        return message;
    },
};
function createBaseResendContactEmailCodeResponse() {
    return { details: undefined, verificationCode: undefined };
}
export const ResendContactEmailCodeResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(18).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResendContactEmailCodeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return ResendContactEmailCodeResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResendContactEmailCodeResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseSetContactPhoneRequest() {
    return { instance: undefined, organization: undefined, id: "", phone: undefined };
}
export const SetContactPhoneRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.phone !== undefined) {
            SetPhone.encode(message.phone, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetContactPhoneRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.phone = SetPhone.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            phone: isSet(object.phone) ? SetPhone.fromJSON(object.phone) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.phone !== undefined) {
            obj.phone = SetPhone.toJSON(message.phone);
        }
        return obj;
    },
    create(base) {
        return SetContactPhoneRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetContactPhoneRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.phone = (object.phone !== undefined && object.phone !== null)
            ? SetPhone.fromPartial(object.phone)
            : undefined;
        return message;
    },
};
function createBaseSetContactPhoneResponse() {
    return { details: undefined, verificationCode: undefined };
}
export const SetContactPhoneResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(26).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetContactPhoneResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return SetContactPhoneResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetContactPhoneResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseVerifyContactPhoneRequest() {
    return { instance: undefined, organization: undefined, id: "", verificationCode: "" };
}
export const VerifyContactPhoneRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.verificationCode !== "") {
            writer.uint32(34).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyContactPhoneRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.verificationCode !== "") {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return VerifyContactPhoneRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyContactPhoneRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.verificationCode = object.verificationCode ?? "";
        return message;
    },
};
function createBaseVerifyContactPhoneResponse() {
    return { details: undefined };
}
export const VerifyContactPhoneResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyContactPhoneResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyContactPhoneResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyContactPhoneResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseResendContactPhoneCodeRequest() {
    return { instance: undefined, organization: undefined, id: "", sendCode: undefined, returnCode: undefined };
}
export const ResendContactPhoneCodeRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.sendCode !== undefined) {
            SendPhoneVerificationCode.encode(message.sendCode, writer.uint32(34).fork()).join();
        }
        if (message.returnCode !== undefined) {
            ReturnPhoneVerificationCode.encode(message.returnCode, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResendContactPhoneCodeRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sendCode = SendPhoneVerificationCode.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.returnCode = ReturnPhoneVerificationCode.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            sendCode: isSet(object.sendCode) ? SendPhoneVerificationCode.fromJSON(object.sendCode) : undefined,
            returnCode: isSet(object.returnCode) ? ReturnPhoneVerificationCode.fromJSON(object.returnCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.sendCode !== undefined) {
            obj.sendCode = SendPhoneVerificationCode.toJSON(message.sendCode);
        }
        if (message.returnCode !== undefined) {
            obj.returnCode = ReturnPhoneVerificationCode.toJSON(message.returnCode);
        }
        return obj;
    },
    create(base) {
        return ResendContactPhoneCodeRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResendContactPhoneCodeRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
            ? SendPhoneVerificationCode.fromPartial(object.sendCode)
            : undefined;
        message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
            ? ReturnPhoneVerificationCode.fromPartial(object.returnCode)
            : undefined;
        return message;
    },
};
function createBaseResendContactPhoneCodeResponse() {
    return { details: undefined, verificationCode: undefined };
}
export const ResendContactPhoneCodeResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(18).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResendContactPhoneCodeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return ResendContactPhoneCodeResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResendContactPhoneCodeResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseAddUsernameRequest() {
    return { instance: undefined, organization: undefined, id: "", username: undefined };
}
export const AddUsernameRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.username !== undefined) {
            SetUsername.encode(message.username, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddUsernameRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.username = SetUsername.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            username: isSet(object.username) ? SetUsername.fromJSON(object.username) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.username !== undefined) {
            obj.username = SetUsername.toJSON(message.username);
        }
        return obj;
    },
    create(base) {
        return AddUsernameRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddUsernameRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.username = (object.username !== undefined && object.username !== null)
            ? SetUsername.fromPartial(object.username)
            : undefined;
        return message;
    },
};
function createBaseAddUsernameResponse() {
    return { details: undefined, usernameId: "" };
}
export const AddUsernameResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.usernameId !== "") {
            writer.uint32(18).string(message.usernameId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddUsernameResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.usernameId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            usernameId: isSet(object.usernameId) ? globalThis.String(object.usernameId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.usernameId !== "") {
            obj.usernameId = message.usernameId;
        }
        return obj;
    },
    create(base) {
        return AddUsernameResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddUsernameResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.usernameId = object.usernameId ?? "";
        return message;
    },
};
function createBaseRemoveUsernameRequest() {
    return { instance: undefined, organization: undefined, id: "", usernameId: "" };
}
export const RemoveUsernameRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.usernameId !== "") {
            writer.uint32(34).string(message.usernameId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveUsernameRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.usernameId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            usernameId: isSet(object.usernameId) ? globalThis.String(object.usernameId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.usernameId !== "") {
            obj.usernameId = message.usernameId;
        }
        return obj;
    },
    create(base) {
        return RemoveUsernameRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveUsernameRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.usernameId = object.usernameId ?? "";
        return message;
    },
};
function createBaseRemoveUsernameResponse() {
    return { details: undefined };
}
export const RemoveUsernameResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveUsernameResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveUsernameResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveUsernameResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseSetPasswordRequest() {
    return { instance: undefined, organization: undefined, id: "", newPassword: undefined };
}
export const SetPasswordRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.newPassword !== undefined) {
            SetPassword.encode(message.newPassword, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetPasswordRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.newPassword = SetPassword.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            newPassword: isSet(object.newPassword) ? SetPassword.fromJSON(object.newPassword) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.newPassword !== undefined) {
            obj.newPassword = SetPassword.toJSON(message.newPassword);
        }
        return obj;
    },
    create(base) {
        return SetPasswordRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetPasswordRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.newPassword = (object.newPassword !== undefined && object.newPassword !== null)
            ? SetPassword.fromPartial(object.newPassword)
            : undefined;
        return message;
    },
};
function createBaseSetPasswordResponse() {
    return { details: undefined };
}
export const SetPasswordResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSetPasswordResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return SetPasswordResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSetPasswordResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseRequestPasswordResetRequest() {
    return {
        instance: undefined,
        organization: undefined,
        id: "",
        sendEmail: undefined,
        sendSms: undefined,
        returnCode: undefined,
    };
}
export const RequestPasswordResetRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.sendEmail !== undefined) {
            SendPasswordResetEmail.encode(message.sendEmail, writer.uint32(34).fork()).join();
        }
        if (message.sendSms !== undefined) {
            SendPasswordResetSMS.encode(message.sendSms, writer.uint32(42).fork()).join();
        }
        if (message.returnCode !== undefined) {
            ReturnPasswordResetCode.encode(message.returnCode, writer.uint32(50).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRequestPasswordResetRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sendEmail = SendPasswordResetEmail.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.sendSms = SendPasswordResetSMS.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 50) {
                        break;
                    }
                    message.returnCode = ReturnPasswordResetCode.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            sendEmail: isSet(object.sendEmail) ? SendPasswordResetEmail.fromJSON(object.sendEmail) : undefined,
            sendSms: isSet(object.sendSms) ? SendPasswordResetSMS.fromJSON(object.sendSms) : undefined,
            returnCode: isSet(object.returnCode) ? ReturnPasswordResetCode.fromJSON(object.returnCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.sendEmail !== undefined) {
            obj.sendEmail = SendPasswordResetEmail.toJSON(message.sendEmail);
        }
        if (message.sendSms !== undefined) {
            obj.sendSms = SendPasswordResetSMS.toJSON(message.sendSms);
        }
        if (message.returnCode !== undefined) {
            obj.returnCode = ReturnPasswordResetCode.toJSON(message.returnCode);
        }
        return obj;
    },
    create(base) {
        return RequestPasswordResetRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRequestPasswordResetRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.sendEmail = (object.sendEmail !== undefined && object.sendEmail !== null)
            ? SendPasswordResetEmail.fromPartial(object.sendEmail)
            : undefined;
        message.sendSms = (object.sendSms !== undefined && object.sendSms !== null)
            ? SendPasswordResetSMS.fromPartial(object.sendSms)
            : undefined;
        message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
            ? ReturnPasswordResetCode.fromPartial(object.returnCode)
            : undefined;
        return message;
    },
};
function createBaseRequestPasswordResetResponse() {
    return { details: undefined, verificationCode: undefined };
}
export const RequestPasswordResetResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(18).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRequestPasswordResetResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return RequestPasswordResetResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRequestPasswordResetResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseStartWebAuthNRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "", registration: undefined };
}
export const StartWebAuthNRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.registration !== undefined) {
            StartWebAuthNRegistration.encode(message.registration, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartWebAuthNRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.registration = StartWebAuthNRegistration.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            registration: isSet(object.registration) ? StartWebAuthNRegistration.fromJSON(object.registration) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.registration !== undefined) {
            obj.registration = StartWebAuthNRegistration.toJSON(message.registration);
        }
        return obj;
    },
    create(base) {
        return StartWebAuthNRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartWebAuthNRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.registration = (object.registration !== undefined && object.registration !== null)
            ? StartWebAuthNRegistration.fromPartial(object.registration)
            : undefined;
        return message;
    },
};
function createBaseStartWebAuthNRegistrationResponse() {
    return { details: undefined, webAuthNId: "", publicKeyCredentialCreationOptions: undefined };
}
export const StartWebAuthNRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.webAuthNId !== "") {
            writer.uint32(18).string(message.webAuthNId);
        }
        if (message.publicKeyCredentialCreationOptions !== undefined) {
            Struct.encode(Struct.wrap(message.publicKeyCredentialCreationOptions), writer.uint32(26).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartWebAuthNRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.webAuthNId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.publicKeyCredentialCreationOptions = Struct.unwrap(Struct.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            webAuthNId: isSet(object.webAuthNId) ? globalThis.String(object.webAuthNId) : "",
            publicKeyCredentialCreationOptions: isObject(object.publicKeyCredentialCreationOptions)
                ? object.publicKeyCredentialCreationOptions
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.webAuthNId !== "") {
            obj.webAuthNId = message.webAuthNId;
        }
        if (message.publicKeyCredentialCreationOptions !== undefined) {
            obj.publicKeyCredentialCreationOptions = message.publicKeyCredentialCreationOptions;
        }
        return obj;
    },
    create(base) {
        return StartWebAuthNRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartWebAuthNRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.webAuthNId = object.webAuthNId ?? "";
        message.publicKeyCredentialCreationOptions = object.publicKeyCredentialCreationOptions ?? undefined;
        return message;
    },
};
function createBaseVerifyWebAuthNRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "", webAuthNId: "", verify: undefined };
}
export const VerifyWebAuthNRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.webAuthNId !== "") {
            writer.uint32(34).string(message.webAuthNId);
        }
        if (message.verify !== undefined) {
            VerifyWebAuthNRegistration.encode(message.verify, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyWebAuthNRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.webAuthNId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.verify = VerifyWebAuthNRegistration.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            webAuthNId: isSet(object.webAuthNId) ? globalThis.String(object.webAuthNId) : "",
            verify: isSet(object.verify) ? VerifyWebAuthNRegistration.fromJSON(object.verify) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.webAuthNId !== "") {
            obj.webAuthNId = message.webAuthNId;
        }
        if (message.verify !== undefined) {
            obj.verify = VerifyWebAuthNRegistration.toJSON(message.verify);
        }
        return obj;
    },
    create(base) {
        return VerifyWebAuthNRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyWebAuthNRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.webAuthNId = object.webAuthNId ?? "";
        message.verify = (object.verify !== undefined && object.verify !== null)
            ? VerifyWebAuthNRegistration.fromPartial(object.verify)
            : undefined;
        return message;
    },
};
function createBaseVerifyWebAuthNRegistrationResponse() {
    return { details: undefined };
}
export const VerifyWebAuthNRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyWebAuthNRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyWebAuthNRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyWebAuthNRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseCreateWebAuthNRegistrationLinkRequest() {
    return { instance: undefined, organization: undefined, id: "", sendLink: undefined, returnCode: undefined };
}
export const CreateWebAuthNRegistrationLinkRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.sendLink !== undefined) {
            SendWebAuthNRegistrationLink.encode(message.sendLink, writer.uint32(34).fork()).join();
        }
        if (message.returnCode !== undefined) {
            ReturnWebAuthNRegistrationCode.encode(message.returnCode, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCreateWebAuthNRegistrationLinkRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.sendLink = SendWebAuthNRegistrationLink.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.returnCode = ReturnWebAuthNRegistrationCode.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            sendLink: isSet(object.sendLink) ? SendWebAuthNRegistrationLink.fromJSON(object.sendLink) : undefined,
            returnCode: isSet(object.returnCode) ? ReturnWebAuthNRegistrationCode.fromJSON(object.returnCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.sendLink !== undefined) {
            obj.sendLink = SendWebAuthNRegistrationLink.toJSON(message.sendLink);
        }
        if (message.returnCode !== undefined) {
            obj.returnCode = ReturnWebAuthNRegistrationCode.toJSON(message.returnCode);
        }
        return obj;
    },
    create(base) {
        return CreateWebAuthNRegistrationLinkRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateWebAuthNRegistrationLinkRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.sendLink = (object.sendLink !== undefined && object.sendLink !== null)
            ? SendWebAuthNRegistrationLink.fromPartial(object.sendLink)
            : undefined;
        message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
            ? ReturnWebAuthNRegistrationCode.fromPartial(object.returnCode)
            : undefined;
        return message;
    },
};
function createBaseCreateWebAuthNRegistrationLinkResponse() {
    return { details: undefined, code: undefined };
}
export const CreateWebAuthNRegistrationLinkResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.code !== undefined) {
            AuthenticatorRegistrationCode.encode(message.code, writer.uint32(18).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCreateWebAuthNRegistrationLinkResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.code = AuthenticatorRegistrationCode.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            code: isSet(object.code) ? AuthenticatorRegistrationCode.fromJSON(object.code) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.code !== undefined) {
            obj.code = AuthenticatorRegistrationCode.toJSON(message.code);
        }
        return obj;
    },
    create(base) {
        return CreateWebAuthNRegistrationLinkResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateWebAuthNRegistrationLinkResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.code = (object.code !== undefined && object.code !== null)
            ? AuthenticatorRegistrationCode.fromPartial(object.code)
            : undefined;
        return message;
    },
};
function createBaseRemoveWebAuthNAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", webAuthNId: "" };
}
export const RemoveWebAuthNAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.webAuthNId !== "") {
            writer.uint32(34).string(message.webAuthNId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveWebAuthNAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.webAuthNId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            webAuthNId: isSet(object.webAuthNId) ? globalThis.String(object.webAuthNId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.webAuthNId !== "") {
            obj.webAuthNId = message.webAuthNId;
        }
        return obj;
    },
    create(base) {
        return RemoveWebAuthNAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveWebAuthNAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.webAuthNId = object.webAuthNId ?? "";
        return message;
    },
};
function createBaseRemoveWebAuthNAuthenticatorResponse() {
    return { details: undefined };
}
export const RemoveWebAuthNAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveWebAuthNAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveWebAuthNAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveWebAuthNAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseStartTOTPRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "" };
}
export const StartTOTPRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartTOTPRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return StartTOTPRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartTOTPRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseStartTOTPRegistrationResponse() {
    return { details: undefined, totpId: "", uri: "", secret: "" };
}
export const StartTOTPRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.totpId !== "") {
            writer.uint32(18).string(message.totpId);
        }
        if (message.uri !== "") {
            writer.uint32(26).string(message.uri);
        }
        if (message.secret !== "") {
            writer.uint32(34).string(message.secret);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartTOTPRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.totpId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.uri = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.secret = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            totpId: isSet(object.totpId) ? globalThis.String(object.totpId) : "",
            uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
            secret: isSet(object.secret) ? globalThis.String(object.secret) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.totpId !== "") {
            obj.totpId = message.totpId;
        }
        if (message.uri !== "") {
            obj.uri = message.uri;
        }
        if (message.secret !== "") {
            obj.secret = message.secret;
        }
        return obj;
    },
    create(base) {
        return StartTOTPRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartTOTPRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.totpId = object.totpId ?? "";
        message.uri = object.uri ?? "";
        message.secret = object.secret ?? "";
        return message;
    },
};
function createBaseVerifyTOTPRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "", totpId: "", code: "" };
}
export const VerifyTOTPRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.totpId !== "") {
            writer.uint32(34).string(message.totpId);
        }
        if (message.code !== "") {
            writer.uint32(42).string(message.code);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyTOTPRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.totpId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.code = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            totpId: isSet(object.totpId) ? globalThis.String(object.totpId) : "",
            code: isSet(object.code) ? globalThis.String(object.code) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.totpId !== "") {
            obj.totpId = message.totpId;
        }
        if (message.code !== "") {
            obj.code = message.code;
        }
        return obj;
    },
    create(base) {
        return VerifyTOTPRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyTOTPRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.totpId = object.totpId ?? "";
        message.code = object.code ?? "";
        return message;
    },
};
function createBaseVerifyTOTPRegistrationResponse() {
    return { details: undefined };
}
export const VerifyTOTPRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyTOTPRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyTOTPRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyTOTPRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseRemoveTOTPAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", totpId: "" };
}
export const RemoveTOTPAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.totpId !== "") {
            writer.uint32(34).string(message.totpId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveTOTPAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.totpId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            totpId: isSet(object.totpId) ? globalThis.String(object.totpId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.totpId !== "") {
            obj.totpId = message.totpId;
        }
        return obj;
    },
    create(base) {
        return RemoveTOTPAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveTOTPAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.totpId = object.totpId ?? "";
        return message;
    },
};
function createBaseRemoveTOTPAuthenticatorResponse() {
    return { details: undefined };
}
export const RemoveTOTPAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveTOTPAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveTOTPAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveTOTPAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseAddOTPSMSAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", phone: undefined };
}
export const AddOTPSMSAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.phone !== undefined) {
            SetPhone.encode(message.phone, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddOTPSMSAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.phone = SetPhone.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            phone: isSet(object.phone) ? SetPhone.fromJSON(object.phone) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.phone !== undefined) {
            obj.phone = SetPhone.toJSON(message.phone);
        }
        return obj;
    },
    create(base) {
        return AddOTPSMSAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddOTPSMSAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.phone = (object.phone !== undefined && object.phone !== null)
            ? SetPhone.fromPartial(object.phone)
            : undefined;
        return message;
    },
};
function createBaseAddOTPSMSAuthenticatorResponse() {
    return { details: undefined, otpSmsId: "", verificationCode: undefined };
}
export const AddOTPSMSAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.otpSmsId !== "") {
            writer.uint32(18).string(message.otpSmsId);
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(26).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddOTPSMSAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.otpSmsId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            otpSmsId: isSet(object.otpSmsId) ? globalThis.String(object.otpSmsId) : "",
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.otpSmsId !== "") {
            obj.otpSmsId = message.otpSmsId;
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return AddOTPSMSAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddOTPSMSAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.otpSmsId = object.otpSmsId ?? "";
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseVerifyOTPSMSRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "", otpSmsId: "", code: "" };
}
export const VerifyOTPSMSRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.otpSmsId !== "") {
            writer.uint32(34).string(message.otpSmsId);
        }
        if (message.code !== "") {
            writer.uint32(42).string(message.code);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyOTPSMSRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.otpSmsId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.code = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            otpSmsId: isSet(object.otpSmsId) ? globalThis.String(object.otpSmsId) : "",
            code: isSet(object.code) ? globalThis.String(object.code) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.otpSmsId !== "") {
            obj.otpSmsId = message.otpSmsId;
        }
        if (message.code !== "") {
            obj.code = message.code;
        }
        return obj;
    },
    create(base) {
        return VerifyOTPSMSRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyOTPSMSRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.otpSmsId = object.otpSmsId ?? "";
        message.code = object.code ?? "";
        return message;
    },
};
function createBaseVerifyOTPSMSRegistrationResponse() {
    return { details: undefined };
}
export const VerifyOTPSMSRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyOTPSMSRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyOTPSMSRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyOTPSMSRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseRemoveOTPSMSAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", otpSmsId: "" };
}
export const RemoveOTPSMSAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.otpSmsId !== "") {
            writer.uint32(34).string(message.otpSmsId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveOTPSMSAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.otpSmsId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            otpSmsId: isSet(object.otpSmsId) ? globalThis.String(object.otpSmsId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.otpSmsId !== "") {
            obj.otpSmsId = message.otpSmsId;
        }
        return obj;
    },
    create(base) {
        return RemoveOTPSMSAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveOTPSMSAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.otpSmsId = object.otpSmsId ?? "";
        return message;
    },
};
function createBaseRemoveOTPSMSAuthenticatorResponse() {
    return { details: undefined };
}
export const RemoveOTPSMSAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveOTPSMSAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveOTPSMSAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveOTPSMSAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseAddOTPEmailAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", email: undefined };
}
export const AddOTPEmailAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.email !== undefined) {
            SetEmail.encode(message.email, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddOTPEmailAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.email = SetEmail.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            email: isSet(object.email) ? SetEmail.fromJSON(object.email) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.email !== undefined) {
            obj.email = SetEmail.toJSON(message.email);
        }
        return obj;
    },
    create(base) {
        return AddOTPEmailAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddOTPEmailAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.email = (object.email !== undefined && object.email !== null)
            ? SetEmail.fromPartial(object.email)
            : undefined;
        return message;
    },
};
function createBaseAddOTPEmailAuthenticatorResponse() {
    return { details: undefined, otpEmailId: "", verificationCode: undefined };
}
export const AddOTPEmailAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.otpEmailId !== "") {
            writer.uint32(18).string(message.otpEmailId);
        }
        if (message.verificationCode !== undefined) {
            writer.uint32(26).string(message.verificationCode);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddOTPEmailAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.otpEmailId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.verificationCode = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            otpEmailId: isSet(object.otpEmailId) ? globalThis.String(object.otpEmailId) : "",
            verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.otpEmailId !== "") {
            obj.otpEmailId = message.otpEmailId;
        }
        if (message.verificationCode !== undefined) {
            obj.verificationCode = message.verificationCode;
        }
        return obj;
    },
    create(base) {
        return AddOTPEmailAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddOTPEmailAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.otpEmailId = object.otpEmailId ?? "";
        message.verificationCode = object.verificationCode ?? undefined;
        return message;
    },
};
function createBaseVerifyOTPEmailRegistrationRequest() {
    return { instance: undefined, organization: undefined, id: "", otpEmailId: "", code: "" };
}
export const VerifyOTPEmailRegistrationRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.otpEmailId !== "") {
            writer.uint32(34).string(message.otpEmailId);
        }
        if (message.code !== "") {
            writer.uint32(42).string(message.code);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyOTPEmailRegistrationRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.otpEmailId = reader.string();
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.code = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            otpEmailId: isSet(object.otpEmailId) ? globalThis.String(object.otpEmailId) : "",
            code: isSet(object.code) ? globalThis.String(object.code) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.otpEmailId !== "") {
            obj.otpEmailId = message.otpEmailId;
        }
        if (message.code !== "") {
            obj.code = message.code;
        }
        return obj;
    },
    create(base) {
        return VerifyOTPEmailRegistrationRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyOTPEmailRegistrationRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.otpEmailId = object.otpEmailId ?? "";
        message.code = object.code ?? "";
        return message;
    },
};
function createBaseVerifyOTPEmailRegistrationResponse() {
    return { details: undefined };
}
export const VerifyOTPEmailRegistrationResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseVerifyOTPEmailRegistrationResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return VerifyOTPEmailRegistrationResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseVerifyOTPEmailRegistrationResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseRemoveOTPEmailAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", otpEmailId: "" };
}
export const RemoveOTPEmailAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.otpEmailId !== "") {
            writer.uint32(34).string(message.otpEmailId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveOTPEmailAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.otpEmailId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            otpEmailId: isSet(object.otpEmailId) ? globalThis.String(object.otpEmailId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.otpEmailId !== "") {
            obj.otpEmailId = message.otpEmailId;
        }
        return obj;
    },
    create(base) {
        return RemoveOTPEmailAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveOTPEmailAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.otpEmailId = object.otpEmailId ?? "";
        return message;
    },
};
function createBaseRemoveOTPEmailAuthenticatorResponse() {
    return { details: undefined };
}
export const RemoveOTPEmailAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveOTPEmailAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveOTPEmailAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveOTPEmailAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseStartIdentityProviderIntentRequest() {
    return { instance: undefined, organization: undefined, idpId: "", urls: undefined, ldap: undefined };
}
export const StartIdentityProviderIntentRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.idpId !== "") {
            writer.uint32(26).string(message.idpId);
        }
        if (message.urls !== undefined) {
            RedirectURLs.encode(message.urls, writer.uint32(34).fork()).join();
        }
        if (message.ldap !== undefined) {
            LDAPCredentials.encode(message.ldap, writer.uint32(42).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartIdentityProviderIntentRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.idpId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.urls = RedirectURLs.decode(reader, reader.uint32());
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.ldap = LDAPCredentials.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            idpId: isSet(object.idpId) ? globalThis.String(object.idpId) : "",
            urls: isSet(object.urls) ? RedirectURLs.fromJSON(object.urls) : undefined,
            ldap: isSet(object.ldap) ? LDAPCredentials.fromJSON(object.ldap) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.idpId !== "") {
            obj.idpId = message.idpId;
        }
        if (message.urls !== undefined) {
            obj.urls = RedirectURLs.toJSON(message.urls);
        }
        if (message.ldap !== undefined) {
            obj.ldap = LDAPCredentials.toJSON(message.ldap);
        }
        return obj;
    },
    create(base) {
        return StartIdentityProviderIntentRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartIdentityProviderIntentRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.idpId = object.idpId ?? "";
        message.urls = (object.urls !== undefined && object.urls !== null)
            ? RedirectURLs.fromPartial(object.urls)
            : undefined;
        message.ldap = (object.ldap !== undefined && object.ldap !== null)
            ? LDAPCredentials.fromPartial(object.ldap)
            : undefined;
        return message;
    },
};
function createBaseStartIdentityProviderIntentResponse() {
    return { details: undefined, authUrl: undefined, idpIntent: undefined, postForm: undefined };
}
export const StartIdentityProviderIntentResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.authUrl !== undefined) {
            writer.uint32(18).string(message.authUrl);
        }
        if (message.idpIntent !== undefined) {
            IdentityProviderIntent.encode(message.idpIntent, writer.uint32(26).fork()).join();
        }
        if (message.postForm !== undefined) {
            writer.uint32(34).bytes(message.postForm);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseStartIdentityProviderIntentResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.authUrl = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.idpIntent = IdentityProviderIntent.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.postForm = Buffer.from(reader.bytes());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            authUrl: isSet(object.authUrl) ? globalThis.String(object.authUrl) : undefined,
            idpIntent: isSet(object.idpIntent) ? IdentityProviderIntent.fromJSON(object.idpIntent) : undefined,
            postForm: isSet(object.postForm) ? Buffer.from(bytesFromBase64(object.postForm)) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.authUrl !== undefined) {
            obj.authUrl = message.authUrl;
        }
        if (message.idpIntent !== undefined) {
            obj.idpIntent = IdentityProviderIntent.toJSON(message.idpIntent);
        }
        if (message.postForm !== undefined) {
            obj.postForm = base64FromBytes(message.postForm);
        }
        return obj;
    },
    create(base) {
        return StartIdentityProviderIntentResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseStartIdentityProviderIntentResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.authUrl = object.authUrl ?? undefined;
        message.idpIntent = (object.idpIntent !== undefined && object.idpIntent !== null)
            ? IdentityProviderIntent.fromPartial(object.idpIntent)
            : undefined;
        message.postForm = object.postForm ?? undefined;
        return message;
    },
};
function createBaseGetIdentityProviderIntentRequest() {
    return { instance: undefined, organization: undefined, idpIntentId: "", idpIntentToken: "" };
}
export const GetIdentityProviderIntentRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.idpIntentId !== "") {
            writer.uint32(26).string(message.idpIntentId);
        }
        if (message.idpIntentToken !== "") {
            writer.uint32(34).string(message.idpIntentToken);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetIdentityProviderIntentRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.idpIntentId = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.idpIntentToken = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            idpIntentId: isSet(object.idpIntentId) ? globalThis.String(object.idpIntentId) : "",
            idpIntentToken: isSet(object.idpIntentToken) ? globalThis.String(object.idpIntentToken) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.idpIntentId !== "") {
            obj.idpIntentId = message.idpIntentId;
        }
        if (message.idpIntentToken !== "") {
            obj.idpIntentToken = message.idpIntentToken;
        }
        return obj;
    },
    create(base) {
        return GetIdentityProviderIntentRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetIdentityProviderIntentRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.idpIntentId = object.idpIntentId ?? "";
        message.idpIntentToken = object.idpIntentToken ?? "";
        return message;
    },
};
function createBaseGetIdentityProviderIntentResponse() {
    return { details: undefined, idpInformation: undefined, id: undefined };
}
export const GetIdentityProviderIntentResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        if (message.idpInformation !== undefined) {
            IDPInformation.encode(message.idpInformation, writer.uint32(18).fork()).join();
        }
        if (message.id !== undefined) {
            writer.uint32(26).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetIdentityProviderIntentResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.idpInformation = IDPInformation.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
            idpInformation: isSet(object.idpInformation) ? IDPInformation.fromJSON(object.idpInformation) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        if (message.idpInformation !== undefined) {
            obj.idpInformation = IDPInformation.toJSON(message.idpInformation);
        }
        if (message.id !== undefined) {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return GetIdentityProviderIntentResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetIdentityProviderIntentResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        message.idpInformation = (object.idpInformation !== undefined && object.idpInformation !== null)
            ? IDPInformation.fromPartial(object.idpInformation)
            : undefined;
        message.id = object.id ?? undefined;
        return message;
    },
};
function createBaseAddIDPAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", authenticator: undefined };
}
export const AddIDPAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.authenticator !== undefined) {
            IDPAuthenticator.encode(message.authenticator, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddIDPAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.authenticator = IDPAuthenticator.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            authenticator: isSet(object.authenticator) ? IDPAuthenticator.fromJSON(object.authenticator) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.authenticator !== undefined) {
            obj.authenticator = IDPAuthenticator.toJSON(message.authenticator);
        }
        return obj;
    },
    create(base) {
        return AddIDPAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddIDPAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.authenticator = (object.authenticator !== undefined && object.authenticator !== null)
            ? IDPAuthenticator.fromPartial(object.authenticator)
            : undefined;
        return message;
    },
};
function createBaseAddIDPAuthenticatorResponse() {
    return { details: undefined };
}
export const AddIDPAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseAddIDPAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return AddIDPAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddIDPAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
function createBaseRemoveIDPAuthenticatorRequest() {
    return { instance: undefined, organization: undefined, id: "", idpId: "" };
}
export const RemoveIDPAuthenticatorRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.instance !== undefined) {
            Instance.encode(message.instance, writer.uint32(10).fork()).join();
        }
        if (message.organization !== undefined) {
            Organization.encode(message.organization, writer.uint32(18).fork()).join();
        }
        if (message.id !== "") {
            writer.uint32(26).string(message.id);
        }
        if (message.idpId !== "") {
            writer.uint32(34).string(message.idpId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveIDPAuthenticatorRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.instance = Instance.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.organization = Organization.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.idpId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
            organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            idpId: isSet(object.idpId) ? globalThis.String(object.idpId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.instance !== undefined) {
            obj.instance = Instance.toJSON(message.instance);
        }
        if (message.organization !== undefined) {
            obj.organization = Organization.toJSON(message.organization);
        }
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.idpId !== "") {
            obj.idpId = message.idpId;
        }
        return obj;
    },
    create(base) {
        return RemoveIDPAuthenticatorRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveIDPAuthenticatorRequest();
        message.instance = (object.instance !== undefined && object.instance !== null)
            ? Instance.fromPartial(object.instance)
            : undefined;
        message.organization = (object.organization !== undefined && object.organization !== null)
            ? Organization.fromPartial(object.organization)
            : undefined;
        message.id = object.id ?? "";
        message.idpId = object.idpId ?? "";
        return message;
    },
};
function createBaseRemoveIDPAuthenticatorResponse() {
    return { details: undefined };
}
export const RemoveIDPAuthenticatorResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.details !== undefined) {
            Details.encode(message.details, writer.uint32(10).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRemoveIDPAuthenticatorResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.details = Details.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.details !== undefined) {
            obj.details = Details.toJSON(message.details);
        }
        return obj;
    },
    create(base) {
        return RemoveIDPAuthenticatorResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveIDPAuthenticatorResponse();
        message.details = (object.details !== undefined && object.details !== null)
            ? Details.fromPartial(object.details)
            : undefined;
        return message;
    },
};
export const ZITADELUsersDefinition = {
    name: "ZITADELUsers",
    fullName: "zitadel.resources.user.v3alpha.ZITADELUsers",
    methods: {
        /**
         * Search users
         *
         * Search all matching users. By default, we will return all users of your instance.
         * Make sure to include a limit and sorting for pagination.
         */
        searchUsers: {
            name: "SearchUsers",
            requestType: SearchUsersRequest,
            requestStream: false,
            responseType: SearchUsersResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            107,
                            74,
                            47,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            40,
                            10,
                            38,
                            65,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            111,
                            102,
                            32,
                            97,
                            108,
                            108,
                            32,
                            117,
                            115,
                            101,
                            114,
                            115,
                            32,
                            109,
                            97,
                            116,
                            99,
                            104,
                            105,
                            110,
                            103,
                            32,
                            116,
                            104,
                            101,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                            74,
                            56,
                            10,
                            3,
                            52,
                            48,
                            48,
                            18,
                            49,
                            10,
                            18,
                            105,
                            110,
                            118,
                            97,
                            108,
                            105,
                            100,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                            18,
                            27,
                            10,
                            25,
                            26,
                            23,
                            35,
                            47,
                            100,
                            101,
                            102,
                            105,
                            110,
                            105,
                            116,
                            105,
                            111,
                            110,
                            115,
                            47,
                            114,
                            112,
                            99,
                            83,
                            116,
                            97,
                            116,
                            117,
                            115,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            43,
                            58,
                            7,
                            102,
                            105,
                            108,
                            116,
                            101,
                            114,
                            115,
                            34,
                            32,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            95,
                            115,
                            101,
                            97,
                            114,
                            99,
                            104,
                        ]),
                    ],
                },
            },
        },
        /**
         * User by ID
         *
         * Returns the user identified by the requested ID.
         */
        getUser: {
            name: "GetUser",
            requestType: GetUserRequest,
            requestStream: false,
            responseType: GetUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            38,
                            74,
                            36,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            29,
                            10,
                            27,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            116,
                            114,
                            105,
                            101,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            31,
                            18,
                            29,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Create a user
         *
         * Create a new user with an optional data schema.
         */
        createUser: {
            name: "CreateUser",
            requestType: CreateUserRequest,
            requestStream: false,
            responseType: CreateUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            81,
                            74,
                            79,
                            10,
                            3,
                            50,
                            48,
                            49,
                            18,
                            72,
                            10,
                            25,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            100,
                            18,
                            43,
                            10,
                            41,
                            26,
                            39,
                            35,
                            47,
                            100,
                            101,
                            102,
                            105,
                            110,
                            105,
                            116,
                            105,
                            111,
                            110,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            67,
                            114,
                            101,
                            97,
                            116,
                            101,
                            85,
                            115,
                            101,
                            114,
                            82,
                            101,
                            115,
                            112,
                            111,
                            110,
                            115,
                            101,
                        ]),
                    ],
                    400010: [
                        Buffer.from([
                            36,
                            10,
                            29,
                            10,
                            13,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            101,
                            100,
                            26,
                            12,
                            111,
                            114,
                            103,
                            97,
                            110,
                            105,
                            122,
                            97,
                            116,
                            105,
                            111,
                            110,
                            18,
                            3,
                            8,
                            201,
                            1,
                        ]),
                    ],
                    578365826: [
                        Buffer.from([
                            32,
                            58,
                            4,
                            117,
                            115,
                            101,
                            114,
                            34,
                            24,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Patch a user
         *
         * Patch an existing user with data based on a user schema.
         */
        patchUser: {
            name: "PatchUser",
            requestType: PatchUserRequest,
            requestStream: false,
            responseType: PatchUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            54,
                            74,
                            52,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            45,
                            10,
                            43,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            117,
                            112,
                            100,
                            97,
                            116,
                            101,
                            100,
                            32,
                            111,
                            114,
                            32,
                            108,
                            101,
                            102,
                            116,
                            32,
                            117,
                            110,
                            99,
                            104,
                            97,
                            110,
                            103,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            37,
                            58,
                            4,
                            117,
                            115,
                            101,
                            114,
                            50,
                            29,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Deactivate a user
         *
         * Deactivate an existing user and change the state 'deactivated'.
         * The user will not be able to log in anymore.
         * Use deactivate user when the user should not be able to use the account anymore,
         * but you still need access to the user data.
         *
         * The endpoint returns an error if the user is already in the state 'deactivated'.
         */
        deactivateUser: {
            name: "DeactivateUser",
            requestType: DeactivateUserRequest,
            requestStream: false,
            responseType: DeactivateUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            40,
                            74,
                            38,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            31,
                            10,
                            29,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            43,
                            34,
                            41,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            95,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Activate a user
         *
         * Activate a previously deactivated user and change the state to 'active'.
         * The user will be able to log in again.
         *
         * The endpoint returns an error if the user is not in the state 'deactivated'.
         */
        activateUser: {
            name: "ActivateUser",
            requestType: ActivateUserRequest,
            requestStream: false,
            responseType: ActivateUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            38,
                            74,
                            36,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            29,
                            10,
                            27,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            41,
                            34,
                            39,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            95,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Lock a user
         *
         * Lock an existing user and change the state 'locked'.
         * The user will not be able to log in anymore.
         * Use lock user when the user should temporarily not be able to log in
         * because of an event that happened (wrong password, etc.)
         *
         * The endpoint returns an error if the user is already in the state 'locked'.
         */
        lockUser: {
            name: "LockUser",
            requestType: LockUserRequest,
            requestStream: false,
            responseType: LockUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            35,
                            74,
                            33,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            26,
                            10,
                            24,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            108,
                            111,
                            99,
                            107,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            37,
                            34,
                            35,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            95,
                            108,
                            111,
                            99,
                            107,
                        ]),
                    ],
                },
            },
        },
        /**
         * Unlock a user
         *
         * Unlock a previously locked user and change the state to 'active'.
         * The user will be able to log in again.
         *
         * The endpoint returns an error if the user is not in the state 'locked'.
         */
        unlockUser: {
            name: "UnlockUser",
            requestType: UnlockUserRequest,
            requestStream: false,
            responseType: UnlockUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            37,
                            74,
                            35,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            28,
                            10,
                            26,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            117,
                            110,
                            108,
                            111,
                            99,
                            107,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            39,
                            34,
                            37,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            95,
                            117,
                            110,
                            108,
                            111,
                            99,
                            107,
                        ]),
                    ],
                },
            },
        },
        /**
         * Delete a user
         *
         * Delete an existing user and change the state to 'deleted'.
         * The user will be able to log in anymore.
         */
        deleteUser: {
            name: "DeleteUser",
            requestType: DeleteUserRequest,
            requestStream: false,
            responseType: DeleteUserResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            36,
                            74,
                            34,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            27,
                            10,
                            25,
                            85,
                            115,
                            101,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            100,
                            101,
                            108,
                            101,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            31,
                            42,
                            29,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Set contact email
         *
         * Add or update the contact email address of a user.
         * If the email is not passed as verified, a verification code will be generated,
         * which can be either returned or will be sent to the user by email.
         */
        setContactEmail: {
            name: "SetContactEmail",
            requestType: SetContactEmailRequest,
            requestStream: false,
            responseType: SetContactEmailResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            33,
                            74,
                            31,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            24,
                            10,
                            22,
                            69,
                            109,
                            97,
                            105,
                            108,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            101,
                            116,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            44,
                            58,
                            5,
                            101,
                            109,
                            97,
                            105,
                            108,
                            26,
                            35,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            101,
                            109,
                            97,
                            105,
                            108,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify the contact email
         *
         * Verify the contact email with the provided code.
         */
        verifyContactEmail: {
            name: "VerifyContactEmail",
            requestType: VerifyContactEmailRequest,
            requestStream: false,
            responseType: VerifyContactEmailResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            38,
                            74,
                            36,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            29,
                            10,
                            27,
                            69,
                            109,
                            97,
                            105,
                            108,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            64,
                            58,
                            17,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            99,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            99,
                            111,
                            100,
                            101,
                            34,
                            43,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            101,
                            109,
                            97,
                            105,
                            108,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Resend the contact email code
         *
         * Resend the email with the verification code for the contact email address.
         */
        resendContactEmailCode: {
            name: "ResendContactEmailCode",
            requestType: ResendContactEmailCodeRequest,
            requestStream: false,
            responseType: ResendContactEmailCodeResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            45,
                            74,
                            43,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            36,
                            10,
                            34,
                            67,
                            111,
                            100,
                            101,
                            32,
                            114,
                            101,
                            115,
                            101,
                            110,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            113,
                            117,
                            101,
                            115,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            48,
                            58,
                            1,
                            42,
                            34,
                            43,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            101,
                            109,
                            97,
                            105,
                            108,
                            47,
                            95,
                            114,
                            101,
                            115,
                            101,
                            110,
                            100,
                        ]),
                    ],
                },
            },
        },
        /**
         * Set contact phone
         *
         * Add or update the contact phone number of a user.
         * If the phone is not passed as verified, a verification code will be generated,
         * which can be either returned or will be sent to the user by SMS.
         */
        setContactPhone: {
            name: "SetContactPhone",
            requestType: SetContactPhoneRequest,
            requestStream: false,
            responseType: SetContactPhoneResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            41,
                            74,
                            39,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            32,
                            10,
                            30,
                            67,
                            111,
                            110,
                            116,
                            97,
                            99,
                            116,
                            32,
                            112,
                            104,
                            111,
                            110,
                            101,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            101,
                            116,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            44,
                            58,
                            5,
                            112,
                            104,
                            111,
                            110,
                            101,
                            26,
                            35,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            112,
                            104,
                            111,
                            110,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify the contact phone
         *
         * Verify the contact phone with the provided code.
         */
        verifyContactPhone: {
            name: "VerifyContactPhone",
            requestType: VerifyContactPhoneRequest,
            requestStream: false,
            responseType: VerifyContactPhoneResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            46,
                            74,
                            44,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            37,
                            10,
                            35,
                            67,
                            111,
                            110,
                            116,
                            97,
                            99,
                            116,
                            32,
                            112,
                            104,
                            111,
                            110,
                            101,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            64,
                            58,
                            17,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            99,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            99,
                            111,
                            100,
                            101,
                            34,
                            43,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            112,
                            104,
                            111,
                            110,
                            101,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Resend the contact phone code
         *
         * Resend the phone with the verification code for the contact phone number.
         */
        resendContactPhoneCode: {
            name: "ResendContactPhoneCode",
            requestType: ResendContactPhoneCodeRequest,
            requestStream: false,
            responseType: ResendContactPhoneCodeResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            45,
                            74,
                            43,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            36,
                            10,
                            34,
                            67,
                            111,
                            100,
                            101,
                            32,
                            114,
                            101,
                            115,
                            101,
                            110,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            113,
                            117,
                            101,
                            115,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            48,
                            58,
                            1,
                            42,
                            34,
                            43,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            112,
                            104,
                            111,
                            110,
                            101,
                            47,
                            95,
                            114,
                            101,
                            115,
                            101,
                            110,
                            100,
                        ]),
                    ],
                },
            },
        },
        /**
         * Add a username
         *
         * Add a new unique username to a user. The username will be used to identify the user on authentication.
         */
        addUsername: {
            name: "AddUsername",
            requestType: AddUsernameRequest,
            requestStream: false,
            responseType: AddUsernameResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            38,
                            74,
                            36,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            29,
                            10,
                            27,
                            85,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            97,
                            100,
                            100,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            50,
                            58,
                            8,
                            117,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                            34,
                            38,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            117,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove a username
         *
         * Remove an existing username of a user, so it cannot be used for authentication anymore.
         */
        removeUsername: {
            name: "RemoveUsername",
            requestType: RemoveUsernameRequest,
            requestStream: false,
            responseType: RemoveUsernameResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            40,
                            74,
                            38,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            31,
                            10,
                            29,
                            85,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            54,
                            42,
                            52,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            117,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                            47,
                            123,
                            117,
                            115,
                            101,
                            114,
                            110,
                            97,
                            109,
                            101,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Set a password
         *
         * Add, update or reset a user's password with either a verification code or the current password.
         */
        setPassword: {
            name: "SetPassword",
            requestType: SetPasswordRequest,
            requestStream: false,
            responseType: SetPasswordResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            36,
                            74,
                            34,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            27,
                            10,
                            25,
                            80,
                            97,
                            115,
                            115,
                            119,
                            111,
                            114,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            101,
                            116,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            54,
                            58,
                            12,
                            110,
                            101,
                            119,
                            95,
                            112,
                            97,
                            115,
                            115,
                            119,
                            111,
                            114,
                            100,
                            34,
                            38,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            112,
                            97,
                            115,
                            115,
                            119,
                            111,
                            114,
                            100,
                        ]),
                    ],
                },
            },
        },
        /**
         * Request password reset
         *
         * Request a code to be able to set a new password.
         */
        requestPasswordReset: {
            name: "RequestPasswordReset",
            requestType: RequestPasswordResetRequest,
            requestStream: false,
            responseType: RequestPasswordResetResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            48,
                            74,
                            46,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            39,
                            10,
                            37,
                            80,
                            97,
                            115,
                            115,
                            119,
                            111,
                            114,
                            100,
                            32,
                            114,
                            101,
                            115,
                            101,
                            116,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            113,
                            117,
                            101,
                            115,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            50,
                            58,
                            1,
                            42,
                            34,
                            45,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            112,
                            97,
                            115,
                            115,
                            119,
                            111,
                            114,
                            100,
                            47,
                            95,
                            114,
                            101,
                            115,
                            101,
                            116,
                        ]),
                    ],
                },
            },
        },
        /**
         * Start a WebAuthN registration
         *
         * Start the registration of a new WebAuthN device (e.g. Passkeys) for a user.
         * As a response the public key credential creation options are returned,
         * which are used to verify the device.
         */
        startWebAuthNRegistration: {
            name: "StartWebAuthNRegistration",
            requestType: StartWebAuthNRegistrationRequest,
            requestStream: false,
            responseType: StartWebAuthNRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            53,
                            74,
                            51,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            44,
                            10,
                            42,
                            87,
                            101,
                            98,
                            65,
                            117,
                            116,
                            104,
                            78,
                            32,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            116,
                            97,
                            114,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            54,
                            58,
                            12,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            34,
                            38,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            119,
                            101,
                            98,
                            97,
                            117,
                            116,
                            104,
                            110,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify a WebAuthN registration
         *
         * Verify the WebAuthN registration started by StartWebAuthNRegistration with the public key credential.
         */
        verifyWebAuthNRegistration: {
            name: "VerifyWebAuthNRegistration",
            requestType: VerifyWebAuthNRegistrationRequest,
            requestStream: false,
            responseType: VerifyWebAuthNRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            54,
                            74,
                            52,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            45,
                            10,
                            43,
                            87,
                            101,
                            98,
                            65,
                            117,
                            116,
                            104,
                            78,
                            32,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            72,
                            58,
                            6,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                            34,
                            62,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            119,
                            101,
                            98,
                            97,
                            117,
                            116,
                            104,
                            110,
                            47,
                            123,
                            119,
                            101,
                            98,
                            95,
                            97,
                            117,
                            116,
                            104,
                            95,
                            110,
                            95,
                            105,
                            100,
                            125,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Create a WebAuthN registration link
         *
         * Create a link, which includes a code, that can either be returned or directly sent to the user.
         * The code will allow the user to start a new WebAuthN registration.
         */
        createWebAuthNRegistrationLink: {
            name: "CreateWebAuthNRegistrationLink",
            requestType: CreateWebAuthNRegistrationLinkRequest,
            requestStream: false,
            responseType: CreateWebAuthNRegistrationLinkResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            53,
                            74,
                            51,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            44,
                            10,
                            42,
                            87,
                            101,
                            98,
                            65,
                            117,
                            116,
                            104,
                            78,
                            32,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            61,
                            58,
                            1,
                            42,
                            34,
                            56,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            119,
                            101,
                            98,
                            97,
                            117,
                            116,
                            104,
                            110,
                            47,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            108,
                            105,
                            110,
                            107,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove a WebAuthN authenticator
         *
         * Remove an existing WebAuthN authenticator from a user, so it cannot be used for authentication anymore.
         */
        removeWebAuthNAuthenticator: {
            name: "RemoveWebAuthNAuthenticator",
            requestType: RemoveWebAuthNAuthenticatorRequest,
            requestStream: false,
            responseType: RemoveWebAuthNAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            54,
                            74,
                            52,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            45,
                            10,
                            43,
                            87,
                            101,
                            98,
                            65,
                            117,
                            116,
                            104,
                            78,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            56,
                            42,
                            54,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            119,
                            101,
                            98,
                            97,
                            117,
                            116,
                            104,
                            110,
                            47,
                            123,
                            119,
                            101,
                            98,
                            95,
                            97,
                            117,
                            116,
                            104,
                            95,
                            110,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Start a TOTP registration
         *
         * Start the registration of a new time-based one-time password (TOTP) generator for a user.
         * As a response a secret is returned, which is used to initialize a TOTP app or device.
         */
        startTOTPRegistration: {
            name: "StartTOTPRegistration",
            requestType: StartTOTPRegistrationRequest,
            requestStream: false,
            responseType: StartTOTPRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            49,
                            74,
                            47,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            40,
                            10,
                            38,
                            84,
                            79,
                            84,
                            80,
                            32,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            116,
                            97,
                            114,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            36,
                            34,
                            34,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            116,
                            111,
                            116,
                            112,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify a TOTP registration
         *
         * Verify the time-based one-time password (TOTP) registration with the generated code.
         */
        verifyTOTPRegistration: {
            name: "VerifyTOTPRegistration",
            requestType: VerifyTOTPRegistrationRequest,
            requestStream: false,
            responseType: VerifyTOTPRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            50,
                            74,
                            48,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            41,
                            10,
                            39,
                            84,
                            79,
                            84,
                            80,
                            32,
                            114,
                            101,
                            103,
                            105,
                            115,
                            116,
                            114,
                            97,
                            116,
                            105,
                            111,
                            110,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            60,
                            58,
                            4,
                            99,
                            111,
                            100,
                            101,
                            34,
                            52,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            116,
                            111,
                            116,
                            112,
                            47,
                            123,
                            116,
                            111,
                            116,
                            112,
                            95,
                            105,
                            100,
                            125,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove a TOTP authenticator
         *
         * Remove an existing time-based one-time password (TOTP) authenticator from a user, so it cannot be used for authentication anymore.
         */
        removeTOTPAuthenticator: {
            name: "RemoveTOTPAuthenticator",
            requestType: RemoveTOTPAuthenticatorRequest,
            requestStream: false,
            responseType: RemoveTOTPAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            50,
                            74,
                            48,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            41,
                            10,
                            39,
                            84,
                            79,
                            84,
                            80,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            46,
                            42,
                            44,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            116,
                            111,
                            116,
                            112,
                            47,
                            123,
                            116,
                            111,
                            116,
                            112,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Add a OTP SMS authenticator
         *
         * Add a new one-time password (OTP) SMS authenticator to a user.
         * If the phone is not passed as verified, a verification code will be generated,
         * which can be either returned or will be sent to the user by SMS.
         */
        addOTPSMSAuthenticator: {
            name: "AddOTPSMSAuthenticator",
            requestType: AddOTPSMSAuthenticatorRequest,
            requestStream: false,
            responseType: AddOTPSMSAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            51,
                            74,
                            49,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            42,
                            10,
                            40,
                            79,
                            84,
                            80,
                            32,
                            83,
                            77,
                            83,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            97,
                            100,
                            100,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            46,
                            58,
                            5,
                            112,
                            104,
                            111,
                            110,
                            101,
                            34,
                            37,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            115,
                            109,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify OTP SMS registration
         *
         * Verify the OTP SMS registration with the provided code.
         */
        verifyOTPSMSRegistration: {
            name: "VerifyOTPSMSRegistration",
            requestType: VerifyOTPSMSRegistrationRequest,
            requestStream: false,
            responseType: VerifyOTPSMSRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            54,
                            74,
                            52,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            45,
                            10,
                            43,
                            79,
                            84,
                            80,
                            32,
                            83,
                            77,
                            83,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            66,
                            58,
                            4,
                            99,
                            111,
                            100,
                            101,
                            34,
                            58,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            115,
                            109,
                            115,
                            47,
                            123,
                            111,
                            116,
                            112,
                            95,
                            115,
                            109,
                            115,
                            95,
                            105,
                            100,
                            125,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove a OTP SMS authenticator
         *
         * Remove an existing one-time password (OTP) SMS authenticator from a user, so it cannot be used for authentication anymore.
         */
        removeOTPSMSAuthenticator: {
            name: "RemoveOTPSMSAuthenticator",
            requestType: RemoveOTPSMSAuthenticatorRequest,
            requestStream: false,
            responseType: RemoveOTPSMSAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            53,
                            74,
                            51,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            44,
                            10,
                            42,
                            79,
                            84,
                            80,
                            32,
                            83,
                            77,
                            83,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            52,
                            42,
                            50,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            115,
                            109,
                            115,
                            47,
                            123,
                            111,
                            116,
                            112,
                            95,
                            115,
                            109,
                            115,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Add a OTP Email authenticator
         *
         * Add a new one-time password (OTP) Email authenticator to a user.
         * If the email is not passed as verified, a verification code will be generated,
         * which can be either returned or will be sent to the user by email.
         */
        addOTPEmailAuthenticator: {
            name: "AddOTPEmailAuthenticator",
            requestType: AddOTPEmailAuthenticatorRequest,
            requestStream: false,
            responseType: AddOTPEmailAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            53,
                            74,
                            51,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            44,
                            10,
                            42,
                            79,
                            84,
                            80,
                            32,
                            69,
                            109,
                            97,
                            105,
                            108,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            97,
                            100,
                            100,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            48,
                            58,
                            5,
                            101,
                            109,
                            97,
                            105,
                            108,
                            34,
                            39,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            101,
                            109,
                            97,
                            105,
                            108,
                        ]),
                    ],
                },
            },
        },
        /**
         * Verify OTP Email registration
         *
         * Verify the OTP Email registration with the provided code.
         */
        verifyOTPEmailRegistration: {
            name: "VerifyOTPEmailRegistration",
            requestType: VerifyOTPEmailRegistrationRequest,
            requestStream: false,
            responseType: VerifyOTPEmailRegistrationResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            56,
                            74,
                            54,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            47,
                            10,
                            45,
                            79,
                            84,
                            80,
                            32,
                            69,
                            109,
                            97,
                            105,
                            108,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            118,
                            101,
                            114,
                            105,
                            102,
                            105,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            70,
                            58,
                            4,
                            99,
                            111,
                            100,
                            101,
                            34,
                            62,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            101,
                            109,
                            97,
                            105,
                            108,
                            47,
                            123,
                            111,
                            116,
                            112,
                            95,
                            101,
                            109,
                            97,
                            105,
                            108,
                            95,
                            105,
                            100,
                            125,
                            47,
                            95,
                            118,
                            101,
                            114,
                            105,
                            102,
                            121,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove a OTP Email authenticator
         *
         * Remove an existing one-time password (OTP) Email authenticator from a user, so it cannot be used for authentication anymore.
         */
        removeOTPEmailAuthenticator: {
            name: "RemoveOTPEmailAuthenticator",
            requestType: RemoveOTPEmailAuthenticatorRequest,
            requestStream: false,
            responseType: RemoveOTPEmailAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            55,
                            74,
                            53,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            46,
                            10,
                            44,
                            79,
                            84,
                            80,
                            32,
                            69,
                            109,
                            97,
                            105,
                            108,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            56,
                            42,
                            54,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            111,
                            116,
                            112,
                            95,
                            101,
                            109,
                            97,
                            105,
                            108,
                            47,
                            123,
                            111,
                            116,
                            112,
                            95,
                            101,
                            109,
                            97,
                            105,
                            108,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Start an IDP authentication intent
         *
         * Start a new authentication intent on configured identity provider (IDP) for external login, registration or linking.
         */
        startIdentityProviderIntent: {
            name: "StartIdentityProviderIntent",
            requestType: StartIdentityProviderIntentRequest,
            requestStream: false,
            responseType: StartIdentityProviderIntentResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            42,
                            74,
                            40,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            33,
                            10,
                            31,
                            73,
                            68,
                            80,
                            32,
                            105,
                            110,
                            116,
                            101,
                            110,
                            116,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            115,
                            116,
                            97,
                            114,
                            116,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            35,
                            58,
                            1,
                            42,
                            34,
                            30,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            105,
                            100,
                            112,
                            95,
                            105,
                            110,
                            116,
                            101,
                            110,
                            116,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Get the information of the IDP authentication intent
         *
         * Get the information returned by the identity provider (IDP) for registration or updating an existing user with new information.
         */
        getIdentityProviderIntent: {
            name: "GetIdentityProviderIntent",
            requestType: GetIdentityProviderIntentRequest,
            requestStream: false,
            responseType: GetIdentityProviderIntentResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            44,
                            74,
                            42,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            35,
                            10,
                            33,
                            73,
                            68,
                            80,
                            32,
                            105,
                            110,
                            116,
                            101,
                            110,
                            116,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            116,
                            114,
                            105,
                            101,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            48,
                            18,
                            46,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            105,
                            100,
                            112,
                            95,
                            105,
                            110,
                            116,
                            101,
                            110,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            112,
                            95,
                            105,
                            110,
                            116,
                            101,
                            110,
                            116,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Add an IDP authenticator to a user
         *
         * Add a new identity provider (IDP) authenticator to an existing user.
         * This will allow the user to authenticate with the provided IDP.
         */
        addIDPAuthenticator: {
            name: "AddIDPAuthenticator",
            requestType: AddIDPAuthenticatorRequest,
            requestStream: false,
            responseType: AddIDPAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            47,
                            74,
                            45,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            38,
                            10,
                            36,
                            73,
                            68,
                            80,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            97,
                            100,
                            100,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            51,
                            58,
                            13,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            34,
                            34,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            105,
                            100,
                            112,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove an IDP authenticator
         *
         * Remove an existing identity provider (IDP) authenticator from a user, so it cannot be used for authentication anymore.
         */
        removeIDPAuthenticator: {
            name: "RemoveIDPAuthenticator",
            requestType: RemoveIDPAuthenticatorRequest,
            requestStream: false,
            responseType: RemoveIDPAuthenticatorResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            49,
                            74,
                            47,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            40,
                            10,
                            38,
                            73,
                            68,
                            80,
                            32,
                            97,
                            117,
                            116,
                            104,
                            101,
                            110,
                            116,
                            105,
                            99,
                            97,
                            116,
                            111,
                            114,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            45,
                            42,
                            43,
                            47,
                            114,
                            101,
                            115,
                            111,
                            117,
                            114,
                            99,
                            101,
                            115,
                            47,
                            118,
                            51,
                            97,
                            108,
                            112,
                            104,
                            97,
                            47,
                            117,
                            115,
                            101,
                            114,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            105,
                            100,
                            112,
                            115,
                            47,
                            123,
                            105,
                            100,
                            112,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
    },
};
function bytesFromBase64(b64) {
    return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
}
function base64FromBytes(arr) {
    return globalThis.Buffer.from(arr).toString("base64");
}
function isObject(value) {
    return typeof value === "object" && value !== null;
}
function isSet(value) {
    return value !== null && value !== undefined;
}