// @generated by protobuf-ts 2.11.1
// @generated from protobuf file "team.proto" (package "aegis", syntax proto3)
// tslint:disable
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 aegis.TeamInfo
 */
export interface TeamInfo {
    /**
     * @generated from protobuf field: int32 saved_alive = 1
     */
    savedAlive: number;
    /**
     * @generated from protobuf field: int32 saved_dead = 2
     */
    savedDead: number;
    /**
     * @generated from protobuf field: int32 saved = 3
     */
    saved: number;
    /**
     * @generated from protobuf field: int32 predicted_right = 4
     */
    predictedRight: number;
    /**
     * @generated from protobuf field: int32 predicted_wrong = 5
     */
    predictedWrong: number;
    /**
     * @generated from protobuf field: int32 predicted = 6
     */
    predicted: number;
    /**
     * @generated from protobuf field: int32 score = 7
     */
    score: number;
    /**
     * @generated from protobuf field: int32 units = 8
     */
    units: number;
    /**
     * @generated from protobuf field: aegis.Team team = 9
     */
    team: Team;
}
/**
 * @generated from protobuf enum aegis.Team
 */
export enum Team {
    /**
     * @generated from protobuf enum value: GOOBS = 0;
     */
    GOOBS = 0,
    /**
     * @generated from protobuf enum value: VOIDSEERS = 1;
     */
    VOIDSEERS = 1
}
// @generated message type with reflection information, may provide speed optimized methods
class TeamInfo$Type extends MessageType<TeamInfo> {
    constructor() {
        super("aegis.TeamInfo", [
            { no: 1, name: "saved_alive", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 2, name: "saved_dead", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 3, name: "saved", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 4, name: "predicted_right", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 5, name: "predicted_wrong", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 6, name: "predicted", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 7, name: "score", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 8, name: "units", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
            { no: 9, name: "team", kind: "enum", T: () => ["aegis.Team", Team] }
        ]);
    }
    create(value?: PartialMessage<TeamInfo>): TeamInfo {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.savedAlive = 0;
        message.savedDead = 0;
        message.saved = 0;
        message.predictedRight = 0;
        message.predictedWrong = 0;
        message.predicted = 0;
        message.score = 0;
        message.units = 0;
        message.team = 0;
        if (value !== undefined)
            reflectionMergePartial<TeamInfo>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TeamInfo): TeamInfo {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int32 saved_alive */ 1:
                    message.savedAlive = reader.int32();
                    break;
                case /* int32 saved_dead */ 2:
                    message.savedDead = reader.int32();
                    break;
                case /* int32 saved */ 3:
                    message.saved = reader.int32();
                    break;
                case /* int32 predicted_right */ 4:
                    message.predictedRight = reader.int32();
                    break;
                case /* int32 predicted_wrong */ 5:
                    message.predictedWrong = reader.int32();
                    break;
                case /* int32 predicted */ 6:
                    message.predicted = reader.int32();
                    break;
                case /* int32 score */ 7:
                    message.score = reader.int32();
                    break;
                case /* int32 units */ 8:
                    message.units = reader.int32();
                    break;
                case /* aegis.Team team */ 9:
                    message.team = reader.int32();
                    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: TeamInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int32 saved_alive = 1; */
        if (message.savedAlive !== 0)
            writer.tag(1, WireType.Varint).int32(message.savedAlive);
        /* int32 saved_dead = 2; */
        if (message.savedDead !== 0)
            writer.tag(2, WireType.Varint).int32(message.savedDead);
        /* int32 saved = 3; */
        if (message.saved !== 0)
            writer.tag(3, WireType.Varint).int32(message.saved);
        /* int32 predicted_right = 4; */
        if (message.predictedRight !== 0)
            writer.tag(4, WireType.Varint).int32(message.predictedRight);
        /* int32 predicted_wrong = 5; */
        if (message.predictedWrong !== 0)
            writer.tag(5, WireType.Varint).int32(message.predictedWrong);
        /* int32 predicted = 6; */
        if (message.predicted !== 0)
            writer.tag(6, WireType.Varint).int32(message.predicted);
        /* int32 score = 7; */
        if (message.score !== 0)
            writer.tag(7, WireType.Varint).int32(message.score);
        /* int32 units = 8; */
        if (message.units !== 0)
            writer.tag(8, WireType.Varint).int32(message.units);
        /* aegis.Team team = 9; */
        if (message.team !== 0)
            writer.tag(9, WireType.Varint).int32(message.team);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message aegis.TeamInfo
 */
export const TeamInfo = new TeamInfo$Type();
