Passed
Pull Request — master (#2657)
by
unknown
03:44
created

basev1.request_Data_ReadAttributes_0   B

Complexity

Conditions 6

Size

Total Lines 22
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 17
nop 5
dl 0
loc 22
rs 8.6166
c 0
b 0
f 0
1
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
2
// source: base/v1/service.proto
3
4
/*
5
Package basev1 is a reverse proxy.
6
7
It translates gRPC into RESTful JSON APIs.
8
*/
9
package basev1
10
11
import (
12
	"context"
13
	"errors"
14
	"io"
15
	"net/http"
16
17
	"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
18
	"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
19
	"google.golang.org/grpc"
20
	"google.golang.org/grpc/codes"
21
	"google.golang.org/grpc/grpclog"
22
	"google.golang.org/grpc/metadata"
23
	"google.golang.org/grpc/status"
24
	"google.golang.org/protobuf/proto"
25
)
26
27
// Suppress "imported and not used" errors
28
var (
29
	_ codes.Code
30
	_ io.Reader
31
	_ status.Status
32
	_ = errors.New
33
	_ = runtime.String
34
	_ = utilities.NewDoubleArray
35
	_ = metadata.Join
36
)
37
38
func request_Permission_Check_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
39
	var (
40
		protoReq PermissionCheckRequest
41
		metadata runtime.ServerMetadata
42
		err      error
43
	)
44
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
45
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
46
	}
47
	if req.Body != nil {
48
		_, _ = io.Copy(io.Discard, req.Body)
49
	}
50
	val, ok := pathParams["tenant_id"]
51
	if !ok {
52
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
53
	}
54
	protoReq.TenantId, err = runtime.String(val)
55
	if err != nil {
56
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
57
	}
58
	msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
59
	return msg, metadata, err
60
}
61
62
func local_request_Permission_Check_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
63
	var (
64
		protoReq PermissionCheckRequest
65
		metadata runtime.ServerMetadata
66
		err      error
67
	)
68
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
69
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
70
	}
71
	val, ok := pathParams["tenant_id"]
72
	if !ok {
73
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
74
	}
75
	protoReq.TenantId, err = runtime.String(val)
76
	if err != nil {
77
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
78
	}
79
	msg, err := server.Check(ctx, &protoReq)
80
	return msg, metadata, err
81
}
82
83
func request_Permission_BulkCheck_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
84
	var (
85
		protoReq PermissionBulkCheckRequest
86
		metadata runtime.ServerMetadata
87
		err      error
88
	)
89
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
90
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
91
	}
92
	if req.Body != nil {
93
		_, _ = io.Copy(io.Discard, req.Body)
94
	}
95
	val, ok := pathParams["tenant_id"]
96
	if !ok {
97
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
98
	}
99
	protoReq.TenantId, err = runtime.String(val)
100
	if err != nil {
101
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
102
	}
103
	msg, err := client.BulkCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
104
	return msg, metadata, err
105
}
106
107
func local_request_Permission_BulkCheck_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
108
	var (
109
		protoReq PermissionBulkCheckRequest
110
		metadata runtime.ServerMetadata
111
		err      error
112
	)
113
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
114
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
115
	}
116
	val, ok := pathParams["tenant_id"]
117
	if !ok {
118
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
119
	}
120
	protoReq.TenantId, err = runtime.String(val)
121
	if err != nil {
122
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
123
	}
124
	msg, err := server.BulkCheck(ctx, &protoReq)
125
	return msg, metadata, err
126
}
127
128
func request_Permission_Expand_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
129
	var (
130
		protoReq PermissionExpandRequest
131
		metadata runtime.ServerMetadata
132
		err      error
133
	)
134
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
135
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
136
	}
137
	if req.Body != nil {
138
		_, _ = io.Copy(io.Discard, req.Body)
139
	}
140
	val, ok := pathParams["tenant_id"]
141
	if !ok {
142
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
143
	}
144
	protoReq.TenantId, err = runtime.String(val)
145
	if err != nil {
146
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
147
	}
148
	msg, err := client.Expand(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
149
	return msg, metadata, err
150
}
151
152
func local_request_Permission_Expand_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
153
	var (
154
		protoReq PermissionExpandRequest
155
		metadata runtime.ServerMetadata
156
		err      error
157
	)
158
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
159
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
160
	}
161
	val, ok := pathParams["tenant_id"]
162
	if !ok {
163
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
164
	}
165
	protoReq.TenantId, err = runtime.String(val)
166
	if err != nil {
167
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
168
	}
169
	msg, err := server.Expand(ctx, &protoReq)
170
	return msg, metadata, err
171
}
172
173
func request_Permission_LookupEntity_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
174
	var (
175
		protoReq PermissionLookupEntityRequest
176
		metadata runtime.ServerMetadata
177
		err      error
178
	)
179
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
180
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
181
	}
182
	if req.Body != nil {
183
		_, _ = io.Copy(io.Discard, req.Body)
184
	}
185
	val, ok := pathParams["tenant_id"]
186
	if !ok {
187
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
188
	}
189
	protoReq.TenantId, err = runtime.String(val)
190
	if err != nil {
191
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
192
	}
193
	msg, err := client.LookupEntity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
194
	return msg, metadata, err
195
}
196
197
func local_request_Permission_LookupEntity_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
198
	var (
199
		protoReq PermissionLookupEntityRequest
200
		metadata runtime.ServerMetadata
201
		err      error
202
	)
203
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
204
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
205
	}
206
	val, ok := pathParams["tenant_id"]
207
	if !ok {
208
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
209
	}
210
	protoReq.TenantId, err = runtime.String(val)
211
	if err != nil {
212
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
213
	}
214
	msg, err := server.LookupEntity(ctx, &protoReq)
215
	return msg, metadata, err
216
}
217
218
func request_Permission_LookupEntityStream_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (Permission_LookupEntityStreamClient, runtime.ServerMetadata, error) {
219
	var (
220
		protoReq PermissionLookupEntityRequest
221
		metadata runtime.ServerMetadata
222
		err      error
223
	)
224
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
225
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
226
	}
227
	if req.Body != nil {
228
		_, _ = io.Copy(io.Discard, req.Body)
229
	}
230
	val, ok := pathParams["tenant_id"]
231
	if !ok {
232
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
233
	}
234
	protoReq.TenantId, err = runtime.String(val)
235
	if err != nil {
236
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
237
	}
238
	stream, err := client.LookupEntityStream(ctx, &protoReq)
239
	if err != nil {
240
		return nil, metadata, err
241
	}
242
	header, err := stream.Header()
243
	if err != nil {
244
		return nil, metadata, err
245
	}
246
	metadata.HeaderMD = header
247
	return stream, metadata, nil
248
}
249
250
func request_Permission_LookupSubject_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
251
	var (
252
		protoReq PermissionLookupSubjectRequest
253
		metadata runtime.ServerMetadata
254
		err      error
255
	)
256
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
257
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
258
	}
259
	if req.Body != nil {
260
		_, _ = io.Copy(io.Discard, req.Body)
261
	}
262
	val, ok := pathParams["tenant_id"]
263
	if !ok {
264
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
265
	}
266
	protoReq.TenantId, err = runtime.String(val)
267
	if err != nil {
268
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
269
	}
270
	msg, err := client.LookupSubject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
271
	return msg, metadata, err
272
}
273
274
func local_request_Permission_LookupSubject_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
275
	var (
276
		protoReq PermissionLookupSubjectRequest
277
		metadata runtime.ServerMetadata
278
		err      error
279
	)
280
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
281
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
282
	}
283
	val, ok := pathParams["tenant_id"]
284
	if !ok {
285
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
286
	}
287
	protoReq.TenantId, err = runtime.String(val)
288
	if err != nil {
289
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
290
	}
291
	msg, err := server.LookupSubject(ctx, &protoReq)
292
	return msg, metadata, err
293
}
294
295
func request_Permission_SubjectPermission_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
296
	var (
297
		protoReq PermissionSubjectPermissionRequest
298
		metadata runtime.ServerMetadata
299
		err      error
300
	)
301
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
302
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
303
	}
304
	if req.Body != nil {
305
		_, _ = io.Copy(io.Discard, req.Body)
306
	}
307
	val, ok := pathParams["tenant_id"]
308
	if !ok {
309
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
310
	}
