@@ -759,6 +759,37 @@ org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse> getGetAccountChatMe
759759 return getGetAccountChatMethod ;
760760 }
761761
762+ private static volatile io .grpc .MethodDescriptor <org .jumpserver .wisp .ServiceOuterClass .HTTPRequest ,
763+ org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > getCallAPIMethod ;
764+
765+ @ io .grpc .stub .annotations .RpcMethod (
766+ fullMethodName = SERVICE_NAME + '/' + "CallAPI" ,
767+ requestType = org .jumpserver .wisp .ServiceOuterClass .HTTPRequest .class ,
768+ responseType = org .jumpserver .wisp .ServiceOuterClass .HTTPResponse .class ,
769+ methodType = io .grpc .MethodDescriptor .MethodType .UNARY )
770+ public static io .grpc .MethodDescriptor <org .jumpserver .wisp .ServiceOuterClass .HTTPRequest ,
771+ org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > getCallAPIMethod () {
772+ io .grpc .MethodDescriptor <org .jumpserver .wisp .ServiceOuterClass .HTTPRequest , org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > getCallAPIMethod ;
773+ if ((getCallAPIMethod = ServiceGrpc .getCallAPIMethod ) == null ) {
774+ synchronized (ServiceGrpc .class ) {
775+ if ((getCallAPIMethod = ServiceGrpc .getCallAPIMethod ) == null ) {
776+ ServiceGrpc .getCallAPIMethod = getCallAPIMethod =
777+ io .grpc .MethodDescriptor .<org .jumpserver .wisp .ServiceOuterClass .HTTPRequest , org .jumpserver .wisp .ServiceOuterClass .HTTPResponse >newBuilder ()
778+ .setType (io .grpc .MethodDescriptor .MethodType .UNARY )
779+ .setFullMethodName (generateFullMethodName (SERVICE_NAME , "CallAPI" ))
780+ .setSampledToLocalTracing (true )
781+ .setRequestMarshaller (io .grpc .protobuf .ProtoUtils .marshaller (
782+ org .jumpserver .wisp .ServiceOuterClass .HTTPRequest .getDefaultInstance ()))
783+ .setResponseMarshaller (io .grpc .protobuf .ProtoUtils .marshaller (
784+ org .jumpserver .wisp .ServiceOuterClass .HTTPResponse .getDefaultInstance ()))
785+ .setSchemaDescriptor (new ServiceMethodDescriptorSupplier ("CallAPI" ))
786+ .build ();
787+ }
788+ }
789+ }
790+ return getCallAPIMethod ;
791+ }
792+
762793 /**
763794 * Creates a new async stub that supports all call types for the service
764795 */
@@ -974,6 +1005,13 @@ default void getAccountChat(org.jumpserver.wisp.ServiceOuterClass.Empty request,
9741005 io .grpc .stub .StreamObserver <org .jumpserver .wisp .ServiceOuterClass .AccountDetailResponse > responseObserver ) {
9751006 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (getGetAccountChatMethod (), responseObserver );
9761007 }
1008+
1009+ /**
1010+ */
1011+ default void callAPI (org .jumpserver .wisp .ServiceOuterClass .HTTPRequest request ,
1012+ io .grpc .stub .StreamObserver <org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > responseObserver ) {
1013+ io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (getCallAPIMethod (), responseObserver );
1014+ }
9771015 }
9781016
9791017 /**
@@ -1194,6 +1232,14 @@ public void getAccountChat(org.jumpserver.wisp.ServiceOuterClass.Empty request,
11941232 io .grpc .stub .ClientCalls .asyncUnaryCall (
11951233 getChannel ().newCall (getGetAccountChatMethod (), getCallOptions ()), request , responseObserver );
11961234 }
1235+
1236+ /**
1237+ */
1238+ public void callAPI (org .jumpserver .wisp .ServiceOuterClass .HTTPRequest request ,
1239+ io .grpc .stub .StreamObserver <org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > responseObserver ) {
1240+ io .grpc .stub .ClientCalls .asyncUnaryCall (
1241+ getChannel ().newCall (getCallAPIMethod (), getCallOptions ()), request , responseObserver );
1242+ }
11971243 }
11981244
11991245 /**
@@ -1372,6 +1418,13 @@ public org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse getAccountCha
13721418 return io .grpc .stub .ClientCalls .blockingUnaryCall (
13731419 getChannel (), getGetAccountChatMethod (), getCallOptions (), request );
13741420 }
1421+
1422+ /**
1423+ */
1424+ public org .jumpserver .wisp .ServiceOuterClass .HTTPResponse callAPI (org .jumpserver .wisp .ServiceOuterClass .HTTPRequest request ) {
1425+ return io .grpc .stub .ClientCalls .blockingUnaryCall (
1426+ getChannel (), getCallAPIMethod (), getCallOptions (), request );
1427+ }
13751428 }
13761429
13771430 /**
@@ -1573,6 +1626,14 @@ public com.google.common.util.concurrent.ListenableFuture<org.jumpserver.wisp.Se
15731626 return io .grpc .stub .ClientCalls .futureUnaryCall (
15741627 getChannel ().newCall (getGetAccountChatMethod (), getCallOptions ()), request );
15751628 }
1629+
1630+ /**
1631+ */
1632+ public com .google .common .util .concurrent .ListenableFuture <org .jumpserver .wisp .ServiceOuterClass .HTTPResponse > callAPI (
1633+ org .jumpserver .wisp .ServiceOuterClass .HTTPRequest request ) {
1634+ return io .grpc .stub .ClientCalls .futureUnaryCall (
1635+ getChannel ().newCall (getCallAPIMethod (), getCallOptions ()), request );
1636+ }
15761637 }
15771638
15781639 private static final int METHODID_GET_TOKEN_AUTH_INFO = 0 ;
@@ -1598,7 +1659,8 @@ public com.google.common.util.concurrent.ListenableFuture<org.jumpserver.wisp.Se
15981659 private static final int METHODID_FACE_MONITOR_CALLBACK = 20 ;
15991660 private static final int METHODID_JOIN_FACE_MONITOR = 21 ;
16001661 private static final int METHODID_GET_ACCOUNT_CHAT = 22 ;
1601- private static final int METHODID_DISPATCH_TASK = 23 ;
1662+ private static final int METHODID_CALL_API = 23 ;
1663+ private static final int METHODID_DISPATCH_TASK = 24 ;
16021664
16031665 private static final class MethodHandlers <Req , Resp > implements
16041666 io .grpc .stub .ServerCalls .UnaryMethod <Req , Resp >,
@@ -1709,6 +1771,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
17091771 serviceImpl .getAccountChat ((org .jumpserver .wisp .ServiceOuterClass .Empty ) request ,
17101772 (io .grpc .stub .StreamObserver <org .jumpserver .wisp .ServiceOuterClass .AccountDetailResponse >) responseObserver );
17111773 break ;
1774+ case METHODID_CALL_API :
1775+ serviceImpl .callAPI ((org .jumpserver .wisp .ServiceOuterClass .HTTPRequest ) request ,
1776+ (io .grpc .stub .StreamObserver <org .jumpserver .wisp .ServiceOuterClass .HTTPResponse >) responseObserver );
1777+ break ;
17121778 default :
17131779 throw new AssertionError ();
17141780 }
@@ -1898,6 +1964,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
18981964 org .jumpserver .wisp .ServiceOuterClass .Empty ,
18991965 org .jumpserver .wisp .ServiceOuterClass .AccountDetailResponse >(
19001966 service , METHODID_GET_ACCOUNT_CHAT )))
1967+ .addMethod (
1968+ getCallAPIMethod (),
1969+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1970+ new MethodHandlers <
1971+ org .jumpserver .wisp .ServiceOuterClass .HTTPRequest ,
1972+ org .jumpserver .wisp .ServiceOuterClass .HTTPResponse >(
1973+ service , METHODID_CALL_API )))
19011974 .build ();
19021975 }
19031976
@@ -1970,6 +2043,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
19702043 .addMethod (getFaceMonitorCallbackMethod ())
19712044 .addMethod (getJoinFaceMonitorMethod ())
19722045 .addMethod (getGetAccountChatMethod ())
2046+ .addMethod (getCallAPIMethod ())
19732047 .build ();
19742048 }
19752049 }
0 commit comments