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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Duration, Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { LogEvent } from "../../../types/v1/logevent_pb";

/**
 * @generated from message svc.ingest.v1.GetHeartbeatRequest
 */
export class GetHeartbeatRequest extends Message<GetHeartbeatRequest> {
  /**
   * may change the heartbeat if specified
   *
   * @generated from field: optional uint64 machine_id = 1;
   */
  machineId?: bigint;

  /**
   * @generated from field: optional uint64 session_id = 2;
   */
  sessionId?: bigint;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.GetHeartbeatRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "machine_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
    { no: 2, name: "session_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
  ]);

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

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

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

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

/**
 * @generated from message svc.ingest.v1.GetHeartbeatResponse
 */
export class GetHeartbeatResponse extends Message<GetHeartbeatResponse> {
  /**
   * @generated from field: google.protobuf.Duration heartbeat_in = 1;
   */
  heartbeatIn?: Duration;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.GetHeartbeatResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "heartbeat_in", kind: "message", T: Duration },
  ]);

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestRequest
 */
export class IngestRequest extends Message<IngestRequest> {
  /**
   * @generated from field: uint64 machine_id = 1;
   */
  machineId = protoInt64.zero;

  /**
   * session ID, unique per machine.
   * if not specified, one will be returned
   *
   * @generated from field: uint64 session_id = 2;
   */
  sessionId = protoInt64.zero;

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

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

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

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestResponse
 */
export class IngestResponse extends Message<IngestResponse> {
  /**
   * @generated from field: uint64 session_id = 1;
   */
  sessionId = protoInt64.zero;

  /**
   * @generated from field: google.protobuf.Duration heartbeat_in = 2;
   */
  heartbeatIn?: Duration;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.IngestResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "session_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 2, name: "heartbeat_in", kind: "message", T: Duration },
  ]);

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestStreamRequest
 */
export class IngestStreamRequest extends Message<IngestStreamRequest> {
  /**
   * only evaluated on the first message
   *
   * @generated from field: uint64 machine_id = 1;
   */
  machineId = protoInt64.zero;

  /**
   * session ID, unique per machine
   *
   * @generated from field: uint64 session_id = 2;
   */
  sessionId = protoInt64.zero;

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

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

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

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestStreamResponse
 */
export class IngestStreamResponse extends Message<IngestStreamResponse> {
  /**
   * @generated from field: uint64 session_id = 1;
   */
  sessionId = protoInt64.zero;

  /**
   * @generated from field: google.protobuf.Duration heartbeat_in = 2;
   */
  heartbeatIn?: Duration;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.IngestStreamResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "session_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 2, name: "heartbeat_in", kind: "message", T: Duration },
  ]);

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestBidiStreamRequest
 */
export class IngestBidiStreamRequest extends Message<IngestBidiStreamRequest> {
  /**
   * @generated from field: repeated types.v1.LogEvent events = 1;
   */
  events: LogEvent[] = [];

  /**
   * only evaluated on the first message
   *
   * @generated from field: uint64 machine_id = 2;
   */
  machineId = protoInt64.zero;

  /**
   * Optional session ID to mark as resuming.
   *
   * @generated from field: uint64 resume_session_id = 3;
   */
  resumeSessionId = protoInt64.zero;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.IngestBidiStreamRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "events", kind: "message", T: LogEvent, repeated: true },
    { no: 2, name: "machine_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 3, name: "resume_session_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
  ]);

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

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

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

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

/**
 * @generated from message svc.ingest.v1.IngestBidiStreamResponse
 */
export class IngestBidiStreamResponse extends Message<IngestBidiStreamResponse> {
  /**
   * @generated from field: uint64 session_id = 1;
   */
  sessionId = protoInt64.zero;

  /**
   * @generated from field: google.protobuf.Duration heartbeat_in = 2;
   */
  heartbeatIn?: Duration;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.ingest.v1.IngestBidiStreamResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "session_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 2, name: "heartbeat_in", kind: "message", T: Duration },
  ]);

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

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

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

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

