cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/session_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/session_service.proto 20 21 package aiplatformpb 22 23 import ( 24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" 25 context "context" 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 SessionService_CreateSession_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/CreateSession" 38 SessionService_GetSession_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/GetSession" 39 SessionService_ListSessions_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/ListSessions" 40 SessionService_UpdateSession_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/UpdateSession" 41 SessionService_DeleteSession_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/DeleteSession" 42 SessionService_ListEvents_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/ListEvents" 43 SessionService_AppendEvent_FullMethodName = "/google.cloud.aiplatform.v1beta1.SessionService/AppendEvent" 44 ) 45 46 // SessionServiceClient is the client API for SessionService service. 47 // 48 // 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. 49 type SessionServiceClient interface { 50 // Creates a new [Session][google.cloud.aiplatform.v1beta1.Session]. 51 CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 52 // Gets details of the specific 53 // [Session][google.cloud.aiplatform.v1beta1.Session]. 54 GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) 55 // Lists [Sessions][google.cloud.aiplatform.v1beta1.Session] in a given 56 // reasoning engine. 57 ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) 58 // Updates the specific [Session][google.cloud.aiplatform.v1beta1.Session]. 59 UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*Session, error) 60 // Deletes details of the specific 61 // [Session][google.cloud.aiplatform.v1beta1.Session]. 62 DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 63 // Lists [Events][google.cloud.aiplatform.v1beta1.Event] in a given session. 64 ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) 65 // Appends an event to a given session. 66 AppendEvent(ctx context.Context, in *AppendEventRequest, opts ...grpc.CallOption) (*AppendEventResponse, error) 67 } 68 69 type sessionServiceClient struct { 70 cc grpc.ClientConnInterface 71 } 72 73 func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient { 74 return &sessionServiceClient{cc} 75 } 76 77 func (c *sessionServiceClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 78 out := new(longrunningpb.Operation) 79 err := c.cc.Invoke(ctx, SessionService_CreateSession_FullMethodName, in, out, opts...) 80 if err != nil { 81 return nil, err 82 } 83 return out, nil 84 } 85 86 func (c *sessionServiceClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) { 87 out := new(Session) 88 err := c.cc.Invoke(ctx, SessionService_GetSession_FullMethodName, in, out, opts...) 89 if err != nil { 90 return nil, err 91 } 92 return out, nil 93 } 94 95 func (c *sessionServiceClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) { 96 out := new(ListSessionsResponse) 97 err := c.cc.Invoke(ctx, SessionService_ListSessions_FullMethodName, in, out, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return out, nil 102 } 103 104 func (c *sessionServiceClient) UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*Session, error) { 105 out := new(Session) 106 err := c.cc.Invoke(ctx, SessionService_UpdateSession_FullMethodName, in, out, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return out, nil 111 } 112 113 func (c *sessionServiceClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 114 out := new(longrunningpb.Operation) 115 err := c.cc.Invoke(ctx, SessionService_DeleteSession_FullMethodName, in, out, opts...) 116 if err != nil { 117 return nil, err 118 } 119 return out, nil 120 } 121 122 func (c *sessionServiceClient) ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) { 123 out := new(ListEventsResponse) 124 err := c.cc.Invoke(ctx, SessionService_ListEvents_FullMethodName, in, out, opts...) 125 if err != nil { 126 return nil, err 127 } 128 return out, nil 129 } 130 131 func (c *sessionServiceClient) AppendEvent(ctx context.Context, in *AppendEventRequest, opts ...grpc.CallOption) (*AppendEventResponse, error) { 132 out := new(AppendEventResponse) 133 err := c.cc.Invoke(ctx, SessionService_AppendEvent_FullMethodName, in, out, opts...) 134 if err != nil { 135 return nil, err 136 } 137 return out, nil 138 } 139 140 // SessionServiceServer is the server API for SessionService service. 141 // All implementations should embed UnimplementedSessionServiceServer 142 // for forward compatibility 143 type SessionServiceServer interface { 144 // Creates a new [Session][google.cloud.aiplatform.v1beta1.Session]. 145 CreateSession(context.Context, *CreateSessionRequest) (*longrunningpb.Operation, error) 146 // Gets details of the specific 147 // [Session][google.cloud.aiplatform.v1beta1.Session]. 148 GetSession(context.Context, *GetSessionRequest) (*Session, error) 149 // Lists [Sessions][google.cloud.aiplatform.v1beta1.Session] in a given 150 // reasoning engine. 151 ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) 152 // Updates the specific [Session][google.cloud.aiplatform.v1beta1.Session]. 153 UpdateSession(context.Context, *UpdateSessionRequest) (*Session, error) 154 // Deletes details of the specific 155 // [Session][google.cloud.aiplatform.v1beta1.Session]. 156 DeleteSession(context.Context, *DeleteSessionRequest) (*longrunningpb.Operation, error) 157 // Lists [Events][google.cloud.aiplatform.v1beta1.Event] in a given session. 158 ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) 159 // Appends an event to a given session. 160 AppendEvent(context.Context, *AppendEventRequest) (*AppendEventResponse, error) 161 } 162 163 // UnimplementedSessionServiceServer should be embedded to have forward compatible implementations. 164 type UnimplementedSessionServiceServer struct { 165 } 166 167 func (UnimplementedSessionServiceServer) CreateSession(context.Context, *CreateSessionRequest) (*longrunningpb.Operation, error) { 168 return nil, status.Errorf(codes.Unimplemented, "method CreateSession not implemented") 169 } 170 func (UnimplementedSessionServiceServer) GetSession(context.Context, *GetSessionRequest) (*Session, error) { 171 return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented") 172 } 173 func (UnimplementedSessionServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) { 174 return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented") 175 } 176 func (UnimplementedSessionServiceServer) UpdateSession(context.Context, *UpdateSessionRequest) (*Session, error) { 177 return nil, status.Errorf(codes.Unimplemented, "method UpdateSession not implemented") 178 } 179 func (UnimplementedSessionServiceServer) DeleteSession(context.Context, *DeleteSessionRequest) (*longrunningpb.Operation, error) { 180 return nil, status.Errorf(codes.Unimplemented, "method DeleteSession not implemented") 181 } 182 func (UnimplementedSessionServiceServer) ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) { 183 return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") 184 } 185 func (UnimplementedSessionServiceServer) AppendEvent(context.Context, *AppendEventRequest) (*AppendEventResponse, error) { 186 return nil, status.Errorf(codes.Unimplemented, "method AppendEvent not implemented") 187 } 188 189 // UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service. 190 // Use of this interface is not recommended, as added methods to SessionServiceServer will 191 // result in compilation errors. 192 type UnsafeSessionServiceServer interface { 193 mustEmbedUnimplementedSessionServiceServer() 194 } 195 196 func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer) { 197 s.RegisterService(&SessionService_ServiceDesc, srv) 198 } 199 200 func _SessionService_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 201 in := new(CreateSessionRequest) 202 if err := dec(in); err != nil { 203 return nil, err 204 } 205 if interceptor == nil { 206 return srv.(SessionServiceServer).CreateSession(ctx, in) 207 } 208 info := &grpc.UnaryServerInfo{ 209 Server: srv, 210 FullMethod: SessionService_CreateSession_FullMethodName, 211 } 212 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 213 return srv.(SessionServiceServer).CreateSession(ctx, req.(*CreateSessionRequest)) 214 } 215 return interceptor(ctx, in, info, handler) 216 } 217 218 func _SessionService_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 219 in := new(GetSessionRequest) 220 if err := dec(in); err != nil { 221 return nil, err 222 } 223 if interceptor == nil { 224 return srv.(SessionServiceServer).GetSession(ctx, in) 225 } 226 info := &grpc.UnaryServerInfo{ 227 Server: srv, 228 FullMethod: SessionService_GetSession_FullMethodName, 229 } 230 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 231 return srv.(SessionServiceServer).GetSession(ctx, req.(*GetSessionRequest)) 232 } 233 return interceptor(ctx, in, info, handler) 234 } 235 236 func _SessionService_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 237 in := new(ListSessionsRequest) 238 if err := dec(in); err != nil { 239 return nil, err 240 } 241 if interceptor == nil { 242 return srv.(SessionServiceServer).ListSessions(ctx, in) 243 } 244 info := &grpc.UnaryServerInfo{ 245 Server: srv, 246 FullMethod: SessionService_ListSessions_FullMethodName, 247 } 248 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 249 return srv.(SessionServiceServer).ListSessions(ctx, req.(*ListSessionsRequest)) 250 } 251 return interceptor(ctx, in, info, handler) 252 } 253 254 func _SessionService_UpdateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 255 in := new(UpdateSessionRequest) 256 if err := dec(in); err != nil { 257 return nil, err 258 } 259 if interceptor == nil { 260 return srv.(SessionServiceServer).UpdateSession(ctx, in) 261 } 262 info := &grpc.UnaryServerInfo{ 263 Server: srv, 264 FullMethod: SessionService_UpdateSession_FullMethodName, 265 } 266 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 267 return srv.(SessionServiceServer).UpdateSession(ctx, req.(*UpdateSessionRequest)) 268 } 269 return interceptor(ctx, in, info, handler) 270 } 271 272 func _SessionService_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 273 in := new(DeleteSessionRequest) 274 if err := dec(in); err != nil { 275 return nil, err 276 } 277 if interceptor == nil { 278 return srv.(SessionServiceServer).DeleteSession(ctx, in) 279 } 280 info := &grpc.UnaryServerInfo{ 281 Server: srv, 282 FullMethod: SessionService_DeleteSession_FullMethodName, 283 } 284 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 285 return srv.(SessionServiceServer).DeleteSession(ctx, req.(*DeleteSessionRequest)) 286 } 287 return interceptor(ctx, in, info, handler) 288 } 289 290 func _SessionService_ListEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 291 in := new(ListEventsRequest) 292 if err := dec(in); err != nil { 293 return nil, err 294 } 295 if interceptor == nil { 296 return srv.(SessionServiceServer).ListEvents(ctx, in) 297 } 298 info := &grpc.UnaryServerInfo{ 299 Server: srv, 300 FullMethod: SessionService_ListEvents_FullMethodName, 301 } 302 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 303 return srv.(SessionServiceServer).ListEvents(ctx, req.(*ListEventsRequest)) 304 } 305 return interceptor(ctx, in, info, handler) 306 } 307 308 func _SessionService_AppendEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 309 in := new(AppendEventRequest) 310 if err := dec(in); err != nil { 311 return nil, err 312 } 313 if interceptor == nil { 314 return srv.(SessionServiceServer).AppendEvent(ctx, in) 315 } 316 info := &grpc.UnaryServerInfo{ 317 Server: srv, 318 FullMethod: SessionService_AppendEvent_FullMethodName, 319 } 320 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 321 return srv.(SessionServiceServer).AppendEvent(ctx, req.(*AppendEventRequest)) 322 } 323 return interceptor(ctx, in, info, handler) 324 } 325 326 // SessionService_ServiceDesc is the grpc.ServiceDesc for SessionService service. 327 // It's only intended for direct use with grpc.RegisterService, 328 // and not to be introspected or modified (even as a copy) 329 var SessionService_ServiceDesc = grpc.ServiceDesc{ 330 ServiceName: "google.cloud.aiplatform.v1beta1.SessionService", 331 HandlerType: (*SessionServiceServer)(nil), 332 Methods: []grpc.MethodDesc{ 333 { 334 MethodName: "CreateSession", 335 Handler: _SessionService_CreateSession_Handler, 336 }, 337 { 338 MethodName: "GetSession", 339 Handler: _SessionService_GetSession_Handler, 340 }, 341 { 342 MethodName: "ListSessions", 343 Handler: _SessionService_ListSessions_Handler, 344 }, 345 { 346 MethodName: "UpdateSession", 347 Handler: _SessionService_UpdateSession_Handler, 348 }, 349 { 350 MethodName: "DeleteSession", 351 Handler: _SessionService_DeleteSession_Handler, 352 }, 353 { 354 MethodName: "ListEvents", 355 Handler: _SessionService_ListEvents_Handler, 356 }, 357 { 358 MethodName: "AppendEvent", 359 Handler: _SessionService_AppendEvent_Handler, 360 }, 361 }, 362 Streams: []grpc.StreamDesc{}, 363 Metadata: "google/cloud/aiplatform/v1beta1/session_service.proto", 364 }