311
	protoReq.TenantId, err = runtime.String(val)
312
	if err != nil {
313
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
314
	}
315
	msg, err := client.SubjectPermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
316
	return msg, metadata, err
317
}
318
319
func local_request_Permission_SubjectPermission_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
320
	var (
321
		protoReq PermissionSubjectPermissionRequest
322
		metadata runtime.ServerMetadata
323
		err      error
324
	)
325
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
326
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
327
	}
328
	val, ok := pathParams["tenant_id"]
329
	if !ok {
330
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
331
	}
332
	protoReq.TenantId, err = runtime.String(val)
333
	if err != nil {
334
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
335
	}
336
	msg, err := server.SubjectPermission(ctx, &protoReq)
337
	return msg, metadata, err
338
}
339
340
func request_Watch_Watch_0(ctx context.Context, marshaler runtime.Marshaler, client WatchClient, req *http.Request, pathParams map[string]string) (Watch_WatchClient, runtime.ServerMetadata, error) {
341
	var (
342
		protoReq WatchRequest
343
		metadata runtime.ServerMetadata
344
		err      error
345
	)
346
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
347
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
348
	}
349
	if req.Body != nil {
350
		_, _ = io.Copy(io.Discard, req.Body)
351
	}
352
	val, ok := pathParams["tenant_id"]
353
	if !ok {
354
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
355
	}
356
	protoReq.TenantId, err = runtime.String(val)
357
	if err != nil {
358
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
359
	}
360
	stream, err := client.Watch(ctx, &protoReq)
361
	if err != nil {
362
		return nil, metadata, err
363
	}
364
	header, err := stream.Header()
365
	if err != nil {
366
		return nil, metadata, err
367
	}
368
	metadata.HeaderMD = header
369
	return stream, metadata, nil
370
}
371
372
func request_Schema_Write_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
373
	var (
374
		protoReq SchemaWriteRequest
375
		metadata runtime.ServerMetadata
376
		err      error
377
	)
378
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
379
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
380
	}
381
	if req.Body != nil {
382
		_, _ = io.Copy(io.Discard, req.Body)
383
	}
384
	val, ok := pathParams["tenant_id"]
385
	if !ok {
386
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
387
	}
388
	protoReq.TenantId, err = runtime.String(val)
389
	if err != nil {
390
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
391
	}
392
	msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
393
	return msg, metadata, err
394
}
395
396
func local_request_Schema_Write_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
397
	var (
398
		protoReq SchemaWriteRequest
399
		metadata runtime.ServerMetadata
400
		err      error
401
	)
402
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
403
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
404
	}
405
	val, ok := pathParams["tenant_id"]
406
	if !ok {
407
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
408
	}
409
	protoReq.TenantId, err = runtime.String(val)
410
	if err != nil {
411
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
412
	}
413
	msg, err := server.Write(ctx, &protoReq)
414
	return msg, metadata, err
415
}
416
417
func request_Schema_PartialWrite_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
418
	var (
419
		protoReq SchemaPartialWriteRequest
420
		metadata runtime.ServerMetadata
421
		err      error
422
	)
423
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
424
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
425
	}
426
	if req.Body != nil {
427
		_, _ = io.Copy(io.Discard, req.Body)
428
	}
429
	val, ok := pathParams["tenant_id"]
430
	if !ok {
431
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
432
	}
433
	protoReq.TenantId, err = runtime.String(val)
434
	if err != nil {
435
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
436
	}
437
	msg, err := client.PartialWrite(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
438
	return msg, metadata, err
439
}
440
441
func local_request_Schema_PartialWrite_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
442
	var (
443
		protoReq SchemaPartialWriteRequest
444
		metadata runtime.ServerMetadata
445
		err      error
446
	)
447
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
448
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
449
	}
450
	val, ok := pathParams["tenant_id"]
451
	if !ok {
452
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
453
	}
454
	protoReq.TenantId, err = runtime.String(val)
455
	if err != nil {
456
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
457
	}
458
	msg, err := server.PartialWrite(ctx, &protoReq)
459
	return msg, metadata, err
460
}
461
462
func request_Schema_Read_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
463
	var (
464
		protoReq SchemaReadRequest
465
		metadata runtime.ServerMetadata
466
		err      error
467
	)
468
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
469
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
470
	}
471
	if req.Body != nil {
472
		_, _ = io.Copy(io.Discard, req.Body)
473
	}
474
	val, ok := pathParams["tenant_id"]
475
	if !ok {
476
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
477
	}
478
	protoReq.TenantId, err = runtime.String(val)
479
	if err != nil {
480
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
481
	}
482
	msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
483
	return msg, metadata, err
484
}
485
486
func local_request_Schema_Read_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
487
	var (
488
		protoReq SchemaReadRequest
489
		metadata runtime.ServerMetadata
490
		err      error
491
	)
492
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
493
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
494
	}
495
	val, ok := pathParams["tenant_id"]
496
	if !ok {
497
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
498
	}
499
	protoReq.TenantId, err = runtime.String(val)
500
	if err != nil {
501
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
502
	}
503
	msg, err := server.Read(ctx, &protoReq)
504
	return msg, metadata, err
505
}
506
507
func request_Schema_List_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
508
	var (
509
		protoReq SchemaListRequest
510
		metadata runtime.ServerMetadata
511
		err      error
512
	)
513
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
514
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
515
	}
516
	if req.Body != nil {
517
		_, _ = io.Copy(io.Discard, req.Body)
518
	}
519
	val, ok := pathParams["tenant_id"]
520
	if !ok {
521
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
522
	}
523
	protoReq.TenantId, err = runtime.String(val)
524
	if err != nil {
525
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
526
	}
527
	msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
528
	return msg, metadata, err
529
}
530
531
func local_request_Schema_List_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
532
	var (
533
		protoReq SchemaListRequest
534
		metadata runtime.ServerMetadata
535
		err      error
536
	)
537
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
538
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
539
	}
540
	val, ok := pathParams["tenant_id"]
541
	if !ok {
542
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
543
	}
544
	protoReq.TenantId, err = runtime.String(val)
545
	if err != nil {
546
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
547
	}
548
	msg, err := server.List(ctx, &protoReq)
549
	return msg, metadata, err
550
}
551
552
func request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
553
	var (
554
		protoReq DataWriteRequest
555
		metadata runtime.ServerMetadata
556
		err      error
557
	)
558
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
559
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
560
	}
561
	if req.Body != nil {
562
		_, _ = io.Copy(io.Discard, req.Body)
563
	}
564
	val, ok := pathParams["tenant_id"]
565
	if !ok {
566
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
567
	}
568
	protoReq.TenantId, err = runtime.String(val)
569
	if err != nil {
570
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
571
	}
572
	msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
573
	return msg, metadata, err
574
}
575
576
func local_request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
577
	var (
578
		protoReq DataWriteRequest
579
		metadata runtime.ServerMetadata
580
		err      error
581
	)
582
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
583
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
584
	}
585
	val, ok := pathParams["tenant_id"]
586
	if !ok {
587
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
588
	}
589
	protoReq.TenantId, err = runtime.String(val)
590
	if err != nil {
591
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
592
	}
593
	msg, err := server.Write(ctx, &protoReq)
594
	return msg, metadata, err
595
}
596
597
func request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
598
	var (
599
		protoReq RelationshipWriteRequest
600
		metadata runtime.ServerMetadata
601
		err      error
602
	)
603
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
604
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
605
	}
606
	if req.Body != nil {
607
		_, _ = io.Copy(io.Discard, req.Body)
608
	}
609
	val, ok := pathParams["tenant_id"]
610
	if !ok {
611
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
612
	}
613
	protoReq.TenantId, err = runtime.String(val)
614
	if err != nil {
615
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
616
	}
617
	msg, err := client.WriteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
618
	return msg, metadata, err
619
}
620
621
func local_request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
622
	var (
623
		protoReq RelationshipWriteRequest
624
		metadata runtime.ServerMetadata
625
		err      error
626
	)
627
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
628
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
629
	}
630
	val, ok := pathParams["tenant_id"]
631
	if !ok {
632
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
633
	}
634
	protoReq.TenantId, err = runtime.String(val)
635
	if err != nil {
636
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
637
	}
638
	msg, err := server.WriteRelationships(ctx, &protoReq)
