// @generated by protobuf-ts 2.9.6 with parameter generate_dependencies
// @generated from protobuf file "documentGeneration.proto" (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";
/**
 * @generated from protobuf message FeatureDocumentationRequest
 */
export interface FeatureDocumentationRequest {
    /**
     * @generated from protobuf field: string title = 1;
     */
    title: string;
    /**
     * @generated from protobuf field: string userDescription = 2;
     */
    userDescription: string;
    /**
     * @generated from protobuf field: string content = 3;
     */
    content: string;
    /**
     * @generated from protobuf field: string processId = 10;
     */
    processId: string;
}
/**
 * @generated from protobuf message DocumentationContentRequest
 */
export interface DocumentationContentRequest {
    /**
     * @generated from protobuf field: string title = 1;
     */
    title: string;
    /**
     * @generated from protobuf field: string content = 2;
     */
    content: string;
    /**
     * @generated from protobuf field: string assistantMessage = 3;
     */
    assistantMessage: string;
    /**
     * @generated from protobuf field: ProcessData processData = 10;
     */
    processData?: ProcessData;
}
/**
 * @generated from protobuf message DocumentationApprovalRequest
 */
export interface DocumentationApprovalRequest {
    /**
     * @generated from protobuf field: bool documentationApproved = 1;
     */
    documentationApproved: boolean;
    /**
     * @generated from protobuf field: string reason = 2;
     */
    reason: string;
    /**
     * @generated from protobuf field: ProcessData processData = 10;
     */
    processData?: ProcessData;
}
/**
 * @generated from protobuf message ProcessData
 */
export interface ProcessData {
    /**
     * @generated from protobuf field: string processId = 1;
     */
    processId: string;
}
/**
 * @generated from protobuf message Empty
 */
export interface Empty {
}
// @generated message type with reflection information, may provide speed optimized methods
class FeatureDocumentationRequest$Type extends MessageType<FeatureDocumentationRequest> {
    constructor() {
        super("FeatureDocumentationRequest", [
            { no: 1, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "userDescription", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 10, name: "processId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<FeatureDocumentationRequest>): FeatureDocumentationRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.title = "";
        message.userDescription = "";
        message.content = "";
        message.processId = "";
        if (value !== undefined)
            reflectionMergePartial<FeatureDocumentationRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureDocumentationRequest): FeatureDocumentationRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string title */ 1:
                    message.title = reader.string();
                    break;
                case /* string userDescription */ 2:
                    message.userDescription = reader.string();
                    break;
                case /* string content */ 3:
                    message.content = reader.string();
                    break;
                case /* string processId */ 10:
                    message.processId = 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: FeatureDocumentationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string title = 1; */
        if (message.title !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.title);
        /* string userDescription = 2; */
        if (message.userDescription !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.userDescription);
        /* string content = 3; */
        if (message.content !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.content);
        /* string processId = 10; */
        if (message.processId !== "")
            writer.tag(10, WireType.LengthDelimited).string(message.processId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message FeatureDocumentationRequest
 */
export const FeatureDocumentationRequest = new FeatureDocumentationRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DocumentationContentRequest$Type extends MessageType<DocumentationContentRequest> {
    constructor() {
        super("DocumentationContentRequest", [
            { no: 1, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "assistantMessage", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 10, name: "processData", kind: "message", T: () => ProcessData }
        ]);
    }
    create(value?: PartialMessage<DocumentationContentRequest>): DocumentationContentRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.title = "";
        message.content = "";
        message.assistantMessage = "";
        if (value !== undefined)
            reflectionMergePartial<DocumentationContentRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentationContentRequest): DocumentationContentRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string title */ 1:
                    message.title = reader.string();
                    break;
                case /* string content */ 2:
                    message.content = reader.string();
                    break;
                case /* string assistantMessage */ 3:
                    message.assistantMessage = reader.string();
                    break;
                case /* ProcessData processData */ 10:
                    message.processData = ProcessData.internalBinaryRead(reader, reader.uint32(), options, message.processData);
                    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: DocumentationContentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string title = 1; */
        if (message.title !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.title);
        /* string content = 2; */
        if (message.content !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.content);
        /* string assistantMessage = 3; */
        if (message.assistantMessage !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.assistantMessage);
        /* ProcessData processData = 10; */
        if (message.processData)
            ProcessData.internalBinaryWrite(message.processData, writer.tag(10, 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 DocumentationContentRequest
 */
export const DocumentationContentRequest = new DocumentationContentRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DocumentationApprovalRequest$Type extends MessageType<DocumentationApprovalRequest> {
    constructor() {
        super("DocumentationApprovalRequest", [
            { no: 1, name: "documentationApproved", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 2, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 10, name: "processData", kind: "message", T: () => ProcessData }
        ]);
    }
    create(value?: PartialMessage<DocumentationApprovalRequest>): DocumentationApprovalRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.documentationApproved = false;
        message.reason = "";
        if (value !== undefined)
            reflectionMergePartial<DocumentationApprovalRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentationApprovalRequest): DocumentationApprovalRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bool documentationApproved */ 1:
                    message.documentationApproved = reader.bool();
                    break;
                case /* string reason */ 2:
                    message.reason = reader.string();
                    break;
                case /* ProcessData processData */ 10:
                    message.processData = ProcessData.internalBinaryRead(reader, reader.uint32(), options, message.processData);
                    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: DocumentationApprovalRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* bool documentationApproved = 1; */
        if (message.documentationApproved !== false)
            writer.tag(1, WireType.Varint).bool(message.documentationApproved);
        /* string reason = 2; */
        if (message.reason !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.reason);
        /* ProcessData processData = 10; */
        if (message.processData)
            ProcessData.internalBinaryWrite(message.processData, writer.tag(10, 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 DocumentationApprovalRequest
 */
export const DocumentationApprovalRequest = new DocumentationApprovalRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ProcessData$Type extends MessageType<ProcessData> {
    constructor() {
        super("ProcessData", [
            { no: 1, name: "processId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<ProcessData>): ProcessData {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.processId = "";
        if (value !== undefined)
            reflectionMergePartial<ProcessData>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProcessData): ProcessData {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string processId */ 1:
                    message.processId = 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: ProcessData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string processId = 1; */
        if (message.processId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.processId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message ProcessData
 */
export const ProcessData = new ProcessData$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Empty$Type extends MessageType<Empty> {
    constructor() {
        super("Empty", []);
    }
    create(value?: PartialMessage<Empty>): Empty {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<Empty>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty {
        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: Empty, 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 Empty
 */
export const Empty = new Empty$Type();
/**
 * @generated ServiceType for protobuf service GrpcDocumentationGeneration
 */
export const GrpcDocumentationGeneration = new ServiceType("GrpcDocumentationGeneration", [
    { name: "UserRequestFeatureDocumentation", options: {}, I: FeatureDocumentationRequest, O: ProcessData },
    { name: "RequestUserReviewDocumentationFromProcess", options: {}, I: DocumentationContentRequest, O: Empty },
    { name: "RequestUserReviewDocumentation", serverStreaming: true, options: {}, I: ProcessData, O: DocumentationContentRequest },
    { name: "UserReviewedDocumentation", options: {}, I: DocumentationApprovalRequest, O: Empty },
    { name: "PublishDocumentation", options: {}, I: DocumentationContentRequest, O: Empty },
    { name: "ReceivePublishedDocumentation", serverStreaming: true, options: {}, I: ProcessData, O: DocumentationContentRequest }
]);
