// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "restrictionLinks.proto" (package "api", syntax proto3)
// tslint:disable
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { RequestProjectHeader } from "./shared";
import { Restriction } from "./restrictions";
/**
 * ========== MODEL MESSAGES ==========
 *
 * @generated from protobuf message api.RestrictionLink
 */
export interface RestrictionLink {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 4 [json_name = "TargetID"];
     */
    targetID: string;
    /**
     * @generated from protobuf field: api.Restriction Restriction = 6 [json_name = "Restriction"];
     */
    restriction?: Restriction;
}
// ========== REQUESTS & RESPONSE MESSAGES ==========

/**
 * Create
 *
 * @generated from protobuf message api.CreateRestrictionLinkRequest
 */
export interface CreateRestrictionLinkRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 3 [json_name = "TargetID"];
     */
    targetID: string;
}
/**
 * @generated from protobuf message api.CreateRestrictionLinkResponse
 */
export interface CreateRestrictionLinkResponse {
    /**
     * @generated from protobuf field: api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];
     */
    restrictionLink?: RestrictionLink;
}
/**
 * Update
 *
 * @generated from protobuf message api.UpdateRestrictionLinkRequest
 */
export interface UpdateRestrictionLinkRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 3 [json_name = "TargetID"];
     */
    targetID: string;
}
/**
 * @generated from protobuf message api.UpdateRestrictionLinkResponse
 */
export interface UpdateRestrictionLinkResponse {
    /**
     * @generated from protobuf field: api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];
     */
    restrictionLink?: RestrictionLink;
}
/**
 * Delete
 *
 * @generated from protobuf message api.DeleteRestrictionLinkRequest
 */
export interface DeleteRestrictionLinkRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 3 [json_name = "TargetID"];
     */
    targetID: string;
}
/**
 * @generated from protobuf message api.DeleteRestrictionLinkResponse
 */
export interface DeleteRestrictionLinkResponse {
}
/**
 * Get
 *
 * @generated from protobuf message api.GetRestrictionLinkRequest
 */
export interface GetRestrictionLinkRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 3 [json_name = "TargetID"];
     */
    targetID: string;
}
/**
 * @generated from protobuf message api.GetRestrictionLinkResponse
 */
export interface GetRestrictionLinkResponse {
    /**
     * @generated from protobuf field: api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];
     */
    restrictionLink?: RestrictionLink;
}
/**
 * List
 *
 * @generated from protobuf message api.ListRestrictionLinksRequest
 */
export interface ListRestrictionLinksRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string TargetID = 3 [json_name = "TargetID"];
     */
    targetID: string;
}
/**
 * @generated from protobuf message api.ListRestrictionLinksResponse
 */
export interface ListRestrictionLinksResponse {
    /**
     * @generated from protobuf field: repeated api.RestrictionLink RestrictionLinks = 1 [json_name = "RestrictionLinks"];
     */
    restrictionLinks: RestrictionLink[];
}
/**
 * SetUserActors
 *
 * @generated from protobuf message api.SetUserActorsRequest
 */
export interface SetUserActorsRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string RestrictionID = 2 [json_name = "RestrictionID"];
     */
    restrictionID: string;
    /**
     * @generated from protobuf field: string UserID = 3 [json_name = "UserID"];
     */
    userID: string;
    /**
     * @generated from protobuf field: repeated string UserActorIDs = 4 [json_name = "UserActorIDs"];
     */
    userActorIDs: string[]; // If empty, it will remove all user actors for this restriction ID and User ID
}
/**
 * @generated from protobuf message api.SetUserActorsResponse
 */
export interface SetUserActorsResponse {
}
/**
 * DeleteForProject
 *
 * @generated from protobuf message api.DeleteForProjectRestrictionLinkRequest
 */
export interface DeleteForProjectRestrictionLinkRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
}
/**
 * @generated from protobuf message api.DeleteForProjectRestrictionLinkResponse
 */