639
	return msg, metadata, err
640
}
641
642
func request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
643
	var (
644
		protoReq RelationshipReadRequest
645
		metadata runtime.ServerMetadata
646
		err      error
647
	)
648
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
649
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
650
	}
651
	if req.Body != nil {
652
		_, _ = io.Copy(io.Discard, req.Body)
653
	}
654
	val, ok := pathParams["tenant_id"]
655
	if !ok {
656
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
657
	}
658
	protoReq.TenantId, err = runtime.String(val)
659
	if err != nil {
660
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
661
	}
662
	msg, err := client.ReadRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
663
	return msg, metadata, err
664
}
665
666
func local_request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
667
	var (
668
		protoReq RelationshipReadRequest
669
		metadata runtime.ServerMetadata
670
		err      error
671
	)
672
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
673
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
674
	}
675
	val, ok := pathParams["tenant_id"]
676
	if !ok {
677
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
678
	}
679
	protoReq.TenantId, err = runtime.String(val)
680
	if err != nil {
681
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
682
	}
683
	msg, err := server.ReadRelationships(ctx, &protoReq)
684
	return msg, metadata, err
685
}
686
687
func request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
688
	var (
689
		protoReq AttributeReadRequest
690
		metadata runtime.ServerMetadata
691
		err      error
692
	)
693
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
694
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
695
	}
696
	if req.Body != nil {
697
		_, _ = io.Copy(io.Discard, req.Body)
698
	}
699
	val, ok := pathParams["tenant_id"]
700
	if !ok {
701
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
702
	}
703
	protoReq.TenantId, err = runtime.String(val)
704
	if err != nil {
705
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
706
	}
707
	msg, err := client.ReadAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
708
	return msg, metadata, err
709
}
710
711
func local_request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
712
	var (
713
		protoReq AttributeReadRequest
714
		metadata runtime.ServerMetadata
715
		err      error
716
	)
717
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
718
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
719
	}
720
	val, ok := pathParams["tenant_id"]
721
	if !ok {
722
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
723
	}
724
	protoReq.TenantId, err = runtime.String(val)
725
	if err != nil {
726
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
727
	}
728
	msg, err := server.ReadAttributes(ctx, &protoReq)
729
	return msg, metadata, err
730
}
731
732
func request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
733
	var (
734
		protoReq DataDeleteRequest
735
		metadata runtime.ServerMetadata
736
		err      error
737
	)
738
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
739
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
740
	}
741
	if req.Body != nil {
742
		_, _ = io.Copy(io.Discard, req.Body)
743
	}
744
	val, ok := pathParams["tenant_id"]
745
	if !ok {
746
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
747
	}
748
	protoReq.TenantId, err = runtime.String(val)
749
	if err != nil {
750
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
751
	}
752
	msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
753
	return msg, metadata, err
754
}
755
756
func local_request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
757
	var (
758
		protoReq DataDeleteRequest
759
		metadata runtime.ServerMetadata
760
		err      error
761
	)
762
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
763
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
764
	}
765
	val, ok := pathParams["tenant_id"]
766
	if !ok {
767
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
768
	}
769
	protoReq.TenantId, err = runtime.String(val)
770
	if err != nil {
771
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
772
	}
773
	msg, err := server.Delete(ctx, &protoReq)
774
	return msg, metadata, err
775
}
776
777
func request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
778
	var (
779
		protoReq RelationshipDeleteRequest
780
		metadata runtime.ServerMetadata
781
		err      error
782
	)
783
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
784
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
785
	}
786
	if req.Body != nil {
787
		_, _ = io.Copy(io.Discard, req.Body)
788
	}
789
	val, ok := pathParams["tenant_id"]
790
	if !ok {
791
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
792
	}
793
	protoReq.TenantId, err = runtime.String(val)
794
	if err != nil {
795
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
796
	}
797
	msg, err := client.DeleteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
798
	return msg, metadata, err
799
}
800
801
func local_request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
802
	var (
803
		protoReq RelationshipDeleteRequest
804
		metadata runtime.ServerMetadata
805
		err      error
806
	)
807
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
808
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
809
	}
810
	val, ok := pathParams["tenant_id"]
811
	if !ok {
812
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
813
	}
814
	protoReq.TenantId, err = runtime.String(val)
815
	if err != nil {
816
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
817
	}
818
	msg, err := server.DeleteRelationships(ctx, &protoReq)
819
	return msg, metadata, err
820
}
821
822
func request_Data_RunBundle_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
823
	var (
824
		protoReq BundleRunRequest
825
		metadata runtime.ServerMetadata
826
		err      error
827
	)
828
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
829
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
830
	}
831
	if req.Body != nil {
832
		_, _ = io.Copy(io.Discard, req.Body)
833
	}
834
	val, ok := pathParams["tenant_id"]
835
	if !ok {
836
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
837
	}
838
	protoReq.TenantId, err = runtime.String(val)
839
	if err != nil {
840
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
841
	}
842
	msg, err := client.RunBundle(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
843
	return msg, metadata, err
844
}
845
846
func local_request_Data_RunBundle_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
847
	var (
848
		protoReq BundleRunRequest
849
		metadata runtime.ServerMetadata
850
		err      error
851
	)
852
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
853
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
854
	}
855
	val, ok := pathParams["tenant_id"]
856
	if !ok {
857
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
858
	}
859
	protoReq.TenantId, err = runtime.String(val)
860
	if err != nil {
861
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
862
	}
863
	msg, err := server.RunBundle(ctx, &protoReq)
864
	return msg, metadata, err
865
}
866
867
func request_Bundle_Write_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
868
	var (
869
		protoReq BundleWriteRequest
870
		metadata runtime.ServerMetadata
871
		err      error
872
	)
873
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
874
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
875
	}
876
	if req.Body != nil {
877
		_, _ = io.Copy(io.Discard, req.Body)
878
	}
879
	val, ok := pathParams["tenant_id"]
880
	if !ok {
881
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
882
	}
883
	protoReq.TenantId, err = runtime.String(val)
884
	if err != nil {
885
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
886
	}
887
	msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
888
	return msg, metadata, err
889
}
890
891
func local_request_Bundle_Write_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
892
	var (
893
		protoReq BundleWriteRequest
894
		metadata runtime.ServerMetadata
895
		err      error
896
	)
897
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
898
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
899
	}
900
	val, ok := pathParams["tenant_id"]
901
	if !ok {
902
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
903
	}
904
	protoReq.TenantId, err = runtime.String(val)
905
	if err != nil {
906
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
907
	}
908
	msg, err := server.Write(ctx, &protoReq)
909
	return msg, metadata, err
910
}
911
912
func request_Bundle_Read_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
913
	var (
914
		protoReq BundleReadRequest
915
		metadata runtime.ServerMetadata
916
		err      error
917
	)
918
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
919
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
920
	}
921
	if req.Body != nil {
922
		_, _ = io.Copy(io.Discard, req.Body)
923
	}
924
	val, ok := pathParams["tenant_id"]
925
	if !ok {
926
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
927
	}
928
	protoReq.TenantId, err = runtime.String(val)
929
	if err != nil {
930
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
931
	}
932
	msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
933
	return msg, metadata, err
934
}
935
936
func local_request_Bundle_Read_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
937
	var (
938
		protoReq BundleReadRequest
939
		metadata runtime.ServerMetadata
940
		err      error
941
	)
942
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
943
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
944
	}
945
	val, ok := pathParams["tenant_id"]
946
	if !ok {
947
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
948
	}
949
	protoReq.TenantId, err = runtime.String(val)
950
	if err != nil {
951
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
952
	}
953
	msg, err := server.Read(ctx, &protoReq)
954
	return msg, metadata, err
955
}
956
957
func request_Bundle_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
958
	var (
959
		protoReq BundleDeleteRequest
960
		metadata runtime.ServerMetadata
961
		err      error
962
	)
963
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
964
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
965
	}
966
	if req.Body != nil {
967
		_, _ = io.Copy(io.Discard, req.Body)
968
	}
969
	val, ok := pathParams["tenant_id"]
970
	if !ok {
971
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
972
	}
973
	protoReq.TenantId, err = runtime.String(val)
974
	if err != nil {
975
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
976
	}
977
	msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
978
	return msg, metadata, err
