// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file actorAction.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 { ActorSnapshot } from "./repositoryShared_pb.js";
import { CommandHeader, EntityID } from "./shared_pb.js";

/**
 *
 * CompleteSnapshot : finalize a actor snapshot 
 * by sending cumulated snapshotted quantity on stock id not already cumulated, 
 * by reseting the quantity of missing stock entry for the current snapshot
 *
 * @generated from message api.ActorCompleteSnapshotPayload
 */
export class ActorCompleteSnapshotPayload extends Message<ActorCompleteSnapshotPayload> {
  /**
   * @generated from field: api.ActorSnapshot Snapshot = 1;
   */
  Snapshot?: ActorSnapshot;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ActorCompleteSnapshotPayload";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Snapshot", kind: "message", T: ActorSnapshot },
  ]);

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

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

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

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

/**
 * @generated from message api.ActorCompleteSnapshot
 */
export class ActorCompleteSnapshot extends Message<ActorCompleteSnapshot> {
  /**
   * @generated from field: api.CommandHeader Header = 1;
   */
  Header?: CommandHeader;

  /**
   * @generated from field: api.EntityID ID = 2;
   */
  ID?: EntityID;

  /**
   * @generated from field: api.ActorCompleteSnapshotPayload Payload = 3;
   */
  Payload?: ActorCompleteSnapshotPayload;

  /**
   * @generated from field: api.ActorCompleteSnapshotPayload EventPayload = 4;
   */
  EventPayload?: ActorCompleteSnapshotPayload;

  /**
   * @generated from field: api.ActorCompleteSnapshotPayload PreviousPayload = 5;
   */
  PreviousPayload?: ActorCompleteSnapshotPayload;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ActorCompleteSnapshot";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: CommandHeader },
    { no: 2, name: "ID", kind: "message", T: EntityID },
    { no: 3, name: "Payload", kind: "message", T: ActorCompleteSnapshotPayload },
    { no: 4, name: "EventPayload", kind: "message", T: ActorCompleteSnapshotPayload },
    { no: 5, name: "PreviousPayload", kind: "message", T: ActorCompleteSnapshotPayload },
  ]);

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

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

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

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

