@Test void testToIdlTemplate() { SdkWorkflowBuilder builder = new SdkWorkflowBuilder(); new Times2Workflow().expand(builder); WorkflowTemplate expected = WorkflowTemplate.builder() .metadata(WorkflowMetadata.builder().build()) .interface_(expectedInterface()) .outputs(expectedOutputs()) .nodes(expectedNodes()) .build(); assertEquals(expected, builder.toIdlTemplate()); }
public WorkflowTemplate toIdlTemplate() { WorkflowMetadata metadata = WorkflowMetadata.builder().build(); List<Node> nodes = nodesToIdl(); return WorkflowTemplate.builder() .metadata(metadata) .interface_( TypedInterface.builder() .inputs(getInputVariables()) .outputs(getOutputVariables()) .build()) .outputs(getOutputBindings()) .nodes(nodes) .build(); }
SdkWorkflowBuilder { public WorkflowTemplate toIdlTemplate() { WorkflowMetadata metadata = WorkflowMetadata.builder().build(); List<Node> nodes = nodesToIdl(); return WorkflowTemplate.builder() .metadata(metadata) .interface_( TypedInterface.builder() .inputs(getInputVariables()) .outputs(getOutputVariables()) .build()) .outputs(getOutputBindings()) .nodes(nodes) .build(); } }
SdkWorkflowBuilder { public WorkflowTemplate toIdlTemplate() { WorkflowMetadata metadata = WorkflowMetadata.builder().build(); List<Node> nodes = nodesToIdl(); return WorkflowTemplate.builder() .metadata(metadata) .interface_( TypedInterface.builder() .inputs(getInputVariables()) .outputs(getOutputVariables()) .build()) .outputs(getOutputBindings()) .nodes(nodes) .build(); } SdkWorkflowBuilder(); }
SdkWorkflowBuilder { public WorkflowTemplate toIdlTemplate() { WorkflowMetadata metadata = WorkflowMetadata.builder().build(); List<Node> nodes = nodesToIdl(); return WorkflowTemplate.builder() .metadata(metadata) .interface_( TypedInterface.builder() .inputs(getInputVariables()) .outputs(getOutputVariables()) .build()) .outputs(getOutputBindings()) .nodes(nodes) .build(); } SdkWorkflowBuilder(); SdkNode apply(String nodeId, SdkTransform transform); SdkNode apply(String nodeId, SdkTransform transform, Map<String, SdkBindingData> inputs); static SdkBindingData literalOfInteger(long value); static SdkBindingData literalOfFloat(double value); static SdkBindingData literalOfString(String value); static SdkBindingData literalOfBoolean(boolean value); static SdkBindingData literalOfDatetime(Instant value); static SdkBindingData literalOfDuration(Duration value); SdkBinding mapOf(String name1, SdkBindingData value1); SdkBinding mapOf(
      String name1, SdkBindingData value1, String name2, SdkBindingData value2); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3,
      String name4,
      SdkBindingData value4); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3,
      String name4,
      SdkBindingData value4,
      String name5,
      SdkBindingData value5); SdkBinding tupleOf(SdkNode... nodes); SdkBindingData inputOfInteger(String name); SdkBindingData inputOfInteger(String name, String help); SdkBindingData inputOfString(String name); SdkBindingData inputOfString(String name, String help); SdkBindingData inputOfBoolean(String name); SdkBindingData inputOfBoolean(String name, String help); SdkBindingData inputOfDatetime(String name); SdkBindingData inputOfDatetime(String name, String help); SdkBindingData inputOfDuration(String name); SdkBindingData inputOfDuration(String name, String help); SdkBindingData inputOfFloat(String name); SdkBindingData inputOfFloat(String name, String help); void output(String name, SdkBindingData value); void output(String name, SdkBindingData value, String help); void applyInternal(SdkNode node); WorkflowTemplate toIdlTemplate(); }
SdkWorkflowBuilder { public WorkflowTemplate toIdlTemplate() { WorkflowMetadata metadata = WorkflowMetadata.builder().build(); List<Node> nodes = nodesToIdl(); return WorkflowTemplate.builder() .metadata(metadata) .interface_( TypedInterface.builder() .inputs(getInputVariables()) .outputs(getOutputVariables()) .build()) .outputs(getOutputBindings()) .nodes(nodes) .build(); } SdkWorkflowBuilder(); SdkNode apply(String nodeId, SdkTransform transform); SdkNode apply(String nodeId, SdkTransform transform, Map<String, SdkBindingData> inputs); static SdkBindingData literalOfInteger(long value); static SdkBindingData literalOfFloat(double value); static SdkBindingData literalOfString(String value); static SdkBindingData literalOfBoolean(boolean value); static SdkBindingData literalOfDatetime(Instant value); static SdkBindingData literalOfDuration(Duration value); SdkBinding mapOf(String name1, SdkBindingData value1); SdkBinding mapOf(
      String name1, SdkBindingData value1, String name2, SdkBindingData value2); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3,
      String name4,
      SdkBindingData value4); SdkBinding mapOf(
      String name1,
      SdkBindingData value1,
      String name2,
      SdkBindingData value2,
      String name3,
      SdkBindingData value3,
      String name4,
      SdkBindingData value4,
      String name5,
      SdkBindingData value5); SdkBinding tupleOf(SdkNode... nodes); SdkBindingData inputOfInteger(String name); SdkBindingData inputOfInteger(String name, String help); SdkBindingData inputOfString(String name); SdkBindingData inputOfString(String name, String help); SdkBindingData inputOfBoolean(String name); SdkBindingData inputOfBoolean(String name, String help); SdkBindingData inputOfDatetime(String name); SdkBindingData inputOfDatetime(String name, String help); SdkBindingData inputOfDuration(String name); SdkBindingData inputOfDuration(String name, String help); SdkBindingData inputOfFloat(String name); SdkBindingData inputOfFloat(String name, String help); void output(String name, SdkBindingData value); void output(String name, SdkBindingData value, String help); void applyInternal(SdkNode node); WorkflowTemplate toIdlTemplate();  }