@Test void shouldSerializeOutputReference() { OutputReference input = OutputReference.builder().nodeId("node-id").var("var").build(); Types.OutputReference expected = Types.OutputReference.newBuilder().setNodeId("node-id").setVar("var").build(); Types.OutputReference output = ProtoUtil.serialize(input); assertEquals(expected, output); }
static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); static Workflow.WorkflowTemplate serialize(WorkflowTemplate template); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); static Workflow.WorkflowTemplate serialize(WorkflowTemplate template);  }