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 — 业务 keyname- 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordSingle DSL assignee record.static final recordSingle DSL step record (mirrors JSON object literally).static final recordSingle DSL transition record. -
Constructor Summary
ConstructorsConstructorDescriptionFlowDsl(String schemaVersion, String key, String name, Integer version, List<FlowDsl.StepDsl> steps, List<FlowDsl.TransitionDsl> transitions) Creates an instance of aFlowDslrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.name()Returns the value of thenamerecord component.Returns the value of theschemaVersionrecord component.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionsrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
FlowDsl
public FlowDsl(String schemaVersion, String key, String name, Integer version, List<FlowDsl.StepDsl> steps, List<FlowDsl.TransitionDsl> transitions) Creates an instance of aFlowDslrecord class.- Parameters:
schemaVersion- the value for theschemaVersionrecord componentkey- the value for thekeyrecord componentname- the value for thenamerecord componentversion- the value for theversionrecord componentsteps- the value for thestepsrecord componenttransitions- the value for thetransitionsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
schemaVersion
Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
key
-
name
-
version
-
steps
-
transitions
Returns the value of thetransitionsrecord component.- Returns:
- the value of the
transitionsrecord component
-