Debian Codegraph @

bigquery/storage/apiv1beta/storagepb/metastore_partition_grpc.pb.go

raw symbols SCIP
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/bigquery/storage/v1beta/metastore_partition.proto
20
21 package storagepb
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 emptypb "google.golang.org/protobuf/types/known/emptypb"
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 MetastorePartitionService_BatchCreateMetastorePartitions_FullMethodName = "/google.cloud.bigquery.storage.v1beta.MetastorePartitionService/BatchCreateMetastorePartitions"
38 MetastorePartitionService_BatchDeleteMetastorePartitions_FullMethodName = "/google.cloud.bigquery.storage.v1beta.MetastorePartitionService/BatchDeleteMetastorePartitions"
39 MetastorePartitionService_BatchUpdateMetastorePartitions_FullMethodName = "/google.cloud.bigquery.storage.v1beta.MetastorePartitionService/BatchUpdateMetastorePartitions"
40 MetastorePartitionService_ListMetastorePartitions_FullMethodName = "/google.cloud.bigquery.storage.v1beta.MetastorePartitionService/ListMetastorePartitions"
41 MetastorePartitionService_StreamMetastorePartitions_FullMethodName = "/google.cloud.bigquery.storage.v1beta.MetastorePartitionService/StreamMetastorePartitions"
42 )
43
44 // MetastorePartitionServiceClient is the client API for MetastorePartitionService service.
45 //
46 // 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.
47 type MetastorePartitionServiceClient interface {
48 // Adds metastore partitions to a table.
49 BatchCreateMetastorePartitions(ctx context.Context, in *BatchCreateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchCreateMetastorePartitionsResponse, error)
50 // Deletes metastore partitions from a table.
51 BatchDeleteMetastorePartitions(ctx context.Context, in *BatchDeleteMetastorePartitionsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
52 // Updates metastore partitions in a table.
53 BatchUpdateMetastorePartitions(ctx context.Context, in *BatchUpdateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchUpdateMetastorePartitionsResponse, error)
54 // Gets metastore partitions from a table.
55 ListMetastorePartitions(ctx context.Context, in *ListMetastorePartitionsRequest, opts ...grpc.CallOption) (*ListMetastorePartitionsResponse, error)
56 // This is a bi-di streaming rpc method that allows the client to send
57 // a stream of partitions and commit all of them atomically at the end.
58 // If the commit is successful, the server will return a
59 // response and close the stream. If the commit fails (due to duplicate
60 // partitions or other reason), the server will close the stream with an
61 // error. This method is only available via the gRPC API (not REST).
62 StreamMetastorePartitions(ctx context.Context, opts ...grpc.CallOption) (MetastorePartitionService_StreamMetastorePartitionsClient, error)
63 }
64
65 type metastorePartitionServiceClient struct {
66 cc grpc.ClientConnInterface
67 }
68
69 func NewMetastorePartitionServiceClient(cc grpc.ClientConnInterface) MetastorePartitionServiceClient {
70 return &metastorePartitionServiceClient{cc}
71 }
72
73 func (c *metastorePartitionServiceClient) BatchCreateMetastorePartitions(ctx context.Context, in *BatchCreateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchCreateMetastorePartitionsResponse, error) {
74 out := new(BatchCreateMetastorePartitionsResponse)
75 err := c.cc.Invoke(ctx, MetastorePartitionService_BatchCreateMetastorePartitions_FullMethodName, in, out, opts...)
76 if err != nil {
77 return nil, err
78 }
79 return out, nil
80 }
81
82 func (c *metastorePartitionServiceClient) BatchDeleteMetastorePartitions(ctx context.Context, in *BatchDeleteMetastorePartitionsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
83 out := new(emptypb.Empty)
84 err := c.cc.Invoke(ctx, MetastorePartitionService_BatchDeleteMetastorePartitions_FullMethodName, in, out, opts...)
85 if err != nil {
86 return nil, err
87 }
88 return out, nil
89 }
90
91 func (c *metastorePartitionServiceClient) BatchUpdateMetastorePartitions(ctx context.Context, in *BatchUpdateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchUpdateMetastorePartitionsResponse, error) {
92 out := new(BatchUpdateMetastorePartitionsResponse)
93 err := c.cc.Invoke(ctx, MetastorePartitionService_BatchUpdateMetastorePartitions_FullMethodName, in, out, opts...)
94 if err != nil {
95 return nil, err
96 }
97 return out, nil
98 }
99
100 func (c *metastorePartitionServiceClient) ListMetastorePartitions(ctx context.Context, in *ListMetastorePartitionsRequest, opts ...grpc.CallOption) (*ListMetastorePartitionsResponse, error) {
101 out := new(ListMetastorePartitionsResponse)
102 err := c.cc.Invoke(ctx, MetastorePartitionService_ListMetastorePartitions_FullMethodName, in, out, opts...)
103 if err != nil {
104 return nil, err
105 }
106 return out, nil
107 }
108
109 func (c *metastorePartitionServiceClient) StreamMetastorePartitions(ctx context.Context, opts ...grpc.CallOption) (MetastorePartitionService_StreamMetastorePartitionsClient, error) {
110 stream, err := c.cc.NewStream(ctx, &MetastorePartitionService_ServiceDesc.Streams[0], MetastorePartitionService_StreamMetastorePartitions_FullMethodName, opts...)
111 if err != nil {
112 return nil, err
113 }
114 x := &metastorePartitionServiceStreamMetastorePartitionsClient{stream}
115 return x, nil
116 }
117
118 type MetastorePartitionService_StreamMetastorePartitionsClient interface {
119 Send(*StreamMetastorePartitionsRequest) error
120 Recv() (*StreamMetastorePartitionsResponse, error)
121 grpc.ClientStream
122 }
123
124 type metastorePartitionServiceStreamMetastorePartitionsClient struct {
125 grpc.ClientStream
126 }
127
128 func (x *metastorePartitionServiceStreamMetastorePartitionsClient) Send(m *StreamMetastorePartitionsRequest) error {
129 return x.ClientStream.SendMsg(m)
130 }
131
132 func (x *metastorePartitionServiceStreamMetastorePartitionsClient) Recv() (*StreamMetastorePartitionsResponse, error) {
133 m := new(StreamMetastorePartitionsResponse)
134 if err := x.ClientStream.RecvMsg(m); err != nil {
135 return nil, err
136 }
137 return m, nil
138 }
139
140 // MetastorePartitionServiceServer is the server API for MetastorePartitionService service.
141 // All implementations should embed UnimplementedMetastorePartitionServiceServer
142 // for forward compatibility
143 type MetastorePartitionServiceServer interface {
144 // Adds metastore partitions to a table.
145 BatchCreateMetastorePartitions(context.Context, *BatchCreateMetastorePartitionsRequest) (*BatchCreateMetastorePartitionsResponse, error)
146 // Deletes metastore partitions from a table.
147 BatchDeleteMetastorePartitions(context.Context, *BatchDeleteMetastorePartitionsRequest) (*emptypb.Empty, error)
148 // Updates metastore partitions in a table.
149 BatchUpdateMetastorePartitions(context.Context, *BatchUpdateMetastorePartitionsRequest) (*BatchUpdateMetastorePartitionsResponse, error)
150 // Gets metastore partitions from a table.
151 ListMetastorePartitions(context.Context, *ListMetastorePartitionsRequest) (*ListMetastorePartitionsResponse, error)
152 // This is a bi-di streaming rpc method that allows the client to send
153 // a stream of partitions and commit all of them atomically at the end.
154 // If the commit is successful, the server will return a
155 // response and close the stream. If the commit fails (due to duplicate
156 // partitions or other reason), the server will close the stream with an
157 // error. This method is only available via the gRPC API (not REST).
158 StreamMetastorePartitions(MetastorePartitionService_StreamMetastorePartitionsServer) error
159 }
160
161 // UnimplementedMetastorePartitionServiceServer should be embedded to have forward compatible implementations.
162 type UnimplementedMetastorePartitionServiceServer struct {
163 }
164
165 func (UnimplementedMetastorePartitionServiceServer) BatchCreateMetastorePartitions(context.Context, *BatchCreateMetastorePartitionsRequest) (*BatchCreateMetastorePartitionsResponse, error) {
166 return nil, status.Errorf(codes.Unimplemented, "method BatchCreateMetastorePartitions not implemented")
167 }
168 func (UnimplementedMetastorePartitionServiceServer) BatchDeleteMetastorePartitions(context.Context, *BatchDeleteMetastorePartitionsRequest) (*emptypb.Empty, error) {
169 return nil, status.Errorf(codes.Unimplemented, "method BatchDeleteMetastorePartitions not implemented")
170 }
171 func (UnimplementedMetastorePartitionServiceServer) BatchUpdateMetastorePartitions(context.Context, *BatchUpdateMetastorePartitionsRequest) (*BatchUpdateMetastorePartitionsResponse, error) {
172 return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateMetastorePartitions not implemented")
173 }
174 func (UnimplementedMetastorePartitionServiceServer) ListMetastorePartitions(context.Context, *ListMetastorePartitionsRequest) (*ListMetastorePartitionsResponse, error) {
175 return nil, status.Errorf(codes.Unimplemented, "method ListMetastorePartitions not implemented")
176 }
177 func (UnimplementedMetastorePartitionServiceServer) StreamMetastorePartitions(MetastorePartitionService_StreamMetastorePartitionsServer) error {
178 return status.Errorf(codes.Unimplemented, "method StreamMetastorePartitions not implemented")
179 }
180
181 // UnsafeMetastorePartitionServiceServer may be embedded to opt out of forward compatibility for this service.
182 // Use of this interface is not recommended, as added methods to MetastorePartitionServiceServer will
183 // result in compilation errors.
184 type UnsafeMetastorePartitionServiceServer interface {
185 mustEmbedUnimplementedMetastorePartitionServiceServer()
186 }
187
188 func RegisterMetastorePartitionServiceServer(s grpc.ServiceRegistrar, srv MetastorePartitionServiceServer) {
189 s.RegisterService(&MetastorePartitionService_ServiceDesc, srv)
190 }
191
192 func _MetastorePartitionService_BatchCreateMetastorePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
193 in := new(BatchCreateMetastorePartitionsRequest)
194 if err := dec(in); err != nil {
195 return nil, err
196 }
197 if interceptor == nil {
198 return srv.(MetastorePartitionServiceServer).BatchCreateMetastorePartitions(ctx, in)
199 }
200 info := &grpc.UnaryServerInfo{
201 Server: srv,
202 FullMethod: MetastorePartitionService_BatchCreateMetastorePartitions_FullMethodName,
203 }
204 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
205 return srv.(MetastorePartitionServiceServer).BatchCreateMetastorePartitions(ctx, req.(*BatchCreateMetastorePartitionsRequest))
206 }
207 return interceptor(ctx, in, info, handler)
208 }
209
210 func _MetastorePartitionService_BatchDeleteMetastorePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
211 in := new(BatchDeleteMetastorePartitionsRequest)
212 if err := dec(in); err != nil {
213 return nil, err
214 }
215 if interceptor == nil {
216 return srv.(MetastorePartitionServiceServer).BatchDeleteMetastorePartitions(ctx, in)
217 }
218 info := &grpc.UnaryServerInfo{
219 Server: srv,
220 FullMethod: MetastorePartitionService_BatchDeleteMetastorePartitions_FullMethodName,
221 }
222 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
223 return srv.(MetastorePartitionServiceServer).BatchDeleteMetastorePartitions(ctx, req.(*BatchDeleteMetastorePartitionsRequest))
224 }
225 return interceptor(ctx, in, info, handler)
226 }
227
228 func _MetastorePartitionService_BatchUpdateMetastorePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
229 in := new(BatchUpdateMetastorePartitionsRequest)
230 if err := dec(in); err != nil {
231 return nil, err
232 }
233 if interceptor == nil {
234 return srv.(MetastorePartitionServiceServer).BatchUpdateMetastorePartitions(ctx, in)
235 }
236 info := &grpc.UnaryServerInfo{
237 Server: srv,
238 FullMethod: MetastorePartitionService_BatchUpdateMetastorePartitions_FullMethodName,
239 }
240 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
241 return srv.(MetastorePartitionServiceServer).BatchUpdateMetastorePartitions(ctx, req.(*BatchUpdateMetastorePartitionsRequest))
242 }
243 return interceptor(ctx, in, info, handler)
244 }
245
246 func _MetastorePartitionService_ListMetastorePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
247 in := new(ListMetastorePartitionsRequest)
248 if err := dec(in); err != nil {
249 return nil, err
250 }
251 if interceptor == nil {
252 return srv.(MetastorePartitionServiceServer).ListMetastorePartitions(ctx, in)
253 }
254 info := &grpc.UnaryServerInfo{
255 Server: srv,
256 FullMethod: MetastorePartitionService_ListMetastorePartitions_FullMethodName,
257 }
258 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
259 return srv.(MetastorePartitionServiceServer).ListMetastorePartitions(ctx, req.(*ListMetastorePartitionsRequest))
260 }
261 return interceptor(ctx, in, info, handler)
262 }
263
264 func _MetastorePartitionService_StreamMetastorePartitions_Handler(srv interface{}, stream grpc.ServerStream) error {
265 return srv.(MetastorePartitionServiceServer).StreamMetastorePartitions(&metastorePartitionServiceStreamMetastorePartitionsServer{stream})
266 }
267
268 type MetastorePartitionService_StreamMetastorePartitionsServer interface {
269 Send(*StreamMetastorePartitionsResponse) error
270 Recv() (*StreamMetastorePartitionsRequest, error)
271 grpc.ServerStream
272 }
273
274 type metastorePartitionServiceStreamMetastorePartitionsServer struct {
275 grpc.ServerStream
276 }
277
278 func (x *metastorePartitionServiceStreamMetastorePartitionsServer) Send(m *StreamMetastorePartitionsResponse) error {
279 return x.ServerStream.SendMsg(m)
280 }
281
282 func (x *metastorePartitionServiceStreamMetastorePartitionsServer) Recv() (*StreamMetastorePartitionsRequest, error) {
283 m := new(StreamMetastorePartitionsRequest)
284 if err := x.ServerStream.RecvMsg(m); err != nil {
285 return nil, err
286 }
287 return m, nil
288 }
289
290 // MetastorePartitionService_ServiceDesc is the grpc.ServiceDesc for MetastorePartitionService service.
291 // It's only intended for direct use with grpc.RegisterService,
292 // and not to be introspected or modified (even as a copy)
293 var MetastorePartitionService_ServiceDesc = grpc.ServiceDesc{
294 ServiceName: "google.cloud.bigquery.storage.v1beta.MetastorePartitionService",
295 HandlerType: (*MetastorePartitionServiceServer)(nil),
296 Methods: []grpc.MethodDesc{
297 {
298 MethodName: "BatchCreateMetastorePartitions",
299 Handler: _MetastorePartitionService_BatchCreateMetastorePartitions_Handler,
300 },
301 {
302 MethodName: "BatchDeleteMetastorePartitions",
303 Handler: _MetastorePartitionService_BatchDeleteMetastorePartitions_Handler,
304 },
305 {
306 MethodName: "BatchUpdateMetastorePartitions",
307 Handler: _MetastorePartitionService_BatchUpdateMetastorePartitions_Handler,
308 },
309 {
310 MethodName: "ListMetastorePartitions",
311 Handler: _MetastorePartitionService_ListMetastorePartitions_Handler,
312 },
313 },
314 Streams: []grpc.StreamDesc{
315 {
316 StreamName: "StreamMetastorePartitions",
317 Handler: _MetastorePartitionService_StreamMetastorePartitions_Handler,
318 ServerStreams: true,
319 ClientStreams: true,
320 },
321 },
322 Metadata: "google/cloud/bigquery/storage/v1beta/metastore_partition.proto",
323 }