diff --git a/build.gradle b/build.gradle index 2aa26fb725..aa6074c715 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 01f369b96f..2921ee0112 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 9049bfff11..2bdadb2406 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 0000000000..1692e6bceb --- /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 0000000000..1b2e3fa438 --- /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 e57a607ed2..298e250811 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 0000000000..aff9b4ce2c --- /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 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 getSubscribeMethod() { + io.grpc.MethodDescriptor getSubscribeMethod; + if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) { + synchronized (ConsumerServiceGrpc.class) { + if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) { + ConsumerServiceGrpc.getSubscribeMethod = getSubscribeMethod = + io.grpc.MethodDescriptor.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 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 getSubscribeStreamMethod() { + io.grpc.MethodDescriptor getSubscribeStreamMethod; + if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) { + synchronized (ConsumerServiceGrpc.class) { + if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) { + ConsumerServiceGrpc.getSubscribeStreamMethod = getSubscribeStreamMethod = + io.grpc.MethodDescriptor.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 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 getUnsubscribeMethod() { + io.grpc.MethodDescriptor getUnsubscribeMethod; + if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) { + synchronized (ConsumerServiceGrpc.class) { + if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) { + ConsumerServiceGrpc.getUnsubscribeMethod = getUnsubscribeMethod = + io.grpc.MethodDescriptor.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 responseObserver) { + asyncUnimplementedUnaryCall(getSubscribeMethod(), responseObserver); + } + + /** + * + */ + public void subscribeStream(org.apache.eventmesh.client.grpc.protos.Subscription request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSubscribeStreamMethod(), responseObserver); + } + + /** + * + */ + public void unsubscribe(org.apache.eventmesh.client.grpc.protos.Subscription request, + io.grpc.stub.StreamObserver 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 { + 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSubscribeMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + */ + public void subscribeStream(org.apache.eventmesh.client.grpc.protos.Subscription request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getSubscribeStreamMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + */ + public void unsubscribe(org.apache.eventmesh.client.grpc.protos.Subscription request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUnsubscribeMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + */ + public static final class ConsumerServiceBlockingStub extends io.grpc.stub.AbstractStub { + 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 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 { + 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 subscribe( + org.apache.eventmesh.client.grpc.protos.Subscription request) { + return futureUnaryCall( + getChannel().newCall(getSubscribeMethod(), getCallOptions()), request); + } + + /** + * + */ + public com.google.common.util.concurrent.ListenableFuture 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 implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + 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 responseObserver) { + switch (methodId) { + case METHODID_SUBSCRIBE: + serviceImpl.subscribe((org.apache.eventmesh.client.grpc.protos.Subscription) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SUBSCRIBE_STREAM: + serviceImpl.subscribeStream((org.apache.eventmesh.client.grpc.protos.Subscription) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNSUBSCRIBE: + serviceImpl.unsubscribe((org.apache.eventmesh.client.grpc.protos.Subscription) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @Override + @SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver 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 0000000000..9bd4db761d --- /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 0000000000..f9927b7b81 --- /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(); + 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 { + + /** + * string topic = 1; + */ + String getTopic(); + + /** + * string topic = 1; + */ + com.google.protobuf.ByteString + getTopicBytes(); + + /** + * string url = 2; + */ + String getUrl(); + + /** + * string url = 2; + */ + 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_; + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + 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_; + + /** + * string url = 2; + */ + 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; + } + } + + /** + * string url = 2; + */ + 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 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_ = ""; + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + public Builder setTopic( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + + /** + * string topic = 1; + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + + /** + * string topic = 1; + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + + private Object url_ = ""; + + /** + * string url = 2; + */ + 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; + } + } + + /** + * string url = 2; + */ + 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; + } + } + + /** + * string url = 2; + */ + public Builder setUrl( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + + /** + * string url = 2; + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + + /** + * string url = 2; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public HeartbeatItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private RequestHeader header_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int CLIENTTYPE_FIELD_NUMBER = 2; + private volatile Object clientType_; + + /** + * string clientType = 2; + */ + 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; + } + } + + /** + * string clientType = 2; + */ + 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_; + + /** + * string producerGroup = 3; + */ + 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; + } + } + + /** + * string producerGroup = 3; + */ + 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_; + + /** + * string consumerGroup = 4; + */ + 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; + } + } + + /** + * string consumerGroup = 4; + */ + 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 heartbeatItems_; + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public java.util.List getHeartbeatItemsList() { + return heartbeatItems_; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public java.util.List + getHeartbeatItemsOrBuilderList() { + return heartbeatItems_; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public int getHeartbeatItemsCount() { + return heartbeatItems_.size(); + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItem getHeartbeatItems(int index) { + return heartbeatItems_.get(index); + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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 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_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader(RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader( + RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + RequestHeader.getDefaultInstance() : header_; + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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_ = ""; + + /** + * string clientType = 2; + */ + 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; + } + } + + /** + * string clientType = 2; + */ + 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; + } + } + + /** + * string clientType = 2; + */ + public Builder setClientType( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + clientType_ = value; + onChanged(); + return this; + } + + /** + * string clientType = 2; + */ + public Builder clearClientType() { + + clientType_ = getDefaultInstance().getClientType(); + onChanged(); + return this; + } + + /** + * string clientType = 2; + */ + public Builder setClientTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clientType_ = value; + onChanged(); + return this; + } + + private Object producerGroup_ = ""; + + /** + * string producerGroup = 3; + */ + 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; + } + } + + /** + * string producerGroup = 3; + */ + 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; + } + } + + /** + * string producerGroup = 3; + */ + public Builder setProducerGroup( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + producerGroup_ = value; + onChanged(); + return this; + } + + /** + * string producerGroup = 3; + */ + public Builder clearProducerGroup() { + + producerGroup_ = getDefaultInstance().getProducerGroup(); + onChanged(); + return this; + } + + /** + * string producerGroup = 3; + */ + public Builder setProducerGroupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + producerGroup_ = value; + onChanged(); + return this; + } + + private Object consumerGroup_ = ""; + + /** + * string consumerGroup = 4; + */ + 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; + } + } + + /** + * string consumerGroup = 4; + */ + 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; + } + } + + /** + * string consumerGroup = 4; + */ + public Builder setConsumerGroup( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + consumerGroup_ = value; + onChanged(); + return this; + } + + /** + * string consumerGroup = 4; + */ + public Builder clearConsumerGroup() { + + consumerGroup_ = getDefaultInstance().getConsumerGroup(); + onChanged(); + return this; + } + + /** + * string consumerGroup = 4; + */ + 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 heartbeatItems_ = + java.util.Collections.emptyList(); + + private void ensureHeartbeatItemsIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + heartbeatItems_ = new java.util.ArrayList(heartbeatItems_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder> heartbeatItemsBuilder_; + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public java.util.List getHeartbeatItemsList() { + if (heartbeatItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(heartbeatItems_); + } else { + return heartbeatItemsBuilder_.getMessageList(); + } + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public int getHeartbeatItemsCount() { + if (heartbeatItemsBuilder_ == null) { + return heartbeatItems_.size(); + } else { + return heartbeatItemsBuilder_.getCount(); + } + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItem getHeartbeatItems(int index) { + if (heartbeatItemsBuilder_ == null) { + return heartbeatItems_.get(index); + } else { + return heartbeatItemsBuilder_.getMessage(index); + } + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public Builder addHeartbeatItems( + HeartbeatItem.Builder builderForValue) { + if (heartbeatItemsBuilder_ == null) { + ensureHeartbeatItemsIsMutable(); + heartbeatItems_.add(builderForValue.build()); + onChanged(); + } else { + heartbeatItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + 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; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public Builder addAllHeartbeatItems( + Iterable values) { + if (heartbeatItemsBuilder_ == null) { + ensureHeartbeatItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, heartbeatItems_); + onChanged(); + } else { + heartbeatItemsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public Builder clearHeartbeatItems() { + if (heartbeatItemsBuilder_ == null) { + heartbeatItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + heartbeatItemsBuilder_.clear(); + } + return this; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public Builder removeHeartbeatItems(int index) { + if (heartbeatItemsBuilder_ == null) { + ensureHeartbeatItemsIsMutable(); + heartbeatItems_.remove(index); + onChanged(); + } else { + heartbeatItemsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItem.Builder getHeartbeatItemsBuilder( + int index) { + return getHeartbeatItemsFieldBuilder().getBuilder(index); + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder( + int index) { + if (heartbeatItemsBuilder_ == null) { + return heartbeatItems_.get(index); + } else { + return heartbeatItemsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public java.util.List + getHeartbeatItemsOrBuilderList() { + if (heartbeatItemsBuilder_ != null) { + return heartbeatItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(heartbeatItems_); + } + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItem.Builder addHeartbeatItemsBuilder() { + return getHeartbeatItemsFieldBuilder().addBuilder( + HeartbeatItem.getDefaultInstance()); + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public HeartbeatItem.Builder addHeartbeatItemsBuilder( + int index) { + return getHeartbeatItemsFieldBuilder().addBuilder( + index, HeartbeatItem.getDefaultInstance()); + } + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5; + */ + public java.util.List + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser 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 0000000000..ec67c09c33 --- /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 { + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + boolean hasHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeader getHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * string clientType = 2. + */ + String getClientType(); + + /** + * string clientType = 2. + */ + com.google.protobuf.ByteString getClientTypeBytes(); + + /** + * string producerGroup = 3. + */ + String getProducerGroup(); + + /** + * string producerGroup = 3. + */ + com.google.protobuf.ByteString getProducerGroupBytes(); + + /** + * string consumerGroup = 4. + */ + String getConsumerGroup(); + + /** + * string consumerGroup = 4. + */ + com.google.protobuf.ByteString getConsumerGroupBytes(); + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5. + */ + java.util.List getHeartbeatItemsList(); + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5. + */ + Heartbeat.HeartbeatItem getHeartbeatItems(int index); + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5. + */ + int getHeartbeatItemsCount(); + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5. + */ + java.util.List getHeartbeatItemsOrBuilderList(); + + /** + * repeated .eventmesh.client.Heartbeat.HeartbeatItem heartbeatItems = 5. + */ + 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 0000000000..40df4200ab --- /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 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 getHeartbeatMethod() { + io.grpc.MethodDescriptor getHeartbeatMethod; + if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) { + synchronized (HeartbeatServiceGrpc.class) { + if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) { + HeartbeatServiceGrpc.getHeartbeatMethod = getHeartbeatMethod = + io.grpc.MethodDescriptor.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 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 { + 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getHeartbeatMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + */ + public static final class HeartbeatServiceBlockingStub extends io.grpc.stub.AbstractStub { + 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 { + 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 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 implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + 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 responseObserver) { + switch (methodId) { + case METHODID_HEARTBEAT: + serviceImpl.heartbeat((org.apache.eventmesh.client.grpc.protos.Heartbeat) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @Override + @SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver 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 0000000000..ecef2824ff --- /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_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int PRODUCTIONGROUP_FIELD_NUMBER = 2; + private volatile Object productionGroup_; + + /** + * string productionGroup = 2; + */ + 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; + } + } + + /** + * string productionGroup = 2; + */ + 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_; + + /** + * string topic = 3; + */ + 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; + } + } + + /** + * string topic = 3; + */ + 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_; + + /** + * string content = 4; + */ + 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; + } + } + + /** + * string content = 4; + */ + 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_; + + /** + * string ttl = 5; + */ + 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; + } + } + + /** + * string ttl = 5; + */ + 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_; + + /** + * string uniqueId = 6; + */ + 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; + } + } + + /** + * string uniqueId = 6; + */ + 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 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_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader(RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader( + RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + RequestHeader.getDefaultInstance() : header_; + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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_ = ""; + + /** + * string productionGroup = 2; + */ + 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; + } + } + + /** + * string productionGroup = 2; + */ + 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; + } + } + + /** + * string productionGroup = 2; + */ + public Builder setProductionGroup( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + productionGroup_ = value; + onChanged(); + return this; + } + + /** + * string productionGroup = 2; + */ + public Builder clearProductionGroup() { + + productionGroup_ = getDefaultInstance().getProductionGroup(); + onChanged(); + return this; + } + + /** + * string productionGroup = 2; + */ + public Builder setProductionGroupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productionGroup_ = value; + onChanged(); + return this; + } + + private Object topic_ = ""; + + /** + * string topic = 3; + */ + 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; + } + } + + /** + * string topic = 3; + */ + 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; + } + } + + /** + * string topic = 3; + */ + public Builder setTopic( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + + /** + * string topic = 3; + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + + /** + * string topic = 3; + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + + private Object content_ = ""; + + /** + * string content = 4; + */ + 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; + } + } + + /** + * string content = 4; + */ + 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; + } + } + + /** + * string content = 4; + */ + public Builder setContent( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + + /** + * string content = 4; + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + /** + * string content = 4; + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private Object ttl_ = ""; + + /** + * string ttl = 5; + */ + 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; + } + } + + /** + * string ttl = 5; + */ + 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; + } + } + + /** + * string ttl = 5; + */ + public Builder setTtl( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + ttl_ = value; + onChanged(); + return this; + } + + /** + * string ttl = 5; + */ + public Builder clearTtl() { + + ttl_ = getDefaultInstance().getTtl(); + onChanged(); + return this; + } + + /** + * string ttl = 5; + */ + public Builder setTtlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ttl_ = value; + onChanged(); + return this; + } + + private Object uniqueId_ = ""; + + /** + * string uniqueId = 6; + */ + 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; + } + } + + /** + * string uniqueId = 6; + */ + 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; + } + } + + /** + * string uniqueId = 6; + */ + public Builder setUniqueId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + uniqueId_ = value; + onChanged(); + return this; + } + + /** + * string uniqueId = 6; + */ + public Builder clearUniqueId() { + + uniqueId_ = getDefaultInstance().getUniqueId(); + onChanged(); + return this; + } + + /** + * string uniqueId = 6; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser 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 0000000000..05dfb84241 --- /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 { + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + boolean hasHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeader getHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * string productionGroup = 2. + */ + String getProductionGroup(); + + /** + * string productionGroup = 2. + */ + com.google.protobuf.ByteString getProductionGroupBytes(); + + /** + * string topic = 3. + */ + String getTopic(); + + /** + * string topic = 3. + */ + com.google.protobuf.ByteString getTopicBytes(); + + /** + * string content = 4. + */ + String getContent(); + + /** + * string content = 4. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * string ttl = 5. + */ + String getTtl(); + + /** + * string ttl = 5. + */ + com.google.protobuf.ByteString getTtlBytes(); + + /** + * string uniqueId = 6. + */ + String getUniqueId(); + + /** + * string uniqueId = 6. + */ + 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 0000000000..d075d8fe4b --- /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 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 getPublishMethod() { + io.grpc.MethodDescriptor getPublishMethod; + if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) { + synchronized (PublisherServiceGrpc.class) { + if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) { + PublisherServiceGrpc.getPublishMethod = getPublishMethod = + io.grpc.MethodDescriptor.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 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 getRequestReplyMethod() { + io.grpc.MethodDescriptor getRequestReplyMethod; + if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) { + synchronized (PublisherServiceGrpc.class) { + if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) { + PublisherServiceGrpc.getRequestReplyMethod = getRequestReplyMethod = + io.grpc.MethodDescriptor.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 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 getBroadcastMethod() { + io.grpc.MethodDescriptor getBroadcastMethod; + if ((getBroadcastMethod = PublisherServiceGrpc.getBroadcastMethod) == null) { + synchronized (PublisherServiceGrpc.class) { + if ((getBroadcastMethod = PublisherServiceGrpc.getBroadcastMethod) == null) { + PublisherServiceGrpc.getBroadcastMethod = getBroadcastMethod = + io.grpc.MethodDescriptor.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 responseObserver) { + asyncUnimplementedUnaryCall(getPublishMethod(), responseObserver); + } + + /** + * + */ + public void requestReply(org.apache.eventmesh.client.grpc.protos.Message request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRequestReplyMethod(), responseObserver); + } + + /** + * + */ + public void broadcast(org.apache.eventmesh.client.grpc.protos.Message request, + io.grpc.stub.StreamObserver 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 { + 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPublishMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + */ + public void requestReply(org.apache.eventmesh.client.grpc.protos.Message request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + */ + public void broadcast(org.apache.eventmesh.client.grpc.protos.Message request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBroadcastMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + */ + public static final class PublisherServiceBlockingStub extends io.grpc.stub.AbstractStub { + 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 { + 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 publish( + org.apache.eventmesh.client.grpc.protos.Message request) { + return futureUnaryCall( + getChannel().newCall(getPublishMethod(), getCallOptions()), request); + } + + /** + * + */ + public com.google.common.util.concurrent.ListenableFuture requestReply( + org.apache.eventmesh.client.grpc.protos.Message request) { + return futureUnaryCall( + getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request); + } + + /** + * + */ + public com.google.common.util.concurrent.ListenableFuture 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 implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + 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 responseObserver) { + switch (methodId) { + case METHODID_PUBLISH: + serviceImpl.publish((org.apache.eventmesh.client.grpc.protos.Message) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REQUEST_REPLY: + serviceImpl.requestReply((org.apache.eventmesh.client.grpc.protos.Message) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BROADCAST: + serviceImpl.broadcast((org.apache.eventmesh.client.grpc.protos.Message) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @Override + @SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver 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 0000000000..ed21ed8d35 --- /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_; + + /** + * string env = 1; + */ + 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; + } + } + + /** + * string env = 1; + */ + 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_; + + /** + * string region = 2; + */ + 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; + } + } + + /** + * string region = 2; + */ + 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_; + + /** + * string idc = 3; + */ + 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; + } + } + + /** + * string idc = 3; + */ + 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_; + + /** + * string ip = 4; + */ + 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; + } + } + + /** + * string ip = 4; + */ + 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_; + + /** + * string pid = 5; + */ + 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; + } + } + + /** + * string pid = 5; + */ + 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_; + + /** + * string sys = 6; + */ + 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; + } + } + + /** + * string sys = 6; + */ + 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_; + + /** + * string username = 7; + */ + 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; + } + } + + /** + * string username = 7; + */ + 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_; + + /** + * string password = 8; + */ + 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; + } + } + + /** + * string password = 8; + */ + 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_; + + /** + * string version = 9; + */ + 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; + } + } + + /** + * string version = 9; + */ + 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_; + + /** + * string language = 10; + */ + 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; + } + } + + /** + * string language = 10; + */ + 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_; + + /** + * string seqNum = 11; + */ + 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; + } + } + + /** + * string seqNum = 11; + */ + 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 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_ = ""; + + /** + * string env = 1; + */ + 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; + } + } + + /** + * string env = 1; + */ + 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; + } + } + + /** + * string env = 1; + */ + public Builder setEnv( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + env_ = value; + onChanged(); + return this; + } + + /** + * string env = 1; + */ + public Builder clearEnv() { + + env_ = getDefaultInstance().getEnv(); + onChanged(); + return this; + } + + /** + * string env = 1; + */ + public Builder setEnvBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + env_ = value; + onChanged(); + return this; + } + + private Object region_ = ""; + + /** + * string region = 2; + */ + 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; + } + } + + /** + * string region = 2; + */ + 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; + } + } + + /** + * string region = 2; + */ + public Builder setRegion( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + + /** + * string region = 2; + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + + /** + * string region = 2; + */ + public Builder setRegionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + onChanged(); + return this; + } + + private Object idc_ = ""; + + /** + * string idc = 3; + */ + 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; + } + } + + /** + * string idc = 3; + */ + 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; + } + } + + /** + * string idc = 3; + */ + public Builder setIdc( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + idc_ = value; + onChanged(); + return this; + } + + /** + * string idc = 3; + */ + public Builder clearIdc() { + + idc_ = getDefaultInstance().getIdc(); + onChanged(); + return this; + } + + /** + * string idc = 3; + */ + public Builder setIdcBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + idc_ = value; + onChanged(); + return this; + } + + private Object ip_ = ""; + + /** + * string ip = 4; + */ + 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; + } + } + + /** + * string ip = 4; + */ + 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; + } + } + + /** + * string ip = 4; + */ + public Builder setIp( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + ip_ = value; + onChanged(); + return this; + } + + /** + * string ip = 4; + */ + public Builder clearIp() { + + ip_ = getDefaultInstance().getIp(); + onChanged(); + return this; + } + + /** + * string ip = 4; + */ + public Builder setIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ip_ = value; + onChanged(); + return this; + } + + private Object pid_ = ""; + + /** + * string pid = 5; + */ + 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; + } + } + + /** + * string pid = 5; + */ + 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; + } + } + + /** + * string pid = 5; + */ + public Builder setPid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + pid_ = value; + onChanged(); + return this; + } + + /** + * string pid = 5; + */ + public Builder clearPid() { + + pid_ = getDefaultInstance().getPid(); + onChanged(); + return this; + } + + /** + * string pid = 5; + */ + public Builder setPidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pid_ = value; + onChanged(); + return this; + } + + private Object sys_ = ""; + + /** + * string sys = 6; + */ + 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; + } + } + + /** + * string sys = 6; + */ + 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; + } + } + + /** + * string sys = 6; + */ + public Builder setSys( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + sys_ = value; + onChanged(); + return this; + } + + /** + * string sys = 6; + */ + public Builder clearSys() { + + sys_ = getDefaultInstance().getSys(); + onChanged(); + return this; + } + + /** + * string sys = 6; + */ + public Builder setSysBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sys_ = value; + onChanged(); + return this; + } + + private Object username_ = ""; + + /** + * string username = 7; + */ + 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; + } + } + + /** + * string username = 7; + */ + 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; + } + } + + /** + * string username = 7; + */ + public Builder setUsername( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + + /** + * string username = 7; + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + + /** + * string username = 7; + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + + private Object password_ = ""; + + /** + * string password = 8; + */ + 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; + } + } + + /** + * string password = 8; + */ + 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; + } + } + + /** + * string password = 8; + */ + public Builder setPassword( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + + /** + * string password = 8; + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + + /** + * string password = 8; + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + + private Object version_ = ""; + + /** + * string version = 9; + */ + 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; + } + } + + /** + * string version = 9; + */ + 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; + } + } + + /** + * string version = 9; + */ + public Builder setVersion( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + + /** + * string version = 9; + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + + /** + * string version = 9; + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private Object language_ = ""; + + /** + * string language = 10; + */ + 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; + } + } + + /** + * string language = 10; + */ + 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; + } + } + + /** + * string language = 10; + */ + public Builder setLanguage( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + language_ = value; + onChanged(); + return this; + } + + /** + * string language = 10; + */ + public Builder clearLanguage() { + + language_ = getDefaultInstance().getLanguage(); + onChanged(); + return this; + } + + /** + * string language = 10; + */ + public Builder setLanguageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + language_ = value; + onChanged(); + return this; + } + + private Object seqNum_ = ""; + + /** + * string seqNum = 11; + */ + 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; + } + } + + /** + * string seqNum = 11; + */ + 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; + } + } + + /** + * string seqNum = 11; + */ + public Builder setSeqNum( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + seqNum_ = value; + onChanged(); + return this; + } + + /** + * string seqNum = 11; + */ + public Builder clearSeqNum() { + + seqNum_ = getDefaultInstance().getSeqNum(); + onChanged(); + return this; + } + + /** + * string seqNum = 11; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser 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 0000000000..a112bfa22a --- /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 { + + /** + * string env = 1. + */ + String getEnv(); + + /** + * string env = 1. + */ + com.google.protobuf.ByteString getEnvBytes(); + + /** + * string region = 2. + */ + String getRegion(); + + /** + * string region = 2. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * string idc = 3. + */ + String getIdc(); + + /** + * string idc = 3. + */ + com.google.protobuf.ByteString getIdcBytes(); + + /** + * string ip = 4. + */ + String getIp(); + + /** + * string ip = 4. + */ + com.google.protobuf.ByteString getIpBytes(); + + /** + * string pid = 5. + */ + String getPid(); + + /** + * string pid = 5. + */ + com.google.protobuf.ByteString getPidBytes(); + + /** + * string sys = 6. + */ + String getSys(); + + /** + * string sys = 6. + */ + com.google.protobuf.ByteString getSysBytes(); + + /** + * string username = 7. + */ + String getUsername(); + + /** + * string username = 7. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * string password = 8. + */ + String getPassword(); + + /** + * string password = 8. + */ + com.google.protobuf.ByteString getPasswordBytes(); + + /** + * string version = 9. + */ + String getVersion(); + + /** + * string version = 9. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * string language = 10. + */ + String getLanguage(); + + /** + * string language = 10. + */ + com.google.protobuf.ByteString getLanguageBytes(); + + /** + * string seqNum = 11. + */ + String getSeqNum(); + + /** + * string seqNum = 11. + */ + 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 0000000000..b54fc330c8 --- /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_; + + /** + * string respCode = 1; + */ + 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; + } + } + + /** + * string respCode = 1; + */ + 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_; + + /** + * string respMsg = 2; + */ + 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; + } + } + + /** + * string respMsg = 2; + */ + 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_; + + /** + * string respTime = 3; + */ + 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; + } + } + + /** + * string respTime = 3; + */ + 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_; + + /** + * string seqNum = 4; + */ + 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; + } + } + + /** + * string seqNum = 4; + */ + 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 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_ = ""; + + /** + * string respCode = 1; + */ + 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; + } + } + + /** + * string respCode = 1; + */ + 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; + } + } + + /** + * string respCode = 1; + */ + public Builder setRespCode( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + respCode_ = value; + onChanged(); + return this; + } + + /** + * string respCode = 1; + */ + public Builder clearRespCode() { + + respCode_ = getDefaultInstance().getRespCode(); + onChanged(); + return this; + } + + /** + * string respCode = 1; + */ + public Builder setRespCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + respCode_ = value; + onChanged(); + return this; + } + + private Object respMsg_ = ""; + + /** + * string respMsg = 2; + */ + 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; + } + } + + /** + * string respMsg = 2; + */ + 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; + } + } + + /** + * string respMsg = 2; + */ + public Builder setRespMsg( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + respMsg_ = value; + onChanged(); + return this; + } + + /** + * string respMsg = 2; + */ + public Builder clearRespMsg() { + + respMsg_ = getDefaultInstance().getRespMsg(); + onChanged(); + return this; + } + + /** + * string respMsg = 2; + */ + public Builder setRespMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + respMsg_ = value; + onChanged(); + return this; + } + + private Object respTime_ = ""; + + /** + * string respTime = 3; + */ + 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; + } + } + + /** + * string respTime = 3; + */ + 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; + } + } + + /** + * string respTime = 3; + */ + public Builder setRespTime( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + respTime_ = value; + onChanged(); + return this; + } + + /** + * string respTime = 3; + */ + public Builder clearRespTime() { + + respTime_ = getDefaultInstance().getRespTime(); + onChanged(); + return this; + } + + /** + * string respTime = 3; + */ + public Builder setRespTimeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + respTime_ = value; + onChanged(); + return this; + } + + private Object seqNum_ = ""; + + /** + * string seqNum = 4; + */ + 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; + } + } + + /** + * string seqNum = 4; + */ + 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; + } + } + + /** + * string seqNum = 4; + */ + public Builder setSeqNum( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + seqNum_ = value; + onChanged(); + return this; + } + + /** + * string seqNum = 4; + */ + public Builder clearSeqNum() { + + seqNum_ = getDefaultInstance().getSeqNum(); + onChanged(); + return this; + } + + /** + * string seqNum = 4; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser 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 0000000000..0b4acd2fe4 --- /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 { + + /** + * string respCode = 1. + */ + String getRespCode(); + + /** + * string respCode = 1. + */ + com.google.protobuf.ByteString getRespCodeBytes(); + + /** + * string respMsg = 2. + */ + String getRespMsg(); + + /** + * string respMsg = 2. + */ + com.google.protobuf.ByteString getRespMsgBytes(); + + /** + * string respTime = 3. + */ + String getRespTime(); + + /** + * string respTime = 3. + */ + com.google.protobuf.ByteString getRespTimeBytes(); + + /** + * string seqNum = 4. + */ + String getSeqNum(); + + /** + * string seqNum = 4. + */ + 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 0000000000..803e1daf5c --- /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(); + 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 { + + /** + * string topic = 1; + */ + String getTopic(); + + /** + * string topic = 1; + */ + com.google.protobuf.ByteString + getTopicBytes(); + + /** + * string mode = 2; + */ + String getMode(); + + /** + * string mode = 2; + */ + com.google.protobuf.ByteString + getModeBytes(); + + /** + * string type = 3; + */ + String getType(); + + /** + * string type = 3; + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * string url = 4; + */ + String getUrl(); + + /** + * string url = 4; + */ + 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_; + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + 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_; + + /** + * string mode = 2; + */ + 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; + } + } + + /** + * string mode = 2; + */ + 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_; + + /** + * string type = 3; + */ + 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; + } + } + + /** + * string type = 3; + */ + 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_; + + /** + * string url = 4; + */ + 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; + } + } + + /** + * string url = 4; + */ + 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 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_ = ""; + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + 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; + } + } + + /** + * string topic = 1; + */ + public Builder setTopic( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + + /** + * string topic = 1; + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + + /** + * string topic = 1; + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + + private Object mode_ = ""; + + /** + * string mode = 2; + */ + 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; + } + } + + /** + * string mode = 2; + */ + 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; + } + } + + /** + * string mode = 2; + */ + public Builder setMode( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + + /** + * string mode = 2; + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + + /** + * string mode = 2; + */ + public Builder setModeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private Object type_ = ""; + + /** + * string type = 3; + */ + 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; + } + } + + /** + * string type = 3; + */ + 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; + } + } + + /** + * string type = 3; + */ + public Builder setType( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + + /** + * string type = 3; + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + + /** + * string type = 3; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private Object url_ = ""; + + /** + * string url = 4; + */ + 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; + } + } + + /** + * string url = 4; + */ + 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; + } + } + + /** + * string url = 4; + */ + public Builder setUrl( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + + /** + * string url = 4; + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + + /** + * string url = 4; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public SubscriptionItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private RequestHeader header_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int CONSUMERGROUP_FIELD_NUMBER = 2; + private volatile Object consumerGroup_; + + /** + * string consumerGroup = 2; + */ + 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; + } + } + + /** + * string consumerGroup = 2; + */ + 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 subscriptionItems_; + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public java.util.List getSubscriptionItemsList() { + return subscriptionItems_; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public java.util.List + getSubscriptionItemsOrBuilderList() { + return subscriptionItems_; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public int getSubscriptionItemsCount() { + return subscriptionItems_.size(); + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItem getSubscriptionItems(int index) { + return subscriptionItems_.get(index); + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + 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; + } + + public static Subscription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Subscription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Subscription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Subscription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Subscription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Subscription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Subscription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static Subscription 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 Subscription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static Subscription 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 Subscription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static Subscription 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(Subscription 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} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:eventmesh.client.Subscription) + SubscriptionOrBuilder { + 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); + } + + // Construct using org.apache.eventmesh.client.grpc.protos.Subscription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubscriptionItemsFieldBuilder(); + } + } + + public Builder clear() { + super.clear(); + if (headerBuilder_ == null) { + header_ = null; + } else { + header_ = null; + headerBuilder_ = null; + } + consumerGroup_ = ""; + + if (subscriptionItemsBuilder_ == null) { + subscriptionItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + subscriptionItemsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return EventmeshClient.internal_static_eventmesh_client_Subscription_descriptor; + } + + public Subscription getDefaultInstanceForType() { + return Subscription.getDefaultInstance(); + } + + public Subscription build() { + Subscription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public Subscription buildPartial() { + Subscription result = new Subscription(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + result.consumerGroup_ = consumerGroup_; + if (subscriptionItemsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subscriptionItems_ = java.util.Collections.unmodifiableList(subscriptionItems_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subscriptionItems_ = subscriptionItems_; + } else { + result.subscriptionItems_ = subscriptionItemsBuilder_.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 Subscription) { + return mergeFrom((Subscription) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Subscription other) { + if (other == Subscription.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getConsumerGroup().isEmpty()) { + consumerGroup_ = other.consumerGroup_; + onChanged(); + } + if (subscriptionItemsBuilder_ == null) { + if (!other.subscriptionItems_.isEmpty()) { + if (subscriptionItems_.isEmpty()) { + subscriptionItems_ = other.subscriptionItems_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.addAll(other.subscriptionItems_); + } + onChanged(); + } + } else { + if (!other.subscriptionItems_.isEmpty()) { + if (subscriptionItemsBuilder_.isEmpty()) { + subscriptionItemsBuilder_.dispose(); + subscriptionItemsBuilder_ = null; + subscriptionItems_ = other.subscriptionItems_; + bitField0_ = (bitField0_ & ~0x00000004); + subscriptionItemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubscriptionItemsFieldBuilder() : null; + } else { + subscriptionItemsBuilder_.addAllMessages(other.subscriptionItems_); + } + } + } + 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 { + Subscription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Subscription) 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_; + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? RequestHeader.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader(RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder setHeader( + RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeader.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + public RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + RequestHeader.getDefaultInstance() : header_; + } + } + + /** + * .eventmesh.client.RequestHeader header = 1; + */ + 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 consumerGroup_ = ""; + + /** + * string consumerGroup = 2; + */ + 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; + } + } + + /** + * string consumerGroup = 2; + */ + 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; + } + } + + /** + * string consumerGroup = 2; + */ + public Builder setConsumerGroup( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + consumerGroup_ = value; + onChanged(); + return this; + } + + /** + * string consumerGroup = 2; + */ + public Builder clearConsumerGroup() { + + consumerGroup_ = getDefaultInstance().getConsumerGroup(); + onChanged(); + return this; + } + + /** + * string consumerGroup = 2; + */ + 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 subscriptionItems_ = + java.util.Collections.emptyList(); + + private void ensureSubscriptionItemsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + subscriptionItems_ = new java.util.ArrayList(subscriptionItems_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + SubscriptionItem, SubscriptionItem.Builder, SubscriptionItemOrBuilder> subscriptionItemsBuilder_; + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public java.util.List getSubscriptionItemsList() { + if (subscriptionItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subscriptionItems_); + } else { + return subscriptionItemsBuilder_.getMessageList(); + } + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public int getSubscriptionItemsCount() { + if (subscriptionItemsBuilder_ == null) { + return subscriptionItems_.size(); + } else { + return subscriptionItemsBuilder_.getCount(); + } + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItem getSubscriptionItems(int index) { + if (subscriptionItemsBuilder_ == null) { + return subscriptionItems_.get(index); + } else { + return subscriptionItemsBuilder_.getMessage(index); + } + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder setSubscriptionItems( + int index, SubscriptionItem value) { + if (subscriptionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.set(index, value); + onChanged(); + } else { + subscriptionItemsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder setSubscriptionItems( + int index, SubscriptionItem.Builder builderForValue) { + if (subscriptionItemsBuilder_ == null) { + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.set(index, builderForValue.build()); + onChanged(); + } else { + subscriptionItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder addSubscriptionItems(SubscriptionItem value) { + if (subscriptionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.add(value); + onChanged(); + } else { + subscriptionItemsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder addSubscriptionItems( + int index, SubscriptionItem value) { + if (subscriptionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.add(index, value); + onChanged(); + } else { + subscriptionItemsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder addSubscriptionItems( + SubscriptionItem.Builder builderForValue) { + if (subscriptionItemsBuilder_ == null) { + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.add(builderForValue.build()); + onChanged(); + } else { + subscriptionItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder addSubscriptionItems( + int index, SubscriptionItem.Builder builderForValue) { + if (subscriptionItemsBuilder_ == null) { + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.add(index, builderForValue.build()); + onChanged(); + } else { + subscriptionItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder addAllSubscriptionItems( + Iterable values) { + if (subscriptionItemsBuilder_ == null) { + ensureSubscriptionItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subscriptionItems_); + onChanged(); + } else { + subscriptionItemsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder clearSubscriptionItems() { + if (subscriptionItemsBuilder_ == null) { + subscriptionItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subscriptionItemsBuilder_.clear(); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public Builder removeSubscriptionItems(int index) { + if (subscriptionItemsBuilder_ == null) { + ensureSubscriptionItemsIsMutable(); + subscriptionItems_.remove(index); + onChanged(); + } else { + subscriptionItemsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItem.Builder getSubscriptionItemsBuilder( + int index) { + return getSubscriptionItemsFieldBuilder().getBuilder(index); + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItemOrBuilder getSubscriptionItemsOrBuilder( + int index) { + if (subscriptionItemsBuilder_ == null) { + return subscriptionItems_.get(index); + } else { + return subscriptionItemsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public java.util.List + getSubscriptionItemsOrBuilderList() { + if (subscriptionItemsBuilder_ != null) { + return subscriptionItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subscriptionItems_); + } + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItem.Builder addSubscriptionItemsBuilder() { + return getSubscriptionItemsFieldBuilder().addBuilder( + SubscriptionItem.getDefaultInstance()); + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public SubscriptionItem.Builder addSubscriptionItemsBuilder( + int index) { + return getSubscriptionItemsFieldBuilder().addBuilder( + index, SubscriptionItem.getDefaultInstance()); + } + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3; + */ + public java.util.List + getSubscriptionItemsBuilderList() { + return getSubscriptionItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + SubscriptionItem, SubscriptionItem.Builder, SubscriptionItemOrBuilder> + getSubscriptionItemsFieldBuilder() { + if (subscriptionItemsBuilder_ == null) { + subscriptionItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + SubscriptionItem, SubscriptionItem.Builder, SubscriptionItemOrBuilder>( + subscriptionItems_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + subscriptionItems_ = null; + } + return subscriptionItemsBuilder_; + } + + 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) + } + + // @@protoc_insertion_point(class_scope:eventmesh.client.Subscription) + private static final Subscription DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Subscription(); + } + + public static Subscription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Subscription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Subscription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public Subscription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/SubscriptionOrBuilder.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/SubscriptionOrBuilder.java new file mode 100644 index 0000000000..b47e54826d --- /dev/null +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/protos/SubscriptionOrBuilder.java @@ -0,0 +1,78 @@ +/* + * 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; + +/** + * SubscriptionOrBuilder interface. + */ +public interface SubscriptionOrBuilder extends com.google.protobuf.MessageOrBuilder { + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + boolean hasHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeader getHeader(); + + /** + * .eventmesh.client.RequestHeader header = 1. + */ + RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * string consumerGroup = 2. + */ + String getConsumerGroup(); + + /** + * string consumerGroup = 2. + */ + com.google.protobuf.ByteString getConsumerGroupBytes(); + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3. + */ + java.util.List getSubscriptionItemsList(); + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3. + */ + Subscription.SubscriptionItem getSubscriptionItems(int index); + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3. + */ + int getSubscriptionItemsCount(); + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3. + */ + java.util.List + getSubscriptionItemsOrBuilderList(); + + /** + * repeated .eventmesh.client.Subscription.SubscriptionItem subscriptionItems = 3. + */ + Subscription.SubscriptionItemOrBuilder getSubscriptionItemsOrBuilder(int index); +} diff --git a/settings.gradle b/settings.gradle index a87e06858c..2bf9859260 100644 --- a/settings.gradle +++ b/settings.gradle @@ -37,4 +37,5 @@ include 'eventmesh-protocol-plugin' include 'eventmesh-protocol-plugin:eventmesh-protocol-api' include 'eventmesh-protocol-plugin:eventmesh-protocol-openmessage' include 'eventmesh-protocol-plugin:eventmesh-protocol-cloudevents' +include 'eventmesh-protocol-plugin:eventmesh-protocol-grpc' diff --git a/tool/license/allowed-licenses.txt b/tool/license/allowed-licenses.txt index 41b5c8d0c3..7d2c56e489 100644 --- a/tool/license/allowed-licenses.txt +++ b/tool/license/allowed-licenses.txt @@ -1098,6 +1098,81 @@ "moduleLicense": "Apache License, Version 2.0", "moduleVersion": "5.3.10", "moduleName": "org.springframework:spring-webmvc" + }, + { + "moduleLicense": "Apache-2.0", + "moduleVersion": "1.0.0", + "moduleName": "com.google.api.grpc:proto-google-common-protos" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "2.7", + "moduleName": "com.google.code.gson:gson" + }, + { + "moduleLicense": "3-Clause BSD License", + "moduleVersion": "3.5.1", + "moduleName": "com.google.protobuf:protobuf-java" + }, + { + "moduleLicense": "The Apache Software License, Version 2.0", + "moduleVersion": "3.5.1", + "moduleName": "com.google.protobuf:protobuf-java" + }, + { + "moduleLicense": "3-Clause BSD License", + "moduleVersion": "3.5.1", + "moduleName": "com.google.protobuf:protobuf-java-util" + }, + { + "moduleLicense": "The Apache Software License, Version 2.0", + "moduleVersion": "3.5.1", + "moduleName": "com.google.protobuf:protobuf-java-util" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "1.15.0", + "moduleName": "io.grpc:grpc-context" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "1.15.0", + "moduleName": "io.grpc:grpc-core" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "1.15.0", + "moduleName": "io.grpc:grpc-protobuf" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "1.15.0", + "moduleName": "io.grpc:grpc-protobuf-lite" + }, + { + "moduleLicense": "Apache 2.0", + "moduleVersion": "1.15.0", + "moduleName": "io.grpc:grpc-stub" + }, + { + "moduleLicense": "The Apache License, Version 2.0", + "moduleVersion": "0.12.3", + "moduleName": "io.opencensus:opencensus-api" + }, + { + "moduleLicense": "The Apache License, Version 2.0", + "moduleVersion": "0.12.3", + "moduleName": "io.opencensus:opencensus-contrib-grpc-metrics" + }, + { + "moduleLicense": "MIT license", + "moduleVersion": "1.17", + "moduleName": "org.codehaus.mojo:animal-sniffer-annotations" + }, + { + "moduleLicense": "The Apache Software License, Version 2.0", + "moduleVersion": "1.17", + "moduleName": "org.codehaus.mojo:animal-sniffer-annotations" } ] } \ No newline at end of file