cloud.google.com/go/aiplatform@v1.106.0/apiv1/aiplatformpb/index_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/v1/index_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 IndexService_CreateIndex_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/CreateIndex" 38 IndexService_GetIndex_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/GetIndex" 39 IndexService_ListIndexes_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/ListIndexes" 40 IndexService_UpdateIndex_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/UpdateIndex" 41 IndexService_DeleteIndex_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/DeleteIndex" 42 IndexService_UpsertDatapoints_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/UpsertDatapoints" 43 IndexService_RemoveDatapoints_FullMethodName = "/google.cloud.aiplatform.v1.IndexService/RemoveDatapoints" 44 ) 45 46 // IndexServiceClient is the client API for IndexService 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 IndexServiceClient interface { 50 // Creates an Index. 51 CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 52 // Gets an Index. 53 GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) 54 // Lists Indexes in a Location. 55 ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) 56 // Updates an Index. 57 UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 58 // Deletes an Index. 59 // An Index can only be deleted when all its 60 // [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had 61 // been undeployed. 62 DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 63 // Add/update Datapoints into an Index. 64 UpsertDatapoints(ctx context.Context, in *UpsertDatapointsRequest, opts ...grpc.CallOption) (*UpsertDatapointsResponse, error) 65 // Remove Datapoints from an Index. 66 RemoveDatapoints(ctx context.Context, in *RemoveDatapointsRequest, opts ...grpc.CallOption) (*RemoveDatapointsResponse, error) 67 } 68 69 type indexServiceClient struct { 70 cc grpc.ClientConnInterface 71 } 72 73 func NewIndexServiceClient(cc grpc.ClientConnInterface) IndexServiceClient { 74 return &indexServiceClient{cc} 75 } 76 77 func (c *indexServiceClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 78 out := new(longrunningpb.Operation) 79 err := c.cc.Invoke(ctx, IndexService_CreateIndex_FullMethodName, in, out, opts...) 80 if err != nil { 81 return nil, err 82 } 83 return out, nil 84 } 85 86 func (c *indexServiceClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) { 87 out := new(Index) 88 err := c.cc.Invoke(ctx, IndexService_GetIndex_FullMethodName, in, out, opts...) 89 if err != nil { 90 return nil, err 91 } 92 return out, nil 93 } 94 95 func (c *indexServiceClient) ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) { 96 out := new(ListIndexesResponse) 97 err := c.cc.Invoke(ctx, IndexService_ListIndexes_FullMethodName, in, out, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return out, nil 102 } 103 104 func (c *indexServiceClient) UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 105 out := new(longrunningpb.Operation) 106 err := c.cc.Invoke(ctx, IndexService_UpdateIndex_FullMethodName, in, out, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return out, nil 111 } 112 113 func (c *indexServiceClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 114 out := new(longrunningpb.Operation) 115 err := c.cc.Invoke(ctx, IndexService_DeleteIndex_FullMethodName, in, out, opts...) 116 if err != nil { 117 return nil, err 118 } 119 return out, nil 120 } 121 122 func (c *indexServiceClient) UpsertDatapoints(ctx context.Context, in *UpsertDatapointsRequest, opts ...grpc.CallOption) (*UpsertDatapointsResponse, error) { 123 out := new(UpsertDatapointsResponse) 124 err := c.cc.Invoke(ctx, IndexService_UpsertDatapoints_FullMethodName, in, out, opts...) 125 if err != nil { 126 return nil, err 127 } 128 return out, nil 129 } 130 131 func (c *indexServiceClient) RemoveDatapoints(ctx context.Context, in *RemoveDatapointsRequest, opts ...grpc.CallOption) (*RemoveDatapointsResponse, error) { 132 out := new(RemoveDatapointsResponse) 133 err := c.cc.Invoke(ctx, IndexService_RemoveDatapoints_FullMethodName, in, out, opts...) 134 if err != nil { 135 return nil, err 136 } 137 return out, nil 138 } 139 140 // IndexServiceServer is the server API for IndexService service. 141 // All implementations should embed UnimplementedIndexServiceServer 142 // for forward compatibility 143 type IndexServiceServer interface { 144 // Creates an Index. 145 CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) 146 // Gets an Index. 147 GetIndex(context.Context, *GetIndexRequest) (*Index, error) 148 // Lists Indexes in a Location. 149 ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) 150 // Updates an Index. 151 UpdateIndex(context.Context, *UpdateIndexRequest) (*longrunningpb.Operation, error) 152 // Deletes an Index. 153 // An Index can only be deleted when all its 154 // [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had 155 // been undeployed. 156 DeleteIndex(context.Context, *DeleteIndexRequest) (*longrunningpb.Operation, error) 157 // Add/update Datapoints into an Index. 158 UpsertDatapoints(context.Context, *UpsertDatapointsRequest) (*UpsertDatapointsResponse, error) 159 // Remove Datapoints from an Index. 160 RemoveDatapoints(context.Context, *RemoveDatapointsRequest) (*RemoveDatapointsResponse, error) 161 } 162 163 // UnimplementedIndexServiceServer should be embedded to have forward compatible implementations. 164 type UnimplementedIndexServiceServer struct { 165 } 166 167 func (UnimplementedIndexServiceServer) CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) { 168 return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") 169 } 170 func (UnimplementedIndexServiceServer) GetIndex(context.Context, *GetIndexRequest) (*Index, error) { 171 return nil, status.Errorf(codes.Unimplemented, "method GetIndex not implemented") 172 } 173 func (UnimplementedIndexServiceServer) ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) { 174 return nil, status.Errorf(codes.Unimplemented, "method ListIndexes not implemented") 175 } 176 func (UnimplementedIndexServiceServer) UpdateIndex(context.Context, *UpdateIndexRequest) (*longrunningpb.Operation, error) { 177 return nil, status.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") 178 } 179 func (UnimplementedIndexServiceServer) DeleteIndex(context.Context, *DeleteIndexRequest) (*longrunningpb.Operation, error) { 180 return nil, status.Errorf(codes.Unimplemented, "method DeleteIndex not implemented") 181 } 182 func (UnimplementedIndexServiceServer) UpsertDatapoints(context.Context, *UpsertDatapointsRequest) (*UpsertDatapointsResponse, error) { 183 return nil, status.Errorf(codes.Unimplemented, "method UpsertDatapoints not implemented") 184 } 185 func (UnimplementedIndexServiceServer) RemoveDatapoints(context.Context, *RemoveDatapointsRequest) (*RemoveDatapointsResponse, error) { 186 return nil, status.Errorf(codes.Unimplemented, "method RemoveDatapoints not implemented") 187 } 188 189 // UnsafeIndexServiceServer may be embedded to opt out of forward compatibility for this service. 190 // Use of this interface is not recommended, as added methods to IndexServiceServer will 191 // result in compilation errors. 192 type UnsafeIndexServiceServer interface { 193 mustEmbedUnimplementedIndexServiceServer() 194 } 195 196 func RegisterIndexServiceServer(s grpc.ServiceRegistrar, srv IndexServiceServer) { 197 s.RegisterService(&IndexService_ServiceDesc, srv) 198 } 199 200 func _IndexService_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 201 in := new(CreateIndexRequest) 202 if err := dec(in); err != nil { 203 return nil, err 204 } 205 if interceptor == nil { 206 return srv.(IndexServiceServer).CreateIndex(ctx, in) 207 } 208 info := &grpc.UnaryServerInfo{ 209 Server: srv, 210 FullMethod: IndexService_CreateIndex_FullMethodName, 211 } 212 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 213 return srv.(IndexServiceServer).CreateIndex(ctx, req.(*CreateIndexRequest)) 214 } 215 return interceptor(ctx, in, info, handler) 216 } 217 218 func _IndexService_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 219 in := new(GetIndexRequest) 220 if err := dec(in); err != nil { 221 return nil, err 222 } 223 if interceptor == nil { 224 return srv.(IndexServiceServer).GetIndex(ctx, in) 225 } 226 info := &grpc.UnaryServerInfo{ 227 Server: srv, 228 FullMethod: IndexService_GetIndex_FullMethodName, 229 } 230 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 231 return srv.(IndexServiceServer).GetIndex(ctx, req.(*GetIndexRequest)) 232 } 233 return interceptor(ctx, in, info, handler) 234 } 235 236 func _IndexService_ListIndexes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 237 in := new(ListIndexesRequest) 238 if err := dec(in); err != nil { 239 return nil, err 240 } 241 if interceptor == nil { 242 return srv.(IndexServiceServer).ListIndexes(ctx, in) 243 } 244 info := &grpc.UnaryServerInfo{ 245 Server: srv, 246 FullMethod: IndexService_ListIndexes_FullMethodName, 247 } 248 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 249 return srv.(IndexServiceServer).ListIndexes(ctx, req.(*ListIndexesRequest)) 250 } 251 return interceptor(ctx, in, info, handler) 252 } 253 254 func _IndexService_UpdateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 255 in := new(UpdateIndexRequest) 256 if err := dec(in); err != nil { 257 return nil, err 258 } 259 if interceptor == nil { 260 return srv.(IndexServiceServer).UpdateIndex(ctx, in) 261 } 262 info := &grpc.UnaryServerInfo{ 263 Server: srv, 264 FullMethod: IndexService_UpdateIndex_FullMethodName, 265 } 266 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 267 return srv.(IndexServiceServer).UpdateIndex(ctx, req.(*UpdateIndexRequest)) 268 } 269 return interceptor(ctx, in, info, handler) 270 } 271 272 func _IndexService_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 273 in := new(DeleteIndexRequest) 274 if err := dec(in); err != nil { 275 return nil, err 276 } 277 if interceptor == nil { 278 return srv.(IndexServiceServer).DeleteIndex(ctx, in) 279 } 280 info := &grpc.UnaryServerInfo{ 281 Server: srv, 282 FullMethod: IndexService_DeleteIndex_FullMethodName, 283 } 284 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 285 return srv.(IndexServiceServer).DeleteIndex(ctx, req.(*DeleteIndexRequest)) 286 } 287 return interceptor(ctx, in, info, handler) 288 } 289 290 func _IndexService_UpsertDatapoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 291 in := new(UpsertDatapointsRequest) 292 if err := dec(in); err != nil { 293 return nil, err 294 } 295 if interceptor == nil { 296 return srv.(IndexServiceServer).UpsertDatapoints(ctx, in) 297 } 298 info := &grpc.UnaryServerInfo{ 299 Server: srv, 300 FullMethod: IndexService_UpsertDatapoints_FullMethodName, 301 } 302 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 303 return srv.(IndexServiceServer).UpsertDatapoints(ctx, req.(*UpsertDatapointsRequest)) 304 } 305 return interceptor(ctx, in, info, handler) 306 } 307 308 func _IndexService_RemoveDatapoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 309 in := new(RemoveDatapointsRequest) 310 if err := dec(in); err != nil { 311 return nil, err 312 } 313 if interceptor == nil { 314 return srv.(IndexServiceServer).RemoveDatapoints(ctx, in) 315 } 316 info := &grpc.UnaryServerInfo{ 317 Server: srv, 318 FullMethod: IndexService_RemoveDatapoints_FullMethodName, 319 } 320 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 321 return srv.(IndexServiceServer).RemoveDatapoints(ctx, req.(*RemoveDatapointsRequest)) 322 } 323 return interceptor(ctx, in, info, handler) 324 } 325 326 // IndexService_ServiceDesc is the grpc.ServiceDesc for IndexService 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 IndexService_ServiceDesc = grpc.ServiceDesc{ 330 ServiceName: "google.cloud.aiplatform.v1.IndexService", 331 HandlerType: (*IndexServiceServer)(nil), 332 Methods: []grpc.MethodDesc{ 333 { 334 MethodName: "CreateIndex", 335 Handler: _IndexService_CreateIndex_Handler, 336 }, 337 { 338 MethodName: "GetIndex", 339 Handler: _IndexService_GetIndex_Handler, 340 }, 341 { 342 MethodName: "ListIndexes", 343 Handler: _IndexService_ListIndexes_Handler, 344 }, 345 { 346 MethodName: "UpdateIndex", 347 Handler: _IndexService_UpdateIndex_Handler, 348 }, 349 { 350 MethodName: "DeleteIndex", 351 Handler: _IndexService_DeleteIndex_Handler, 352 }, 353 { 354 MethodName: "UpsertDatapoints", 355 Handler: _IndexService_UpsertDatapoints_Handler, 356 }, 357 { 358 MethodName: "RemoveDatapoints", 359 Handler: _IndexService_RemoveDatapoints_Handler, 360 }, 361 }, 362 Streams: []grpc.StreamDesc{}, 363 Metadata: "google/cloud/aiplatform/v1/index_service.proto", 364 }