979
}
980
981
func local_request_Bundle_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
982
	var (
983
		protoReq BundleDeleteRequest
984
		metadata runtime.ServerMetadata
985
		err      error
986
	)
987
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
988
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
989
	}
990
	val, ok := pathParams["tenant_id"]
991
	if !ok {
992
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id")
993
	}
994
	protoReq.TenantId, err = runtime.String(val)
995
	if err != nil {
996
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err)
997
	}
998
	msg, err := server.Delete(ctx, &protoReq)
999
	return msg, metadata, err
1000
}
1001
1002
func request_Tenancy_Create_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1003
	var (
1004
		protoReq TenantCreateRequest
1005
		metadata runtime.ServerMetadata
1006
	)
1007
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
1008
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
1009
	}
1010
	if req.Body != nil {
1011
		_, _ = io.Copy(io.Discard, req.Body)
1012
	}
1013
	msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
1014
	return msg, metadata, err
1015
}
1016
1017
func local_request_Tenancy_Create_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1018
	var (
1019
		protoReq TenantCreateRequest
1020
		metadata runtime.ServerMetadata
1021
	)
1022
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
1023
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
1024
	}
1025
	msg, err := server.Create(ctx, &protoReq)
1026
	return msg, metadata, err
1027
}
1028
1029
func request_Tenancy_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1030
	var (
1031
		protoReq TenantDeleteRequest
1032
		metadata runtime.ServerMetadata
1033
		err      error
1034
	)
1035
	if req.Body != nil {
1036
		_, _ = io.Copy(io.Discard, req.Body)
1037
	}
1038
	val, ok := pathParams["id"]
1039
	if !ok {
1040
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
1041
	}
1042
	protoReq.Id, err = runtime.String(val)
1043
	if err != nil {
1044
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
1045
	}
1046
	msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
1047
	return msg, metadata, err
1048
}
1049
1050
func local_request_Tenancy_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1051
	var (
1052
		protoReq TenantDeleteRequest
1053
		metadata runtime.ServerMetadata
1054
		err      error
1055
	)
1056
	val, ok := pathParams["id"]
1057
	if !ok {
1058
		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
1059
	}
1060
	protoReq.Id, err = runtime.String(val)
1061
	if err != nil {
1062
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
1063
	}
1064
	msg, err := server.Delete(ctx, &protoReq)
1065
	return msg, metadata, err
1066
}
1067
1068
func request_Tenancy_List_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1069
	var (
1070
		protoReq TenantListRequest
1071
		metadata runtime.ServerMetadata
1072
	)
1073
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
1074
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
1075
	}
1076
	if req.Body != nil {
1077
		_, _ = io.Copy(io.Discard, req.Body)
1078
	}
1079
	msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
1080
	return msg, metadata, err
1081
}
1082
1083
func local_request_Tenancy_List_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
1084
	var (
1085
		protoReq TenantListRequest
1086
		metadata runtime.ServerMetadata
1087
	)
1088
	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
1089
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
1090
	}
1091
	msg, err := server.List(ctx, &protoReq)
1092
	return msg, metadata, err
1093
}
1094
1095
// RegisterPermissionHandlerServer registers the http handlers for service Permission to "mux".
1096
// UnaryRPC     :call PermissionServer directly.
1097
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1098
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPermissionHandlerFromEndpoint instead.
1099
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1100
func RegisterPermissionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServer) error {
1101
	mux.Handle(http.MethodPost, pattern_Permission_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1102
		ctx, cancel := context.WithCancel(req.Context())
1103
		defer cancel()
1104
		var stream runtime.ServerTransportStream
1105
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1106
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1107
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/Check", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/check"))
1108
		if err != nil {
1109
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1110
			return
1111
		}
1112
		resp, md, err := local_request_Permission_Check_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1113
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1114
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1115
		if err != nil {
1116
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1117
			return
1118
		}
1119
		forward_Permission_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1120
	})
1121
	mux.Handle(http.MethodPost, pattern_Permission_BulkCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1122
		ctx, cancel := context.WithCancel(req.Context())
1123
		defer cancel()
1124
		var stream runtime.ServerTransportStream
1125
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1126
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1127
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/BulkCheck", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/bulk-check"))
1128
		if err != nil {
1129
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1130
			return
1131
		}
1132
		resp, md, err := local_request_Permission_BulkCheck_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1133
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1134
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1135
		if err != nil {
1136
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1137
			return
1138
		}
1139
		forward_Permission_BulkCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1140
	})
1141
	mux.Handle(http.MethodPost, pattern_Permission_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1142
		ctx, cancel := context.WithCancel(req.Context())
1143
		defer cancel()
1144
		var stream runtime.ServerTransportStream
1145
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1146
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1147
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/Expand", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/expand"))
1148
		if err != nil {
1149
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1150
			return
1151
		}
1152
		resp, md, err := local_request_Permission_Expand_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1153
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1154
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1155
		if err != nil {
1156
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1157
			return
1158
		}
1159
		forward_Permission_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1160
	})
1161
	mux.Handle(http.MethodPost, pattern_Permission_LookupEntity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1162
		ctx, cancel := context.WithCancel(req.Context())
1163
		defer cancel()
1164
		var stream runtime.ServerTransportStream
1165
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1166
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1167
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/LookupEntity", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity"))
1168
		if err != nil {
1169
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1170
			return
1171
		}
1172
		resp, md, err := local_request_Permission_LookupEntity_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1173
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1174
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1175
		if err != nil {
1176
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1177
			return
1178
		}
1179
		forward_Permission_LookupEntity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1180
	})
1181
1182
	mux.Handle(http.MethodPost, pattern_Permission_LookupEntityStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1183
		err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
1184
		_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1185
		runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1186
		return
1187
	})
1188
	mux.Handle(http.MethodPost, pattern_Permission_LookupSubject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1189
		ctx, cancel := context.WithCancel(req.Context())
1190
		defer cancel()
1191
		var stream runtime.ServerTransportStream
1192
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1193
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1194
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/LookupSubject", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-subject"))
1195
		if err != nil {
1196
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1197
			return
1198
		}
1199
		resp, md, err := local_request_Permission_LookupSubject_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1200
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1201
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1202
		if err != nil {
1203
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1204
			return
1205
		}
1206
		forward_Permission_LookupSubject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1207
	})
1208
	mux.Handle(http.MethodPost, pattern_Permission_SubjectPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1209
		ctx, cancel := context.WithCancel(req.Context())
1210
		defer cancel()
1211
		var stream runtime.ServerTransportStream
1212
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1213
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1214
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/SubjectPermission", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/subject-permission"))
1215
		if err != nil {
1216
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1217
			return
1218
		}
1219
		resp, md, err := local_request_Permission_SubjectPermission_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1220
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1221
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1222
		if err != nil {
1223
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1224
			return
1225
		}
1226
		forward_Permission_SubjectPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1227
	})
1228
1229
	return nil
1230
}
1231
1232
// RegisterWatchHandlerServer registers the http handlers for service Watch to "mux".
1233
// UnaryRPC     :call WatchServer directly.
1234
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1235
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWatchHandlerFromEndpoint instead.
1236
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1237
func RegisterWatchHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WatchServer) error {
1238
	mux.Handle(http.MethodPost, pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1239
		err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
1240
		_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1241
		runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1242
		return
1243
	})
1244
1245
	return nil
1246
}
1247
1248
// RegisterSchemaHandlerServer registers the http handlers for service Schema to "mux".
1249
// UnaryRPC     :call SchemaServer directly.
1250
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1251
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchemaHandlerFromEndpoint instead.
1252
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1253
func RegisterSchemaHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchemaServer) error {
1254
	mux.Handle(http.MethodPost, pattern_Schema_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1255
		ctx, cancel := context.WithCancel(req.Context())
1256
		defer cancel()
1257
		var stream runtime.ServerTransportStream
1258
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1259
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1260
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/write"))
1261
		if err != nil {
1262
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1263
			return
1264
		}
1265
		resp, md, err := local_request_Schema_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1266
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1267
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1268
		if err != nil {
1269
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1270
			return
1271
		}
1272
		forward_Schema_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1273
	})
1274
	mux.Handle(http.MethodPatch, pattern_Schema_PartialWrite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1275
		ctx, cancel := context.WithCancel(req.Context())
1276
		defer cancel()
1277
		var stream runtime.ServerTransportStream
1278
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1279
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1280
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/PartialWrite", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/partial-write"))
1281
		if err != nil {
1282
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1283
			return
1284
		}
