cloud.google.com/go/aiplatform@v1.106.0/apiv1/aiplatformpb/featurestore_online_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/featurestore_online_service.proto 20 21 package aiplatformpb 22 23 import ( 24 context "context" 25 grpc "google.golang.org/grpc" 26 codes "google.golang.org/grpc/codes" 27 status "google.golang.org/grpc/status" 28 ) 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the grpc package it is being compiled against. 32 // Requires gRPC-Go v1.32.0 or later. 33 const _ = grpc.SupportPackageIsVersion7 34 35 const ( 36 FeaturestoreOnlineServingService_ReadFeatureValues_FullMethodName = "/google.cloud.aiplatform.v1.FeaturestoreOnlineServingService/ReadFeatureValues" 37 FeaturestoreOnlineServingService_StreamingReadFeatureValues_FullMethodName = "/google.cloud.aiplatform.v1.FeaturestoreOnlineServingService/StreamingReadFeatureValues" 38 FeaturestoreOnlineServingService_WriteFeatureValues_FullMethodName = "/google.cloud.aiplatform.v1.FeaturestoreOnlineServingService/WriteFeatureValues" 39 ) 40 41 // FeaturestoreOnlineServingServiceClient is the client API for FeaturestoreOnlineServingService 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 FeaturestoreOnlineServingServiceClient interface { 45 // Reads Feature values of a specific entity of an EntityType. For reading 46 // feature values of multiple entities of an EntityType, please use 47 // StreamingReadFeatureValues. 48 ReadFeatureValues(ctx context.Context, in *ReadFeatureValuesRequest, opts ...grpc.CallOption) (*ReadFeatureValuesResponse, error) 49 // Reads Feature values for multiple entities. Depending on their size, data 50 // for different entities may be broken 51 // up across multiple responses. 52 StreamingReadFeatureValues(ctx context.Context, in *StreamingReadFeatureValuesRequest, opts ...grpc.CallOption) (FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient, error) 53 // Writes Feature values of one or more entities of an EntityType. 54 // 55 // The Feature values are merged into existing entities if any. The Feature 56 // values to be written must have timestamp within the online storage 57 // retention. 58 WriteFeatureValues(ctx context.Context, in *WriteFeatureValuesRequest, opts ...grpc.CallOption) (*WriteFeatureValuesResponse, error) 59 } 60 61 type featurestoreOnlineServingServiceClient struct { 62 cc grpc.ClientConnInterface 63 } 64 65 func NewFeaturestoreOnlineServingServiceClient(cc grpc.ClientConnInterface) FeaturestoreOnlineServingServiceClient { 66 return &featurestoreOnlineServingServiceClient{cc} 67 } 68 69 func (c *featurestoreOnlineServingServiceClient) ReadFeatureValues(ctx context.Context, in *ReadFeatureValuesRequest, opts ...grpc.CallOption) (*ReadFeatureValuesResponse, error) { 70 out := new(ReadFeatureValuesResponse) 71 err := c.cc.Invoke(ctx, FeaturestoreOnlineServingService_ReadFeatureValues_FullMethodName, in, out, opts...) 72 if err != nil { 73 return nil, err 74 } 75 return out, nil 76 } 77 78 func (c *featurestoreOnlineServingServiceClient) StreamingReadFeatureValues(ctx context.Context, in *StreamingReadFeatureValuesRequest, opts ...grpc.CallOption) (FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient, error) { 79 stream, err := c.cc.NewStream(ctx, &FeaturestoreOnlineServingService_ServiceDesc.Streams[0], FeaturestoreOnlineServingService_StreamingReadFeatureValues_FullMethodName, opts...) 80 if err != nil { 81 return nil, err 82 } 83 x := &featurestoreOnlineServingServiceStreamingReadFeatureValuesClient{stream} 84 if err := x.ClientStream.SendMsg(in); err != nil { 85 return nil, err 86 } 87 if err := x.ClientStream.CloseSend(); err != nil { 88 return nil, err 89 } 90 return x, nil 91 } 92 93 type FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient interface { 94 Recv() (*ReadFeatureValuesResponse, error) 95 grpc.ClientStream 96 } 97 98 type featurestoreOnlineServingServiceStreamingReadFeatureValuesClient struct { 99 grpc.ClientStream 100 } 101 102 func (x *featurestoreOnlineServingServiceStreamingReadFeatureValuesClient) Recv() (*ReadFeatureValuesResponse, error) { 103 m := new(ReadFeatureValuesResponse) 104 if err := x.ClientStream.RecvMsg(m); err != nil { 105 return nil, err 106 } 107 return m, nil 108 } 109 110 func (c *featurestoreOnlineServingServiceClient) WriteFeatureValues(ctx context.Context, in *WriteFeatureValuesRequest, opts ...grpc.CallOption) (*WriteFeatureValuesResponse, error) { 111 out := new(WriteFeatureValuesResponse) 112 err := c.cc.Invoke(ctx, FeaturestoreOnlineServingService_WriteFeatureValues_FullMethodName, in, out, opts...) 113 if err != nil { 114 return nil, err 115 } 116 return out, nil 117 } 118 119 // FeaturestoreOnlineServingServiceServer is the server API for FeaturestoreOnlineServingService service. 120 // All implementations should embed UnimplementedFeaturestoreOnlineServingServiceServer 121 // for forward compatibility 122 type FeaturestoreOnlineServingServiceServer interface { 123 // Reads Feature values of a specific entity of an EntityType. For reading 124 // feature values of multiple entities of an EntityType, please use 125 // StreamingReadFeatureValues. 126 ReadFeatureValues(context.Context, *ReadFeatureValuesRequest) (*ReadFeatureValuesResponse, error) 127 // Reads Feature values for multiple entities. Depending on their size, data 128 // for different entities may be broken 129 // up across multiple responses. 130 StreamingReadFeatureValues(*StreamingReadFeatureValuesRequest, FeaturestoreOnlineServingService_StreamingReadFeatureValuesServer) error 131 // Writes Feature values of one or more entities of an EntityType. 132 // 133 // The Feature values are merged into existing entities if any. The Feature 134 // values to be written must have timestamp within the online storage 135 // retention. 136 WriteFeatureValues(context.Context, *WriteFeatureValuesRequest) (*WriteFeatureValuesResponse, error) 137 } 138 139 // UnimplementedFeaturestoreOnlineServingServiceServer should be embedded to have forward compatible implementations. 140 type UnimplementedFeaturestoreOnlineServingServiceServer struct { 141 } 142 143 func (UnimplementedFeaturestoreOnlineServingServiceServer) ReadFeatureValues(context.Context, *ReadFeatureValuesRequest) (*ReadFeatureValuesResponse, error) { 144 return nil, status.Errorf(codes.Unimplemented, "method ReadFeatureValues not implemented") 145 } 146 func (UnimplementedFeaturestoreOnlineServingServiceServer) StreamingReadFeatureValues(*StreamingReadFeatureValuesRequest, FeaturestoreOnlineServingService_StreamingReadFeatureValuesServer) error { 147 return status.Errorf(codes.Unimplemented, "method StreamingReadFeatureValues not implemented") 148 } 149 func (UnimplementedFeaturestoreOnlineServingServiceServer) WriteFeatureValues(context.Context, *WriteFeatureValuesRequest) (*WriteFeatureValuesResponse, error) { 150 return nil, status.Errorf(codes.Unimplemented, "method WriteFeatureValues not implemented") 151 } 152 153 // UnsafeFeaturestoreOnlineServingServiceServer may be embedded to opt out of forward compatibility for this service. 154 // Use of this interface is not recommended, as added methods to FeaturestoreOnlineServingServiceServer will 155 // result in compilation errors. 156 type UnsafeFeaturestoreOnlineServingServiceServer interface { 157 mustEmbedUnimplementedFeaturestoreOnlineServingServiceServer() 158 } 159 160 func RegisterFeaturestoreOnlineServingServiceServer(s grpc.ServiceRegistrar, srv FeaturestoreOnlineServingServiceServer) { 161 s.RegisterService(&FeaturestoreOnlineServingService_ServiceDesc, srv) 162 } 163 164 func _FeaturestoreOnlineServingService_ReadFeatureValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 165 in := new(ReadFeatureValuesRequest) 166 if err := dec(in); err != nil { 167 return nil, err 168 } 169 if interceptor == nil { 170 return srv.(FeaturestoreOnlineServingServiceServer).ReadFeatureValues(ctx, in) 171 } 172 info := &grpc.UnaryServerInfo{ 173 Server: srv, 174 FullMethod: FeaturestoreOnlineServingService_ReadFeatureValues_FullMethodName, 175 } 176 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 177 return srv.(FeaturestoreOnlineServingServiceServer).ReadFeatureValues(ctx, req.(*ReadFeatureValuesRequest)) 178 } 179 return interceptor(ctx, in, info, handler) 180 } 181 182 func _FeaturestoreOnlineServingService_StreamingReadFeatureValues_Handler(srv interface{}, stream grpc.ServerStream) error { 183 m := new(StreamingReadFeatureValuesRequest) 184 if err := stream.RecvMsg(m); err != nil { 185 return err 186 } 187 return srv.(FeaturestoreOnlineServingServiceServer).StreamingReadFeatureValues(m, &featurestoreOnlineServingServiceStreamingReadFeatureValuesServer{stream}) 188 } 189 190 type FeaturestoreOnlineServingService_StreamingReadFeatureValuesServer interface { 191 Send(*ReadFeatureValuesResponse) error 192 grpc.ServerStream 193 } 194 195 type featurestoreOnlineServingServiceStreamingReadFeatureValuesServer struct { 196 grpc.ServerStream 197 } 198 199 func (x *featurestoreOnlineServingServiceStreamingReadFeatureValuesServer) Send(m *ReadFeatureValuesResponse) error { 200 return x.ServerStream.SendMsg(m) 201 } 202 203 func _FeaturestoreOnlineServingService_WriteFeatureValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 204 in := new(WriteFeatureValuesRequest) 205 if err := dec(in); err != nil { 206 return nil, err 207 } 208 if interceptor == nil { 209 return srv.(FeaturestoreOnlineServingServiceServer).WriteFeatureValues(ctx, in) 210 } 211 info := &grpc.UnaryServerInfo{ 212 Server: srv, 213 FullMethod: FeaturestoreOnlineServingService_WriteFeatureValues_FullMethodName, 214 } 215 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 216 return srv.(FeaturestoreOnlineServingServiceServer).WriteFeatureValues(ctx, req.(*WriteFeatureValuesRequest)) 217 } 218 return interceptor(ctx, in, info, handler) 219 } 220 221 // FeaturestoreOnlineServingService_ServiceDesc is the grpc.ServiceDesc for FeaturestoreOnlineServingService service. 222 // It's only intended for direct use with grpc.RegisterService, 223 // and not to be introspected or modified (even as a copy) 224 var FeaturestoreOnlineServingService_ServiceDesc = grpc.ServiceDesc{ 225 ServiceName: "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService", 226 HandlerType: (*FeaturestoreOnlineServingServiceServer)(nil), 227 Methods: []grpc.MethodDesc{ 228 { 229 MethodName: "ReadFeatureValues", 230 Handler: _FeaturestoreOnlineServingService_ReadFeatureValues_Handler, 231 }, 232 { 233 MethodName: "WriteFeatureValues", 234 Handler: _FeaturestoreOnlineServingService_WriteFeatureValues_Handler, 235 }, 236 }, 237 Streams: []grpc.StreamDesc{ 238 { 239 StreamName: "StreamingReadFeatureValues", 240 Handler: _FeaturestoreOnlineServingService_StreamingReadFeatureValues_Handler, 241 ServerStreams: true, 242 }, 243 }, 244 Metadata: "google/cloud/aiplatform/v1/featurestore_online_service.proto", 245 }