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

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

/**
 * Indicates a resource type within Flyte.
 *
 * @generated from enum flyteidl.core.ResourceType
 */
export enum ResourceType {
  /**
   * @generated from enum value: UNSPECIFIED = 0;
   */
  UNSPECIFIED = 0,

  /**
   * @generated from enum value: TASK = 1;
   */
  TASK = 1,

  /**
   * @generated from enum value: WORKFLOW = 2;
   */
  WORKFLOW = 2,

  /**
   * @generated from enum value: LAUNCH_PLAN = 3;
   */
  LAUNCH_PLAN = 3,

  /**
   * A dataset represents an entity modeled in Flyte DataCatalog. A Dataset is also a versioned entity and can be a compilation of multiple individual objects.
   * Eventually all Catalog objects should be modeled similar to Flyte Objects. The Dataset entities makes it possible for the UI  and CLI to act on the objects 
   * in a similar manner to other Flyte objects
   *
   * @generated from enum value: DATASET = 4;
   */
  DATASET = 4,
}
// Retrieve enum metadata with: proto3.getEnumType(ResourceType)
proto3.util.setEnumType(ResourceType, "flyteidl.core.ResourceType", [
  { no: 0, name: "UNSPECIFIED" },
  { no: 1, name: "TASK" },
  { no: 2, name: "WORKFLOW" },
  { no: 3, name: "LAUNCH_PLAN" },
  { no: 4, name: "DATASET" },
]);

/**
 * Encapsulation of fields that uniquely identifies a Flyte resource.
 *
 * @generated from message flyteidl.core.Identifier
 */
export class Identifier extends Message<Identifier> {
  /**
   * Identifies the specific type of resource that this identifier corresponds to.
   *
   * @generated from field: flyteidl.core.ResourceType resource_type = 1;
   */
  resourceType = ResourceType.UNSPECIFIED;

  /**
   * Name of the project the resource belongs to.
   *
   * @generated from field: string project = 2;
   */
  project = "";

  /**
   * Name of the domain the resource belongs to.
   * A domain can be considered as a subset within a specific project.
   *
   * @generated from field: string domain = 3;
   */
  domain = "";

  /**
   * User provided value for the resource.
   *
   * @generated from field: string name = 4;
   */
  name = "";

  /**
   * Specific version of the resource.
   *
   * @generated from field: string version = 5;
   */
  version = "";

  /**
   * Optional, org key applied to the resource.
   *
   * @generated from field: string org = 6;
   */
  org = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.core.Identifier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "resource_type", kind: "enum", T: proto3.getEnumType(ResourceType) },
    { no: 2, name: "project", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "org", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * Encapsulation of fields that uniquely identifies a Flyte workflow execution
 *
 * @generated from message flyteidl.core.WorkflowExecutionIdentifier
 */
export class WorkflowExecutionIdentifier extends Message<WorkflowExecutionIdentifier> {
  /**
   * Name of the project the resource belongs to.
   *
   * @generated from field: string project = 1;
   */
  project = "";

  /**
   * Name of the domain the resource belongs to.
   * A domain can be considered as a subset within a specific project.
   *
   * @generated from field: string domain = 2;
   */
  domain = "";

  /**
   * User or system provided value for the resource.
   *
   * @generated from field: string name = 4;
   */
  name = "";

  /**
   * Optional, org key applied to the resource.
   *
   * @generated from field: string org = 5;
   */
  org = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.core.WorkflowExecutionIdentifier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "project", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "org", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * Encapsulation of fields that identify a Flyte node execution entity.
 *
 * @generated from message flyteidl.core.NodeExecutionIdentifier
 */
export class NodeExecutionIdentifier extends Message<NodeExecutionIdentifier> {
  /**
   * @generated from field: string node_id = 1;
   */
  nodeId = "";

  /**
   * @generated from field: flyteidl.core.WorkflowExecutionIdentifier execution_id = 2;
   */
  executionId?: WorkflowExecutionIdentifier;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.core.NodeExecutionIdentifier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "node_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "execution_id", kind: "message", T: WorkflowExecutionIdentifier },
  ]);

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

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

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

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

/**
 * Encapsulation of fields that identify a Flyte task execution entity.
 *
 * @generated from message flyteidl.core.TaskExecutionIdentifier
 */
export class TaskExecutionIdentifier extends Message<TaskExecutionIdentifier> {
  /**
   * @generated from field: flyteidl.core.Identifier task_id = 1;
   */
  taskId?: Identifier;

  /**
   * @generated from field: flyteidl.core.NodeExecutionIdentifier node_execution_id = 2;
   */
  nodeExecutionId?: NodeExecutionIdentifier;

  /**
   * @generated from field: uint32 retry_attempt = 3;
   */
  retryAttempt = 0;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.core.TaskExecutionIdentifier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "task_id", kind: "message", T: Identifier },
    { no: 2, name: "node_execution_id", kind: "message", T: NodeExecutionIdentifier },
    { no: 3, name: "retry_attempt", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ]);

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

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

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

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

/**
 * Encapsulation of fields the uniquely identify a signal.
 *
 * @generated from message flyteidl.core.SignalIdentifier
 */
export class SignalIdentifier extends Message<SignalIdentifier> {
  /**
   * Unique identifier for a signal.
   *
   * @generated from field: string signal_id = 1;
   */
  signalId = "";

  /**
   * Identifies the Flyte workflow execution this signal belongs to.
   *
   * @generated from field: flyteidl.core.WorkflowExecutionIdentifier execution_id = 2;
   */
  executionId?: WorkflowExecutionIdentifier;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.core.SignalIdentifier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "signal_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "execution_id", kind: "message", T: WorkflowExecutionIdentifier },
  ]);

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

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

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

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