1285
		resp, md, err := local_request_Schema_PartialWrite_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1286
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1287
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1288
		if err != nil {
1289
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1290
			return
1291
		}
1292
		forward_Schema_PartialWrite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1293
	})
1294
	mux.Handle(http.MethodPost, pattern_Schema_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1295
		ctx, cancel := context.WithCancel(req.Context())
1296
		defer cancel()
1297
		var stream runtime.ServerTransportStream
1298
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1299
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1300
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/read"))
1301
		if err != nil {
1302
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1303
			return
1304
		}
1305
		resp, md, err := local_request_Schema_Read_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1306
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1307
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1308
		if err != nil {
1309
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1310
			return
1311
		}
1312
		forward_Schema_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1313
	})
1314
	mux.Handle(http.MethodPost, pattern_Schema_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1315
		ctx, cancel := context.WithCancel(req.Context())
1316
		defer cancel()
1317
		var stream runtime.ServerTransportStream
1318
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1319
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1320
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/List", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/list"))
1321
		if err != nil {
1322
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1323
			return
1324
		}
1325
		resp, md, err := local_request_Schema_List_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1326
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1327
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1328
		if err != nil {
1329
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1330
			return
1331
		}
1332
		forward_Schema_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1333
	})
1334
1335
	return nil
1336
}
1337
1338
// RegisterDataHandlerServer registers the http handlers for service Data to "mux".
1339
// UnaryRPC     :call DataServer directly.
1340
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1341
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDataHandlerFromEndpoint instead.
1342
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1343
func RegisterDataHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataServer) error {
1344
	mux.Handle(http.MethodPost, pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1345
		ctx, cancel := context.WithCancel(req.Context())
1346
		defer cancel()
1347
		var stream runtime.ServerTransportStream
1348
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1349
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1350
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write"))
1351
		if err != nil {
1352
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1353
			return
1354
		}
1355
		resp, md, err := local_request_Data_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1356
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1357
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1358
		if err != nil {
1359
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1360
			return
1361
		}
1362
		forward_Data_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1363
	})
1364
	mux.Handle(http.MethodPost, pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1365
		ctx, cancel := context.WithCancel(req.Context())
1366
		defer cancel()
1367
		var stream runtime.ServerTransportStream
1368
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1369
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1370
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write"))
1371
		if err != nil {
1372
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1373
			return
1374
		}
1375
		resp, md, err := local_request_Data_WriteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1376
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1377
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1378
		if err != nil {
1379
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1380
			return
1381
		}
1382
		forward_Data_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1383
	})
1384
	mux.Handle(http.MethodPost, pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1385
		ctx, cancel := context.WithCancel(req.Context())
1386
		defer cancel()
1387
		var stream runtime.ServerTransportStream
1388
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1389
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1390
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read"))
1391
		if err != nil {
1392
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1393
			return
1394
		}
1395
		resp, md, err := local_request_Data_ReadRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1396
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1397
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1398
		if err != nil {
1399
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1400
			return
1401
		}
1402
		forward_Data_ReadRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1403
	})
1404
	mux.Handle(http.MethodPost, pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1405
		ctx, cancel := context.WithCancel(req.Context())
1406
		defer cancel()
1407
		var stream runtime.ServerTransportStream
1408
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1409
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1410
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read"))
1411
		if err != nil {
1412
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1413
			return
1414
		}
1415
		resp, md, err := local_request_Data_ReadAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1416
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1417
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1418
		if err != nil {
1419
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1420
			return
1421
		}
1422
		forward_Data_ReadAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1423
	})
1424
	mux.Handle(http.MethodPost, pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1425
		ctx, cancel := context.WithCancel(req.Context())
1426
		defer cancel()
1427
		var stream runtime.ServerTransportStream
1428
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1429
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1430
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete"))
1431
		if err != nil {
1432
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1433
			return
1434
		}
1435
		resp, md, err := local_request_Data_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1436
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1437
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1438
		if err != nil {
1439
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1440
			return
1441
		}
1442
		forward_Data_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1443
	})
1444
	mux.Handle(http.MethodPost, pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1445
		ctx, cancel := context.WithCancel(req.Context())
1446
		defer cancel()
1447
		var stream runtime.ServerTransportStream
1448
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1449
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1450
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete"))
1451
		if err != nil {
1452
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1453
			return
1454
		}
1455
		resp, md, err := local_request_Data_DeleteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1456
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1457
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1458
		if err != nil {
1459
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1460
			return
1461
		}
1462
		forward_Data_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1463
	})
1464
	mux.Handle(http.MethodPost, pattern_Data_RunBundle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1465
		ctx, cancel := context.WithCancel(req.Context())
1466
		defer cancel()
1467
		var stream runtime.ServerTransportStream
1468
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1469
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1470
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/RunBundle", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/run-bundle"))
1471
		if err != nil {
1472
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1473
			return
1474
		}
1475
		resp, md, err := local_request_Data_RunBundle_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1476
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1477
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1478
		if err != nil {
1479
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1480
			return
1481
		}
1482
		forward_Data_RunBundle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1483
	})
1484
1485
	return nil
1486
}
1487
1488
// RegisterBundleHandlerServer registers the http handlers for service Bundle to "mux".
1489
// UnaryRPC     :call BundleServer directly.
1490
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1491
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBundleHandlerFromEndpoint instead.
1492
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1493
func RegisterBundleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BundleServer) error {
1494
	mux.Handle(http.MethodPost, pattern_Bundle_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1495
		ctx, cancel := context.WithCancel(req.Context())
1496
		defer cancel()
1497
		var stream runtime.ServerTransportStream
1498
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1499
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1500
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/write"))
1501
		if err != nil {
1502
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1503
			return
1504
		}
1505
		resp, md, err := local_request_Bundle_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1506
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1507
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1508
		if err != nil {
1509
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1510
			return
1511
		}
1512
		forward_Bundle_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1513
	})
1514
	mux.Handle(http.MethodPost, pattern_Bundle_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1515
		ctx, cancel := context.WithCancel(req.Context())
1516
		defer cancel()
1517
		var stream runtime.ServerTransportStream
1518
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1519
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1520
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/read"))
1521
		if err != nil {
1522
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1523
			return
1524
		}
1525
		resp, md, err := local_request_Bundle_Read_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1526
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1527
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1528
		if err != nil {
1529
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1530
			return
1531
		}
1532
		forward_Bundle_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1533
	})
1534
	mux.Handle(http.MethodPost, pattern_Bundle_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1535
		ctx, cancel := context.WithCancel(req.Context())
1536
		defer cancel()
1537
		var stream runtime.ServerTransportStream
1538
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1539
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1540
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/delete"))
1541
		if err != nil {
1542
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1543
			return
1544
		}
1545
		resp, md, err := local_request_Bundle_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1546
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1547
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1548
		if err != nil {
1549
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1550
			return
1551
		}
1552
		forward_Bundle_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1553
	})
1554
1555
	return nil
1556
}
1557
1558
// RegisterTenancyHandlerServer registers the http handlers for service Tenancy to "mux".
1559
// UnaryRPC     :call TenancyServer directly.
1560
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
1561
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTenancyHandlerFromEndpoint instead.
1562
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
1563
func RegisterTenancyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TenancyServer) error {
1564
	mux.Handle(http.MethodPost, pattern_Tenancy_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1565
		ctx, cancel := context.WithCancel(req.Context())
1566
		defer cancel()
1567
		var stream runtime.ServerTransportStream
1568
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1569
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1570
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/Create", runtime.WithHTTPPathPattern("/v1/tenants/create"))
1571
		if err != nil {
1572
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1573
			return
1574
		}
1575
		resp, md, err := local_request_Tenancy_Create_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1576
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1577
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1578
		if err != nil {
1579
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1580
			return
1581
		}
1582
		forward_Tenancy_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1583
	})
1584
	mux.Handle(http.MethodDelete, pattern_Tenancy_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1585
		ctx, cancel := context.WithCancel(req.Context())
1586
		defer cancel()
1587
		var stream runtime.ServerTransportStream
1588
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1589
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1590
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{id}"))
1591
		if err != nil {
1592
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1593
			return
1594
		}
1595
		resp, md, err := local_request_Tenancy_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1596
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1597
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1598
		if err != nil {
1599
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1600
			return
1601
		}
1602
		forward_Tenancy_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1603
	})
