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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { NodeExecutionEvent, TaskExecutionEvent, WorkflowExecutionEvent } from "../event/event_pb.js";

/**
 * Indicates that a sent event was not used to update execution state due to
 * the referenced execution already being terminated (and therefore ineligible
 * for further state transitions).
 *
 * @generated from message flyteidl.admin.EventErrorAlreadyInTerminalState
 */
export class EventErrorAlreadyInTerminalState extends Message<EventErrorAlreadyInTerminalState> {
  /**
   * +required
   *
   * @generated from field: string current_phase = 1;
   */
  currentPhase = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.EventErrorAlreadyInTerminalState";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "current_phase", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * Indicates an event was rejected because it came from a different cluster than 
 * is on record as running the execution.
 *
 * @generated from message flyteidl.admin.EventErrorIncompatibleCluster
 */
export class EventErrorIncompatibleCluster extends Message<EventErrorIncompatibleCluster> {
  /**
   * The cluster which has been recorded as processing the execution.
   * +required
   *
   * @generated from field: string cluster = 1;
   */
  cluster = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.EventErrorIncompatibleCluster";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "cluster", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * Indicates why a sent event was not used to update execution.
 *
 * @generated from message flyteidl.admin.EventFailureReason
 */
export class EventFailureReason extends Message<EventFailureReason> {
  /**
   * +required
   *
   * @generated from oneof flyteidl.admin.EventFailureReason.reason
   */
  reason: {
    /**
     * @generated from field: flyteidl.admin.EventErrorAlreadyInTerminalState already_in_terminal_state = 1;
     */
    value: EventErrorAlreadyInTerminalState;
    case: "alreadyInTerminalState";
  } | {
    /**
     * @generated from field: flyteidl.admin.EventErrorIncompatibleCluster incompatible_cluster = 2;
     */
    value: EventErrorIncompatibleCluster;
    case: "incompatibleCluster";
  } | { case: undefined; value?: undefined } = { case: undefined };

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.EventFailureReason";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "already_in_terminal_state", kind: "message", T: EventErrorAlreadyInTerminalState, oneof: "reason" },
    { no: 2, name: "incompatible_cluster", kind: "message", T: EventErrorIncompatibleCluster, oneof: "reason" },
  ]);

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

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

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

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

/**
 * Request to send a notification that a workflow execution event has occurred.
 *
 * @generated from message flyteidl.admin.WorkflowExecutionEventRequest
 */
export class WorkflowExecutionEventRequest extends Message<WorkflowExecutionEventRequest> {
  /**
   * Unique ID for this request that can be traced between services
   *
   * @generated from field: string request_id = 1;
   */
  requestId = "";

  /**
   * Details about the event that occurred.
   *
   * @generated from field: flyteidl.event.WorkflowExecutionEvent event = 2;
   */
  event?: WorkflowExecutionEvent;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.WorkflowExecutionEventRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "event", kind: "message", T: WorkflowExecutionEvent },
  ]);

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

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

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

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

/**
 * Purposefully empty, may be populated in the future.
 *
 * @generated from message flyteidl.admin.WorkflowExecutionEventResponse
 */
export class WorkflowExecutionEventResponse extends Message<WorkflowExecutionEventResponse> {
  constructor(data?: PartialMessage<WorkflowExecutionEventResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.WorkflowExecutionEventResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

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

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

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

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

/**
 * Request to send a notification that a node execution event has occurred.
 *
 * @generated from message flyteidl.admin.NodeExecutionEventRequest
 */
export class NodeExecutionEventRequest extends Message<NodeExecutionEventRequest> {
  /**
   * Unique ID for this request that can be traced between services
   *
   * @generated from field: string request_id = 1;
   */
  requestId = "";

  /**
   * Details about the event that occurred.
   *
   * @generated from field: flyteidl.event.NodeExecutionEvent event = 2;
   */
  event?: NodeExecutionEvent;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.NodeExecutionEventRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "event", kind: "message", T: NodeExecutionEvent },
  ]);

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

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

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

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

/**
 * Purposefully empty, may be populated in the future.
 *
 * @generated from message flyteidl.admin.NodeExecutionEventResponse
 */
export class NodeExecutionEventResponse extends Message<NodeExecutionEventResponse> {
  constructor(data?: PartialMessage<NodeExecutionEventResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.NodeExecutionEventResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

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

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

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

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

/**
 * Request to send a notification that a task execution event has occurred.
 *
 * @generated from message flyteidl.admin.TaskExecutionEventRequest
 */
export class TaskExecutionEventRequest extends Message<TaskExecutionEventRequest> {
  /**
   * Unique ID for this request that can be traced between services
   *
   * @generated from field: string request_id = 1;
   */
  requestId = "";

  /**
   * Details about the event that occurred.
   *
   * @generated from field: flyteidl.event.TaskExecutionEvent event = 2;
   */
  event?: TaskExecutionEvent;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.TaskExecutionEventRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "event", kind: "message", T: TaskExecutionEvent },
  ]);

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

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

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

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

/**
 * Purposefully empty, may be populated in the future.
 *
 * @generated from message flyteidl.admin.TaskExecutionEventResponse
 */
export class TaskExecutionEventResponse extends Message<TaskExecutionEventResponse> {
  constructor(data?: PartialMessage<TaskExecutionEventResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.TaskExecutionEventResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

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

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

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

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

