UNPKG

@zitadel/node

Version:

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

5,125 lines 175 kB
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.7.5
//   protoc               unknown
// source: zitadel/project/v2beta/project_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import Long from "long";
import { Timestamp } from "../../../google/protobuf/timestamp.js";
import { PaginationRequest, PaginationResponse } from "../../filter/v2beta/filter.js";
import { privateLabelingSettingFromJSON, privateLabelingSettingToJSON, Project, projectFieldNameFromJSON, projectFieldNameToJSON, ProjectGrant, projectGrantFieldNameFromJSON, projectGrantFieldNameToJSON, ProjectGrantSearchFilter, ProjectRole, projectRoleFieldNameFromJSON, projectRoleFieldNameToJSON, ProjectRoleSearchFilter, ProjectSearchFilter, } from "./query.js";
export const protobufPackage = "zitadel.project.v2beta";
function createBaseCreateProjectRequest() {
    return {
        organizationId: "",
        id: undefined,
        name: "",
        projectRoleAssertion: false,
        authorizationRequired: false,
        projectAccessRequired: false,
        privateLabelingSetting: 0,
    };
}
export const CreateProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.organizationId !== "") {
            writer.uint32(10).string(message.organizationId);
        }
        if (message.id !== undefined) {
            writer.uint32(18).string(message.id);
        }
        if (message.name !== "") {
            writer.uint32(26).string(message.name);
        }
        if (message.projectRoleAssertion !== false) {
            writer.uint32(32).bool(message.projectRoleAssertion);
        }
        if (message.authorizationRequired !== false) {
            writer.uint32(40).bool(message.authorizationRequired);
        }
        if (message.projectAccessRequired !== false) {
            writer.uint32(48).bool(message.projectAccessRequired);
        }
        if (message.privateLabelingSetting !== 0) {
            writer.uint32(56).int32(message.privateLabelingSetting);
        }
        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 = createBaseCreateProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.organizationId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.projectRoleAssertion = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.authorizationRequired = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.projectAccessRequired = reader.bool();
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.privateLabelingSetting = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            organizationId: isSet(object.organizationId) ? globalThis.String(object.organizationId) : "",
            id: isSet(object.id) ? globalThis.String(object.id) : undefined,
            name: isSet(object.name) ? globalThis.String(object.name) : "",
            projectRoleAssertion: isSet(object.projectRoleAssertion)
                ? globalThis.Boolean(object.projectRoleAssertion)
                : false,
            authorizationRequired: isSet(object.authorizationRequired)
                ? globalThis.Boolean(object.authorizationRequired)
                : false,
            projectAccessRequired: isSet(object.projectAccessRequired)
                ? globalThis.Boolean(object.projectAccessRequired)
                : false,
            privateLabelingSetting: isSet(object.privateLabelingSetting)
                ? privateLabelingSettingFromJSON(object.privateLabelingSetting)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.organizationId !== "") {
            obj.organizationId = message.organizationId;
        }
        if (message.id !== undefined) {
            obj.id = message.id;
        }
        if (message.name !== "") {
            obj.name = message.name;
        }
        if (message.projectRoleAssertion !== false) {
            obj.projectRoleAssertion = message.projectRoleAssertion;
        }
        if (message.authorizationRequired !== false) {
            obj.authorizationRequired = message.authorizationRequired;
        }
        if (message.projectAccessRequired !== false) {
            obj.projectAccessRequired = message.projectAccessRequired;
        }
        if (message.privateLabelingSetting !== 0) {
            obj.privateLabelingSetting = privateLabelingSettingToJSON(message.privateLabelingSetting);
        }
        return obj;
    },
    create(base) {
        return CreateProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateProjectRequest();
        message.organizationId = object.organizationId ?? "";
        message.id = object.id ?? undefined;
        message.name = object.name ?? "";
        message.projectRoleAssertion = object.projectRoleAssertion ?? false;
        message.authorizationRequired = object.authorizationRequired ?? false;
        message.projectAccessRequired = object.projectAccessRequired ?? false;
        message.privateLabelingSetting = object.privateLabelingSetting ?? 0;
        return message;
    },
};
function createBaseCreateProjectResponse() {
    return { id: "", creationDate: undefined };
}
export const CreateProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).string(message.id);
        }
        if (message.creationDate !== undefined) {
            Timestamp.encode(toTimestamp(message.creationDate), 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 = createBaseCreateProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.creationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.creationDate !== undefined) {
            obj.creationDate = message.creationDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return CreateProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateProjectResponse();
        message.id = object.id ?? "";
        message.creationDate = object.creationDate ?? undefined;
        return message;
    },
};
function createBaseUpdateProjectRequest() {
    return {
        id: "",
        name: undefined,
        projectRoleAssertion: undefined,
        projectRoleCheck: undefined,
        hasProjectCheck: undefined,
        privateLabelingSetting: undefined,
    };
}
export const UpdateProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).string(message.id);
        }
        if (message.name !== undefined) {
            writer.uint32(18).string(message.name);
        }
        if (message.projectRoleAssertion !== undefined) {
            writer.uint32(24).bool(message.projectRoleAssertion);
        }
        if (message.projectRoleCheck !== undefined) {
            writer.uint32(32).bool(message.projectRoleCheck);
        }
        if (message.hasProjectCheck !== undefined) {
            writer.uint32(40).bool(message.hasProjectCheck);
        }
        if (message.privateLabelingSetting !== undefined) {
            writer.uint32(48).int32(message.privateLabelingSetting);
        }
        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 = createBaseUpdateProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.name = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.projectRoleAssertion = reader.bool();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.projectRoleCheck = reader.bool();
                    continue;
                }
                case 5: {
                    if (tag !== 40) {
                        break;
                    }
                    message.hasProjectCheck = reader.bool();
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.privateLabelingSetting = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            id: isSet(object.id) ? globalThis.String(object.id) : "",
            name: isSet(object.name) ? globalThis.String(object.name) : undefined,
            projectRoleAssertion: isSet(object.projectRoleAssertion)
                ? globalThis.Boolean(object.projectRoleAssertion)
                : undefined,
            projectRoleCheck: isSet(object.projectRoleCheck) ? globalThis.Boolean(object.projectRoleCheck) : undefined,
            hasProjectCheck: isSet(object.hasProjectCheck) ? globalThis.Boolean(object.hasProjectCheck) : undefined,
            privateLabelingSetting: isSet(object.privateLabelingSetting)
                ? privateLabelingSettingFromJSON(object.privateLabelingSetting)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        if (message.name !== undefined) {
            obj.name = message.name;
        }
        if (message.projectRoleAssertion !== undefined) {
            obj.projectRoleAssertion = message.projectRoleAssertion;
        }
        if (message.projectRoleCheck !== undefined) {
            obj.projectRoleCheck = message.projectRoleCheck;
        }
        if (message.hasProjectCheck !== undefined) {
            obj.hasProjectCheck = message.hasProjectCheck;
        }
        if (message.privateLabelingSetting !== undefined) {
            obj.privateLabelingSetting = privateLabelingSettingToJSON(message.privateLabelingSetting);
        }
        return obj;
    },
    create(base) {
        return UpdateProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectRequest();
        message.id = object.id ?? "";
        message.name = object.name ?? undefined;
        message.projectRoleAssertion = object.projectRoleAssertion ?? undefined;
        message.projectRoleCheck = object.projectRoleCheck ?? undefined;
        message.hasProjectCheck = object.hasProjectCheck ?? undefined;
        message.privateLabelingSetting = object.privateLabelingSetting ?? undefined;
        return message;
    },
};
function createBaseUpdateProjectResponse() {
    return { changeDate: undefined };
}
export const UpdateProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseUpdateProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return UpdateProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseDeleteProjectRequest() {
    return { id: "" };
}
export const DeleteProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).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 = createBaseDeleteProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return DeleteProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteProjectRequest();
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseDeleteProjectResponse() {
    return { deletionDate: undefined };
}
export const DeleteProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.deletionDate !== undefined) {
            Timestamp.encode(toTimestamp(message.deletionDate), 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 = createBaseDeleteProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.deletionDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { deletionDate: isSet(object.deletionDate) ? fromJsonTimestamp(object.deletionDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.deletionDate !== undefined) {
            obj.deletionDate = message.deletionDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return DeleteProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteProjectResponse();
        message.deletionDate = object.deletionDate ?? undefined;
        return message;
    },
};
function createBaseGetProjectRequest() {
    return { id: "" };
}
export const GetProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).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 = createBaseGetProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return GetProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetProjectRequest();
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseGetProjectResponse() {
    return { project: undefined };
}
export const GetProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.project !== undefined) {
            Project.encode(message.project, 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 = createBaseGetProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.project = Project.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { project: isSet(object.project) ? Project.fromJSON(object.project) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.project !== undefined) {
            obj.project = Project.toJSON(message.project);
        }
        return obj;
    },
    create(base) {
        return GetProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetProjectResponse();
        message.project = (object.project !== undefined && object.project !== null)
            ? Project.fromPartial(object.project)
            : undefined;
        return message;
    },
};
function createBaseListProjectsRequest() {
    return { pagination: undefined, sortingColumn: undefined, filters: [] };
}
export const ListProjectsRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.pagination !== undefined) {
            PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
        }
        if (message.sortingColumn !== undefined) {
            writer.uint32(16).int32(message.sortingColumn);
        }
        for (const v of message.filters) {
            ProjectSearchFilter.encode(v, 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 = createBaseListProjectsRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pagination = PaginationRequest.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sortingColumn = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.filters.push(ProjectSearchFilter.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
            sortingColumn: isSet(object.sortingColumn) ? projectFieldNameFromJSON(object.sortingColumn) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => ProjectSearchFilter.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.pagination !== undefined) {
            obj.pagination = PaginationRequest.toJSON(message.pagination);
        }
        if (message.sortingColumn !== undefined) {
            obj.sortingColumn = projectFieldNameToJSON(message.sortingColumn);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => ProjectSearchFilter.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectsRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectsRequest();
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationRequest.fromPartial(object.pagination)
            : undefined;
        message.sortingColumn = object.sortingColumn ?? undefined;
        message.filters = object.filters?.map((e) => ProjectSearchFilter.fromPartial(e)) || [];
        return message;
    },
};
function createBaseListProjectsResponse() {
    return { pagination: undefined, projects: [] };
}
export const ListProjectsResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.pagination !== undefined) {
            PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
        }
        for (const v of message.projects) {
            Project.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 = createBaseListProjectsResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pagination = PaginationResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.projects.push(Project.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
            projects: globalThis.Array.isArray(object?.projects) ? object.projects.map((e) => Project.fromJSON(e)) : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.pagination !== undefined) {
            obj.pagination = PaginationResponse.toJSON(message.pagination);
        }
        if (message.projects?.length) {
            obj.projects = message.projects.map((e) => Project.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectsResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectsResponse();
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationResponse.fromPartial(object.pagination)
            : undefined;
        message.projects = object.projects?.map((e) => Project.fromPartial(e)) || [];
        return message;
    },
};
function createBaseDeactivateProjectRequest() {
    return { id: "" };
}
export const DeactivateProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).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 = createBaseDeactivateProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return DeactivateProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateProjectRequest();
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseDeactivateProjectResponse() {
    return { changeDate: undefined };
}
export const DeactivateProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseDeactivateProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return DeactivateProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateProjectResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseActivateProjectRequest() {
    return { id: "" };
}
export const ActivateProjectRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.id !== "") {
            writer.uint32(10).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 = createBaseActivateProjectRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.id = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
    },
    toJSON(message) {
        const obj = {};
        if (message.id !== "") {
            obj.id = message.id;
        }
        return obj;
    },
    create(base) {
        return ActivateProjectRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateProjectRequest();
        message.id = object.id ?? "";
        return message;
    },
};
function createBaseActivateProjectResponse() {
    return { changeDate: undefined };
}
export const ActivateProjectResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseActivateProjectResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return ActivateProjectResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateProjectResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseAddProjectRoleRequest() {
    return { projectId: "", roleKey: "", displayName: "", group: undefined };
}
export const AddProjectRoleRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.roleKey !== "") {
            writer.uint32(18).string(message.roleKey);
        }
        if (message.displayName !== "") {
            writer.uint32(26).string(message.displayName);
        }
        if (message.group !== undefined) {
            writer.uint32(34).string(message.group);
        }
        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 = createBaseAddProjectRoleRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.roleKey = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.displayName = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.group = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            roleKey: isSet(object.roleKey) ? globalThis.String(object.roleKey) : "",
            displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "",
            group: isSet(object.group) ? globalThis.String(object.group) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.roleKey !== "") {
            obj.roleKey = message.roleKey;
        }
        if (message.displayName !== "") {
            obj.displayName = message.displayName;
        }
        if (message.group !== undefined) {
            obj.group = message.group;
        }
        return obj;
    },
    create(base) {
        return AddProjectRoleRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddProjectRoleRequest();
        message.projectId = object.projectId ?? "";
        message.roleKey = object.roleKey ?? "";
        message.displayName = object.displayName ?? "";
        message.group = object.group ?? undefined;
        return message;
    },
};
function createBaseAddProjectRoleResponse() {
    return { creationDate: undefined };
}
export const AddProjectRoleResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.creationDate !== undefined) {
            Timestamp.encode(toTimestamp(message.creationDate), 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 = createBaseAddProjectRoleResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.creationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.creationDate !== undefined) {
            obj.creationDate = message.creationDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return AddProjectRoleResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseAddProjectRoleResponse();
        message.creationDate = object.creationDate ?? undefined;
        return message;
    },
};
function createBaseUpdateProjectRoleRequest() {
    return { projectId: "", roleKey: "", displayName: undefined, group: undefined };
}
export const UpdateProjectRoleRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.roleKey !== "") {
            writer.uint32(18).string(message.roleKey);
        }
        if (message.displayName !== undefined) {
            writer.uint32(26).string(message.displayName);
        }
        if (message.group !== undefined) {
            writer.uint32(34).string(message.group);
        }
        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 = createBaseUpdateProjectRoleRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.roleKey = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.displayName = reader.string();
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.group = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            roleKey: isSet(object.roleKey) ? globalThis.String(object.roleKey) : "",
            displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : undefined,
            group: isSet(object.group) ? globalThis.String(object.group) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.roleKey !== "") {
            obj.roleKey = message.roleKey;
        }
        if (message.displayName !== undefined) {
            obj.displayName = message.displayName;
        }
        if (message.group !== undefined) {
            obj.group = message.group;
        }
        return obj;
    },
    create(base) {
        return UpdateProjectRoleRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectRoleRequest();
        message.projectId = object.projectId ?? "";
        message.roleKey = object.roleKey ?? "";
        message.displayName = object.displayName ?? undefined;
        message.group = object.group ?? undefined;
        return message;
    },
};
function createBaseUpdateProjectRoleResponse() {
    return { changeDate: undefined };
}
export const UpdateProjectRoleResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseUpdateProjectRoleResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return UpdateProjectRoleResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectRoleResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseRemoveProjectRoleRequest() {
    return { projectId: "", roleKey: "" };
}
export const RemoveProjectRoleRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.roleKey !== "") {
            writer.uint32(18).string(message.roleKey);
        }
        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 = createBaseRemoveProjectRoleRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.roleKey = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            roleKey: isSet(object.roleKey) ? globalThis.String(object.roleKey) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.roleKey !== "") {
            obj.roleKey = message.roleKey;
        }
        return obj;
    },
    create(base) {
        return RemoveProjectRoleRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveProjectRoleRequest();
        message.projectId = object.projectId ?? "";
        message.roleKey = object.roleKey ?? "";
        return message;
    },
};
function createBaseRemoveProjectRoleResponse() {
    return { removalDate: undefined };
}
export const RemoveProjectRoleResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.removalDate !== undefined) {
            Timestamp.encode(toTimestamp(message.removalDate), 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 = createBaseRemoveProjectRoleResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.removalDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { removalDate: isSet(object.removalDate) ? fromJsonTimestamp(object.removalDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.removalDate !== undefined) {
            obj.removalDate = message.removalDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return RemoveProjectRoleResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRemoveProjectRoleResponse();
        message.removalDate = object.removalDate ?? undefined;
        return message;
    },
};
function createBaseListProjectRolesRequest() {
    return { projectId: "", pagination: undefined, sortingColumn: undefined, filters: [] };
}
export const ListProjectRolesRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.pagination !== undefined) {
            PaginationRequest.encode(message.pagination, writer.uint32(18).fork()).join();
        }
        if (message.sortingColumn !== undefined) {
            writer.uint32(24).int32(message.sortingColumn);
        }
        for (const v of message.filters) {
            ProjectRoleSearchFilter.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 = createBaseListProjectRolesRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.pagination = PaginationRequest.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(ProjectRoleSearchFilter.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
            sortingColumn: isSet(object.sortingColumn) ? projectRoleFieldNameFromJSON(object.sortingColumn) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => ProjectRoleSearchFilter.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.pagination !== undefined) {
            obj.pagination = PaginationRequest.toJSON(message.pagination);
        }
        if (message.sortingColumn !== undefined) {
            obj.sortingColumn = projectRoleFieldNameToJSON(message.sortingColumn);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => ProjectRoleSearchFilter.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectRolesRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectRolesRequest();
        message.projectId = object.projectId ?? "";
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationRequest.fromPartial(object.pagination)
            : undefined;
        message.sortingColumn = object.sortingColumn ?? undefined;
        message.filters = object.filters?.map((e) => ProjectRoleSearchFilter.fromPartial(e)) || [];
        return message;
    },
};
function createBaseListProjectRolesResponse() {
    return { pagination: undefined, projectRoles: [] };
}
export const ListProjectRolesResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.pagination !== undefined) {
            PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
        }
        for (const v of message.projectRoles) {
            ProjectRole.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 = createBaseListProjectRolesResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pagination = PaginationResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.projectRoles.push(ProjectRole.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
            projectRoles: globalThis.Array.isArray(object?.projectRoles)
                ? object.projectRoles.map((e) => ProjectRole.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.pagination !== undefined) {
            obj.pagination = PaginationResponse.toJSON(message.pagination);
        }
        if (message.projectRoles?.length) {
            obj.projectRoles = message.projectRoles.map((e) => ProjectRole.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectRolesResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectRolesResponse();
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationResponse.fromPartial(object.pagination)
            : undefined;
        message.projectRoles = object.projectRoles?.map((e) => ProjectRole.fromPartial(e)) || [];
        return message;
    },
};
function createBaseCreateProjectGrantRequest() {
    return { projectId: "", grantedOrganizationId: "", roleKeys: [] };
}
export const CreateProjectGrantRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.grantedOrganizationId !== "") {
            writer.uint32(18).string(message.grantedOrganizationId);
        }
        for (const v of message.roleKeys) {
            writer.uint32(26).string(v);
        }
        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 = createBaseCreateProjectGrantRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.grantedOrganizationId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.roleKeys.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            grantedOrganizationId: isSet(object.grantedOrganizationId) ? globalThis.String(object.grantedOrganizationId) : "",
            roleKeys: globalThis.Array.isArray(object?.roleKeys) ? object.roleKeys.map((e) => globalThis.String(e)) : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.grantedOrganizationId !== "") {
            obj.grantedOrganizationId = message.grantedOrganizationId;
        }
        if (message.roleKeys?.length) {
            obj.roleKeys = message.roleKeys;
        }
        return obj;
    },
    create(base) {
        return CreateProjectGrantRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateProjectGrantRequest();
        message.projectId = object.projectId ?? "";
        message.grantedOrganizationId = object.grantedOrganizationId ?? "";
        message.roleKeys = object.roleKeys?.map((e) => e) || [];
        return message;
    },
};
function createBaseCreateProjectGrantResponse() {
    return { creationDate: undefined };
}
export const CreateProjectGrantResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.creationDate !== undefined) {
            Timestamp.encode(toTimestamp(message.creationDate), 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 = createBaseCreateProjectGrantResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.creationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.creationDate !== undefined) {
            obj.creationDate = message.creationDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return CreateProjectGrantResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseCreateProjectGrantResponse();
        message.creationDate = object.creationDate ?? undefined;
        return message;
    },
};
function createBaseUpdateProjectGrantRequest() {
    return { projectId: "", grantedOrganizationId: "", roleKeys: [] };
}
export const UpdateProjectGrantRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.grantedOrganizationId !== "") {
            writer.uint32(18).string(message.grantedOrganizationId);
        }
        for (const v of message.roleKeys) {
            writer.uint32(26).string(v);
        }
        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 = createBaseUpdateProjectGrantRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.grantedOrganizationId = reader.string();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.roleKeys.push(reader.string());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            grantedOrganizationId: isSet(object.grantedOrganizationId) ? globalThis.String(object.grantedOrganizationId) : "",
            roleKeys: globalThis.Array.isArray(object?.roleKeys) ? object.roleKeys.map((e) => globalThis.String(e)) : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.grantedOrganizationId !== "") {
            obj.grantedOrganizationId = message.grantedOrganizationId;
        }
        if (message.roleKeys?.length) {
            obj.roleKeys = message.roleKeys;
        }
        return obj;
    },
    create(base) {
        return UpdateProjectGrantRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectGrantRequest();
        message.projectId = object.projectId ?? "";
        message.grantedOrganizationId = object.grantedOrganizationId ?? "";
        message.roleKeys = object.roleKeys?.map((e) => e) || [];
        return message;
    },
};
function createBaseUpdateProjectGrantResponse() {
    return { changeDate: undefined };
}
export const UpdateProjectGrantResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseUpdateProjectGrantResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return UpdateProjectGrantResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseUpdateProjectGrantResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseDeleteProjectGrantRequest() {
    return { projectId: "", grantedOrganizationId: "" };
}
export const DeleteProjectGrantRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.grantedOrganizationId !== "") {
            writer.uint32(18).string(message.grantedOrganizationId);
        }
        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 = createBaseDeleteProjectGrantRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.grantedOrganizationId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            grantedOrganizationId: isSet(object.grantedOrganizationId) ? globalThis.String(object.grantedOrganizationId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.grantedOrganizationId !== "") {
            obj.grantedOrganizationId = message.grantedOrganizationId;
        }
        return obj;
    },
    create(base) {
        return DeleteProjectGrantRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteProjectGrantRequest();
        message.projectId = object.projectId ?? "";
        message.grantedOrganizationId = object.grantedOrganizationId ?? "";
        return message;
    },
};
function createBaseDeleteProjectGrantResponse() {
    return { deletionDate: undefined };
}
export const DeleteProjectGrantResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.deletionDate !== undefined) {
            Timestamp.encode(toTimestamp(message.deletionDate), 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 = createBaseDeleteProjectGrantResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.deletionDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { deletionDate: isSet(object.deletionDate) ? fromJsonTimestamp(object.deletionDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.deletionDate !== undefined) {
            obj.deletionDate = message.deletionDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return DeleteProjectGrantResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeleteProjectGrantResponse();
        message.deletionDate = object.deletionDate ?? undefined;
        return message;
    },
};
function createBaseDeactivateProjectGrantRequest() {
    return { projectId: "", grantedOrganizationId: "" };
}
export const DeactivateProjectGrantRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.grantedOrganizationId !== "") {
            writer.uint32(18).string(message.grantedOrganizationId);
        }
        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 = createBaseDeactivateProjectGrantRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.grantedOrganizationId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            grantedOrganizationId: isSet(object.grantedOrganizationId) ? globalThis.String(object.grantedOrganizationId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.grantedOrganizationId !== "") {
            obj.grantedOrganizationId = message.grantedOrganizationId;
        }
        return obj;
    },
    create(base) {
        return DeactivateProjectGrantRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateProjectGrantRequest();
        message.projectId = object.projectId ?? "";
        message.grantedOrganizationId = object.grantedOrganizationId ?? "";
        return message;
    },
};
function createBaseDeactivateProjectGrantResponse() {
    return { changeDate: undefined };
}
export const DeactivateProjectGrantResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseDeactivateProjectGrantResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return DeactivateProjectGrantResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseDeactivateProjectGrantResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseActivateProjectGrantRequest() {
    return { projectId: "", grantedOrganizationId: "" };
}
export const ActivateProjectGrantRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.projectId !== "") {
            writer.uint32(10).string(message.projectId);
        }
        if (message.grantedOrganizationId !== "") {
            writer.uint32(18).string(message.grantedOrganizationId);
        }
        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 = createBaseActivateProjectGrantRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.projectId = reader.string();
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.grantedOrganizationId = reader.string();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
            grantedOrganizationId: isSet(object.grantedOrganizationId) ? globalThis.String(object.grantedOrganizationId) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.projectId !== "") {
            obj.projectId = message.projectId;
        }
        if (message.grantedOrganizationId !== "") {
            obj.grantedOrganizationId = message.grantedOrganizationId;
        }
        return obj;
    },
    create(base) {
        return ActivateProjectGrantRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateProjectGrantRequest();
        message.projectId = object.projectId ?? "";
        message.grantedOrganizationId = object.grantedOrganizationId ?? "";
        return message;
    },
};
function createBaseActivateProjectGrantResponse() {
    return { changeDate: undefined };
}
export const ActivateProjectGrantResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.changeDate !== undefined) {
            Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseActivateProjectGrantResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return { changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined };
    },
    toJSON(message) {
        const obj = {};
        if (message.changeDate !== undefined) {
            obj.changeDate = message.changeDate.toISOString();
        }
        return obj;
    },
    create(base) {
        return ActivateProjectGrantResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseActivateProjectGrantResponse();
        message.changeDate = object.changeDate ?? undefined;
        return message;
    },
};
function createBaseListProjectGrantsRequest() {
    return { pagination: undefined, sortingColumn: undefined, filters: [] };
}
export const ListProjectGrantsRequest = {
    encode(message, writer = new BinaryWriter()) {
        if (message.pagination !== undefined) {
            PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
        }
        if (message.sortingColumn !== undefined) {
            writer.uint32(16).int32(message.sortingColumn);
        }
        for (const v of message.filters) {
            ProjectGrantSearchFilter.encode(v, 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 = createBaseListProjectGrantsRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pagination = PaginationRequest.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.sortingColumn = reader.int32();
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.filters.push(ProjectGrantSearchFilter.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
            sortingColumn: isSet(object.sortingColumn) ? projectGrantFieldNameFromJSON(object.sortingColumn) : undefined,
            filters: globalThis.Array.isArray(object?.filters)
                ? object.filters.map((e) => ProjectGrantSearchFilter.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.pagination !== undefined) {
            obj.pagination = PaginationRequest.toJSON(message.pagination);
        }
        if (message.sortingColumn !== undefined) {
            obj.sortingColumn = projectGrantFieldNameToJSON(message.sortingColumn);
        }
        if (message.filters?.length) {
            obj.filters = message.filters.map((e) => ProjectGrantSearchFilter.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectGrantsRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectGrantsRequest();
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationRequest.fromPartial(object.pagination)
            : undefined;
        message.sortingColumn = object.sortingColumn ?? undefined;
        message.filters = object.filters?.map((e) => ProjectGrantSearchFilter.fromPartial(e)) || [];
        return message;
    },
};
function createBaseListProjectGrantsResponse() {
    return { pagination: undefined, projectGrants: [] };
}
export const ListProjectGrantsResponse = {
    encode(message, writer = new BinaryWriter()) {
        if (message.pagination !== undefined) {
            PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
        }
        for (const v of message.projectGrants) {
            ProjectGrant.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 = createBaseListProjectGrantsResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.pagination = PaginationResponse.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.projectGrants.push(ProjectGrant.decode(reader, reader.uint32()));
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
            projectGrants: globalThis.Array.isArray(object?.projectGrants)
                ? object.projectGrants.map((e) => ProjectGrant.fromJSON(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.pagination !== undefined) {
            obj.pagination = PaginationResponse.toJSON(message.pagination);
        }
        if (message.projectGrants?.length) {
            obj.projectGrants = message.projectGrants.map((e) => ProjectGrant.toJSON(e));
        }
        return obj;
    },
    create(base) {
        return ListProjectGrantsResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListProjectGrantsResponse();
        message.pagination = (object.pagination !== undefined && object.pagination !== null)
            ? PaginationResponse.fromPartial(object.pagination)
            : undefined;
        message.projectGrants = object.projectGrants?.map((e) => ProjectGrant.fromPartial(e)) || [];
        return message;
    },
};
export const ProjectServiceDefinition = {
    name: "ProjectService",
    fullName: "zitadel.project.v2beta.ProjectService",
    methods: {
        /**
         * Create Project
         *
         * Create a new Project.
         *
         * Required permission:
         *   - `project.create`
         */
        createProject: {
            name: "CreateProject",
            requestType: CreateProjectRequest,
            requestStream: false,
            responseType: CreateProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            87,
                            74,
                            37,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            30,
                            10,
                            28,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            46,
                            10,
                            3,
                            52,
                            48,
                            57,
                            18,
                            39,
                            10,
                            37,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            32,
                            97,
                            108,
                            114,
                            101,
                            97,
                            100,
                            121,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            115,
                            46,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            21,
                            58,
                            1,
                            42,
                            34,
                            16,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Update Project
         *
         * Update an existing project.
         *
         * Required permission:
         *   - `project.write`
         */
        updateProject: {
            name: "UpdateProject",
            requestType: UpdateProjectRequest,
            requestStream: false,
            responseType: UpdateProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            105,
                            74,
                            55,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            48,
                            10,
                            46,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            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,
                            74,
                            46,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            39,
                            10,
                            37,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            117,
                            112,
                            100,
                            97,
                            116,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            26,
                            58,
                            1,
                            42,
                            34,
                            21,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Delete Project
         *
         * Delete an existing project.
         * In case the project is not found, the request will return a successful response as
         * the desired state is already achieved.
         *
         * Required permission:
         *   - `project.delete`
         */
        deleteProject: {
            name: "DeleteProject",
            requestType: DeleteProjectRequest,
            requestStream: false,
            responseType: DeleteProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            39,
                            74,
                            37,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            30,
                            10,
                            28,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            100,
                            101,
                            108,
                            101,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            23,
                            42,
                            21,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Get Project
         *
         * Returns the project identified by the requested ID.
         *
         * Required permission:
         *   - `project.read`
         */
        getProject: {
            name: "GetProject",
            requestType: GetProjectRequest,
            requestStream: false,
            responseType: GetProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            86,
                            74,
                            39,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            32,
                            10,
                            30,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            101,
                            116,
                            114,
                            105,
                            101,
                            118,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            43,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            36,
                            10,
                            34,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            103,
                            101,
                            116,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    400010: [Buffer.from([16, 10, 14, 10, 12, 112, 114, 111, 106, 101, 99, 116, 46, 114, 101, 97, 100])],
                    578365826: [
                        Buffer.from([
                            23,
                            18,
                            21,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * List Projects
         *
         * List all matching projects. By default all projects of the instance that the caller has permission to read are returned.
         * Make sure to include a limit and sorting for pagination.
         *
         * Required permission:
         *   - `project.read`
         */
        listProjects: {
            name: "ListProjects",
            requestType: ListProjectsRequest,
            requestStream: false,
            responseType: ListProjectsResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            81,
                            74,
                            50,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            43,
                            10,
                            41,
                            65,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            111,
                            102,
                            32,
                            97,
                            108,
                            108,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            32,
                            109,
                            97,
                            116,
                            99,
                            104,
                            105,
                            110,
                            103,
                            32,
                            116,
                            104,
                            101,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                            74,
                            27,
                            10,
                            3,
                            52,
                            48,
                            48,
                            18,
                            20,
                            10,
                            18,
                            105,
                            110,
                            118,
                            97,
                            108,
                            105,
                            100,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                        ]),
                    ],
                    400010: [Buffer.from([16, 10, 14, 10, 12, 112, 114, 111, 106, 101, 99, 116, 46, 114, 101, 97, 100])],
                    578365826: [
                        Buffer.from([
                            28,
                            58,
                            1,
                            42,
                            34,
                            23,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            115,
                            101,
                            97,
                            114,
                            99,
                            104,
                        ]),
                    ],
                },
            },
        },
        /**
         * Deactivate Project
         *
         * Set the state of a project to deactivated. Request returns no error if the project is already deactivated.
         * Applications under deactivated projects are not able to login anymore.
         *
         * Required permission:
         *   - `project.write`
         */
        deactivateProject: {
            name: "DeactivateProject",
            requestType: DeactivateProjectRequest,
            requestStream: false,
            responseType: DeactivateProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            95,
                            74,
                            41,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            34,
                            10,
                            32,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            50,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            43,
                            10,
                            41,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    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,
                            1,
                            42,
                            34,
                            32,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Activate Project
         *
         * Set the state of a project to active. Request returns no error if the project is already activated.
         *
         * Required permission:
         *   - `project.write`
         */
        activateProject: {
            name: "ActivateProject",
            requestType: ActivateProjectRequest,
            requestStream: false,
            responseType: ActivateProjectResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            91,
                            74,
                            39,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            32,
                            10,
                            30,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            48,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            41,
                            10,
                            39,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    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,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            105,
                            100,
                            125,
                            47,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Add Project Role
         *
         * Add a new project role to a project. The key must be unique within the project.
         *
         * Required permission:
         *   - `project.role.write`
         */
        addProjectRole: {
            name: "AddProjectRole",
            requestType: AddProjectRoleRequest,
            requestStream: false,
            responseType: AddProjectRoleResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            104,
                            74,
                            40,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            33,
                            10,
                            31,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            97,
                            100,
                            100,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            60,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            53,
                            10,
                            51,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            116,
                            111,
                            32,
                            97,
                            100,
                            100,
                            32,
                            116,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            40,
                            58,
                            1,
                            42,
                            34,
                            35,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            114,
                            111,
                            108,
                            101,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Update Project Role
         *
         * Change a project role. The key is not editable. If a key should change, remove the role and create a new one.
         *
         * Required permission:
         *   - `project.role.write`
         */
        updateProjectRole: {
            name: "UpdateProjectRole",
            requestType: UpdateProjectRoleRequest,
            requestStream: false,
            responseType: UpdateProjectRoleResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            97,
                            74,
                            42,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            35,
                            10,
                            33,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            117,
                            112,
                            100,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            51,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            44,
                            10,
                            42,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            116,
                            111,
                            32,
                            117,
                            112,
                            100,
                            97,
                            116,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    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,
                            1,
                            42,
                            34,
                            46,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            114,
                            111,
                            108,
                            101,
                            115,
                            47,
                            123,
                            114,
                            111,
                            108,
                            101,
                            95,
                            107,
                            101,
                            121,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Remove Project Role
         *
         * Removes the role from the project and on every resource it has a dependency. This includes project grants and user grants.
         *
         * Required permission:
         *   - `project.role.write`
         */
        removeProjectRole: {
            name: "RemoveProjectRole",
            requestType: RemoveProjectRoleRequest,
            requestStream: false,
            responseType: RemoveProjectRoleResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            97,
                            74,
                            42,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            35,
                            10,
                            33,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            51,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            44,
                            10,
                            42,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            32,
                            116,
                            111,
                            32,
                            114,
                            101,
                            109,
                            111,
                            118,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    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,
                            42,
                            46,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            114,
                            111,
                            108,
                            101,
                            115,
                            47,
                            123,
                            114,
                            111,
                            108,
                            101,
                            95,
                            107,
                            101,
                            121,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * List Project Roles
         *
         * Returns all roles of a project matching the search query.
         *
         * Required permission:
         *   - `project.role.read`
         */
        listProjectRoles: {
            name: "ListProjectRoles",
            requestType: ListProjectRolesRequest,
            requestStream: false,
            responseType: ListProjectRolesResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            86,
                            74,
                            55,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            48,
                            10,
                            46,
                            65,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            111,
                            102,
                            32,
                            97,
                            108,
                            108,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            114,
                            111,
                            108,
                            101,
                            115,
                            32,
                            109,
                            97,
                            116,
                            99,
                            104,
                            105,
                            110,
                            103,
                            32,
                            116,
                            104,
                            101,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                            74,
                            27,
                            10,
                            3,
                            52,
                            48,
                            48,
                            18,
                            20,
                            10,
                            18,
                            105,
                            110,
                            118,
                            97,
                            108,
                            105,
                            100,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                        ]),
                    ],
                    400010: [
                        Buffer.from([
                            21,
                            10,
                            19,
                            10,
                            17,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            46,
                            114,
                            111,
                            108,
                            101,
                            46,
                            114,
                            101,
                            97,
                            100,
                        ]),
                    ],
                    578365826: [
                        Buffer.from([
                            44,
                            34,
                            42,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            114,
                            111,
                            108,
                            101,
                            115,
                            47,
                            115,
                            101,
                            97,
                            114,
                            99,
                            104,
                        ]),
                    ],
                },
            },
        },
        /**
         * Create Project Grant
         *
         * Grant a project to another organization.
         * The project grant will allow the granted organization to access the project and manage the authorizations for its users.
         *
         * Required permission:
         *   - `project.grant.create`
         */
        createProjectGrant: {
            name: "CreateProjectGrant",
            requestType: CreateProjectGrantRequest,
            requestStream: false,
            responseType: CreateProjectGrantResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            99,
                            74,
                            43,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            36,
                            10,
                            34,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                            74,
                            52,
                            10,
                            3,
                            52,
                            48,
                            57,
                            18,
                            45,
                            10,
                            43,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            116,
                            111,
                            32,
                            99,
                            114,
                            101,
                            97,
                            116,
                            101,
                            32,
                            97,
                            108,
                            114,
                            101,
                            97,
                            100,
                            121,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            115,
                            46,
                        ]),
                    ],
                    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,
                            58,
                            1,
                            42,
                            34,
                            36,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                        ]),
                    ],
                },
            },
        },
        /**
         * Update Project Grant
         *
         * Change the roles of the project that is granted to another organization.
         * The project grant will allow the granted organization to access the project and manage the authorizations for its users.
         *
         * Required permission:
         *   - `project.grant.write`
         */
        updateProjectGrant: {
            name: "UpdateProjectGrant",
            requestType: UpdateProjectGrantRequest,
            requestStream: false,
            responseType: UpdateProjectGrantResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            117,
                            74,
                            61,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            54,
                            10,
                            52,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            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,
                            74,
                            52,
                            10,
                            3,
                            52,
                            48,
                            52,
                            18,
                            45,
                            10,
                            43,
                            84,
                            104,
                            101,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            116,
                            111,
                            32,
                            117,
                            112,
                            100,
                            97,
                            116,
                            101,
                            32,
                            100,
                            111,
                            101,
                            115,
                            32,
                            110,
                            111,
                            116,
                            32,
                            101,
                            120,
                            105,
                            115,
                            116,
                            46,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            67,
                            58,
                            1,
                            42,
                            34,
                            62,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            47,
                            123,
                            103,
                            114,
                            97,
                            110,
                            116,
                            101,
                            100,
                            95,
                            111,
                            114,
                            103,
                            97,
                            110,
                            105,
                            122,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Delete Project Grant
         *
         * Delete a project grant. All user grants for this project grant will also be removed.
         * A user will not have access to the project afterward (if permissions are checked).
         * In case the project grant is not found, the request will return a successful response as
         * the desired state is already achieved.
         *
         * Required permission:
         *   - `project.grant.delete`
         */
        deleteProjectGrant: {
            name: "DeleteProjectGrant",
            requestType: DeleteProjectGrantRequest,
            requestStream: false,
            responseType: DeleteProjectGrantResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            45,
                            74,
                            43,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            36,
                            10,
                            34,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            100,
                            101,
                            108,
                            101,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                        ]),
                    ],
                    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,
                            42,
                            62,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            47,
                            123,
                            103,
                            114,
                            97,
                            110,
                            116,
                            101,
                            100,
                            95,
                            111,
                            114,
                            103,
                            97,
                            110,
                            105,
                            122,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            105,
                            100,
                            125,
                        ]),
                    ],
                },
            },
        },
        /**
         * Deactivate Project Grant
         *
         * Set the state of the project grant to deactivated.
         * Applications under deactivated projects grants are not able to login anymore.
         *
         * Required permission:
         *   - `project.grant.write`
         */
        deactivateProjectGrant: {
            name: "DeactivateProjectGrant",
            requestType: DeactivateProjectGrantRequest,
            requestStream: false,
            responseType: DeactivateProjectGrantResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            49,
                            74,
                            47,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            40,
                            10,
                            38,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            78,
                            58,
                            1,
                            42,
                            34,
                            73,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            47,
                            123,
                            103,
                            114,
                            97,
                            110,
                            116,
                            101,
                            100,
                            95,
                            111,
                            114,
                            103,
                            97,
                            110,
                            105,
                            122,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            105,
                            100,
                            125,
                            47,
                            100,
                            101,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * Activate Project Grant
         *
         * Set the state of the project grant to activated.
         *
         * Required permission:
         *   - `project.grant.write`
         */
        activateProjectGrant: {
            name: "ActivateProjectGrant",
            requestType: ActivateProjectGrantRequest,
            requestStream: false,
            responseType: ActivateProjectGrantResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            47,
                            74,
                            45,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            38,
                            10,
                            36,
                            80,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            32,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                            100,
                            32,
                            115,
                            117,
                            99,
                            99,
                            101,
                            115,
                            115,
                            102,
                            117,
                            108,
                            108,
                            121,
                        ]),
                    ],
                    400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
                    578365826: [
                        Buffer.from([
                            76,
                            58,
                            1,
                            42,
                            34,
                            71,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            123,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            95,
                            105,
                            100,
                            125,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            47,
                            123,
                            103,
                            114,
                            97,
                            110,
                            116,
                            101,
                            100,
                            95,
                            111,
                            114,
                            103,
                            97,
                            110,
                            105,
                            122,
                            97,
                            116,
                            105,
                            111,
                            110,
                            95,
                            105,
                            100,
                            125,
                            47,
                            97,
                            99,
                            116,
                            105,
                            118,
                            97,
                            116,
                            101,
                        ]),
                    ],
                },
            },
        },
        /**
         * List Project Grants
         *
         * Returns a list of project grants. A project grant is when the organization grants its project to another organization.
         *
         * Required permission:
         *   - `project.grant.write`
         */
        listProjectGrants: {
            name: "ListProjectGrants",
            requestType: ListProjectGrantsRequest,
            requestStream: false,
            responseType: ListProjectGrantsResponse,
            responseStream: false,
            options: {
                _unknownFields: {
                    8338: [
                        Buffer.from([
                            87,
                            74,
                            56,
                            10,
                            3,
                            50,
                            48,
                            48,
                            18,
                            49,
                            10,
                            47,
                            65,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            111,
                            102,
                            32,
                            97,
                            108,
                            108,
                            32,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            32,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            32,
                            109,
                            97,
                            116,
                            99,
                            104,
                            105,
                            110,
                            103,
                            32,
                            116,
                            104,
                            101,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                            74,
                            27,
                            10,
                            3,
                            52,
                            48,
                            48,
                            18,
                            20,
                            10,
                            18,
                            105,
                            110,
                            118,
                            97,
                            108,
                            105,
                            100,
                            32,
                            108,
                            105,
                            115,
                            116,
                            32,
                            113,
                            117,
                            101,
                            114,
                            121,
                        ]),
                    ],
                    400010: [
                        Buffer.from([
                            22,
                            10,
                            20,
                            10,
                            18,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            46,
                            103,
                            114,
                            97,
                            110,
                            116,
                            46,
                            114,
                            101,
                            97,
                            100,
                        ]),
                    ],
                    578365826: [
                        Buffer.from([
                            35,
                            58,
                            1,
                            42,
                            34,
                            30,
                            47,
                            118,
                            50,
                            98,
                            101,
                            116,
                            97,
                            47,
                            112,
                            114,
                            111,
                            106,
                            101,
                            99,
                            116,
                            115,
                            47,
                            103,
                            114,
                            97,
                            110,
                            116,
                            115,
                            47,
                            115,
                            101,
                            97,
                            114,
                            99,
                            104,
                        ]),
                    ],
                },
            },
        },
    },
};
function toTimestamp(date) {
    const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
    const nanos = (date.getTime() % 1_000) * 1_000_000;
    return { seconds, nanos };
}
function fromTimestamp(t) {
    let millis = (t.seconds.toNumber() || 0) * 1_000;
    millis += (t.nanos || 0) / 1_000_000;
    return new globalThis.Date(millis);
}
function fromJsonTimestamp(o) {
    if (o instanceof globalThis.Date) {
        return o;
    }
    else if (typeof o === "string") {
        return new globalThis.Date(o);
    }
    else {
        return fromTimestamp(Timestamp.fromJSON(o));
    }
}
function numberToLong(number) {
    return Long.fromNumber(number);
}
function isSet(value) {
    return value !== null && value !== undefined;
}