// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file types/v1/session.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";

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

  /**
   * @generated from field: int64 machine_id = 2;
   */
  machineId = protoInt64.zero;

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

  /**
   * @generated from field: int64 log_event_count = 4;
   */
  logEventCount = protoInt64.zero;

  /**
   * @generated from field: int64 log_event_size_bytes = 5;
   */
  logEventSizeBytes = protoInt64.zero;

  /**
   * @generated from field: google.protobuf.Timestamp started_at = 6;
   */
  startedAt?: Timestamp;

  /**
   * @generated from field: google.protobuf.Timestamp finished_at = 7;
   */
  finishedAt?: Timestamp;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.Session";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "machine_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 3, name: "session_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 4, name: "log_event_count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 5, name: "log_event_size_bytes", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 6, name: "started_at", kind: "message", T: Timestamp },
    { no: 7, name: "finished_at", kind: "message", T: Timestamp },
  ]);

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

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

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

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

