| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 32 |
|
| 33 |
|
| 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 |
|
| 45 |
|
| 46 |
|
| 47 |
type MetastorePartitionServiceClient interface { |
| 48 |
|
| 49 |
BatchCreateMetastorePartitions(ctx context.Context, in *BatchCreateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchCreateMetastorePartitionsResponse, error) |
| 50 |
|
| 51 |
BatchDeleteMetastorePartitions(ctx context.Context, in *BatchDeleteMetastorePartitionsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 52 |
|
| 53 |
BatchUpdateMetastorePartitions(ctx context.Context, in *BatchUpdateMetastorePartitionsRequest, opts ...grpc.CallOption) (*BatchUpdateMetastorePartitionsResponse, error) |
| 54 |
|
| 55 |
ListMetastorePartitions(ctx context.Context, in *ListMetastorePartitionsRequest, opts ...grpc.CallOption) (*ListMetastorePartitionsResponse, error) |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 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 |
|
| 141 |
|
| 142 |
|
| 143 |
type MetastorePartitionServiceServer interface { |
| 144 |
|
| 145 |
BatchCreateMetastorePartitions(context.Context, *BatchCreateMetastorePartitionsRequest) (*BatchCreateMetastorePartitionsResponse, error) |
| 146 |
|
| 147 |
BatchDeleteMetastorePartitions(context.Context, *BatchDeleteMetastorePartitionsRequest) (*emptypb.Empty, error) |
| 148 |
|
| 149 |
BatchUpdateMetastorePartitions(context.Context, *BatchUpdateMetastorePartitionsRequest) (*BatchUpdateMetastorePartitionsResponse, error) |
| 150 |
|
| 151 |
ListMetastorePartitions(context.Context, *ListMetastorePartitionsRequest) (*ListMetastorePartitionsResponse, error) |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
StreamMetastorePartitions(MetastorePartitionService_StreamMetastorePartitionsServer) error |
| 159 |
} |
| 160 |
|
| 161 |
|
| 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 |
|
| 182 |
|
| 183 |
|
| 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 |
|
| 291 |
|
| 292 |
|
| 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 |
} |