You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2021/11/22 04:56:20 UTC
[incubator-eventmesh] branch grpc updated: [Issue #417] gRPC design doc and protobuf models (#594)
This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch grpc
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/grpc by this push:
new dafa5a7 [Issue #417] gRPC design doc and protobuf models (#594)
dafa5a7 is described below
commit dafa5a740b9dd10a45959337fa924e4779317640
Author: jinrongluo <ka...@gmail.com>
AuthorDate: Sun Nov 21 23:56:15 2021 -0500
[Issue #417] gRPC design doc and protobuf models (#594)
* [Issue #337] Fix HttpSubscriber startup issue
* [Issue #337] test commit
* [Issue #337] revert test commit
* [Issue #337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook
* [Issue #337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook
* [Issue #337] Address code review comment for Subscriber Demo App
* adding license headers
* adding grpc build file
* [Issue#417] update settings.gradle
* [Issue#417] fix grpc generated code styles
* [Issue#417] fix grpc generated code styles
* [Issue#417] fix grpc generated code styles
* [Issue#417] fix grpc generated code styles and license issue
* [Issue#417] fix license issue
* [Issue #417] ignore checkstyle for generated files
* [Issue #417] adding allow licensed for grpc protobuf
Co-authored-by: j00441484 <ji...@huawei.com>
---
build.gradle | 2 +
docs/cn/instructions/eventmesh-runtime-protocol.md | 120 ++
docs/en/instructions/eventmesh-runtime-protocol.md | 122 ++
.../eventmesh-protocol-grpc/build.gradle | 53 +
.../src/main/proto/eventmesh-client.proto | 102 +
eventmesh-sdk-java/build.gradle | 3 +
.../client/grpc/protos/ConsumerServiceGrpc.java | 453 +++++
.../client/grpc/protos/EventmeshClient.java | 174 ++
.../eventmesh/client/grpc/protos/Heartbeat.java | 2117 +++++++++++++++++++
.../client/grpc/protos/HeartbeatOrBuilder.java | 97 +
.../client/grpc/protos/HeartbeatServiceGrpc.java | 302 +++
.../eventmesh/client/grpc/protos/Message.java | 1299 ++++++++++++
.../client/grpc/protos/MessageOrBuilder.java | 92 +
.../client/grpc/protos/PublisherServiceGrpc.java | 460 +++++
.../client/grpc/protos/RequestHeader.java | 1910 +++++++++++++++++
.../client/grpc/protos/RequestHeaderOrBuilder.java | 137 ++
.../eventmesh/client/grpc/protos/Response.java | 972 +++++++++
.../client/grpc/protos/ResponseOrBuilder.java | 67 +
.../eventmesh/client/grpc/protos/Subscription.java | 2138 ++++++++++++++++++++
.../client/grpc/protos/SubscriptionOrBuilder.java | 78 +
settings.gradle | 1 +
tool/license/allowed-licenses.txt | 75 +
22 files changed, 10774 insertions(+)
diff --git a/build.gradle b/build.gradle
index 2aa26fb..aa6074c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -87,6 +87,8 @@ allprojects {
maxWarnings = 0
configFile = new File("${rootDir}/style/checkStyle.xml")
}
+
+ checkstyleMain.exclude '**/org/apache/eventmesh/client/grpc/protos**'
}
task tar(type: Tar) {
diff --git a/docs/cn/instructions/eventmesh-runtime-protocol.md b/docs/cn/instructions/eventmesh-runtime-protocol.md
index 01f369b..2921ee0 100644
--- a/docs/cn/instructions/eventmesh-runtime-protocol.md
+++ b/docs/cn/instructions/eventmesh-runtime-protocol.md
@@ -258,3 +258,123 @@ public class LiteMessage {
| 场景 | Server向Client发送消息请求码 | Client回复Server消息响应码 | 说明 |
| ------------------ | ---------------------------- | -------------------------- | ---------------------- |
| 客户端接收异步事件 | HTTP_PUSH_CLIENT_ASYNC(105) | retCode | retCode值为0时代表成功 |
+
+
+## gRPC 协议文档
+
+#### 1. protobuf
+
+在 `eventmesh-protocol-gprc` 模块有 Eventmesh gRPC 客户端的 protobuf 文件. the protobuf 文件路径是 `/src/main/proto/eventmesh-client.proto`.
+
+用gradle build 生成 gRPC 代码在 `/build/generated/source/proto/main`. 生成代码用于 `eventmesh-sdk-java` 模块.
+
+#### 2. gRPC 数据模型
+
+- 消息
+
+以下消息数据模型用于 `publish()`, `requestReply()` 和 `broadcast()` APIs.
+
+```
+message RequestHeader {
+ string env = 1;
+ string region = 2;
+ string idc = 3;
+ string ip = 4;
+ string pid = 5;
+ string sys = 6;
+ string username = 7;
+ string password = 8;
+ string version = 9;
+ string language = 10;
+ string seqNum = 11;
+}
+
+message Message {
+ RequestHeader header = 1;
+ string productionGroup = 2;
+ string topic = 3;
+ string content = 4;
+ string ttl = 5;
+ string uniqueId = 6;
+}
+
+message Response {
+ string respCode = 1;
+ string respMsg = 2;
+ string respTime = 3;
+ string seqNum = 4;
+}
+```
+
+- 订阅
+
+以下订阅数据模型用于 `subscribe()` 和 `unsubscribe()` APIs.
+
+```
+message Subscription {
+ RequestHeader header = 1;
+ string consumerGroup = 2;
+
+ message SubscriptionItem {
+ string topic = 1;
+ string mode = 2;
+ string type = 3;
+ string url = 4;
+ }
+
+ repeated SubscriptionItem subscriptionItems = 3;
+}
+```
+
+- 心跳
+
+以下心跳数据模型用于 `heartbeat()` API.
+
+```
+message Heartbeat {
+ RequestHeader header = 1;
+ string clientType = 2;
+ string producerGroup = 3;
+ string consumerGroup = 4;
+
+ message HeartbeatItem {
+ string topic = 1;
+ string url = 2;
+ }
+
+ repeated HeartbeatItem heartbeatItems = 5;
+}
+```
+
+#### 3. gRPC 服务接口
+
+- 事件生产端服务 APIs
+
+```
+ # 异步事件生产
+ rpc publish(Message) returns (Response);
+
+ # 同步事件生产
+ rpc requestReply(Message) returns (Response);
+
+ # 事件广播
+ rpc broadcast(Message) returns (Response);
+```
+
+- 事件消费端服务 APIs
+
+```
+ # 所消费事件通过 HTTP Webhook推送事件
+ rpc subscribe(Subscription) returns (Response);
+
+ # 所消费事件通过 TCP stream推送事件
+ rpc subscribeStream(Subscription) returns (stream Message);
+
+ rpc unsubscribe(Subscription) returns (Response);
+```
+
+- 客户端心跳服务 API
+
+```
+ rpc heartbeat(Heartbeat) returns (Response);
+```
\ No newline at end of file
diff --git a/docs/en/instructions/eventmesh-runtime-protocol.md b/docs/en/instructions/eventmesh-runtime-protocol.md
index 9049bff..2bdadb2 100644
--- a/docs/en/instructions/eventmesh-runtime-protocol.md
+++ b/docs/en/instructions/eventmesh-runtime-protocol.md
@@ -259,3 +259,125 @@ same with RequestHeader of Heartbeat Msg
| Scene | Server Send | Client Reply | Remark |
| ------------------ | ---------------------------- | -------------------------- | ---------------------- |
| Push async msg to client | HTTP_PUSH_CLIENT_ASYNC(105) | retCode | retCode=0,send success |
+
+## gRPC Protocol Document In Eventmesh-Runtime
+
+#### 1. protobuf
+
+The `eventmesh-protocol-gprc` module contains the protobuf file of the evenmesh client. the protobuf file
+is located as `/src/main/proto/eventmesh-client.proto`.
+
+Run the gradle build to generate the gRPC codes. The generated codes are located at `/build/generated/source/proto/main`.
+
+These generated grpc codes will be used in `eventmesh-sdk-java` module.
+
+#### 2. data models
+
+- message
+
+The following is the message data model, used by `publish()`, `requestReply()` and `broadcast()` APIs.
+
+```
+message RequestHeader {
+ string env = 1;
+ string region = 2;
+ string idc = 3;
+ string ip = 4;
+ string pid = 5;
+ string sys = 6;
+ string username = 7;
+ string password = 8;
+ string version = 9;
+ string language = 10;
+ string seqNum = 11;
+}
+
+message Message {
+ RequestHeader header = 1;
+ string productionGroup = 2;
+ string topic = 3;
+ string content = 4;
+ string ttl = 5;
+ string uniqueId = 6;
+}
+
+message Response {
+ string respCode = 1;
+ string respMsg = 2;
+ string respTime = 3;
+ string seqNum = 4;
+}
+```
+
+- subscription
+
+The following data model is used by `subscribe()` and `unsubscribe()` APIs.
+
+```
+message Subscription {
+ RequestHeader header = 1;
+ string consumerGroup = 2;
+
+ message SubscriptionItem {
+ string topic = 1;
+ string mode = 2;
+ string type = 3;
+ string url = 4;
+ }
+
+ repeated SubscriptionItem subscriptionItems = 3;
+}
+```
+
+- heartbeat
+
+The following data model is used by `heartbeat()` API.
+
+```
+message Heartbeat {
+ RequestHeader header = 1;
+ string clientType = 2;
+ string producerGroup = 3;
+ string consumerGroup = 4;
+
+ message HeartbeatItem {
+ string topic = 1;
+ string url = 2;
+ }
+
+ repeated HeartbeatItem heartbeatItems = 5;
+}
+```
+
+#### 3. service operations
+
+- event publisher service APIs
+
+```
+ # Async event publish
+ rpc publish(Message) returns (Response);
+
+ # Sync event publish
+ rpc requestReply(Message) returns (Response);
+
+ # event broadcast
+ rpc broadcast(Message) returns (Response);
+```
+
+- event consumer service APIs
+
+```
+ # The subscribed event will be delivered by invoking the webhook url in the Subscription
+ rpc subscribe(Subscription) returns (Response);
+
+ # The subscribed event will be delivered through stream of Message
+ rpc subscribeStream(Subscription) returns (stream Message);
+
+ rpc unsubscribe(Subscription) returns (Response);
+```
+
+- client heartbeat service API
+
+```
+ rpc heartbeat(Heartbeat) returns (Response);
+```
\ No newline at end of file
diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle
new file mode 100644
index 0000000..1692e6b
--- /dev/null
+++ b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+plugins {
+ id 'java'
+ id 'com.google.protobuf' version '0.8.17'
+}
+
+repositories {
+ mavenCentral()
+}
+
+def grpcVersion = '1.15.0' // CURRENT_GRPC_VERSION
+def protobufVersion = '3.5.1'
+def protocVersion = protobufVersion
+
+dependencies {
+ implementation "io.grpc:grpc-protobuf:${grpcVersion}"
+ implementation "io.grpc:grpc-stub:${grpcVersion}"
+ implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
+ testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
+ testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
+}
+
+protobuf {
+ protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
+ plugins {
+ grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
+ }
+ generateProtoTasks {
+ all()*.plugins {
+ grpc {}
+ }
+ }
+}
+
+test {
+ useJUnitPlatform()
+}
\ No newline at end of file
diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto
new file mode 100644
index 0000000..1b2e3fa
--- /dev/null
+++ b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto3";
+
+package eventmesh.client;
+
+option java_multiple_files = true;
+option java_package = "org.apache.eventmesh.client.grpc.protos";
+option java_outer_classname = "EventmeshClient";
+
+message RequestHeader {
+ string env = 1;
+ string region = 2;
+ string idc = 3;
+ string ip = 4;
+ string pid = 5;
+ string sys = 6;
+ string username = 7;
+ string password = 8;
+ string version = 9;
+ string language = 10;
+ string seqNum = 11;
+}
+
+message Message {
+ RequestHeader header = 1;
+ string productionGroup = 2;
+ string topic = 3;
+ string content = 4;
+ string ttl = 5;
+ string uniqueId = 6;
+}
+
+message Response {
+ string respCode = 1;
+ string respMsg = 2;
+ string respTime = 3;
+ string seqNum = 4;
+}
+
+message Subscription {
+ RequestHeader header = 1;
+ string consumerGroup = 2;
+
+ message SubscriptionItem {
+ string topic = 1;
+ string mode = 2;
+ string type = 3;
+ string url = 4;
+ }
+
+ repeated SubscriptionItem subscriptionItems = 3;
+}
+
+message Heartbeat {
+ RequestHeader header = 1;
+ string clientType = 2;
+ string producerGroup = 3;
+ string consumerGroup = 4;
+
+ message HeartbeatItem {
+ string topic = 1;
+ string url = 2;
+ }
+
+ repeated HeartbeatItem heartbeatItems = 5;
+}
+
+service PublisherService {
+ rpc publish(Message) returns (Response);
+
+ rpc requestReply(Message) returns (Response);
+
+ rpc broadcast(Message) returns (Response);
+}
+
+service ConsumerService {
+ rpc subscribe(Subscription) returns (Response);
+
+ rpc subscribeStream(Subscription) returns (stream Message);
+
+ rpc unsubscribe(Subscription) returns (Response);
+}
+
+service HeartbeatService {
+ rpc heartbeat(Heartbeat) returns (Response);
+}
\ No newline at end of file
diff --git a/eventmesh-sdk-java/build.gradle b/eventmesh-sdk-java/build.gradle
index e57a607..298e250 100644
--- a/eventmesh-sdk-java/build.gradle
+++ b/eventmesh-sdk-java/build.gradle
@@ -36,4 +36,7 @@ dependencies {
testImplementation "io.netty:netty-all"
testImplementation "org.apache.httpcomponents:httpclient"
+ implementation "io.grpc:grpc-protobuf:1.15.0"
+ implementation "io.grpc:grpc-stub:1.15.0"
+ implementation "com.google.protobuf:protobuf-java-util:3.5.1"
}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ConsumerServiceGrpc.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ConsumerServiceGrpc.java
new file mode 100644
index 0000000..aff9b4c
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ConsumerServiceGrpc.java
@@ -0,0 +1,453 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.client.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.*;
+import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.*;
+
+/**
+ *
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class ConsumerServiceGrpc {
+
+ private ConsumerServiceGrpc() {
+ }
+
+ public static final String SERVICE_NAME = "eventmesh.client.ConsumerService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response> getSubscribeMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "subscribe",
+ requestType = org.apache.eventmesh.client.grpc.protos.Subscription.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response> getSubscribeMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Response> getSubscribeMethod;
+ if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) {
+ ConsumerServiceGrpc.getSubscribeMethod = getSubscribeMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.ConsumerService", "subscribe"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("subscribe"))
+ .build();
+ }
+ }
+ }
+ return getSubscribeMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Message> getSubscribeStreamMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "subscribeStream",
+ requestType = org.apache.eventmesh.client.grpc.protos.Subscription.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Message.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Message> getSubscribeStreamMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Message> getSubscribeStreamMethod;
+ if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) {
+ ConsumerServiceGrpc.getSubscribeStreamMethod = getSubscribeStreamMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Message>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.ConsumerService", "subscribeStream"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Message.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("subscribeStream"))
+ .build();
+ }
+ }
+ }
+ return getSubscribeStreamMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response> getUnsubscribeMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "unsubscribe",
+ requestType = org.apache.eventmesh.client.grpc.protos.Subscription.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response> getUnsubscribeMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Response> getUnsubscribeMethod;
+ if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) {
+ ConsumerServiceGrpc.getUnsubscribeMethod = getUnsubscribeMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Subscription, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.ConsumerService", "unsubscribe"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("unsubscribe"))
+ .build();
+ }
+ }
+ }
+ return getUnsubscribeMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static ConsumerServiceStub newStub(io.grpc.Channel channel) {
+ return new ConsumerServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static ConsumerServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new ConsumerServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static ConsumerServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new ConsumerServiceFutureStub(channel);
+ }
+
+ /**
+ *
+ */
+ public static abstract class ConsumerServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ *
+ */
+ public void subscribe(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getSubscribeMethod(), responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void subscribeStream(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Message> responseObserver) {
+ asyncUnimplementedUnaryCall(getSubscribeStreamMethod(), responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void unsubscribe(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getUnsubscribeMethod(), responseObserver);
+ }
+
+ @Override
+ public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getSubscribeMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_SUBSCRIBE)))
+ .addMethod(
+ getSubscribeStreamMethod(),
+ asyncServerStreamingCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Message>(
+ this, METHODID_SUBSCRIBE_STREAM)))
+ .addMethod(
+ getUnsubscribeMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Subscription,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_UNSUBSCRIBE)))
+ .build();
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class ConsumerServiceStub extends io.grpc.stub.AbstractStub<ConsumerServiceStub> {
+ private ConsumerServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public void subscribe(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getSubscribeMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void subscribeStream(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Message> responseObserver) {
+ asyncServerStreamingCall(
+ getChannel().newCall(getSubscribeStreamMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void unsubscribe(org.apache.eventmesh.client.grpc.protos.Subscription request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getUnsubscribeMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class ConsumerServiceBlockingStub extends io.grpc.stub.AbstractStub<ConsumerServiceBlockingStub> {
+ private ConsumerServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response subscribe(org.apache.eventmesh.client.grpc.protos.Subscription request) {
+ return blockingUnaryCall(
+ getChannel(), getSubscribeMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ */
+ public java.util.Iterator<org.apache.eventmesh.client.grpc.protos.Message> subscribeStream(
+ org.apache.eventmesh.client.grpc.protos.Subscription request) {
+ return blockingServerStreamingCall(
+ getChannel(), getSubscribeStreamMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response unsubscribe(org.apache.eventmesh.client.grpc.protos.Subscription request) {
+ return blockingUnaryCall(
+ getChannel(), getUnsubscribeMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class ConsumerServiceFutureStub extends io.grpc.stub.AbstractStub<ConsumerServiceFutureStub> {
+ private ConsumerServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> subscribe(
+ org.apache.eventmesh.client.grpc.protos.Subscription request) {
+ return futureUnaryCall(
+ getChannel().newCall(getSubscribeMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> unsubscribe(
+ org.apache.eventmesh.client.grpc.protos.Subscription request) {
+ return futureUnaryCall(
+ getChannel().newCall(getUnsubscribeMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_SUBSCRIBE = 0;
+ private static final int METHODID_SUBSCRIBE_STREAM = 1;
+ private static final int METHODID_UNSUBSCRIBE = 2;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final ConsumerServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(ConsumerServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_SUBSCRIBE:
+ serviceImpl.subscribe((org.apache.eventmesh.client.grpc.protos.Subscription) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ case METHODID_SUBSCRIBE_STREAM:
+ serviceImpl.subscribeStream((org.apache.eventmesh.client.grpc.protos.Subscription) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Message>) responseObserver);
+ break;
+ case METHODID_UNSUBSCRIBE:
+ serviceImpl.unsubscribe((org.apache.eventmesh.client.grpc.protos.Subscription) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class ConsumerServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ ConsumerServiceBaseDescriptorSupplier() {
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return org.apache.eventmesh.client.grpc.protos.EventmeshClient.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("ConsumerService");
+ }
+ }
+
+ private static final class ConsumerServiceFileDescriptorSupplier
+ extends ConsumerServiceBaseDescriptorSupplier {
+ ConsumerServiceFileDescriptorSupplier() {
+ }
+ }
+
+ private static final class ConsumerServiceMethodDescriptorSupplier
+ extends ConsumerServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ ConsumerServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new ConsumerServiceFileDescriptorSupplier())
+ .addMethod(getSubscribeMethod())
+ .addMethod(getSubscribeStreamMethod())
+ .addMethod(getUnsubscribeMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/EventmeshClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/EventmeshClient.java
new file mode 100644
index 0000000..9bd4db7
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/EventmeshClient.java
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+public final class EventmeshClient {
+ private EventmeshClient() {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_RequestHeader_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_RequestHeader_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Message_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Message_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Response_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Response_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Subscription_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Subscription_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Subscription_SubscriptionItem_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Heartbeat_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Heartbeat_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_client_Heartbeat_HeartbeatItem_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+
+ static {
+ String[] descriptorData = {
+ "\n\026eventmesh-client.proto\022\020eventmesh.clie" +
+ "nt\"\266\001\n\rRequestHeader\022\013\n\003env\030\001 \001(\t\022\016\n\006reg" +
+ "ion\030\002 \001(\t\022\013\n\003idc\030\003 \001(\t\022\n\n\002ip\030\004 \001(\t\022\013\n\003pi" +
+ "d\030\005 \001(\t\022\013\n\003sys\030\006 \001(\t\022\020\n\010username\030\007 \001(\t\022\020" +
+ "\n\010password\030\010 \001(\t\022\017\n\007version\030\t \001(\t\022\020\n\010lan" +
+ "guage\030\n \001(\t\022\016\n\006seqNum\030\013 \001(\t\"\222\001\n\007Message\022" +
+ "/\n\006header\030\001 \001(\0132\037.eventmesh.client.Reque" +
+ "stHeader\022\027\n\017productionGroup\030\002 \001(\t\022\r\n\005top" +
+ "ic\030\003 \001(\t\022\017\n\007content\030\004 \001(\t\022\013\n\003ttl\030\005 \001(\t\022\020" +
+ "\n\010uniqueId\030\006 \001(\t\"O\n\010Response\022\020\n\010respCode" +
+ "\030\001 \001(\t\022\017\n\007respMsg\030\002 \001(\t\022\020\n\010respTime\030\003 \001(" +
+ "\t\022\016\n\006seqNum\030\004 \001(\t\"\356\001\n\014Subscription\022/\n\006he" +
+ "ader\030\001 \001(\0132\037.eventmesh.client.RequestHea" +
+ "der\022\025\n\rconsumerGroup\030\002 \001(\t\022J\n\021subscripti" +
+ "onItems\030\003 \003(\0132/.eventmesh.client.Subscri" +
+ "ption.SubscriptionItem\032J\n\020SubscriptionIt" +
+ "em\022\r\n\005topic\030\001 \001(\t\022\014\n\004mode\030\002 \001(\t\022\014\n\004type\030" +
+ "\003 \001(\t\022\013\n\003url\030\004 \001(\t\"\356\001\n\tHeartbeat\022/\n\006head" +
+ "er\030\001 \001(\0132\037.eventmesh.client.RequestHeade" +
+ "r\022\022\n\nclientType\030\002 \001(\t\022\025\n\rproducerGroup\030\003" +
+ " \001(\t\022\025\n\rconsumerGroup\030\004 \001(\t\022A\n\016heartbeat" +
+ "Items\030\005 \003(\0132).eventmesh.client.Heartbeat" +
+ ".HeartbeatItem\032+\n\rHeartbeatItem\022\r\n\005topic" +
+ "\030\001 \001(\t\022\013\n\003url\030\002 \001(\t2\337\001\n\020PublisherService" +
+ "\022@\n\007publish\022\031.eventmesh.client.Message\032\032" +
+ ".eventmesh.client.Response\022E\n\014requestRep" +
+ "ly\022\031.eventmesh.client.Message\032\032.eventmes" +
+ "h.client.Response\022B\n\tbroadcast\022\031.eventme" +
+ "sh.client.Message\032\032.eventmesh.client.Res" +
+ "ponse2\365\001\n\017ConsumerService\022G\n\tsubscribe\022\036" +
+ ".eventmesh.client.Subscription\032\032.eventme" +
+ "sh.client.Response\022N\n\017subscribeStream\022\036." +
+ "eventmesh.client.Subscription\032\031.eventmes" +
+ "h.client.Message0\001\022I\n\013unsubscribe\022\036.even" +
+ "tmesh.client.Subscription\032\032.eventmesh.cl" +
+ "ient.Response2X\n\020HeartbeatService\022D\n\thea" +
+ "rtbeat\022\033.eventmesh.client.Heartbeat\032\032.ev" +
+ "entmesh.client.ResponseB<\n\'org.apache.ev" +
+ "entmesh.client.grpc.protosB\017EventmeshCli" +
+ "entP\001b\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[]{
+ }, assigner);
+ internal_static_eventmesh_client_RequestHeader_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_eventmesh_client_RequestHeader_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_RequestHeader_descriptor,
+ new String[]{"Env", "Region", "Idc", "Ip", "Pid", "Sys", "Username", "Password", "Version", "Language", "SeqNum",});
+ internal_static_eventmesh_client_Message_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_eventmesh_client_Message_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Message_descriptor,
+ new String[]{"Header", "ProductionGroup", "Topic", "Content", "Ttl", "UniqueId",});
+ internal_static_eventmesh_client_Response_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_eventmesh_client_Response_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Response_descriptor,
+ new String[]{"RespCode", "RespMsg", "RespTime", "SeqNum",});
+ internal_static_eventmesh_client_Subscription_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_eventmesh_client_Subscription_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Subscription_descriptor,
+ new String[]{"Header", "ConsumerGroup", "SubscriptionItems",});
+ internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor =
+ internal_static_eventmesh_client_Subscription_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_client_Subscription_SubscriptionItem_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor,
+ new String[]{"Topic", "Mode", "Type", "Url",});
+ internal_static_eventmesh_client_Heartbeat_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_eventmesh_client_Heartbeat_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Heartbeat_descriptor,
+ new String[]{"Header", "ClientType", "ProducerGroup", "ConsumerGroup", "HeartbeatItems",});
+ internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor =
+ internal_static_eventmesh_client_Heartbeat_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_client_Heartbeat_HeartbeatItem_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor,
+ new String[]{"Topic", "Url",});
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Heartbeat.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Heartbeat.java
new file mode 100644
index 0000000..f9927b7
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Heartbeat.java
@@ -0,0 +1,2117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.client.Heartbeat}
+ */
+public final class Heartbeat extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ HeartbeatOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Heartbeat.newBuilder() to construct.
+ private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private Heartbeat() {
+ clientType_ = "";
+ producerGroup_ = "";
+ consumerGroup_ = "";
+ heartbeatItems_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Heartbeat(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ clientType_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ producerGroup_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ consumerGroup_ = s;
+ break;
+ }
+ case 42: {
+ if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = new java.util.ArrayList<HeartbeatItem>();
+ mutable_bitField0_ |= 0x00000010;
+ }
+ heartbeatItems_.add(
+ input.readMessage(HeartbeatItem.parser(), extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Heartbeat.class, Builder.class);
+ }
+
+ public interface HeartbeatItemOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.client.Heartbeat.HeartbeatItem)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ String getTopic();
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getTopicBytes();
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ String getUrl();
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getUrlBytes();
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Heartbeat.HeartbeatItem}
+ */
+ public static final class HeartbeatItem extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.client.Heartbeat.HeartbeatItem)
+ HeartbeatItemOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use HeartbeatItem.newBuilder() to construct.
+ private HeartbeatItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private HeartbeatItem() {
+ topic_ = "";
+ url_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private HeartbeatItem(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ url_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_HeartbeatItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ HeartbeatItem.class, Builder.class);
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 1;
+ private volatile Object topic_;
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int URL_FIELD_NUMBER = 2;
+ private volatile Object url_;
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof HeartbeatItem)) {
+ return super.equals(obj);
+ }
+ HeartbeatItem other = (HeartbeatItem) obj;
+
+ boolean result = true;
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getUrl()
+ .equals(other.getUrl());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ hash = (37 * hash) + URL_FIELD_NUMBER;
+ hash = (53 * hash) + getUrl().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static HeartbeatItem parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static HeartbeatItem parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static HeartbeatItem parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static HeartbeatItem parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static HeartbeatItem parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static HeartbeatItem parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static HeartbeatItem parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static HeartbeatItem parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(HeartbeatItem prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Heartbeat.HeartbeatItem}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.Heartbeat.HeartbeatItem)
+ HeartbeatItemOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_HeartbeatItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ HeartbeatItem.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.Heartbeat.HeartbeatItem.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ topic_ = "";
+
+ url_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ public HeartbeatItem getDefaultInstanceForType() {
+ return HeartbeatItem.getDefaultInstance();
+ }
+
+ public HeartbeatItem build() {
+ HeartbeatItem result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public HeartbeatItem buildPartial() {
+ HeartbeatItem result = new HeartbeatItem(this);
+ result.topic_ = topic_;
+ result.url_ = url_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof HeartbeatItem) {
+ return mergeFrom((HeartbeatItem) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(HeartbeatItem other) {
+ if (other == HeartbeatItem.getDefaultInstance()) return this;
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (!other.getUrl().isEmpty()) {
+ url_ = other.url_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ HeartbeatItem parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (HeartbeatItem) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object topic_ = "";
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object url_ = "";
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder setUrl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder clearUrl() {
+
+ url_ = getDefaultInstance().getUrl();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder setUrlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.Heartbeat.HeartbeatItem)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.Heartbeat.HeartbeatItem)
+ private static final HeartbeatItem DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new HeartbeatItem();
+ }
+
+ public static HeartbeatItem getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<HeartbeatItem>
+ PARSER = new com.google.protobuf.AbstractParser<HeartbeatItem>() {
+ public HeartbeatItem parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new HeartbeatItem(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<HeartbeatItem> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<HeartbeatItem> getParserForType() {
+ return PARSER;
+ }
+
+ public HeartbeatItem getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int CLIENTTYPE_FIELD_NUMBER = 2;
+ private volatile Object clientType_;
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public String getClientType() {
+ Object ref = clientType_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ clientType_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getClientTypeBytes() {
+ Object ref = clientType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ clientType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PRODUCERGROUP_FIELD_NUMBER = 3;
+ private volatile Object producerGroup_;
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONSUMERGROUP_FIELD_NUMBER = 4;
+ private volatile Object consumerGroup_;
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public String getConsumerGroup() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ consumerGroup_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConsumerGroupBytes() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ consumerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HEARTBEATITEMS_FIELD_NUMBER = 5;
+ private java.util.List<HeartbeatItem> heartbeatItems_;
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem> getHeartbeatItemsList() {
+ return heartbeatItems_;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<? extends HeartbeatItemOrBuilder>
+ getHeartbeatItemsOrBuilderList() {
+ return heartbeatItems_;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public int getHeartbeatItemsCount() {
+ return heartbeatItems_.size();
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem getHeartbeatItems(int index) {
+ return heartbeatItems_.get(index);
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+ int index) {
+ return heartbeatItems_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (!getClientTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientType_);
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, producerGroup_);
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, consumerGroup_);
+ }
+ for (int i = 0; i < heartbeatItems_.size(); i++) {
+ output.writeMessage(5, heartbeatItems_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (!getClientTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientType_);
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, producerGroup_);
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, consumerGroup_);
+ }
+ for (int i = 0; i < heartbeatItems_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, heartbeatItems_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Heartbeat)) {
+ return super.equals(obj);
+ }
+ Heartbeat other = (Heartbeat) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && getClientType()
+ .equals(other.getClientType());
+ result = result && getProducerGroup()
+ .equals(other.getProducerGroup());
+ result = result && getConsumerGroup()
+ .equals(other.getConsumerGroup());
+ result = result && getHeartbeatItemsList()
+ .equals(other.getHeartbeatItemsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + CLIENTTYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getClientType().hashCode();
+ hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getProducerGroup().hashCode();
+ hash = (37 * hash) + CONSUMERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getConsumerGroup().hashCode();
+ if (getHeartbeatItemsCount() > 0) {
+ hash = (37 * hash) + HEARTBEATITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getHeartbeatItemsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Heartbeat parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Heartbeat parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Heartbeat parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Heartbeat parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Heartbeat parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Heartbeat parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Heartbeat parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Heartbeat parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Heartbeat parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Heartbeat parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Heartbeat parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Heartbeat parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Heartbeat prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Heartbeat}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.Heartbeat)
+ HeartbeatOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Heartbeat.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.Heartbeat.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getHeartbeatItemsFieldBuilder();
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (headerBuilder_ == null) {
+ header_ = null;
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+ clientType_ = "";
+
+ producerGroup_ = "";
+
+ consumerGroup_ = "";
+
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItems_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ } else {
+ heartbeatItemsBuilder_.clear();
+ }
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_Heartbeat_descriptor;
+ }
+
+ public Heartbeat getDefaultInstanceForType() {
+ return Heartbeat.getDefaultInstance();
+ }
+
+ public Heartbeat build() {
+ Heartbeat result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Heartbeat buildPartial() {
+ Heartbeat result = new Heartbeat(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (headerBuilder_ == null) {
+ result.header_ = header_;
+ } else {
+ result.header_ = headerBuilder_.build();
+ }
+ result.clientType_ = clientType_;
+ result.producerGroup_ = producerGroup_;
+ result.consumerGroup_ = consumerGroup_;
+ if (heartbeatItemsBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+ bitField0_ = (bitField0_ & ~0x00000010);
+ }
+ result.heartbeatItems_ = heartbeatItems_;
+ } else {
+ result.heartbeatItems_ = heartbeatItemsBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Heartbeat) {
+ return mergeFrom((Heartbeat) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Heartbeat other) {
+ if (other == Heartbeat.getDefaultInstance()) return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (!other.getClientType().isEmpty()) {
+ clientType_ = other.clientType_;
+ onChanged();
+ }
+ if (!other.getProducerGroup().isEmpty()) {
+ producerGroup_ = other.producerGroup_;
+ onChanged();
+ }
+ if (!other.getConsumerGroup().isEmpty()) {
+ consumerGroup_ = other.consumerGroup_;
+ onChanged();
+ }
+ if (heartbeatItemsBuilder_ == null) {
+ if (!other.heartbeatItems_.isEmpty()) {
+ if (heartbeatItems_.isEmpty()) {
+ heartbeatItems_ = other.heartbeatItems_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ } else {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.addAll(other.heartbeatItems_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.heartbeatItems_.isEmpty()) {
+ if (heartbeatItemsBuilder_.isEmpty()) {
+ heartbeatItemsBuilder_.dispose();
+ heartbeatItemsBuilder_ = null;
+ heartbeatItems_ = other.heartbeatItems_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heartbeatItemsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getHeartbeatItemsFieldBuilder() : null;
+ } else {
+ heartbeatItemsBuilder_.addAllMessages(other.heartbeatItems_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Heartbeat parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Heartbeat) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int bitField0_;
+
+ private RequestHeader header_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return headerBuilder_ != null || header_ != null;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(
+ RequestHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder mergeHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (header_ != null) {
+ header_ =
+ RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+ } else {
+ header_ = value;
+ }
+ onChanged();
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder clearHeader() {
+ if (headerBuilder_ == null) {
+ header_ = null;
+ onChanged();
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader.Builder getHeaderBuilder() {
+
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ RequestHeader.getDefaultInstance() : header_;
+ }
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private Object clientType_ = "";
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public String getClientType() {
+ Object ref = clientType_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ clientType_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getClientTypeBytes() {
+ Object ref = clientType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ clientType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public Builder setClientType(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientType_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public Builder clearClientType() {
+
+ clientType_ = getDefaultInstance().getClientType();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string clientType = 2;</code>
+ */
+ public Builder setClientTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clientType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object producerGroup_ = "";
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder setProducerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder clearProducerGroup() {
+
+ producerGroup_ = getDefaultInstance().getProducerGroup();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder setProducerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object consumerGroup_ = "";
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public String getConsumerGroup() {
+ Object ref = consumerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ consumerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConsumerGroupBytes() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ consumerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder setConsumerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ consumerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder clearConsumerGroup() {
+
+ consumerGroup_ = getDefaultInstance().getConsumerGroup();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder setConsumerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ consumerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List<HeartbeatItem> heartbeatItems_ =
+ java.util.Collections.emptyList();
+
+ private void ensureHeartbeatItemsIsMutable() {
+ if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = new java.util.ArrayList<HeartbeatItem>(heartbeatItems_);
+ bitField0_ |= 0x00000010;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder> heartbeatItemsBuilder_;
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem> getHeartbeatItemsList() {
+ if (heartbeatItemsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(heartbeatItems_);
+ } else {
+ return heartbeatItemsBuilder_.getMessageList();
+ }
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public int getHeartbeatItemsCount() {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.size();
+ } else {
+ return heartbeatItemsBuilder_.getCount();
+ }
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem getHeartbeatItems(int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.get(index);
+ } else {
+ return heartbeatItemsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder setHeartbeatItems(
+ int index, HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.set(index, value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder setHeartbeatItems(
+ int index, HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ int index, HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(index, value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ int index, HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addAllHeartbeatItems(
+ Iterable<? extends HeartbeatItem> values) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, heartbeatItems_);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder clearHeartbeatItems() {
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItems_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder removeHeartbeatItems(int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.remove(index);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder getHeartbeatItemsBuilder(
+ int index) {
+ return getHeartbeatItemsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+ int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.get(index);
+ } else {
+ return heartbeatItemsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<? extends HeartbeatItemOrBuilder>
+ getHeartbeatItemsOrBuilderList() {
+ if (heartbeatItemsBuilder_ != null) {
+ return heartbeatItemsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(heartbeatItems_);
+ }
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder addHeartbeatItemsBuilder() {
+ return getHeartbeatItemsFieldBuilder().addBuilder(
+ HeartbeatItem.getDefaultInstance());
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder addHeartbeatItemsBuilder(
+ int index) {
+ return getHeartbeatItemsFieldBuilder().addBuilder(
+ index, HeartbeatItem.getDefaultInstance());
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem.Builder>
+ getHeartbeatItemsBuilderList() {
+ return getHeartbeatItemsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>
+ getHeartbeatItemsFieldBuilder() {
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>(
+ heartbeatItems_,
+ ((bitField0_ & 0x00000010) == 0x00000010),
+ getParentForChildren(),
+ isClean());
+ heartbeatItems_ = null;
+ }
+ return heartbeatItemsBuilder_;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.Heartbeat)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.Heartbeat)
+ private static final Heartbeat DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Heartbeat();
+ }
+
+ public static Heartbeat getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<Heartbeat>
+ PARSER = new com.google.protobuf.AbstractParser<Heartbeat>() {
+ public Heartbeat parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Heartbeat(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<Heartbeat> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<Heartbeat> getParserForType() {
+ return PARSER;
+ }
+
+ public Heartbeat getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatOrBuilder.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatOrBuilder.java
new file mode 100644
index 0000000..ec67c09
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatOrBuilder.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * HeartbeatOrBuilder interface.
+ */
+public interface HeartbeatOrBuilder extends com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ boolean hasHeader();
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ RequestHeader getHeader();
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ RequestHeaderOrBuilder getHeaderOrBuilder();
+
+ /**
+ * <code>string clientType = 2.</code>
+ */
+ String getClientType();
+
+ /**
+ * <code>string clientType = 2.</code>
+ */
+ com.google.protobuf.ByteString getClientTypeBytes();
+
+ /**
+ * <code>string producerGroup = 3.</code>
+ */
+ String getProducerGroup();
+
+ /**
+ * <code>string producerGroup = 3.</code>
+ */
+ com.google.protobuf.ByteString getProducerGroupBytes();
+
+ /**
+ * <code>string consumerGroup = 4.</code>
+ */
+ String getConsumerGroup();
+
+ /**
+ * <code>string consumerGroup = 4.</code>
+ */
+ com.google.protobuf.ByteString getConsumerGroupBytes();
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5.</code>
+ */
+ java.util.List<Heartbeat.HeartbeatItem> getHeartbeatItemsList();
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5.</code>
+ */
+ Heartbeat.HeartbeatItem getHeartbeatItems(int index);
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5.</code>
+ */
+ int getHeartbeatItemsCount();
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5.</code>
+ */
+ java.util.List<? extends Heartbeat.HeartbeatItemOrBuilder> getHeartbeatItemsOrBuilderList();
+
+ /**
+ * <code>repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5.</code>
+ */
+ Heartbeat.HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(int index);
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatServiceGrpc.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatServiceGrpc.java
new file mode 100644
index 0000000..40df420
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/HeartbeatServiceGrpc.java
@@ -0,0 +1,302 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.client.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ *
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class HeartbeatServiceGrpc {
+
+ private HeartbeatServiceGrpc() {
+ }
+
+ public static final String SERVICE_NAME = "eventmesh.client.HeartbeatService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Heartbeat,
+ org.apache.eventmesh.client.grpc.protos.Response> getHeartbeatMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "heartbeat",
+ requestType = org.apache.eventmesh.client.grpc.protos.Heartbeat.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Heartbeat,
+ org.apache.eventmesh.client.grpc.protos.Response> getHeartbeatMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Heartbeat, org.apache.eventmesh.client.grpc.protos.Response> getHeartbeatMethod;
+ if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) {
+ synchronized (HeartbeatServiceGrpc.class) {
+ if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) {
+ HeartbeatServiceGrpc.getHeartbeatMethod = getHeartbeatMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Heartbeat, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.HeartbeatService", "heartbeat"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Heartbeat.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new HeartbeatServiceMethodDescriptorSupplier("heartbeat"))
+ .build();
+ }
+ }
+ }
+ return getHeartbeatMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static HeartbeatServiceStub newStub(io.grpc.Channel channel) {
+ return new HeartbeatServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static HeartbeatServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new HeartbeatServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static HeartbeatServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new HeartbeatServiceFutureStub(channel);
+ }
+
+ /**
+ *
+ */
+ public static abstract class HeartbeatServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ *
+ */
+ public void heartbeat(org.apache.eventmesh.client.grpc.protos.Heartbeat request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getHeartbeatMethod(), responseObserver);
+ }
+
+ @Override
+ public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getHeartbeatMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Heartbeat,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_HEARTBEAT)))
+ .build();
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class HeartbeatServiceStub extends io.grpc.stub.AbstractStub<HeartbeatServiceStub> {
+ private HeartbeatServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public void heartbeat(org.apache.eventmesh.client.grpc.protos.Heartbeat request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getHeartbeatMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class HeartbeatServiceBlockingStub extends io.grpc.stub.AbstractStub<HeartbeatServiceBlockingStub> {
+ private HeartbeatServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response heartbeat(org.apache.eventmesh.client.grpc.protos.Heartbeat request) {
+ return blockingUnaryCall(
+ getChannel(), getHeartbeatMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class HeartbeatServiceFutureStub extends io.grpc.stub.AbstractStub<HeartbeatServiceFutureStub> {
+ private HeartbeatServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> heartbeat(
+ org.apache.eventmesh.client.grpc.protos.Heartbeat request) {
+ return futureUnaryCall(
+ getChannel().newCall(getHeartbeatMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_HEARTBEAT = 0;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final HeartbeatServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(HeartbeatServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_HEARTBEAT:
+ serviceImpl.heartbeat((org.apache.eventmesh.client.grpc.protos.Heartbeat) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class HeartbeatServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ HeartbeatServiceBaseDescriptorSupplier() {
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return org.apache.eventmesh.client.grpc.protos.EventmeshClient.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("HeartbeatService");
+ }
+ }
+
+ private static final class HeartbeatServiceFileDescriptorSupplier
+ extends HeartbeatServiceBaseDescriptorSupplier {
+ HeartbeatServiceFileDescriptorSupplier() {
+ }
+ }
+
+ private static final class HeartbeatServiceMethodDescriptorSupplier
+ extends HeartbeatServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ HeartbeatServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (HeartbeatServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new HeartbeatServiceFileDescriptorSupplier())
+ .addMethod(getHeartbeatMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Message.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Message.java
new file mode 100644
index 0000000..ecef282
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Message.java
@@ -0,0 +1,1299 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.client.Message}
+ */
+public final class Message extends
+ com.google.protobuf.GeneratedMessageV3 implements MessageOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Message.newBuilder() to construct.
+ private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private Message() {
+ productionGroup_ = "";
+ topic_ = "";
+ content_ = "";
+ ttl_ = "";
+ uniqueId_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Message(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ productionGroup_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ content_ = s;
+ break;
+ }
+ case 42: {
+ String s = input.readStringRequireUtf8();
+
+ ttl_ = s;
+ break;
+ }
+ case 50: {
+ String s = input.readStringRequireUtf8();
+
+ uniqueId_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Message_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Message_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Message.class, Builder.class);
+ }
+
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int PRODUCTIONGROUP_FIELD_NUMBER = 2;
+ private volatile Object productionGroup_;
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public String getProductionGroup() {
+ Object ref = productionGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ productionGroup_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProductionGroupBytes() {
+ Object ref = productionGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ productionGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 3;
+ private volatile Object topic_;
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONTENT_FIELD_NUMBER = 4;
+ private volatile Object content_;
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TTL_FIELD_NUMBER = 5;
+ private volatile Object ttl_;
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int UNIQUEID_FIELD_NUMBER = 6;
+ private volatile Object uniqueId_;
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (!getProductionGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, productionGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uniqueId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (!getProductionGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, productionGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uniqueId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Message)) {
+ return super.equals(obj);
+ }
+ Message other = (Message) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && getProductionGroup()
+ .equals(other.getProductionGroup());
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getContent()
+ .equals(other.getContent());
+ result = result && getTtl()
+ .equals(other.getTtl());
+ result = result && getUniqueId()
+ .equals(other.getUniqueId());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + PRODUCTIONGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getProductionGroup().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ hash = (37 * hash) + TTL_FIELD_NUMBER;
+ hash = (53 * hash) + getTtl().hashCode();
+ hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
+ hash = (53 * hash) + getUniqueId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Message parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Message parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Message parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Message parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Message parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Message parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Message parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Message parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Message parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Message parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Message parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Message parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Message prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Message}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.Message)
+ MessageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Message_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Message_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Message.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.Message.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (headerBuilder_ == null) {
+ header_ = null;
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+ productionGroup_ = "";
+
+ topic_ = "";
+
+ content_ = "";
+
+ ttl_ = "";
+
+ uniqueId_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_Message_descriptor;
+ }
+
+ public Message getDefaultInstanceForType() {
+ return Message.getDefaultInstance();
+ }
+
+ public Message build() {
+ Message result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Message buildPartial() {
+ Message result = new Message(this);
+ if (headerBuilder_ == null) {
+ result.header_ = header_;
+ } else {
+ result.header_ = headerBuilder_.build();
+ }
+ result.productionGroup_ = productionGroup_;
+ result.topic_ = topic_;
+ result.content_ = content_;
+ result.ttl_ = ttl_;
+ result.uniqueId_ = uniqueId_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Message) {
+ return mergeFrom((Message) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Message other) {
+ if (other == Message.getDefaultInstance()) return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (!other.getProductionGroup().isEmpty()) {
+ productionGroup_ = other.productionGroup_;
+ onChanged();
+ }
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (!other.getContent().isEmpty()) {
+ content_ = other.content_;
+ onChanged();
+ }
+ if (!other.getTtl().isEmpty()) {
+ ttl_ = other.ttl_;
+ onChanged();
+ }
+ if (!other.getUniqueId().isEmpty()) {
+ uniqueId_ = other.uniqueId_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Message parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Message) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private RequestHeader header_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return headerBuilder_ != null || header_ != null;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(
+ RequestHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder mergeHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (header_ != null) {
+ header_ =
+ RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+ } else {
+ header_ = value;
+ }
+ onChanged();
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public Builder clearHeader() {
+ if (headerBuilder_ == null) {
+ header_ = null;
+ onChanged();
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+
+ return this;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader.Builder getHeaderBuilder() {
+
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ RequestHeader.getDefaultInstance() : header_;
+ }
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private Object productionGroup_ = "";
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public String getProductionGroup() {
+ Object ref = productionGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ productionGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProductionGroupBytes() {
+ Object ref = productionGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ productionGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public Builder setProductionGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ productionGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public Builder clearProductionGroup() {
+
+ productionGroup_ = getDefaultInstance().getProductionGroup();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string productionGroup = 2;</code>
+ */
+ public Builder setProductionGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ productionGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object topic_ = "";
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object content_ = "";
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder setContent(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder clearContent() {
+
+ content_ = getDefaultInstance().getContent();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder setContentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object ttl_ = "";
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder setTtl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder clearTtl() {
+
+ ttl_ = getDefaultInstance().getTtl();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder setTtlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object uniqueId_ = "";
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder setUniqueId(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder clearUniqueId() {
+
+ uniqueId_ = getDefaultInstance().getUniqueId();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder setUniqueIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.Message)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.Message)
+ private static final Message DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Message();
+ }
+
+ public static Message getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<Message>
+ PARSER = new com.google.protobuf.AbstractParser<Message>() {
+ public Message parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Message(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<Message> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<Message> getParserForType() {
+ return PARSER;
+ }
+
+ public Message getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/MessageOrBuilder.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/MessageOrBuilder.java
new file mode 100644
index 0000000..05dfb84
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/MessageOrBuilder.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * MessageOrBuilder interface.
+ */
+public interface MessageOrBuilder extends com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ boolean hasHeader();
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ RequestHeader getHeader();
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1.</code>
+ */
+ RequestHeaderOrBuilder getHeaderOrBuilder();
+
+ /**
+ * <code>string productionGroup = 2.</code>
+ */
+ String getProductionGroup();
+
+ /**
+ * <code>string productionGroup = 2.</code>
+ */
+ com.google.protobuf.ByteString getProductionGroupBytes();
+
+ /**
+ * <code>string topic = 3.</code>
+ */
+ String getTopic();
+
+ /**
+ * <code>string topic = 3.</code>
+ */
+ com.google.protobuf.ByteString getTopicBytes();
+
+ /**
+ * <code>string content = 4.</code>
+ */
+ String getContent();
+
+ /**
+ * <code>string content = 4.</code>
+ */
+ com.google.protobuf.ByteString getContentBytes();
+
+ /**
+ * <code>string ttl = 5.</code>
+ */
+ String getTtl();
+
+ /**
+ * <code>string ttl = 5.</code>
+ */
+ com.google.protobuf.ByteString getTtlBytes();
+
+ /**
+ * <code>string uniqueId = 6.</code>
+ */
+ String getUniqueId();
+
+ /**
+ * <code>string uniqueId = 6.</code>
+ */
+ com.google.protobuf.ByteString getUniqueIdBytes();
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/PublisherServiceGrpc.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/PublisherServiceGrpc.java
new file mode 100644
index 0000000..d075d8f
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/PublisherServiceGrpc.java
@@ -0,0 +1,460 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.client.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ *
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class PublisherServiceGrpc {
+
+ private PublisherServiceGrpc() {
+ }
+
+ public static final String SERVICE_NAME = "eventmesh.client.PublisherService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getPublishMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "publish",
+ requestType = org.apache.eventmesh.client.grpc.protos.Message.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getPublishMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response> getPublishMethod;
+ if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) {
+ PublisherServiceGrpc.getPublishMethod = getPublishMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.PublisherService", "publish"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Message.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("publish"))
+ .build();
+ }
+ }
+ }
+ return getPublishMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getRequestReplyMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "requestReply",
+ requestType = org.apache.eventmesh.client.grpc.protos.Message.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getRequestReplyMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response> getRequestReplyMethod;
+ if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) {
+ PublisherServiceGrpc.getRequestReplyMethod = getRequestReplyMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.PublisherService", "requestReply"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Message.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("requestReply"))
+ .build();
+ }
+ }
+ }
+ return getRequestReplyMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getBroadcastMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "broadcast",
+ requestType = org.apache.eventmesh.client.grpc.protos.Message.class,
+ responseType = org.apache.eventmesh.client.grpc.protos.Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response> getBroadcastMethod() {
+ io.grpc.MethodDescriptor<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response> getBroadcastMethod;
+ if ((getBroadcastMethod = PublisherServiceGrpc.getBroadcastMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getBroadcastMethod = PublisherServiceGrpc.getBroadcastMethod) == null) {
+ PublisherServiceGrpc.getBroadcastMethod = getBroadcastMethod =
+ io.grpc.MethodDescriptor.<org.apache.eventmesh.client.grpc.protos.Message, org.apache.eventmesh.client.grpc.protos.Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.client.PublisherService", "broadcast"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Message.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ org.apache.eventmesh.client.grpc.protos.Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("broadcast"))
+ .build();
+ }
+ }
+ }
+ return getBroadcastMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static PublisherServiceStub newStub(io.grpc.Channel channel) {
+ return new PublisherServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static PublisherServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new PublisherServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static PublisherServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new PublisherServiceFutureStub(channel);
+ }
+
+ /**
+ *
+ */
+ public static abstract class PublisherServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ *
+ */
+ public void publish(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getPublishMethod(), responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void requestReply(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getRequestReplyMethod(), responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void broadcast(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getBroadcastMethod(), responseObserver);
+ }
+
+ @Override
+ public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getPublishMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_PUBLISH)))
+ .addMethod(
+ getRequestReplyMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_REQUEST_REPLY)))
+ .addMethod(
+ getBroadcastMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ org.apache.eventmesh.client.grpc.protos.Message,
+ org.apache.eventmesh.client.grpc.protos.Response>(
+ this, METHODID_BROADCAST)))
+ .build();
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class PublisherServiceStub extends io.grpc.stub.AbstractStub<PublisherServiceStub> {
+ private PublisherServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public void publish(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getPublishMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void requestReply(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ *
+ */
+ public void broadcast(org.apache.eventmesh.client.grpc.protos.Message request,
+ io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getBroadcastMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class PublisherServiceBlockingStub extends io.grpc.stub.AbstractStub<PublisherServiceBlockingStub> {
+ private PublisherServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response publish(org.apache.eventmesh.client.grpc.protos.Message request) {
+ return blockingUnaryCall(
+ getChannel(), getPublishMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response requestReply(org.apache.eventmesh.client.grpc.protos.Message request) {
+ return blockingUnaryCall(
+ getChannel(), getRequestReplyMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ */
+ public org.apache.eventmesh.client.grpc.protos.Response broadcast(org.apache.eventmesh.client.grpc.protos.Message request) {
+ return blockingUnaryCall(
+ getChannel(), getBroadcastMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ *
+ */
+ public static final class PublisherServiceFutureStub extends io.grpc.stub.AbstractStub<PublisherServiceFutureStub> {
+ private PublisherServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> publish(
+ org.apache.eventmesh.client.grpc.protos.Message request) {
+ return futureUnaryCall(
+ getChannel().newCall(getPublishMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> requestReply(
+ org.apache.eventmesh.client.grpc.protos.Message request) {
+ return futureUnaryCall(
+ getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<org.apache.eventmesh.client.grpc.protos.Response> broadcast(
+ org.apache.eventmesh.client.grpc.protos.Message request) {
+ return futureUnaryCall(
+ getChannel().newCall(getBroadcastMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_PUBLISH = 0;
+ private static final int METHODID_REQUEST_REPLY = 1;
+ private static final int METHODID_BROADCAST = 2;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final PublisherServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(PublisherServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_PUBLISH:
+ serviceImpl.publish((org.apache.eventmesh.client.grpc.protos.Message) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ case METHODID_REQUEST_REPLY:
+ serviceImpl.requestReply((org.apache.eventmesh.client.grpc.protos.Message) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ case METHODID_BROADCAST:
+ serviceImpl.broadcast((org.apache.eventmesh.client.grpc.protos.Message) request,
+ (io.grpc.stub.StreamObserver<org.apache.eventmesh.client.grpc.protos.Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class PublisherServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ PublisherServiceBaseDescriptorSupplier() {
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return org.apache.eventmesh.client.grpc.protos.EventmeshClient.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("PublisherService");
+ }
+ }
+
+ private static final class PublisherServiceFileDescriptorSupplier
+ extends PublisherServiceBaseDescriptorSupplier {
+ PublisherServiceFileDescriptorSupplier() {
+ }
+ }
+
+ private static final class PublisherServiceMethodDescriptorSupplier
+ extends PublisherServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ PublisherServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new PublisherServiceFileDescriptorSupplier())
+ .addMethod(getPublishMethod())
+ .addMethod(getRequestReplyMethod())
+ .addMethod(getBroadcastMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeader.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeader.java
new file mode 100644
index 0000000..ed21ed8
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeader.java
@@ -0,0 +1,1910 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.client.RequestHeader}
+ */
+public final class RequestHeader extends
+ com.google.protobuf.GeneratedMessageV3 implements RequestHeaderOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use RequestHeader.newBuilder() to construct.
+ private RequestHeader(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private RequestHeader() {
+ env_ = "";
+ region_ = "";
+ idc_ = "";
+ ip_ = "";
+ pid_ = "";
+ sys_ = "";
+ username_ = "";
+ password_ = "";
+ version_ = "";
+ language_ = "";
+ seqNum_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private RequestHeader(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ env_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ region_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ idc_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ ip_ = s;
+ break;
+ }
+ case 42: {
+ String s = input.readStringRequireUtf8();
+
+ pid_ = s;
+ break;
+ }
+ case 50: {
+ String s = input.readStringRequireUtf8();
+
+ sys_ = s;
+ break;
+ }
+ case 58: {
+ String s = input.readStringRequireUtf8();
+
+ username_ = s;
+ break;
+ }
+ case 66: {
+ String s = input.readStringRequireUtf8();
+
+ password_ = s;
+ break;
+ }
+ case 74: {
+ String s = input.readStringRequireUtf8();
+
+ version_ = s;
+ break;
+ }
+ case 82: {
+ String s = input.readStringRequireUtf8();
+
+ language_ = s;
+ break;
+ }
+ case 90: {
+ String s = input.readStringRequireUtf8();
+
+ seqNum_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_RequestHeader_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_RequestHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RequestHeader.class, Builder.class);
+ }
+
+ public static final int ENV_FIELD_NUMBER = 1;
+ private volatile Object env_;
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public String getEnv() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ env_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getEnvBytes() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ env_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int REGION_FIELD_NUMBER = 2;
+ private volatile Object region_;
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public String getRegion() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IDC_FIELD_NUMBER = 3;
+ private volatile Object idc_;
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public String getIdc() {
+ Object ref = idc_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ idc_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIdcBytes() {
+ Object ref = idc_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ idc_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IP_FIELD_NUMBER = 4;
+ private volatile Object ip_;
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public String getIp() {
+ Object ref = ip_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ip_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIpBytes() {
+ Object ref = ip_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ip_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PID_FIELD_NUMBER = 5;
+ private volatile Object pid_;
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public String getPid() {
+ Object ref = pid_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ pid_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPidBytes() {
+ Object ref = pid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ pid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SYS_FIELD_NUMBER = 6;
+ private volatile Object sys_;
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public String getSys() {
+ Object ref = sys_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ sys_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSysBytes() {
+ Object ref = sys_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ sys_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USERNAME_FIELD_NUMBER = 7;
+ private volatile Object username_;
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public String getUsername() {
+ Object ref = username_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ username_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUsernameBytes() {
+ Object ref = username_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ username_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PASSWORD_FIELD_NUMBER = 8;
+ private volatile Object password_;
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public String getPassword() {
+ Object ref = password_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ password_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPasswordBytes() {
+ Object ref = password_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ password_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 9;
+ private volatile Object version_;
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public String getVersion() {
+ Object ref = version_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ version_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public com.google.protobuf.ByteString
+ getVersionBytes() {
+ Object ref = version_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ version_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LANGUAGE_FIELD_NUMBER = 10;
+ private volatile Object language_;
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public String getLanguage() {
+ Object ref = language_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ language_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ Object ref = language_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SEQNUM_FIELD_NUMBER = 11;
+ private volatile Object seqNum_;
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getEnvBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, env_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_);
+ }
+ if (!getIdcBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idc_);
+ }
+ if (!getIpBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_);
+ }
+ if (!getPidBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pid_);
+ }
+ if (!getSysBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sys_);
+ }
+ if (!getUsernameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, username_);
+ }
+ if (!getPasswordBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, password_);
+ }
+ if (!getVersionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 9, version_);
+ }
+ if (!getLanguageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 10, language_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 11, seqNum_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getEnvBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, env_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_);
+ }
+ if (!getIdcBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idc_);
+ }
+ if (!getIpBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_);
+ }
+ if (!getPidBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pid_);
+ }
+ if (!getSysBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sys_);
+ }
+ if (!getUsernameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, username_);
+ }
+ if (!getPasswordBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, password_);
+ }
+ if (!getVersionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, version_);
+ }
+ if (!getLanguageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, language_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, seqNum_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof RequestHeader)) {
+ return super.equals(obj);
+ }
+ RequestHeader other = (RequestHeader) obj;
+
+ boolean result = true;
+ result = result && getEnv()
+ .equals(other.getEnv());
+ result = result && getRegion()
+ .equals(other.getRegion());
+ result = result && getIdc()
+ .equals(other.getIdc());
+ result = result && getIp()
+ .equals(other.getIp());
+ result = result && getPid()
+ .equals(other.getPid());
+ result = result && getSys()
+ .equals(other.getSys());
+ result = result && getUsername()
+ .equals(other.getUsername());
+ result = result && getPassword()
+ .equals(other.getPassword());
+ result = result && getVersion()
+ .equals(other.getVersion());
+ result = result && getLanguage()
+ .equals(other.getLanguage());
+ result = result && getSeqNum()
+ .equals(other.getSeqNum());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ENV_FIELD_NUMBER;
+ hash = (53 * hash) + getEnv().hashCode();
+ hash = (37 * hash) + REGION_FIELD_NUMBER;
+ hash = (53 * hash) + getRegion().hashCode();
+ hash = (37 * hash) + IDC_FIELD_NUMBER;
+ hash = (53 * hash) + getIdc().hashCode();
+ hash = (37 * hash) + IP_FIELD_NUMBER;
+ hash = (53 * hash) + getIp().hashCode();
+ hash = (37 * hash) + PID_FIELD_NUMBER;
+ hash = (53 * hash) + getPid().hashCode();
+ hash = (37 * hash) + SYS_FIELD_NUMBER;
+ hash = (53 * hash) + getSys().hashCode();
+ hash = (37 * hash) + USERNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getUsername().hashCode();
+ hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
+ hash = (53 * hash) + getPassword().hashCode();
+ hash = (37 * hash) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion().hashCode();
+ hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguage().hashCode();
+ hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+ hash = (53 * hash) + getSeqNum().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static RequestHeader parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static RequestHeader parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static RequestHeader parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static RequestHeader parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static RequestHeader parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static RequestHeader parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static RequestHeader parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static RequestHeader parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static RequestHeader parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static RequestHeader parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static RequestHeader parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static RequestHeader parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(RequestHeader prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.RequestHeader}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.RequestHeader)
+ RequestHeaderOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_RequestHeader_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_RequestHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RequestHeader.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.RequestHeader.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ env_ = "";
+
+ region_ = "";
+
+ idc_ = "";
+
+ ip_ = "";
+
+ pid_ = "";
+
+ sys_ = "";
+
+ username_ = "";
+
+ password_ = "";
+
+ version_ = "";
+
+ language_ = "";
+
+ seqNum_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_RequestHeader_descriptor;
+ }
+
+ public RequestHeader getDefaultInstanceForType() {
+ return RequestHeader.getDefaultInstance();
+ }
+
+ public RequestHeader build() {
+ RequestHeader result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public RequestHeader buildPartial() {
+ RequestHeader result = new RequestHeader(this);
+ result.env_ = env_;
+ result.region_ = region_;
+ result.idc_ = idc_;
+ result.ip_ = ip_;
+ result.pid_ = pid_;
+ result.sys_ = sys_;
+ result.username_ = username_;
+ result.password_ = password_;
+ result.version_ = version_;
+ result.language_ = language_;
+ result.seqNum_ = seqNum_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof RequestHeader) {
+ return mergeFrom((RequestHeader) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(RequestHeader other) {
+ if (other == RequestHeader.getDefaultInstance()) return this;
+ if (!other.getEnv().isEmpty()) {
+ env_ = other.env_;
+ onChanged();
+ }
+ if (!other.getRegion().isEmpty()) {
+ region_ = other.region_;
+ onChanged();
+ }
+ if (!other.getIdc().isEmpty()) {
+ idc_ = other.idc_;
+ onChanged();
+ }
+ if (!other.getIp().isEmpty()) {
+ ip_ = other.ip_;
+ onChanged();
+ }
+ if (!other.getPid().isEmpty()) {
+ pid_ = other.pid_;
+ onChanged();
+ }
+ if (!other.getSys().isEmpty()) {
+ sys_ = other.sys_;
+ onChanged();
+ }
+ if (!other.getUsername().isEmpty()) {
+ username_ = other.username_;
+ onChanged();
+ }
+ if (!other.getPassword().isEmpty()) {
+ password_ = other.password_;
+ onChanged();
+ }
+ if (!other.getVersion().isEmpty()) {
+ version_ = other.version_;
+ onChanged();
+ }
+ if (!other.getLanguage().isEmpty()) {
+ language_ = other.language_;
+ onChanged();
+ }
+ if (!other.getSeqNum().isEmpty()) {
+ seqNum_ = other.seqNum_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ RequestHeader parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (RequestHeader) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object env_ = "";
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public String getEnv() {
+ Object ref = env_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ env_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getEnvBytes() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ env_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder setEnv(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ env_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder clearEnv() {
+
+ env_ = getDefaultInstance().getEnv();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder setEnvBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ env_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object region_ = "";
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public String getRegion() {
+ Object ref = region_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public Builder setRegion(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ region_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public Builder clearRegion() {
+
+ region_ = getDefaultInstance().getRegion();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string region = 2;</code>
+ */
+ public Builder setRegionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ region_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object idc_ = "";
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public String getIdc() {
+ Object ref = idc_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ idc_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIdcBytes() {
+ Object ref = idc_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ idc_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public Builder setIdc(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ idc_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public Builder clearIdc() {
+
+ idc_ = getDefaultInstance().getIdc();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public Builder setIdcBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ idc_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object ip_ = "";
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public String getIp() {
+ Object ref = ip_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ip_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIpBytes() {
+ Object ref = ip_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ip_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public Builder setIp(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ip_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public Builder clearIp() {
+
+ ip_ = getDefaultInstance().getIp();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public Builder setIpBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ip_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object pid_ = "";
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public String getPid() {
+ Object ref = pid_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ pid_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPidBytes() {
+ Object ref = pid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ pid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public Builder setPid(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pid_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public Builder clearPid() {
+
+ pid_ = getDefaultInstance().getPid();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public Builder setPidBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pid_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object sys_ = "";
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public String getSys() {
+ Object ref = sys_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ sys_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSysBytes() {
+ Object ref = sys_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ sys_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public Builder setSys(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sys_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public Builder clearSys() {
+
+ sys_ = getDefaultInstance().getSys();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public Builder setSysBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sys_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object username_ = "";
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public String getUsername() {
+ Object ref = username_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ username_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUsernameBytes() {
+ Object ref = username_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ username_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public Builder setUsername(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ username_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public Builder clearUsername() {
+
+ username_ = getDefaultInstance().getUsername();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string username = 7;</code>
+ */
+ public Builder setUsernameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ username_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object password_ = "";
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public String getPassword() {
+ Object ref = password_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ password_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPasswordBytes() {
+ Object ref = password_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ password_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public Builder setPassword(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ password_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public Builder clearPassword() {
+
+ password_ = getDefaultInstance().getPassword();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string password = 8;</code>
+ */
+ public Builder setPasswordBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ password_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object version_ = "";
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public String getVersion() {
+ Object ref = version_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ version_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public com.google.protobuf.ByteString
+ getVersionBytes() {
+ Object ref = version_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ version_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public Builder setVersion(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public Builder clearVersion() {
+
+ version_ = getDefaultInstance().getVersion();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string version = 9;</code>
+ */
+ public Builder setVersionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object language_ = "";
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public String getLanguage() {
+ Object ref = language_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ language_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ Object ref = language_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public Builder setLanguage(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ language_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public Builder clearLanguage() {
+
+ language_ = getDefaultInstance().getLanguage();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string language = 10;</code>
+ */
+ public Builder setLanguageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ language_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object seqNum_ = "";
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public Builder setSeqNum(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public Builder clearSeqNum() {
+
+ seqNum_ = getDefaultInstance().getSeqNum();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string seqNum = 11;</code>
+ */
+ public Builder setSeqNumBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.RequestHeader)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.RequestHeader)
+ private static final RequestHeader DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new RequestHeader();
+ }
+
+ public static RequestHeader getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<RequestHeader>
+ PARSER = new com.google.protobuf.AbstractParser<RequestHeader>() {
+ public RequestHeader parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new RequestHeader(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<RequestHeader> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<RequestHeader> getParserForType() {
+ return PARSER;
+ }
+
+ public RequestHeader getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeaderOrBuilder.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeaderOrBuilder.java
new file mode 100644
index 0000000..a112bfa
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/RequestHeaderOrBuilder.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * RequestHeaderOrBuilder interface.
+ */
+public interface RequestHeaderOrBuilder extends com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string env = 1.</code>
+ */
+ String getEnv();
+
+ /**
+ * <code>string env = 1.</code>
+ */
+ com.google.protobuf.ByteString getEnvBytes();
+
+ /**
+ * <code>string region = 2.</code>
+ */
+ String getRegion();
+
+ /**
+ * <code>string region = 2.</code>
+ */
+ com.google.protobuf.ByteString getRegionBytes();
+
+ /**
+ * <code>string idc = 3.</code>
+ */
+ String getIdc();
+
+ /**
+ * <code>string idc = 3.</code>
+ */
+ com.google.protobuf.ByteString getIdcBytes();
+
+ /**
+ * <code>string ip = 4.</code>
+ */
+ String getIp();
+
+ /**
+ * <code>string ip = 4.</code>
+ */
+ com.google.protobuf.ByteString getIpBytes();
+
+ /**
+ * <code>string pid = 5.</code>
+ */
+ String getPid();
+
+ /**
+ * <code>string pid = 5.</code>
+ */
+ com.google.protobuf.ByteString getPidBytes();
+
+ /**
+ * <code>string sys = 6.</code>
+ */
+ String getSys();
+
+ /**
+ * <code>string sys = 6.</code>
+ */
+ com.google.protobuf.ByteString getSysBytes();
+
+ /**
+ * <code>string username = 7.</code>
+ */
+ String getUsername();
+
+ /**
+ * <code>string username = 7.</code>
+ */
+ com.google.protobuf.ByteString getUsernameBytes();
+
+ /**
+ * <code>string password = 8.</code>
+ */
+ String getPassword();
+
+ /**
+ * <code>string password = 8.</code>
+ */
+ com.google.protobuf.ByteString getPasswordBytes();
+
+ /**
+ * <code>string version = 9.</code>
+ */
+ String getVersion();
+
+ /**
+ * <code>string version = 9.</code>
+ */
+ com.google.protobuf.ByteString getVersionBytes();
+
+ /**
+ * <code>string language = 10.</code>
+ */
+ String getLanguage();
+
+ /**
+ * <code>string language = 10.</code>
+ */
+ com.google.protobuf.ByteString getLanguageBytes();
+
+ /**
+ * <code>string seqNum = 11.</code>
+ */
+ String getSeqNum();
+
+ /**
+ * <code>string seqNum = 11.</code>
+ */
+ com.google.protobuf.ByteString getSeqNumBytes();
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Response.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Response.java
new file mode 100644
index 0000000..b54fc33
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Response.java
@@ -0,0 +1,972 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.client.Response}
+ */
+public final class Response extends
+ com.google.protobuf.GeneratedMessageV3 implements ResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Response.newBuilder() to construct.
+ private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private Response() {
+ respCode_ = "";
+ respMsg_ = "";
+ respTime_ = "";
+ seqNum_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Response(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ respCode_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ respMsg_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ respTime_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ seqNum_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Response_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Response_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Response.class, Builder.class);
+ }
+
+ public static final int RESPCODE_FIELD_NUMBER = 1;
+ private volatile Object respCode_;
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public String getRespCode() {
+ Object ref = respCode_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respCode_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespCodeBytes() {
+ Object ref = respCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESPMSG_FIELD_NUMBER = 2;
+ private volatile Object respMsg_;
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public String getRespMsg() {
+ Object ref = respMsg_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respMsg_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespMsgBytes() {
+ Object ref = respMsg_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respMsg_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESPTIME_FIELD_NUMBER = 3;
+ private volatile Object respTime_;
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public String getRespTime() {
+ Object ref = respTime_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respTime_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespTimeBytes() {
+ Object ref = respTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SEQNUM_FIELD_NUMBER = 4;
+ private volatile Object seqNum_;
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getRespCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, respCode_);
+ }
+ if (!getRespMsgBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, respMsg_);
+ }
+ if (!getRespTimeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, respTime_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, seqNum_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getRespCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, respCode_);
+ }
+ if (!getRespMsgBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, respMsg_);
+ }
+ if (!getRespTimeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, respTime_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, seqNum_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Response)) {
+ return super.equals(obj);
+ }
+ Response other = (Response) obj;
+
+ boolean result = true;
+ result = result && getRespCode()
+ .equals(other.getRespCode());
+ result = result && getRespMsg()
+ .equals(other.getRespMsg());
+ result = result && getRespTime()
+ .equals(other.getRespTime());
+ result = result && getSeqNum()
+ .equals(other.getSeqNum());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + RESPCODE_FIELD_NUMBER;
+ hash = (53 * hash) + getRespCode().hashCode();
+ hash = (37 * hash) + RESPMSG_FIELD_NUMBER;
+ hash = (53 * hash) + getRespMsg().hashCode();
+ hash = (37 * hash) + RESPTIME_FIELD_NUMBER;
+ hash = (53 * hash) + getRespTime().hashCode();
+ hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+ hash = (53 * hash) + getSeqNum().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Response parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Response parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Response parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Response parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Response parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Response parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Response parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Response parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Response parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Response parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Response parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static Response parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Response prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Response}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.Response)
+ ResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Response_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Response_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Response.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.Response.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ respCode_ = "";
+
+ respMsg_ = "";
+
+ respTime_ = "";
+
+ seqNum_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_Response_descriptor;
+ }
+
+ public Response getDefaultInstanceForType() {
+ return Response.getDefaultInstance();
+ }
+
+ public Response build() {
+ Response result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Response buildPartial() {
+ Response result = new Response(this);
+ result.respCode_ = respCode_;
+ result.respMsg_ = respMsg_;
+ result.respTime_ = respTime_;
+ result.seqNum_ = seqNum_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Response) {
+ return mergeFrom((Response) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Response other) {
+ if (other == Response.getDefaultInstance()) return this;
+ if (!other.getRespCode().isEmpty()) {
+ respCode_ = other.respCode_;
+ onChanged();
+ }
+ if (!other.getRespMsg().isEmpty()) {
+ respMsg_ = other.respMsg_;
+ onChanged();
+ }
+ if (!other.getRespTime().isEmpty()) {
+ respTime_ = other.respTime_;
+ onChanged();
+ }
+ if (!other.getSeqNum().isEmpty()) {
+ seqNum_ = other.seqNum_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Response parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Response) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object respCode_ = "";
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public String getRespCode() {
+ Object ref = respCode_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respCode_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespCodeBytes() {
+ Object ref = respCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public Builder setRespCode(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ respCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public Builder clearRespCode() {
+
+ respCode_ = getDefaultInstance().getRespCode();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respCode = 1;</code>
+ */
+ public Builder setRespCodeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ respCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object respMsg_ = "";
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public String getRespMsg() {
+ Object ref = respMsg_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respMsg_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespMsgBytes() {
+ Object ref = respMsg_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respMsg_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public Builder setRespMsg(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ respMsg_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public Builder clearRespMsg() {
+
+ respMsg_ = getDefaultInstance().getRespMsg();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respMsg = 2;</code>
+ */
+ public Builder setRespMsgBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ respMsg_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object respTime_ = "";
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public String getRespTime() {
+ Object ref = respTime_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ respTime_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRespTimeBytes() {
+ Object ref = respTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ respTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public Builder setRespTime(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ respTime_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public Builder clearRespTime() {
+
+ respTime_ = getDefaultInstance().getRespTime();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string respTime = 3;</code>
+ */
+ public Builder setRespTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ respTime_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object seqNum_ = "";
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder setSeqNum(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder clearSeqNum() {
+
+ seqNum_ = getDefaultInstance().getSeqNum();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder setSeqNumBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.Response)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.Response)
+ private static final Response DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Response();
+ }
+
+ public static Response getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<Response>
+ PARSER = new com.google.protobuf.AbstractParser<Response>() {
+ public Response parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Response(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<Response> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<Response> getParserForType() {
+ return PARSER;
+ }
+
+ public Response getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ResponseOrBuilder.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ResponseOrBuilder.java
new file mode 100644
index 0000000..0b4acd2
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/ResponseOrBuilder.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * ResponseOrBuilder interface.
+ */
+public interface ResponseOrBuilder extends com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string respCode = 1.</code>
+ */
+ String getRespCode();
+
+ /**
+ * <code>string respCode = 1.</code>
+ */
+ com.google.protobuf.ByteString getRespCodeBytes();
+
+ /**
+ * <code>string respMsg = 2.</code>
+ */
+ String getRespMsg();
+
+ /**
+ * <code>string respMsg = 2.</code>
+ */
+ com.google.protobuf.ByteString getRespMsgBytes();
+
+ /**
+ * <code>string respTime = 3.</code>
+ */
+ String getRespTime();
+
+ /**
+ * <code>string respTime = 3.</code>
+ */
+ com.google.protobuf.ByteString getRespTimeBytes();
+
+ /**
+ * <code>string seqNum = 4.</code>
+ */
+ String getSeqNum();
+
+ /**
+ * <code>string seqNum = 4.</code>
+ */
+ com.google.protobuf.ByteString getSeqNumBytes();
+}
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Subscription.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Subscription.java
new file mode 100644
index 0000000..803e1da
--- /dev/null
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/Subscription.java
@@ -0,0 +1,2138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.client.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.client.Subscription}
+ */
+public final class Subscription extends
+ com.google.protobuf.GeneratedMessageV3 implements SubscriptionOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Subscription.newBuilder() to construct.
+ private Subscription(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private Subscription() {
+ consumerGroup_ = "";
+ subscriptionItems_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Subscription(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ consumerGroup_ = s;
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ subscriptionItems_ = new java.util.ArrayList<SubscriptionItem>();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ subscriptionItems_.add(
+ input.readMessage(SubscriptionItem.parser(), extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ subscriptionItems_ = java.util.Collections.unmodifiableList(subscriptionItems_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Subscription.class, Builder.class);
+ }
+
+ public interface SubscriptionItemOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.client.Subscription.SubscriptionItem)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ String getTopic();
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getTopicBytes();
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ String getMode();
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getModeBytes();
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ String getType();
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getTypeBytes();
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ String getUrl();
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ com.google.protobuf.ByteString
+ getUrlBytes();
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Subscription.SubscriptionItem}
+ */
+ public static final class SubscriptionItem extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.client.Subscription.SubscriptionItem)
+ SubscriptionItemOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use SubscriptionItem.newBuilder() to construct.
+ private SubscriptionItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+
+ private SubscriptionItem() {
+ topic_ = "";
+ mode_ = "";
+ type_ = "";
+ url_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private SubscriptionItem(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ mode_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ type_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ url_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_SubscriptionItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ SubscriptionItem.class, Builder.class);
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 1;
+ private volatile Object topic_;
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MODE_FIELD_NUMBER = 2;
+ private volatile Object mode_;
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public String getMode() {
+ Object ref = mode_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ mode_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getModeBytes() {
+ Object ref = mode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ mode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 3;
+ private volatile Object type_;
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public String getType() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ type_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTypeBytes() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int URL_FIELD_NUMBER = 4;
+ private volatile Object url_;
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
+ }
+ if (!getModeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mode_);
+ }
+ if (!getTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, url_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
+ }
+ if (!getModeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mode_);
+ }
+ if (!getTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, url_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof SubscriptionItem)) {
+ return super.equals(obj);
+ }
+ SubscriptionItem other = (SubscriptionItem) obj;
+
+ boolean result = true;
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getMode()
+ .equals(other.getMode());
+ result = result && getType()
+ .equals(other.getType());
+ result = result && getUrl()
+ .equals(other.getUrl());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ hash = (37 * hash) + MODE_FIELD_NUMBER;
+ hash = (53 * hash) + getMode().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getType().hashCode();
+ hash = (37 * hash) + URL_FIELD_NUMBER;
+ hash = (53 * hash) + getUrl().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static SubscriptionItem parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static SubscriptionItem parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static SubscriptionItem parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static SubscriptionItem parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static SubscriptionItem parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static SubscriptionItem parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static SubscriptionItem parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static SubscriptionItem parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static SubscriptionItem parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static SubscriptionItem parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static SubscriptionItem parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+
+ public static SubscriptionItem parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(SubscriptionItem prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ * Protobuf type {@code eventmesh.client.Subscription.SubscriptionItem}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.client.Subscription.SubscriptionItem)
+ SubscriptionItemOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_SubscriptionItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ SubscriptionItem.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.client.grpc.protos.Subscription.SubscriptionItem.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ topic_ = "";
+
+ mode_ = "";
+
+ type_ = "";
+
+ url_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshClient.internal_static_eventmesh_client_Subscription_SubscriptionItem_descriptor;
+ }
+
+ public SubscriptionItem getDefaultInstanceForType() {
+ return SubscriptionItem.getDefaultInstance();
+ }
+
+ public SubscriptionItem build() {
+ SubscriptionItem result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public SubscriptionItem buildPartial() {
+ SubscriptionItem result = new SubscriptionItem(this);
+ result.topic_ = topic_;
+ result.mode_ = mode_;
+ result.type_ = type_;
+ result.url_ = url_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof SubscriptionItem) {
+ return mergeFrom((SubscriptionItem) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(SubscriptionItem other) {
+ if (other == SubscriptionItem.getDefaultInstance()) return this;
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (!other.getMode().isEmpty()) {
+ mode_ = other.mode_;
+ onChanged();
+ }
+ if (!other.getType().isEmpty()) {
+ type_ = other.type_;
+ onChanged();
+ }
+ if (!other.getUrl().isEmpty()) {
+ url_ = other.url_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ SubscriptionItem parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (SubscriptionItem) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object topic_ = "";
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object mode_ = "";
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public String getMode() {
+ Object ref = mode_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ mode_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getModeBytes() {
+ Object ref = mode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ mode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public Builder setMode(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mode_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public Builder clearMode() {
+
+ mode_ = getDefaultInstance().getMode();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string mode = 2;</code>
+ */
+ public Builder setModeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object type_ = "";
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public String getType() {
+ Object ref = type_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ type_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTypeBytes() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public Builder setType(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ type_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public Builder clearType() {
+
+ type_ = getDefaultInstance().getType();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string type = 3;</code>
+ */
+ public Builder setTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ type_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object url_ = "";
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public Builder setUrl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public Builder clearUrl() {
+
+ url_ = getDefaultInstance().getUrl();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>string url = 4;</code>
+ */
+ public Builder setUrlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.client.Subscription.SubscriptionItem)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.client.Subscription.SubscriptionItem)
+ private static final SubscriptionItem DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new SubscriptionItem();
+ }
+
+ public static SubscriptionItem getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<SubscriptionItem>
+ PARSER = new com.google.protobuf.AbstractParser<SubscriptionItem>() {
+ public SubscriptionItem parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new SubscriptionItem(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<SubscriptionItem> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<SubscriptionItem> getParserForType() {
+ return PARSER;
+ }
+
+ public SubscriptionItem getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+
+ /**
+ * <code>.eventmesh.client.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int CONSUMERGROUP_FIELD_NUMBER = 2;
+ private volatile Object consumerGroup_;
+
+ /**
+ * <code>string consumerGroup = 2;</code>
+ */
+ public String getConsumerGroup() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ consumerGroup_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * <code>string consumerGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConsumerGroupBytes() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ consumerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SUBSCRIPTIONITEMS_FIELD_NUMBER = 3;
+ private java.util.List<SubscriptionItem> subscriptionItems_;
+
+ /**
+ * <code>repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3;</code>
+ */
+ public java.util.List<SubscriptionItem> getSubscriptionItemsList() {
+ return subscriptionItems_;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3;</code>
+ */
+ public java.util.List<? extends SubscriptionItemOrBuilder>
+ getSubscriptionItemsOrBuilderList() {
+ return subscriptionItems_;
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3;</code>
+ */
+ public int getSubscriptionItemsCount() {
+ return subscriptionItems_.size();
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3;</code>
+ */
+ public SubscriptionItem getSubscriptionItems(int index) {
+ return subscriptionItems_.get(index);
+ }
+
+ /**
+ * <code>repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3;</code>
+ */
+ public SubscriptionItemOrBuilder getSubscriptionItemsOrBuilder(
+ int index) {
+ return subscriptionItems_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerGroup_);
+ }
+ for (int i = 0; i < subscriptionItems_.size(); i++) {
+ output.writeMessage(3, subscriptionItems_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerGroup_);
+ }
+ for (int i = 0; i < subscriptionItems_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, subscriptionItems_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Subscription)) {
+ return super.equals(obj);
+ }
+ Subscription other = (Subscription) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && getConsumerGroup()
+ .equals(other.getConsumerGroup());
+ result = result && getSubscriptionItemsList()
+ .equals(other.getSubscriptionItemsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + CONSUMERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getConsumerGroup().hashCode();
+ if (getSubscriptionItemsCount() > 0) {
+ hash = (37 * hash) + SUBSCRIPTIONITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getSubscriptionItemsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
... 999 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org