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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { DateTime } from "./shared_pb.js";

/**
 *
 * object in cassandra DB
 *
 * @generated from message api.ObjectDB
 */
export class ObjectDB extends Message<ObjectDB> {
  /**
   * @generated from field: string project = 1;
   */
  project = "";

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

  /**
   * @generated from field: api.DateTime lastEventTS = 3;
   */
  lastEventTS?: DateTime;

  /**
   * @generated from field: string lastEventName = 4;
   */
  lastEventName = "";

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ObjectDB";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "project", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "lastEventTS", kind: "message", T: DateTime },
    { no: 4, name: "lastEventName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "entity", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
  ]);

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

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

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

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

