// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file types/v1/logevent.proto (package types.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf";
import { KV } from "./types_pb";

/**
 * @generated from message types.v1.LogEventGroup
 */
export class LogEventGroup extends Message<LogEventGroup> {
  /**
   * @generated from field: int64 machine_id = 1;
   */
  machineId = protoInt64.zero;

  /**
   * @generated from field: int64 session_id = 2;
   */
  sessionId = protoInt64.zero;

  /**
   * @generated from field: repeated types.v1.LogEvent logs = 3;
   */
  logs: LogEvent[] = [];

  constructor(data?: PartialMessage<LogEventGroup>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.LogEventGroup";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "machine_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "session_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 3, name: "logs", kind: "message", T: LogEvent, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LogEventGroup {
    return new LogEventGroup().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LogEventGroup {
    return new LogEventGroup().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LogEventGroup {
    return new LogEventGroup().fromJsonString(jsonString, options);
  }

  static equals(a: LogEventGroup | PlainMessage<LogEventGroup> | undefined, b: LogEventGroup | PlainMessage<LogEventGroup> | undefined): boolean {
    return proto3.util.equals(LogEventGroup, a, b);
  }
}

/**
 * @generated from message types.v1.IngestedLogEvent
 */
export class IngestedLogEvent extends Message<IngestedLogEvent> {
  /**
   * @generated from field: int64 machine_id = 1;
   */
  machineId = protoInt64.zero;

  /**
   * @generated from field: int64 session_id = 2;
   */
  sessionId = protoInt64.zero;

  /**
   * @generated from field: int64 event_id = 3;
   */
  eventId = protoInt64.zero;

  /**
   * @generated from field: google.protobuf.Timestamp parsed_at = 4;
   */
  parsedAt?: Timestamp;

  /**
   * @generated from field: bytes raw = 5;
   */
  raw = new Uint8Array(0);

  /**
   * @generated from field: types.v1.StructuredLogEvent structured = 6;
   */
  structured?: StructuredLogEvent;

  constructor(data?: PartialMessage<IngestedLogEvent>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.IngestedLogEvent";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "machine_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "session_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 3, name: "event_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 4, name: "parsed_at", kind: "message", T: Timestamp },
    { no: 5, name: "raw", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 6, name: "structured", kind: "message", T: StructuredLogEvent },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IngestedLogEvent {
    return new IngestedLogEvent().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IngestedLogEvent {
    return new IngestedLogEvent().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IngestedLogEvent {
    return new IngestedLogEvent().fromJsonString(jsonString, options);
  }

  static equals(a: IngestedLogEvent | PlainMessage<IngestedLogEvent> | undefined, b: IngestedLogEvent | PlainMessage<IngestedLogEvent> | undefined): boolean {
    return proto3.util.equals(IngestedLogEvent, a, b);
  }
}

/**
 * @generated from message types.v1.LogEvent
 */
export class LogEvent extends Message<LogEvent> {
  /**
   * @generated from field: google.protobuf.Timestamp parsed_at = 1;
   */
  parsedAt?: Timestamp;

  /**
   * @generated from field: bytes raw = 2;
   */
  raw = new Uint8Array(0);

  /**
   * @generated from field: types.v1.StructuredLogEvent structured = 3;
   */
  structured?: StructuredLogEvent;

  constructor(data?: PartialMessage<LogEvent>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.LogEvent";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "parsed_at", kind: "message", T: Timestamp },
    { no: 2, name: "raw", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 3, name: "structured", kind: "message", T: StructuredLogEvent },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LogEvent {
    return new LogEvent().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LogEvent {
    return new LogEvent().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LogEvent {
    return new LogEvent().fromJsonString(jsonString, options);
  }

  static equals(a: LogEvent | PlainMessage<LogEvent> | undefined, b: LogEvent | PlainMessage<LogEvent> | undefined): boolean {
    return proto3.util.equals(LogEvent, a, b);
  }
}

/**
 * @generated from message types.v1.StructuredLogEvent
 */
export class StructuredLogEvent extends Message<StructuredLogEvent> {
  /**
   * @generated from field: google.protobuf.Timestamp timestamp = 1;
   */
  timestamp?: Timestamp;

  /**
   * @generated from field: string lvl = 2;
   */
  lvl = "";

  /**
   * @generated from field: string msg = 3;
   */
  msg = "";

  /**
   * @generated from field: repeated types.v1.KV kvs = 4;
   */
  kvs: KV[] = [];

  constructor(data?: PartialMessage<StructuredLogEvent>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.StructuredLogEvent";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "timestamp", kind: "message", T: Timestamp },
    { no: 2, name: "lvl", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "msg", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "kvs", kind: "message", T: KV, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StructuredLogEvent {
    return new StructuredLogEvent().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StructuredLogEvent {
    return new StructuredLogEvent().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StructuredLogEvent {
    return new StructuredLogEvent().fromJsonString(jsonString, options);
  }

  static equals(a: StructuredLogEvent | PlainMessage<StructuredLogEvent> | undefined, b: StructuredLogEvent | PlainMessage<StructuredLogEvent> | undefined): boolean {
    return proto3.util.equals(StructuredLogEvent, a, b);
  }
}

