cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/reasoning_engine_execution_service_grpc.pb.go (about) 1 // Copyright 2025 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 16 // versions: 17 // - protoc-gen-go-grpc v1.3.0 18 // - protoc v4.25.7 19 // source: google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto 20 21 package aiplatformpb 22 23 import ( 24 context "context" 25 httpbody "google.golang.org/genproto/googleapis/api/httpbody" 26 grpc "google.golang.org/grpc" 27 codes "google.golang.org/grpc/codes" 28 status "google.golang.org/grpc/status" 29 ) 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the grpc package it is being compiled against. 33 // Requires gRPC-Go v1.32.0 or later. 34 const _ = grpc.SupportPackageIsVersion7 35 36 const ( 37 ReasoningEngineExecutionService_QueryReasoningEngine_FullMethodName = "/google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService/QueryReasoningEngine" 38 ReasoningEngineExecutionService_StreamQueryReasoningEngine_FullMethodName = "/google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService/StreamQueryReasoningEngine" 39 ) 40 41 // ReasoningEngineExecutionServiceClient is the client API for ReasoningEngineExecutionService service. 42 // 43 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 type ReasoningEngineExecutionServiceClient interface { 45 // Queries using a reasoning engine. 46 QueryReasoningEngine(ctx context.Context, in *QueryReasoningEngineRequest, opts ...grpc.CallOption) (*QueryReasoningEngineResponse, error) 47 // Streams queries using a reasoning engine. 48 StreamQueryReasoningEngine(ctx context.Context, in *StreamQueryReasoningEngineRequest, opts ...grpc.CallOption) (ReasoningEngineExecutionService_StreamQueryReasoningEngineClient, error) 49 } 50 51 type reasoningEngineExecutionServiceClient struct { 52 cc grpc.ClientConnInterface 53 } 54 55 func NewReasoningEngineExecutionServiceClient(cc grpc.ClientConnInterface) ReasoningEngineExecutionServiceClient { 56 return &reasoningEngineExecutionServiceClient{cc} 57 } 58 59 func (c *reasoningEngineExecutionServiceClient) QueryReasoningEngine(ctx context.Context, in *QueryReasoningEngineRequest, opts ...grpc.CallOption) (*QueryReasoningEngineResponse, error) { 60 out := new(QueryReasoningEngineResponse) 61 err := c.cc.Invoke(ctx, ReasoningEngineExecutionService_QueryReasoningEngine_FullMethodName, in, out, opts...) 62 if err != nil { 63 return nil, err 64 } 65 return out, nil 66 } 67 68 func (c *reasoningEngineExecutionServiceClient) StreamQueryReasoningEngine(ctx context.Context, in *StreamQueryReasoningEngineRequest, opts ...grpc.CallOption) (ReasoningEngineExecutionService_StreamQueryReasoningEngineClient, error) { 69 stream, err := c.cc.NewStream(ctx, &ReasoningEngineExecutionService_ServiceDesc.Streams[0], ReasoningEngineExecutionService_StreamQueryReasoningEngine_FullMethodName, opts...) 70 if err != nil { 71 return nil, err 72 } 73 x := &reasoningEngineExecutionServiceStreamQueryReasoningEngineClient{stream} 74 if err := x.ClientStream.SendMsg(in); err != nil { 75 return nil, err 76 } 77 if err := x.ClientStream.CloseSend(); err != nil { 78 return nil, err 79 } 80 return x, nil 81 } 82 83 type ReasoningEngineExecutionService_StreamQueryReasoningEngineClient interface { 84 Recv() (*httpbody.HttpBody, error) 85 grpc.ClientStream 86 } 87 88 type reasoningEngineExecutionServiceStreamQueryReasoningEngineClient struct { 89 grpc.ClientStream 90 } 91 92 func (x *reasoningEngineExecutionServiceStreamQueryReasoningEngineClient) Recv() (*httpbody.HttpBody, error) { 93 m := new(httpbody.HttpBody) 94 if err := x.ClientStream.RecvMsg(m); err != nil { 95 return nil, err 96 } 97 return m, nil 98 } 99 100 // ReasoningEngineExecutionServiceServer is the server API for ReasoningEngineExecutionService service. 101 // All implementations should embed UnimplementedReasoningEngineExecutionServiceServer 102 // for forward compatibility 103 type ReasoningEngineExecutionServiceServer interface { 104 // Queries using a reasoning engine. 105 QueryReasoningEngine(context.Context, *QueryReasoningEngineRequest) (*QueryReasoningEngineResponse, error) 106 // Streams queries using a reasoning engine. 107 StreamQueryReasoningEngine(*StreamQueryReasoningEngineRequest, ReasoningEngineExecutionService_StreamQueryReasoningEngineServer) error 108 } 109 110 // UnimplementedReasoningEngineExecutionServiceServer should be embedded to have forward compatible implementations. 111 type UnimplementedReasoningEngineExecutionServiceServer struct { 112 } 113 114 func (UnimplementedReasoningEngineExecutionServiceServer) QueryReasoningEngine(context.Context, *QueryReasoningEngineRequest) (*QueryReasoningEngineResponse, error) { 115 return nil, status.Errorf(codes.Unimplemented, "method QueryReasoningEngine not implemented") 116 } 117 func (UnimplementedReasoningEngineExecutionServiceServer) StreamQueryReasoningEngine(*StreamQueryReasoningEngineRequest, ReasoningEngineExecutionService_StreamQueryReasoningEngineServer) error { 118 return status.Errorf(codes.Unimplemented, "method StreamQueryReasoningEngine not implemented") 119 } 120 121 // UnsafeReasoningEngineExecutionServiceServer may be embedded to opt out of forward compatibility for this service. 122 // Use of this interface is not recommended, as added methods to ReasoningEngineExecutionServiceServer will 123 // result in compilation errors. 124 type UnsafeReasoningEngineExecutionServiceServer interface { 125 mustEmbedUnimplementedReasoningEngineExecutionServiceServer() 126 } 127 128 func RegisterReasoningEngineExecutionServiceServer(s grpc.ServiceRegistrar, srv ReasoningEngineExecutionServiceServer) { 129 s.RegisterService(&ReasoningEngineExecutionService_ServiceDesc, srv) 130 } 131 132 func _ReasoningEngineExecutionService_QueryReasoningEngine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 133 in := new(QueryReasoningEngineRequest) 134 if err := dec(in); err != nil { 135 return nil, err 136 } 137 if interceptor == nil { 138 return srv.(ReasoningEngineExecutionServiceServer).QueryReasoningEngine(ctx, in) 139 } 140 info := &grpc.UnaryServerInfo{ 141 Server: srv, 142 FullMethod: ReasoningEngineExecutionService_QueryReasoningEngine_FullMethodName, 143 } 144 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 145 return srv.(ReasoningEngineExecutionServiceServer).QueryReasoningEngine(ctx, req.(*QueryReasoningEngineRequest)) 146 } 147 return interceptor(ctx, in, info, handler) 148 } 149 150 func _ReasoningEngineExecutionService_StreamQueryReasoningEngine_Handler(srv interface{}, stream grpc.ServerStream) error { 151 m := new(StreamQueryReasoningEngineRequest) 152 if err := stream.RecvMsg(m); err != nil { 153 return err 154 } 155 return srv.(ReasoningEngineExecutionServiceServer).StreamQueryReasoningEngine(m, &reasoningEngineExecutionServiceStreamQueryReasoningEngineServer{stream}) 156 } 157 158 type ReasoningEngineExecutionService_StreamQueryReasoningEngineServer interface { 159 Send(*httpbody.HttpBody) error 160 grpc.ServerStream 161 } 162 163 type reasoningEngineExecutionServiceStreamQueryReasoningEngineServer struct { 164 grpc.ServerStream 165 } 166 167 func (x *reasoningEngineExecutionServiceStreamQueryReasoningEngineServer) Send(m *httpbody.HttpBody) error { 168 return x.ServerStream.SendMsg(m) 169 } 170 171 // ReasoningEngineExecutionService_ServiceDesc is the grpc.ServiceDesc for ReasoningEngineExecutionService service. 172 // It's only intended for direct use with grpc.RegisterService, 173 // and not to be introspected or modified (even as a copy) 174 var ReasoningEngineExecutionService_ServiceDesc = grpc.ServiceDesc{ 175 ServiceName: "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService", 176 HandlerType: (*ReasoningEngineExecutionServiceServer)(nil), 177 Methods: []grpc.MethodDesc{ 178 { 179 MethodName: "QueryReasoningEngine", 180 Handler: _ReasoningEngineExecutionService_QueryReasoningEngine_Handler, 181 }, 182 }, 183 Streams: []grpc.StreamDesc{ 184 { 185 StreamName: "StreamQueryReasoningEngine", 186 Handler: _ReasoningEngineExecutionService_StreamQueryReasoningEngine_Handler, 187 ServerStreams: true, 188 }, 189 }, 190 Metadata: "google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", 191 }