You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/27 02:59:15 UTC
[incubator-eventmesh] branch master updated: add workflow proto for grpc-java
This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 228e7561 add workflow proto for grpc-java
new 235704f1 Merge pull request #1942 from walterlife/upgrade-workflow-proto
228e7561 is described below
commit 228e7561159a4020a630af4209946b67b5cd5c09
Author: yuweizhu <yu...@tencent.com>
AuthorDate: Wed Oct 26 23:26:15 2022 +0800
add workflow proto for grpc-java
---
.../workflow/protos/EventmeshWorkflowGrpc.java | 23 +--
.../protocol/workflow/protos/ExecuteRequest.java | 158 +++++++++++++++++++--
.../workflow/protos/ExecuteRequestOrBuilder.java | 16 ++-
eventmesh-workflow-go/api/proto/workflow.proto | 4 +
4 files changed, 178 insertions(+), 23 deletions(-)
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
index dd396e64..3d25efdc 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
@@ -52,16 +52,17 @@ public final class EventmeshWorkflowGrpc {
static {
String[] descriptorData = {
"\n\016workflow.proto\022\037eventmesh.workflow.api" +
- ".protocol\"@\n\016ExecuteRequest\022\n\n\002id\030\001 \001(\t\022" +
- "\023\n\013instance_id\030\002 \001(\t\022\r\n\005input\030\003 \001(\t\"&\n\017E" +
- "xecuteResponse\022\023\n\013instance_id\030\001 \001(\t2z\n\010W" +
- "orkflow\022n\n\007Execute\022/.eventmesh.workflow." +
- "api.protocol.ExecuteRequest\0320.eventmesh." +
- "workflow.api.protocol.ExecuteResponse\"\000B" +
- "\226\001\n4org.apache.eventmesh.common.protocol" +
- ".workflow.protosB\025EventmeshWorkflowGrpcP" +
- "\001ZEgithub.com/apache/incubator-eventmesh" +
- "/eventmesh-workflow-go/api/protob\006proto3"
+ ".protocol\"Z\n\016ExecuteRequest\022\n\n\002id\030\001 \001(\t\022" +
+ "\023\n\013instance_id\030\002 \001(\t\022\030\n\020task_instance_id" +
+ "\030\003 \001(\t\022\r\n\005input\030\004 \001(\t\"&\n\017ExecuteResponse" +
+ "\022\023\n\013instance_id\030\001 \001(\t2z\n\010Workflow\022n\n\007Exe" +
+ "cute\022/.eventmesh.workflow.api.protocol.E" +
+ "xecuteRequest\0320.eventmesh.workflow.api.p" +
+ "rotocol.ExecuteResponse\"\000B\226\001\n4org.apache" +
+ ".eventmesh.common.protocol.workflow.prot" +
+ "osB\025EventmeshWorkflowGrpcP\001ZEgithub.com/" +
+ "apache/incubator-eventmesh/eventmesh-wor" +
+ "kflow-go/api/protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -72,7 +73,7 @@ public final class EventmeshWorkflowGrpc {
internal_static_eventmesh_workflow_api_protocol_ExecuteRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_eventmesh_workflow_api_protocol_ExecuteRequest_descriptor,
- new String[] { "Id", "InstanceId", "Input", });
+ new String[] { "Id", "InstanceId", "TaskInstanceId", "Input", });
internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable = new
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
index b8b8f38e..878e5f49 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
@@ -36,6 +36,7 @@ private static final long serialVersionUID = 0L;
private ExecuteRequest() {
id_ = "";
instanceId_ = "";
+ taskInstanceId_ = "";
input_ = "";
}
@@ -84,6 +85,12 @@ private static final long serialVersionUID = 0L;
case 26: {
String s = input.readStringRequireUtf8();
+ taskInstanceId_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
input_ = s;
break;
}
@@ -195,10 +202,48 @@ private static final long serialVersionUID = 0L;
}
}
- public static final int INPUT_FIELD_NUMBER = 3;
+ public static final int TASK_INSTANCE_ID_FIELD_NUMBER = 3;
+ private volatile Object taskInstanceId_;
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return The taskInstanceId.
+ */
+ @Override
+ public String getTaskInstanceId() {
+ Object ref = taskInstanceId_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ taskInstanceId_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return The bytes for taskInstanceId.
+ */
+ @Override
+ public com.google.protobuf.ByteString
+ getTaskInstanceIdBytes() {
+ Object ref = taskInstanceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ taskInstanceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INPUT_FIELD_NUMBER = 4;
private volatile Object input_;
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return The input.
*/
@Override
@@ -215,7 +260,7 @@ private static final long serialVersionUID = 0L;
}
}
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return The bytes for input.
*/
@Override
@@ -253,8 +298,11 @@ private static final long serialVersionUID = 0L;
if (!getInstanceIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_);
}
+ if (!getTaskInstanceIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, taskInstanceId_);
+ }
if (!getInputBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, input_);
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, input_);
}
unknownFields.writeTo(output);
}
@@ -271,8 +319,11 @@ private static final long serialVersionUID = 0L;
if (!getInstanceIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_);
}
+ if (!getTaskInstanceIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, taskInstanceId_);
+ }
if (!getInputBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, input_);
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, input_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
@@ -293,6 +344,8 @@ private static final long serialVersionUID = 0L;
.equals(other.getId())) return false;
if (!getInstanceId()
.equals(other.getInstanceId())) return false;
+ if (!getTaskInstanceId()
+ .equals(other.getTaskInstanceId())) return false;
if (!getInput()
.equals(other.getInput())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
@@ -310,6 +363,8 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER;
hash = (53 * hash) + getInstanceId().hashCode();
+ hash = (37 * hash) + TASK_INSTANCE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getTaskInstanceId().hashCode();
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
@@ -449,6 +504,8 @@ private static final long serialVersionUID = 0L;
instanceId_ = "";
+ taskInstanceId_ = "";
+
input_ = "";
return this;
@@ -479,6 +536,7 @@ private static final long serialVersionUID = 0L;
ExecuteRequest result = new ExecuteRequest(this);
result.id_ = id_;
result.instanceId_ = instanceId_;
+ result.taskInstanceId_ = taskInstanceId_;
result.input_ = input_;
onBuilt();
return result;
@@ -536,6 +594,10 @@ private static final long serialVersionUID = 0L;
instanceId_ = other.instanceId_;
onChanged();
}
+ if (!other.getTaskInstanceId().isEmpty()) {
+ taskInstanceId_ = other.taskInstanceId_;
+ onChanged();
+ }
if (!other.getInput().isEmpty()) {
input_ = other.input_;
onChanged();
@@ -721,9 +783,85 @@ private static final long serialVersionUID = 0L;
return this;
}
+ private Object taskInstanceId_ = "";
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return The taskInstanceId.
+ */
+ public String getTaskInstanceId() {
+ Object ref = taskInstanceId_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ taskInstanceId_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return The bytes for taskInstanceId.
+ */
+ public com.google.protobuf.ByteString
+ getTaskInstanceIdBytes() {
+ Object ref = taskInstanceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ taskInstanceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @param value The taskInstanceId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTaskInstanceId(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ taskInstanceId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return This builder for chaining.
+ */
+ public Builder clearTaskInstanceId() {
+
+ taskInstanceId_ = getDefaultInstance().getTaskInstanceId();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @param value The bytes for taskInstanceId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTaskInstanceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ taskInstanceId_ = value;
+ onChanged();
+ return this;
+ }
+
private Object input_ = "";
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return The input.
*/
public String getInput() {
@@ -739,7 +877,7 @@ private static final long serialVersionUID = 0L;
}
}
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return The bytes for input.
*/
public com.google.protobuf.ByteString
@@ -756,7 +894,7 @@ private static final long serialVersionUID = 0L;
}
}
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @param value The input to set.
* @return This builder for chaining.
*/
@@ -771,7 +909,7 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return This builder for chaining.
*/
public Builder clearInput() {
@@ -781,7 +919,7 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @param value The bytes for input to set.
* @return This builder for chaining.
*/
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
index c882835b..2a6c5362 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
@@ -50,12 +50,24 @@ public interface ExecuteRequestOrBuilder extends
getInstanceIdBytes();
/**
- * <code>string input = 3;</code>
+ * <code>string task_instance_id = 3;</code>
+ * @return The taskInstanceId.
+ */
+ String getTaskInstanceId();
+ /**
+ * <code>string task_instance_id = 3;</code>
+ * @return The bytes for taskInstanceId.
+ */
+ com.google.protobuf.ByteString
+ getTaskInstanceIdBytes();
+
+ /**
+ * <code>string input = 4;</code>
* @return The input.
*/
String getInput();
/**
- * <code>string input = 3;</code>
+ * <code>string input = 4;</code>
* @return The bytes for input.
*/
com.google.protobuf.ByteString
diff --git a/eventmesh-workflow-go/api/proto/workflow.proto b/eventmesh-workflow-go/api/proto/workflow.proto
index bc69f9ec..550a222c 100644
--- a/eventmesh-workflow-go/api/proto/workflow.proto
+++ b/eventmesh-workflow-go/api/proto/workflow.proto
@@ -19,6 +19,10 @@ syntax = "proto3";
package eventmesh.workflow.api.protocol;
+option java_multiple_files = true;
+option java_package="org.apache.eventmesh.common.protocol.workflow.protos";
+option java_outer_classname = "EventmeshWorkflowGrpc";
+
option go_package = "github.com/apache/incubator-eventmesh/eventmesh-workflow-go/api/proto";
service Workflow {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org