export interface DeleteForProjectRestrictionLinkResponse {
}
// @generated message type with reflection information, may provide speed optimized methods
class RestrictionLink$Type extends MessageType<RestrictionLink> {
    constructor() {
        super("api.RestrictionLink", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "Restriction", kind: "message", jsonName: "Restriction", T: () => Restriction }
        ]);
    }
    create(value?: PartialMessage<RestrictionLink>): RestrictionLink {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<RestrictionLink>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RestrictionLink): RestrictionLink {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 4 [json_name = "TargetID"];*/ 4:
                    message.targetID = reader.string();
                    break;
                case /* api.Restriction Restriction = 6 [json_name = "Restriction"];*/ 6:
                    message.restriction = Restriction.internalBinaryRead(reader, reader.uint32(), options, message.restriction);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: RestrictionLink, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 4 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.targetID);
        /* api.Restriction Restriction = 6 [json_name = "Restriction"]; */
        if (message.restriction)
            Restriction.internalBinaryWrite(message.restriction, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.RestrictionLink
 */
export const RestrictionLink = new RestrictionLink$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateRestrictionLinkRequest$Type extends MessageType<CreateRestrictionLinkRequest> {
    constructor() {
        super("api.CreateRestrictionLinkRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "RestrictionID", "TargetID"] } } });
    }
    create(value?: PartialMessage<CreateRestrictionLinkRequest>): CreateRestrictionLinkRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<CreateRestrictionLinkRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRestrictionLinkRequest): CreateRestrictionLinkRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 3 [json_name = "TargetID"];*/ 3:
                    message.targetID = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: CreateRestrictionLinkRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 3 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.targetID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreateRestrictionLinkRequest
 */
export const CreateRestrictionLinkRequest = new CreateRestrictionLinkRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateRestrictionLinkResponse$Type extends MessageType<CreateRestrictionLinkResponse> {
    constructor() {
        super("api.CreateRestrictionLinkResponse", [
            { no: 1, name: "RestrictionLink", kind: "message", jsonName: "RestrictionLink", T: () => RestrictionLink }
        ]);
    }
    create(value?: PartialMessage<CreateRestrictionLinkResponse>): CreateRestrictionLinkResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<CreateRestrictionLinkResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRestrictionLinkResponse): CreateRestrictionLinkResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];*/ 1:
                    message.restrictionLink = RestrictionLink.internalBinaryRead(reader, reader.uint32(), options, message.restrictionLink);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: CreateRestrictionLinkResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"]; */
        if (message.restrictionLink)
            RestrictionLink.internalBinaryWrite(message.restrictionLink, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreateRestrictionLinkResponse
 */
export const CreateRestrictionLinkResponse = new CreateRestrictionLinkResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateRestrictionLinkRequest$Type extends MessageType<UpdateRestrictionLinkRequest> {
    constructor() {
        super("api.UpdateRestrictionLinkRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "RestrictionID", "TargetID"] } } });
    }
    create(value?: PartialMessage<UpdateRestrictionLinkRequest>): UpdateRestrictionLinkRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<UpdateRestrictionLinkRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateRestrictionLinkRequest): UpdateRestrictionLinkRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 3 [json_name = "TargetID"];*/ 3:
                    message.targetID = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: UpdateRestrictionLinkRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 3 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.targetID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.UpdateRestrictionLinkRequest
 */
export const UpdateRestrictionLinkRequest = new UpdateRestrictionLinkRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateRestrictionLinkResponse$Type extends MessageType<UpdateRestrictionLinkResponse> {
    constructor() {
        super("api.UpdateRestrictionLinkResponse", [
            { no: 1, name: "RestrictionLink", kind: "message", jsonName: "RestrictionLink", T: () => RestrictionLink }
        ]);
    }
    create(value?: PartialMessage<UpdateRestrictionLinkResponse>): UpdateRestrictionLinkResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<UpdateRestrictionLinkResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateRestrictionLinkResponse): UpdateRestrictionLinkResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];*/ 1:
                    message.restrictionLink = RestrictionLink.internalBinaryRead(reader, reader.uint32(), options, message.restrictionLink);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: UpdateRestrictionLinkResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"]; */
        if (message.restrictionLink)
            RestrictionLink.internalBinaryWrite(message.restrictionLink, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.UpdateRestrictionLinkResponse
 */
export const UpdateRestrictionLinkResponse = new UpdateRestrictionLinkResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRestrictionLinkRequest$Type extends MessageType<DeleteRestrictionLinkRequest> {
    constructor() {
        super("api.DeleteRestrictionLinkRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "TargetID"] } } });
    }
    create(value?: PartialMessage<DeleteRestrictionLinkRequest>): DeleteRestrictionLinkRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<DeleteRestrictionLinkRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRestrictionLinkRequest): DeleteRestrictionLinkRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 3 [json_name = "TargetID"];*/ 3:
                    message.targetID = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: DeleteRestrictionLinkRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 3 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.targetID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteRestrictionLinkRequest
 */
export const DeleteRestrictionLinkRequest = new DeleteRestrictionLinkRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRestrictionLinkResponse$Type extends MessageType<DeleteRestrictionLinkResponse> {
    constructor() {
        super("api.DeleteRestrictionLinkResponse", []);
    }
    create(value?: PartialMessage<DeleteRestrictionLinkResponse>): DeleteRestrictionLinkResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteRestrictionLinkResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRestrictionLinkResponse): DeleteRestrictionLinkResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: DeleteRestrictionLinkResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteRestrictionLinkResponse
 */
export const DeleteRestrictionLinkResponse = new DeleteRestrictionLinkResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetRestrictionLinkRequest$Type extends MessageType<GetRestrictionLinkRequest> {
    constructor() {
        super("api.GetRestrictionLinkRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "RestrictionID", "TargetID"] } } });
    }
    create(value?: PartialMessage<GetRestrictionLinkRequest>): GetRestrictionLinkRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<GetRestrictionLinkRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRestrictionLinkRequest): GetRestrictionLinkRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 3 [json_name = "TargetID"];*/ 3:
                    message.targetID = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: GetRestrictionLinkRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 3 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.targetID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetRestrictionLinkRequest
 */
export const GetRestrictionLinkRequest = new GetRestrictionLinkRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetRestrictionLinkResponse$Type extends MessageType<GetRestrictionLinkResponse> {
    constructor() {
        super("api.GetRestrictionLinkResponse", [
            { no: 1, name: "RestrictionLink", kind: "message", jsonName: "RestrictionLink", T: () => RestrictionLink }
        ]);
    }
    create(value?: PartialMessage<GetRestrictionLinkResponse>): GetRestrictionLinkResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetRestrictionLinkResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRestrictionLinkResponse): GetRestrictionLinkResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"];*/ 1:
                    message.restrictionLink = RestrictionLink.internalBinaryRead(reader, reader.uint32(), options, message.restrictionLink);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: GetRestrictionLinkResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RestrictionLink RestrictionLink = 1 [json_name = "RestrictionLink"]; */
        if (message.restrictionLink)
            RestrictionLink.internalBinaryWrite(message.restrictionLink, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetRestrictionLinkResponse
 */
export const GetRestrictionLinkResponse = new GetRestrictionLinkResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListRestrictionLinksRequest$Type extends MessageType<ListRestrictionLinksRequest> {
    constructor() {
        super("api.ListRestrictionLinksRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "TargetID", kind: "scalar", jsonName: "TargetID", T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<ListRestrictionLinksRequest>): ListRestrictionLinksRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.targetID = "";
        if (value !== undefined)
            reflectionMergePartial<ListRestrictionLinksRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRestrictionLinksRequest): ListRestrictionLinksRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string TargetID = 3 [json_name = "TargetID"];*/ 3:
                    message.targetID = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ListRestrictionLinksRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string TargetID = 3 [json_name = "TargetID"]; */
        if (message.targetID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.targetID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ListRestrictionLinksRequest
 */
export const ListRestrictionLinksRequest = new ListRestrictionLinksRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListRestrictionLinksResponse$Type extends MessageType<ListRestrictionLinksResponse> {
    constructor() {
        super("api.ListRestrictionLinksResponse", [
            { no: 1, name: "RestrictionLinks", kind: "message", jsonName: "RestrictionLinks", repeat: 1 /*RepeatType.PACKED*/, T: () => RestrictionLink }
        ]);
    }
    create(value?: PartialMessage<ListRestrictionLinksResponse>): ListRestrictionLinksResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionLinks = [];
        if (value !== undefined)
            reflectionMergePartial<ListRestrictionLinksResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRestrictionLinksResponse): ListRestrictionLinksResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.RestrictionLink RestrictionLinks = 1 [json_name = "RestrictionLinks"];*/ 1:
                    message.restrictionLinks.push(RestrictionLink.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ListRestrictionLinksResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.RestrictionLink RestrictionLinks = 1 [json_name = "RestrictionLinks"]; */
        for (let i = 0; i < message.restrictionLinks.length; i++)
            RestrictionLink.internalBinaryWrite(message.restrictionLinks[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ListRestrictionLinksResponse
 */
export const ListRestrictionLinksResponse = new ListRestrictionLinksResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SetUserActorsRequest$Type extends MessageType<SetUserActorsRequest> {
    constructor() {
        super("api.SetUserActorsRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "RestrictionID", kind: "scalar", jsonName: "RestrictionID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "UserID", kind: "scalar", jsonName: "UserID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 4, name: "UserActorIDs", kind: "scalar", jsonName: "UserActorIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "RestrictionID", "UserID"] } } });
    }
    create(value?: PartialMessage<SetUserActorsRequest>): SetUserActorsRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.restrictionID = "";
        message.userID = "";
        message.userActorIDs = [];
        if (value !== undefined)
            reflectionMergePartial<SetUserActorsRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetUserActorsRequest): SetUserActorsRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string RestrictionID = 2 [json_name = "RestrictionID"];*/ 2:
                    message.restrictionID = reader.string();
                    break;
                case /* string UserID = 3 [json_name = "UserID"];*/ 3:
                    message.userID = reader.string();
                    break;
                case /* repeated string UserActorIDs = 4 [json_name = "UserActorIDs"];*/ 4:
                    message.userActorIDs.push(reader.string());
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: SetUserActorsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string RestrictionID = 2 [json_name = "RestrictionID"]; */
        if (message.restrictionID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.restrictionID);
        /* string UserID = 3 [json_name = "UserID"]; */
        if (message.userID !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.userID);
        /* repeated string UserActorIDs = 4 [json_name = "UserActorIDs"]; */
        for (let i = 0; i < message.userActorIDs.length; i++)
            writer.tag(4, WireType.LengthDelimited).string(message.userActorIDs[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.SetUserActorsRequest
 */
export const SetUserActorsRequest = new SetUserActorsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SetUserActorsResponse$Type extends MessageType<SetUserActorsResponse> {
    constructor() {
        super("api.SetUserActorsResponse", []);
    }
    create(value?: PartialMessage<SetUserActorsResponse>): SetUserActorsResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<SetUserActorsResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetUserActorsResponse): SetUserActorsResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: SetUserActorsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.SetUserActorsResponse
 */
export const SetUserActorsResponse = new SetUserActorsResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteForProjectRestrictionLinkRequest$Type extends MessageType<DeleteForProjectRestrictionLinkRequest> {
    constructor() {
        super("api.DeleteForProjectRestrictionLinkRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "RestrictionID"] } } });
    }
    create(value?: PartialMessage<DeleteForProjectRestrictionLinkRequest>): DeleteForProjectRestrictionLinkRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteForProjectRestrictionLinkRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteForProjectRestrictionLinkRequest): DeleteForProjectRestrictionLinkRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: DeleteForProjectRestrictionLinkRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteForProjectRestrictionLinkRequest
 */
export const DeleteForProjectRestrictionLinkRequest = new DeleteForProjectRestrictionLinkRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteForProjectRestrictionLinkResponse$Type extends MessageType<DeleteForProjectRestrictionLinkResponse> {
    constructor() {
        super("api.DeleteForProjectRestrictionLinkResponse", []);
    }
    create(value?: PartialMessage<DeleteForProjectRestrictionLinkResponse>): DeleteForProjectRestrictionLinkResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteForProjectRestrictionLinkResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteForProjectRestrictionLinkResponse): DeleteForProjectRestrictionLinkResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: DeleteForProjectRestrictionLinkResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteForProjectRestrictionLinkResponse
 */
export const DeleteForProjectRestrictionLinkResponse = new DeleteForProjectRestrictionLinkResponse$Type();
/**
 * @generated ServiceType for protobuf service api.RestrictionLinkService
 */
export const RestrictionLinkService = new ServiceType("api.RestrictionLinkService", [
    { name: "Create", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "Create a link between a restriction and a user or a partner" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: CreateRestrictionLinkRequest, O: CreateRestrictionLinkResponse },
    { name: "Update", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "Update a link between a restriction and a user or a partner" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: UpdateRestrictionLinkRequest, O: UpdateRestrictionLinkResponse },
    { name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "Delete a restriction link" }, "api.rscType": "Project", "api.roles": "Platform.Project-Rule", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteRestrictionLinkRequest, O: DeleteRestrictionLinkResponse },
    { name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "Get a restriction link" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetRestrictionLinkRequest, O: GetRestrictionLinkResponse },
    { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "List restriction links" }, "api.rscType": "Project", "api.roles": "Platform.Project-Rule", "google.api.method_visibility": { restriction: "SDK" } }, I: ListRestrictionLinksRequest, O: ListRestrictionLinksResponse },
    { name: "SetUserActors", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction Link"], description: "Set user's actors for a restriction. Once applied on the user, the restriction will use that list of actors if needed." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SetUserActorsRequest, O: SetUserActorsResponse },
    { name: "DeleteForProject", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Restriction"], description: "Delete all restriction link in project" }, "api.rscType": "Project", "api.roles": "Platform.Project-Rule", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteForProjectRestrictionLinkRequest, O: DeleteForProjectRestrictionLinkResponse }
], { "api.k8sService": "rule-server" });
