// @generated by protobuf-ts 2.11.1 with parameter long_type_string,ts_nocheck
// @generated from protobuf file "runtime/v1/artifact_service.proto" (package "nimi.runtime.v1", syntax proto3)
// tslint:disable
// @ts-nocheck
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import { WireType } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
// @generated message type with reflection information, may provide speed optimized methods
class ReadArtifactBytesRequest$Type extends MessageType {
    constructor() {
        super("nimi.runtime.v1.ReadArtifactBytesRequest", [
            { no: 1, name: "artifact_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value) {
        const message = globalThis.Object.create((this.messagePrototype));
        message.artifactId = "";
        if (value !== undefined)
            reflectionMergePartial(this, message, value);
        return message;
    }
    internalBinaryRead(reader, length, options, target) {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string artifact_id */ 1:
                    message.artifactId = 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, writer, options) {
        /* string artifact_id = 1; */
        if (message.artifactId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.artifactId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ReadArtifactBytesRequest
 */
export const ReadArtifactBytesRequest = new ReadArtifactBytesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ReadArtifactBytesResponse$Type extends MessageType {
    constructor() {
        super("nimi.runtime.v1.ReadArtifactBytesResponse", [
            { no: 1, name: "bytes", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "mime_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "size_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
            { no: 4, name: "mime_inferred", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
    create(value) {
        const message = globalThis.Object.create((this.messagePrototype));
        message.bytes = new Uint8Array(0);
        message.mimeType = "";
        message.sizeBytes = "0";
        message.mimeInferred = false;
        if (value !== undefined)
            reflectionMergePartial(this, message, value);
        return message;
    }
    internalBinaryRead(reader, length, options, target) {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bytes bytes */ 1:
                    message.bytes = reader.bytes();
                    break;
                case /* string mime_type */ 2:
                    message.mimeType = reader.string();
                    break;
                case /* int64 size_bytes */ 3:
                    message.sizeBytes = reader.int64().toString();
                    break;
                case /* bool mime_inferred */ 4:
                    message.mimeInferred = reader.bool();
                    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, writer, options) {
        /* bytes bytes = 1; */
        if (message.bytes.length)
            writer.tag(1, WireType.LengthDelimited).bytes(message.bytes);
        /* string mime_type = 2; */
        if (message.mimeType !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.mimeType);
        /* int64 size_bytes = 3; */
        if (message.sizeBytes !== "0")
            writer.tag(3, WireType.Varint).int64(message.sizeBytes);
        /* bool mime_inferred = 4; */
        if (message.mimeInferred !== false)
            writer.tag(4, WireType.Varint).bool(message.mimeInferred);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ReadArtifactBytesResponse
 */
export const ReadArtifactBytesResponse = new ReadArtifactBytesResponse$Type();
/**
 * @generated ServiceType for protobuf service nimi.runtime.v1.RuntimeArtifactService
 */
export const RuntimeArtifactService = new ServiceType("nimi.runtime.v1.RuntimeArtifactService", [
    { name: "ReadArtifactBytes", options: {}, I: ReadArtifactBytesRequest, O: ReadArtifactBytesResponse }
]);
//# sourceMappingURL=artifact_service.js.map