1604
	mux.Handle(http.MethodPost, pattern_Tenancy_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1605
		ctx, cancel := context.WithCancel(req.Context())
1606
		defer cancel()
1607
		var stream runtime.ServerTransportStream
1608
		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
1609
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1610
		annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/List", runtime.WithHTTPPathPattern("/v1/tenants/list"))
1611
		if err != nil {
1612
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1613
			return
1614
		}
1615
		resp, md, err := local_request_Tenancy_List_0(annotatedContext, inboundMarshaler, server, req, pathParams)
1616
		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
1617
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1618
		if err != nil {
1619
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1620
			return
1621
		}
1622
		forward_Tenancy_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1623
	})
1624
1625
	return nil
1626
}
1627
1628
// RegisterPermissionHandlerFromEndpoint is same as RegisterPermissionHandler but
1629
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
1630
func RegisterPermissionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
1631
	conn, err := grpc.NewClient(endpoint, opts...)
1632
	if err != nil {
1633
		return err
1634
	}
1635
	defer func() {
1636
		if err != nil {
1637
			if cerr := conn.Close(); cerr != nil {
1638
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1639
			}
1640
			return
1641
		}
1642
		go func() {
1643
			<-ctx.Done()
1644
			if cerr := conn.Close(); cerr != nil {
1645
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1646
			}
1647
		}()
1648
	}()
1649
	return RegisterPermissionHandler(ctx, mux, conn)
1650
}
1651
1652
// RegisterPermissionHandler registers the http handlers for service Permission to "mux".
1653
// The handlers forward requests to the grpc endpoint over "conn".
1654
func RegisterPermissionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
1655
	return RegisterPermissionHandlerClient(ctx, mux, NewPermissionClient(conn))
1656
}
1657
1658
// RegisterPermissionHandlerClient registers the http handlers for service Permission
1659
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PermissionClient".
1660
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PermissionClient"
1661
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
1662
// "PermissionClient" to call the correct interceptors. This client ignores the HTTP middlewares.
1663
func RegisterPermissionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionClient) error {
1664
	mux.Handle(http.MethodPost, pattern_Permission_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1665
		ctx, cancel := context.WithCancel(req.Context())
1666
		defer cancel()
1667
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1668
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/Check", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/check"))
1669
		if err != nil {
1670
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1671
			return
1672
		}
1673
		resp, md, err := request_Permission_Check_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1674
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1675
		if err != nil {
1676
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1677
			return
1678
		}
1679
		forward_Permission_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1680
	})
1681
	mux.Handle(http.MethodPost, pattern_Permission_BulkCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1682
		ctx, cancel := context.WithCancel(req.Context())
1683
		defer cancel()
1684
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1685
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/BulkCheck", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/bulk-check"))
1686
		if err != nil {
1687
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1688
			return
1689
		}
1690
		resp, md, err := request_Permission_BulkCheck_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1691
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1692
		if err != nil {
1693
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1694
			return
1695
		}
1696
		forward_Permission_BulkCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1697
	})
1698
	mux.Handle(http.MethodPost, pattern_Permission_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1699
		ctx, cancel := context.WithCancel(req.Context())
1700
		defer cancel()
1701
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1702
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/Expand", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/expand"))
1703
		if err != nil {
1704
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1705
			return
1706
		}
1707
		resp, md, err := request_Permission_Expand_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1708
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1709
		if err != nil {
1710
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1711
			return
1712
		}
1713
		forward_Permission_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1714
	})
1715
	mux.Handle(http.MethodPost, pattern_Permission_LookupEntity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1716
		ctx, cancel := context.WithCancel(req.Context())
1717
		defer cancel()
1718
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1719
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupEntity", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity"))
1720
		if err != nil {
1721
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1722
			return
1723
		}
1724
		resp, md, err := request_Permission_LookupEntity_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1725
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1726
		if err != nil {
1727
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1728
			return
1729
		}
1730
		forward_Permission_LookupEntity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1731
	})
1732
	mux.Handle(http.MethodPost, pattern_Permission_LookupEntityStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1733
		ctx, cancel := context.WithCancel(req.Context())
1734
		defer cancel()
1735
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1736
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupEntityStream", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity-stream"))
1737
		if err != nil {
1738
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1739
			return
1740
		}
1741
		resp, md, err := request_Permission_LookupEntityStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1742
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1743
		if err != nil {
1744
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1745
			return
1746
		}
1747
		forward_Permission_LookupEntityStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
1748
	})
1749
	mux.Handle(http.MethodPost, pattern_Permission_LookupSubject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1750
		ctx, cancel := context.WithCancel(req.Context())
1751
		defer cancel()
1752
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1753
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupSubject", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-subject"))
1754
		if err != nil {
1755
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1756
			return
1757
		}
1758
		resp, md, err := request_Permission_LookupSubject_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1759
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1760
		if err != nil {
1761
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1762
			return
1763
		}
1764
		forward_Permission_LookupSubject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1765
	})
1766
	mux.Handle(http.MethodPost, pattern_Permission_SubjectPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1767
		ctx, cancel := context.WithCancel(req.Context())
1768
		defer cancel()
1769
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1770
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/SubjectPermission", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/subject-permission"))
1771
		if err != nil {
1772
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1773
			return
1774
		}
1775
		resp, md, err := request_Permission_SubjectPermission_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1776
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1777
		if err != nil {
1778
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1779
			return
1780
		}
1781
		forward_Permission_SubjectPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1782
	})
1783
	return nil
1784
}
1785
1786
var (
1787
	pattern_Permission_Check_0              = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "check"}, ""))
1788
	pattern_Permission_BulkCheck_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "bulk-check"}, ""))
1789
	pattern_Permission_Expand_0             = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "expand"}, ""))
1790
	pattern_Permission_LookupEntity_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-entity"}, ""))
1791
	pattern_Permission_LookupEntityStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-entity-stream"}, ""))
1792
	pattern_Permission_LookupSubject_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-subject"}, ""))
1793
	pattern_Permission_SubjectPermission_0  = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "subject-permission"}, ""))
1794
)
1795
1796
var (
1797
	forward_Permission_Check_0              = runtime.ForwardResponseMessage
1798
	forward_Permission_BulkCheck_0          = runtime.ForwardResponseMessage
1799
	forward_Permission_Expand_0             = runtime.ForwardResponseMessage
1800
	forward_Permission_LookupEntity_0       = runtime.ForwardResponseMessage
1801
	forward_Permission_LookupEntityStream_0 = runtime.ForwardResponseStream
1802
	forward_Permission_LookupSubject_0      = runtime.ForwardResponseMessage
1803
	forward_Permission_SubjectPermission_0  = runtime.ForwardResponseMessage
1804
)
1805
1806
// RegisterWatchHandlerFromEndpoint is same as RegisterWatchHandler but
1807
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
1808
func RegisterWatchHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
1809
	conn, err := grpc.NewClient(endpoint, opts...)
1810
	if err != nil {
1811
		return err
1812
	}
1813
	defer func() {
1814
		if err != nil {
1815
			if cerr := conn.Close(); cerr != nil {
1816
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1817
			}
1818
			return
1819
		}
1820
		go func() {
1821
			<-ctx.Done()
1822
			if cerr := conn.Close(); cerr != nil {
1823
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1824
			}
1825
		}()
1826
	}()
1827
	return RegisterWatchHandler(ctx, mux, conn)
1828
}
1829
1830
// RegisterWatchHandler registers the http handlers for service Watch to "mux".
1831
// The handlers forward requests to the grpc endpoint over "conn".
1832
func RegisterWatchHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
1833
	return RegisterWatchHandlerClient(ctx, mux, NewWatchClient(conn))
1834
}
1835
1836
// RegisterWatchHandlerClient registers the http handlers for service Watch
1837
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WatchClient".
1838
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WatchClient"
1839
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
1840
// "WatchClient" to call the correct interceptors. This client ignores the HTTP middlewares.
1841
func RegisterWatchHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WatchClient) error {
1842
	mux.Handle(http.MethodPost, pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1843
		ctx, cancel := context.WithCancel(req.Context())
1844
		defer cancel()
1845
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1846
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Watch/Watch", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/watch"))
1847
		if err != nil {
1848
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1849
			return
1850
		}
