Record Class FlowDsl

java.lang.Object
java.lang.Record
cloud.opencode.base.flow.dsl.FlowDsl
Record Components:
schemaVersion - DSL schema version (currently must be "1.0") — DSL schema 版本(当前必须为 "1.0")
key - business flow key — 业务 key
name - flow display name — 流程名称
version - business version of the definition — 业务版本号
steps - step definitions — 节点列表
transitions - approval-path edges — 同意路径

public record FlowDsl(String schemaVersion, String key, String name, Integer version, List<FlowDsl.StepDsl> steps, List<FlowDsl.TransitionDsl> transitions) extends Record
Raw JSON DSL top-level structure (v4 §4.1). JSON DSL 顶层结构(v4 §4.1)的 record 形态。

This record is the deserialization target of the on-the-wire DSL JSON. It mirrors the JSON shape literally; semantic conversion to FlowDefinition happens in DslParser, and cross-reference / quota validation is performed by DslValidator.

本 record 是 DSL JSON 的反序列化目标,与 JSON 结构字段一对一; 语义层转换为 FlowDefinition 由 DslParser 完成,引用 / 配额校验由 DslValidator 接力。

Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schemaVersion

      public String schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • version

      public Integer version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • steps

      public List<FlowDsl.StepDsl> steps()
      Returns the value of the steps record component.
      Returns:
      the value of the steps record component
    • transitions

      public List<FlowDsl.TransitionDsl> transitions()
      Returns the value of the transitions record component.
      Returns:
      the value of the transitions record component