1851
		resp, md, err := request_Watch_Watch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1852
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1853
		if err != nil {
1854
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1855
			return
1856
		}
1857
		forward_Watch_Watch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
1858
	})
1859
	return nil
1860
}
1861
1862
var (
1863
	pattern_Watch_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "tenants", "tenant_id", "watch"}, ""))
1864
)
1865
1866
var (
1867
	forward_Watch_Watch_0 = runtime.ForwardResponseStream
1868
)
1869
1870
// RegisterSchemaHandlerFromEndpoint is same as RegisterSchemaHandler but
1871
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
1872
func RegisterSchemaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
1873
	conn, err := grpc.NewClient(endpoint, opts...)
1874
	if err != nil {
1875
		return err
1876
	}
1877
	defer func() {
1878
		if err != nil {
1879
			if cerr := conn.Close(); cerr != nil {
1880
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1881
			}
1882
			return
1883
		}
1884
		go func() {
1885
			<-ctx.Done()
1886
			if cerr := conn.Close(); cerr != nil {
1887
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
1888
			}
1889
		}()
1890
	}()
1891
	return RegisterSchemaHandler(ctx, mux, conn)
1892
}
1893
1894
// RegisterSchemaHandler registers the http handlers for service Schema to "mux".
1895
// The handlers forward requests to the grpc endpoint over "conn".
1896
func RegisterSchemaHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
1897
	return RegisterSchemaHandlerClient(ctx, mux, NewSchemaClient(conn))
1898
}
1899
1900
// RegisterSchemaHandlerClient registers the http handlers for service Schema
1901
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchemaClient".
1902
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchemaClient"
1903
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
1904
// "SchemaClient" to call the correct interceptors. This client ignores the HTTP middlewares.
1905
func RegisterSchemaHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchemaClient) error {
1906
	mux.Handle(http.MethodPost, pattern_Schema_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1907
		ctx, cancel := context.WithCancel(req.Context())
1908
		defer cancel()
1909
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1910
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/write"))
1911
		if err != nil {
1912
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1913
			return
1914
		}
1915
		resp, md, err := request_Schema_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1916
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1917
		if err != nil {
1918
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1919
			return
1920
		}
1921
		forward_Schema_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1922
	})
1923
	mux.Handle(http.MethodPatch, pattern_Schema_PartialWrite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1924
		ctx, cancel := context.WithCancel(req.Context())
1925
		defer cancel()
1926
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1927
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/PartialWrite", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/partial-write"))
1928
		if err != nil {
1929
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1930
			return
1931
		}
1932
		resp, md, err := request_Schema_PartialWrite_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1933
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1934
		if err != nil {
1935
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1936
			return
1937
		}
1938
		forward_Schema_PartialWrite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1939
	})
1940
	mux.Handle(http.MethodPost, pattern_Schema_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1941
		ctx, cancel := context.WithCancel(req.Context())
1942
		defer cancel()
1943
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1944
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/read"))
1945
		if err != nil {
1946
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1947
			return
1948
		}
1949
		resp, md, err := request_Schema_Read_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1950
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1951
		if err != nil {
1952
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1953
			return
1954
		}
1955
		forward_Schema_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1956
	})
1957
	mux.Handle(http.MethodPost, pattern_Schema_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1958
		ctx, cancel := context.WithCancel(req.Context())
1959
		defer cancel()
1960
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1961
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/List", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/list"))
1962
		if err != nil {
1963
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1964
			return
1965
		}
1966
		resp, md, err := request_Schema_List_0(annotatedContext, inboundMarshaler, client, req, pathParams)
1967
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
1968
		if err != nil {
1969
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
1970
			return
1971
		}
1972
		forward_Schema_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1973
	})
1974
	return nil
1975
}
1976
1977
var (
1978
	pattern_Schema_Write_0        = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "write"}, ""))
1979
	pattern_Schema_PartialWrite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "partial-write"}, ""))
1980
	pattern_Schema_Read_0         = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "read"}, ""))
1981
	pattern_Schema_List_0         = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "list"}, ""))
1982
)
1983
1984
var (
1985
	forward_Schema_Write_0        = runtime.ForwardResponseMessage
1986
	forward_Schema_PartialWrite_0 = runtime.ForwardResponseMessage
1987
	forward_Schema_Read_0         = runtime.ForwardResponseMessage
1988
	forward_Schema_List_0         = runtime.ForwardResponseMessage
1989
)
1990
1991
// RegisterDataHandlerFromEndpoint is same as RegisterDataHandler but
1992
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
1993
func RegisterDataHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
1994
	conn, err := grpc.NewClient(endpoint, opts...)
1995
	if err != nil {
1996
		return err
1997
	}
1998
	defer func() {
1999
		if err != nil {
2000
			if cerr := conn.Close(); cerr != nil {
2001
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2002
			}
2003
			return
2004
		}
2005
		go func() {
2006
			<-ctx.Done()
2007
			if cerr := conn.Close(); cerr != nil {
2008
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2009
			}
2010
		}()
2011
	}()
2012
	return RegisterDataHandler(ctx, mux, conn)
2013
}
2014
2015
// RegisterDataHandler registers the http handlers for service Data to "mux".
2016
// The handlers forward requests to the grpc endpoint over "conn".
2017
func RegisterDataHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
2018
	return RegisterDataHandlerClient(ctx, mux, NewDataClient(conn))
2019
}
2020
2021
// RegisterDataHandlerClient registers the http handlers for service Data
2022
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataClient".
2023
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataClient"
2024
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
2025
// "DataClient" to call the correct interceptors. This client ignores the HTTP middlewares.
2026
func RegisterDataHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataClient) error {
2027
	mux.Handle(http.MethodPost, pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2028
		ctx, cancel := context.WithCancel(req.Context())
2029
		defer cancel()
2030
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2031
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write"))
2032
		if err != nil {
2033
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2034
			return
2035
		}
2036
		resp, md, err := request_Data_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2037
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2038
		if err != nil {
2039
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2040
			return
2041
		}
2042
		forward_Data_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2043
	})
2044
	mux.Handle(http.MethodPost, pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2045
		ctx, cancel := context.WithCancel(req.Context())
2046
		defer cancel()
2047
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2048
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write"))
2049
		if err != nil {
2050
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2051
			return
2052
		}
2053
		resp, md, err := request_Data_WriteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2054
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2055
		if err != nil {
2056
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2057
			return
2058
		}
2059
		forward_Data_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2060
	})
2061
	mux.Handle(http.MethodPost, pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2062
		ctx, cancel := context.WithCancel(req.Context())
2063
		defer cancel()
2064
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2065
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read"))
2066
		if err != nil {
2067
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2068
			return
2069
		}
2070
		resp, md, err := request_Data_ReadRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2071
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2072
		if err != nil {
2073
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2074
			return
2075
		}
2076
		forward_Data_ReadRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2077
	})
2078
	mux.Handle(http.MethodPost, pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2079
		ctx, cancel := context.WithCancel(req.Context())
2080
		defer cancel()
2081
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2082
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read"))
2083
		if err != nil {
2084
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2085
			return
2086
		}
2087
		resp, md, err := request_Data_ReadAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2088
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2089
		if err != nil {
2090
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2091
			return
2092
		}
2093
		forward_Data_ReadAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2094
	})
2095
	mux.Handle(http.MethodPost, pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2096
		ctx, cancel := context.WithCancel(req.Context())
2097
		defer cancel()
2098
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2099
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete"))
2100
		if err != nil {
2101
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2102
			return
2103
		}
2104
		resp, md, err := request_Data_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2105
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2106
		if err != nil {
2107
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2108
			return
2109
		}
2110
		forward_Data_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2111
	})
2112
	mux.Handle(http.MethodPost, pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2113
		ctx, cancel := context.WithCancel(req.Context())
2114
		defer cancel()
2115
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2116
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete"))
2117
		if err != nil {
2118
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2119
			return
2120
		}
2121
		resp, md, err := request_Data_DeleteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2122
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2123
		if err != nil {
2124
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2125
			return
2126
		}
2127
		forward_Data_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2128
	})
2129
	mux.Handle(http.MethodPost, pattern_Data_RunBundle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2130
		ctx, cancel := context.WithCancel(req.Context())
2131
		defer cancel()
2132
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2133
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/RunBundle", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/run-bundle"))
2134
		if err != nil {
2135
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2136
			return
2137
		}
2138
		resp, md, err := request_Data_RunBundle_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2139
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2140
		if err != nil {
2141
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2142
			return
2143
		}
2144
		forward_Data_RunBundle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2145
	})
2146
	return nil
2147
}
2148
2149
var (
2150
	pattern_Data_Write_0               = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "write"}, ""))
2151
	pattern_Data_WriteRelationships_0  = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "write"}, ""))
2152
	pattern_Data_ReadRelationships_0   = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "relationships", "read"}, ""))
2153
	pattern_Data_ReadAttributes_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "attributes", "read"}, ""))
2154
	pattern_Data_Delete_0              = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "delete"}, ""))
2155
	pattern_Data_DeleteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "delete"}, ""))
2156
	pattern_Data_RunBundle_0           = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "run-bundle"}, ""))
2157
)
2158
2159
var (
2160
	forward_Data_Write_0               = runtime.ForwardResponseMessage
2161
	forward_Data_WriteRelationships_0  = runtime.ForwardResponseMessage
2162
	forward_Data_ReadRelationships_0   = runtime.ForwardResponseMessage
2163
	forward_Data_ReadAttributes_0      = runtime.ForwardResponseMessage
2164
	forward_Data_Delete_0              = runtime.ForwardResponseMessage
2165
	forward_Data_DeleteRelationships_0 = runtime.ForwardResponseMessage
2166
	forward_Data_RunBundle_0           = runtime.ForwardResponseMessage
2167
)
2168
2169
// RegisterBundleHandlerFromEndpoint is same as RegisterBundleHandler but
2170
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
2171
func RegisterBundleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
2172
	conn, err := grpc.NewClient(endpoint, opts...)
2173
	if err != nil {
2174
		return err
2175
	}
2176
	defer func() {
2177
		if err != nil {
2178
			if cerr := conn.Close(); cerr != nil {
2179
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2180
			}
2181
			return
2182
		}
2183
		go func() {
2184
			<-ctx.Done()
2185
			if cerr := conn.Close(); cerr != nil {
2186
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2187
			}
2188
		}()
2189
	}()
2190
	return RegisterBundleHandler(ctx, mux, conn)
2191
}
2192
2193
// RegisterBundleHandler registers the http handlers for service Bundle to "mux".
2194
// The handlers forward requests to the grpc endpoint over "conn".
2195
func RegisterBundleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
2196
	return RegisterBundleHandlerClient(ctx, mux, NewBundleClient(conn))
2197
}
2198
2199
// RegisterBundleHandlerClient registers the http handlers for service Bundle
2200
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BundleClient".
2201
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BundleClient"
2202
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
2203
// "BundleClient" to call the correct interceptors. This client ignores the HTTP middlewares.
2204
func RegisterBundleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BundleClient) error {
2205
	mux.Handle(http.MethodPost, pattern_Bundle_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2206
		ctx, cancel := context.WithCancel(req.Context())
2207
		defer cancel()
2208
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2209
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/write"))
2210
		if err != nil {
2211
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2212
			return
2213
		}
2214
		resp, md, err := request_Bundle_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2215
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2216
		if err != nil {
2217
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2218
			return
2219
		}
2220
		forward_Bundle_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2221
	})
2222
	mux.Handle(http.MethodPost, pattern_Bundle_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2223
		ctx, cancel := context.WithCancel(req.Context())
2224
		defer cancel()
2225
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2226
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/read"))
2227
		if err != nil {
2228
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2229
			return
2230
		}
2231
		resp, md, err := request_Bundle_Read_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2232
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2233
		if err != nil {
2234
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2235
			return
2236
		}
2237
		forward_Bundle_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2238
	})
2239
	mux.Handle(http.MethodPost, pattern_Bundle_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2240
		ctx, cancel := context.WithCancel(req.Context())
2241
		defer cancel()
2242
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2243
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/delete"))
2244
		if err != nil {
2245
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2246
			return
2247
		}
2248
		resp, md, err := request_Bundle_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2249
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2250
		if err != nil {
2251
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2252
			return
2253
		}
2254
		forward_Bundle_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2255
	})
2256
	return nil
2257
}
2258
2259
var (
2260
	pattern_Bundle_Write_0  = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "write"}, ""))
2261
	pattern_Bundle_Read_0   = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "read"}, ""))
2262
	pattern_Bundle_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "delete"}, ""))
2263
)
2264
2265
var (
2266
	forward_Bundle_Write_0  = runtime.ForwardResponseMessage
2267
	forward_Bundle_Read_0   = runtime.ForwardResponseMessage
2268
	forward_Bundle_Delete_0 = runtime.ForwardResponseMessage
2269
)
2270
2271
// RegisterTenancyHandlerFromEndpoint is same as RegisterTenancyHandler but
2272
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
2273
func RegisterTenancyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
2274
	conn, err := grpc.NewClient(endpoint, opts...)
2275
	if err != nil {
2276
		return err
2277
	}
2278
	defer func() {
2279
		if err != nil {
2280
			if cerr := conn.Close(); cerr != nil {
2281
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2282
			}
2283
			return
2284
		}
2285
		go func() {
2286
			<-ctx.Done()
2287
			if cerr := conn.Close(); cerr != nil {
2288
				grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
2289
			}
2290
		}()
2291
	}()
2292
	return RegisterTenancyHandler(ctx, mux, conn)
2293
}
2294
2295
// RegisterTenancyHandler registers the http handlers for service Tenancy to "mux".
2296
// The handlers forward requests to the grpc endpoint over "conn".
2297
func RegisterTenancyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
2298
	return RegisterTenancyHandlerClient(ctx, mux, NewTenancyClient(conn))
2299
}
2300
2301
// RegisterTenancyHandlerClient registers the http handlers for service Tenancy
2302
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TenancyClient".
2303
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TenancyClient"
2304
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
2305
// "TenancyClient" to call the correct interceptors. This client ignores the HTTP middlewares.
2306
func RegisterTenancyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TenancyClient) error {
2307
	mux.Handle(http.MethodPost, pattern_Tenancy_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2308
		ctx, cancel := context.WithCancel(req.Context())
2309
		defer cancel()
2310
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2311
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/Create", runtime.WithHTTPPathPattern("/v1/tenants/create"))
2312
		if err != nil {
2313
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2314
			return
2315
		}
2316
		resp, md, err := request_Tenancy_Create_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2317
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2318
		if err != nil {
2319
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2320
			return
2321
		}
2322
		forward_Tenancy_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2323
	})
2324
	mux.Handle(http.MethodDelete, pattern_Tenancy_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2325
		ctx, cancel := context.WithCancel(req.Context())
2326
		defer cancel()
2327
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2328
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{id}"))
2329
		if err != nil {
2330
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2331
			return
2332
		}
2333
		resp, md, err := request_Tenancy_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2334
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2335
		if err != nil {
2336
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2337
			return
2338
		}
2339
		forward_Tenancy_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2340
	})
2341
	mux.Handle(http.MethodPost, pattern_Tenancy_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
2342
		ctx, cancel := context.WithCancel(req.Context())
2343
		defer cancel()
2344
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
2345
		annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/List", runtime.WithHTTPPathPattern("/v1/tenants/list"))
2346
		if err != nil {
2347
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
2348
			return
2349
		}
2350
		resp, md, err := request_Tenancy_List_0(annotatedContext, inboundMarshaler, client, req, pathParams)
2351
		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
2352
		if err != nil {
2353
			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
2354
			return
2355
		}
2356
		forward_Tenancy_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
2357
	})
2358
	return nil
2359
}
2360
2361
var (
2362
	pattern_Tenancy_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tenants", "create"}, ""))
2363
	pattern_Tenancy_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "tenants", "id"}, ""))
2364
	pattern_Tenancy_List_0   = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tenants", "list"}, ""))
2365
)
2366
2367
var (
2368
	forward_Tenancy_Create_0 = runtime.ForwardResponseMessage
2369
	forward_Tenancy_Delete_0 = runtime.ForwardResponseMessage
2370
	forward_Tenancy_List_0   = runtime.ForwardResponseMessage
2371
)
2372