-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathannotation_pb2_grpc.py
More file actions
2225 lines (1984 loc) · 94.7 KB
/
Copy pathannotation_pb2_grpc.py
File metadata and controls
2225 lines (1984 loc) · 94.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
from . import annotation_pb2 as annotation__pb2
GRPC_GENERATED_VERSION = '1.84.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in annotation_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
class DpAnnotationServiceStub:
"""
------------------- RPC Interfaces ---------------------------
Annotation Service Interface
Interface for annotating archived data.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.saveDataSet = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveDataSet',
request_serializer=annotation__pb2.SaveDataSetRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveDataSetResponse.FromString,
_registered_method=True)
self.getDataSet = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getDataSet',
request_serializer=annotation__pb2.GetDataSetRequest.SerializeToString,
response_deserializer=annotation__pb2.GetDataSetResponse.FromString,
_registered_method=True)
self.queryDataSets = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/queryDataSets',
request_serializer=annotation__pb2.QueryDataSetsRequest.SerializeToString,
response_deserializer=annotation__pb2.QueryDataSetsResponse.FromString,
_registered_method=True)
self.deleteDataSet = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deleteDataSet',
request_serializer=annotation__pb2.DeleteDataSetRequest.SerializeToString,
response_deserializer=annotation__pb2.DeleteDataSetResponse.FromString,
_registered_method=True)
self.patchDataSet = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/patchDataSet',
request_serializer=annotation__pb2.PatchDataSetRequest.SerializeToString,
response_deserializer=annotation__pb2.PatchDataSetResponse.FromString,
_registered_method=True)
self.saveAnnotation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveAnnotation',
request_serializer=annotation__pb2.SaveAnnotationRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveAnnotationResponse.FromString,
_registered_method=True)
self.getAnnotation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getAnnotation',
request_serializer=annotation__pb2.GetAnnotationRequest.SerializeToString,
response_deserializer=annotation__pb2.GetAnnotationResponse.FromString,
_registered_method=True)
self.queryAnnotations = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/queryAnnotations',
request_serializer=annotation__pb2.QueryAnnotationsRequest.SerializeToString,
response_deserializer=annotation__pb2.QueryAnnotationsResponse.FromString,
_registered_method=True)
self.deleteAnnotation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deleteAnnotation',
request_serializer=annotation__pb2.DeleteAnnotationRequest.SerializeToString,
response_deserializer=annotation__pb2.DeleteAnnotationResponse.FromString,
_registered_method=True)
self.patchAnnotation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/patchAnnotation',
request_serializer=annotation__pb2.PatchAnnotationRequest.SerializeToString,
response_deserializer=annotation__pb2.PatchAnnotationResponse.FromString,
_registered_method=True)
self.getCalculations = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getCalculations',
request_serializer=annotation__pb2.GetCalculationsRequest.SerializeToString,
response_deserializer=annotation__pb2.GetCalculationsResponse.FromString,
_registered_method=True)
self.exportData = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/exportData',
request_serializer=annotation__pb2.ExportDataRequest.SerializeToString,
response_deserializer=annotation__pb2.ExportDataResponse.FromString,
_registered_method=True)
self.savePvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/savePvMetadata',
request_serializer=annotation__pb2.SavePvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.SavePvMetadataResponse.FromString,
_registered_method=True)
self.queryPvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/queryPvMetadata',
request_serializer=annotation__pb2.QueryPvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.QueryPvMetadataResponse.FromString,
_registered_method=True)
self.getPvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getPvMetadata',
request_serializer=annotation__pb2.GetPvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.GetPvMetadataResponse.FromString,
_registered_method=True)
self.patchPvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/patchPvMetadata',
request_serializer=annotation__pb2.PatchPvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.PatchPvMetadataResponse.FromString,
_registered_method=True)
self.deletePvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deletePvMetadata',
request_serializer=annotation__pb2.DeletePvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.DeletePvMetadataResponse.FromString,
_registered_method=True)
self.bulkSavePvMetadata = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/bulkSavePvMetadata',
request_serializer=annotation__pb2.BulkSavePvMetadataRequest.SerializeToString,
response_deserializer=annotation__pb2.BulkSavePvMetadataResponse.FromString,
_registered_method=True)
self.saveConfiguration = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveConfiguration',
request_serializer=annotation__pb2.SaveConfigurationRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveConfigurationResponse.FromString,
_registered_method=True)
self.getConfiguration = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getConfiguration',
request_serializer=annotation__pb2.GetConfigurationRequest.SerializeToString,
response_deserializer=annotation__pb2.GetConfigurationResponse.FromString,
_registered_method=True)
self.queryConfigurations = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/queryConfigurations',
request_serializer=annotation__pb2.QueryConfigurationsRequest.SerializeToString,
response_deserializer=annotation__pb2.QueryConfigurationsResponse.FromString,
_registered_method=True)
self.deleteConfiguration = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deleteConfiguration',
request_serializer=annotation__pb2.DeleteConfigurationRequest.SerializeToString,
response_deserializer=annotation__pb2.DeleteConfigurationResponse.FromString,
_registered_method=True)
self.patchConfiguration = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/patchConfiguration',
request_serializer=annotation__pb2.PatchConfigurationRequest.SerializeToString,
response_deserializer=annotation__pb2.PatchConfigurationResponse.FromString,
_registered_method=True)
self.bulkSaveConfiguration = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/bulkSaveConfiguration',
request_serializer=annotation__pb2.BulkSaveConfigurationRequest.SerializeToString,
response_deserializer=annotation__pb2.BulkSaveConfigurationResponse.FromString,
_registered_method=True)
self.saveConfigurationActivation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveConfigurationActivation',
request_serializer=annotation__pb2.SaveConfigurationActivationRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveConfigurationActivationResponse.FromString,
_registered_method=True)
self.getConfigurationActivation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getConfigurationActivation',
request_serializer=annotation__pb2.GetConfigurationActivationRequest.SerializeToString,
response_deserializer=annotation__pb2.GetConfigurationActivationResponse.FromString,
_registered_method=True)
self.queryConfigurationActivations = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/queryConfigurationActivations',
request_serializer=annotation__pb2.QueryConfigurationActivationsRequest.SerializeToString,
response_deserializer=annotation__pb2.QueryConfigurationActivationsResponse.FromString,
_registered_method=True)
self.deleteConfigurationActivation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deleteConfigurationActivation',
request_serializer=annotation__pb2.DeleteConfigurationActivationRequest.SerializeToString,
response_deserializer=annotation__pb2.DeleteConfigurationActivationResponse.FromString,
_registered_method=True)
self.patchConfigurationActivation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/patchConfigurationActivation',
request_serializer=annotation__pb2.PatchConfigurationActivationRequest.SerializeToString,
response_deserializer=annotation__pb2.PatchConfigurationActivationResponse.FromString,
_registered_method=True)
self.bulkSaveConfigurationActivation = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/bulkSaveConfigurationActivation',
request_serializer=annotation__pb2.BulkSaveConfigurationActivationRequest.SerializeToString,
response_deserializer=annotation__pb2.BulkSaveConfigurationActivationResponse.FromString,
_registered_method=True)
self.getActiveConfigurations = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/getActiveConfigurations',
request_serializer=annotation__pb2.GetActiveConfigurationsRequest.SerializeToString,
response_deserializer=annotation__pb2.GetActiveConfigurationsResponse.FromString,
_registered_method=True)
self.saveSampleStatuses = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveSampleStatuses',
request_serializer=annotation__pb2.SaveSampleStatusesRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveSampleStatusesResponse.FromString,
_registered_method=True)
self.querySampleStatuses = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/querySampleStatuses',
request_serializer=annotation__pb2.QuerySampleStatusesRequest.SerializeToString,
response_deserializer=annotation__pb2.QuerySampleStatusesResponse.FromString,
_registered_method=True)
self.querySampleStatusesStream = channel.unary_stream(
'/dp.service.annotation.DpAnnotationService/querySampleStatusesStream',
request_serializer=annotation__pb2.QuerySampleStatusesRequest.SerializeToString,
response_deserializer=annotation__pb2.QuerySampleStatusesResponse.FromString,
_registered_method=True)
self.deleteSampleStatuses = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/deleteSampleStatuses',
request_serializer=annotation__pb2.DeleteSampleStatusesRequest.SerializeToString,
response_deserializer=annotation__pb2.DeleteSampleStatusesResponse.FromString,
_registered_method=True)
self.saveSampleStatusDomain = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/saveSampleStatusDomain',
request_serializer=annotation__pb2.SaveSampleStatusDomainRequest.SerializeToString,
response_deserializer=annotation__pb2.SaveSampleStatusDomainResponse.FromString,
_registered_method=True)
self.querySampleStatusDomains = channel.unary_unary(
'/dp.service.annotation.DpAnnotationService/querySampleStatusDomains',
request_serializer=annotation__pb2.QuerySampleStatusDomainsRequest.SerializeToString,
response_deserializer=annotation__pb2.QuerySampleStatusDomainsResponse.FromString,
_registered_method=True)
class DpAnnotationServiceServicer:
"""
------------------- RPC Interfaces ---------------------------
Annotation Service Interface
Interface for annotating archived data.
"""
def saveDataSet(self, request, context):
"""
------------------- DataSet CRUD ---------------------------
saveDataSet()
Create or replace a DataSet.
Full replace (upsert) semantics: if the request omits id a new DataSet is created and
the server generates its id; if id is supplied, ALL fields of the existing DataSet
(name, ownerId, description, dataBlocks, tags, attributes, modifiedBy) are replaced
with the request contents. Callers must supply the complete desired state on every
call — fields omitted from the request are not preserved. Use patchDataSet() (future)
for partial updates.
The response may indicate rejection, an error handling the request, or a
SaveDataSetResult with the id of the created or updated DataSet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getDataSet(self, request, context):
"""
getDataSet()
Retrieve a single DataSet by id.
This is the content-retrieval path for the dataSetIds returned by queryAnnotations():
annotation query results carry dataset ids only, not embedded dataset content. To
retrieve many datasets at once, prefer queryDataSets() with an IdCriterion listing the
ids — it is a single round trip, whereas a getDataSet() per id is not.
The response may indicate rejection, an error handling the request, or a
GetDataSetResult containing the matching record. If no DataSet exists with the
specified id, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def queryDataSets(self, request, context):
"""
queryDataSets(): Unary (non-streaming) DataSets query.
Query DataSet records using structured search criteria. Client sends a single
QueryDataSetsRequest and receives a single QueryDataSetsResponse.
Pagination: limit sets the maximum number of records in a page; an unset or zero limit
means a server-configured default page size, NOT an unbounded result. Clients must
follow nextPageToken to retrieve all matching records. pageToken is an opaque
continuation token obtained from a previous response; a malformed token is rejected
with an ExceptionalResult.
Ordering: results are ordered by id ascending. The id is unique, which makes paging
stable, and is approximately insertion order. Ordering is part of this method's
contract — paging is only well defined under a deterministic sort.
The response may indicate rejection, an error in handling, or otherwise contains the
DataSets matching the query criteria. A query matching no data returns an empty
result, not an ExceptionalResult.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteDataSet(self, request, context):
"""
deleteDataSet()
Delete the DataSet with the specified id.
The request is rejected if any Annotation references the DataSet in its dataSetIds — a
containment-strength association. Delete or update those annotations first. Use
queryAnnotations() with a DataSetsCriterion to find them.
The response may indicate rejection, an error handling the request, or a
DeleteDataSetResult confirming the id of the deleted record.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def patchDataSet(self, request, context):
"""
patchDataSet()
Partial update of an existing DataSet. Allows individual fields (name, description,
dataBlocks, tags, attributes, modifiedBy) to be updated without replacing the entire
record, unlike the full-replace semantics of saveDataSet().
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release. Field mask design is deferred.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def saveAnnotation(self, request, context):
"""
------------------- Annotation CRUD ---------------------------
saveAnnotation()
Create or replace an Annotation.
Full replace (upsert) semantics: if the request omits id a new Annotation is created
and the server generates its id; if id is supplied, ALL fields of the existing
Annotation (ownerId, dataSetIds, name, annotationIds, description, tags, attributes,
calculations, modifiedBy) are replaced with the request contents. Callers must supply
the complete desired state on every call — fields omitted from the request are not
preserved. Use patchAnnotation() (future) for partial updates.
WARNING: full replace applies to calculations as it does to every other field. An
update that omits calculations CLEARS the annotation's existing calculations.
Calculations are created and replaced through this method — there is no
saveCalculations(). The response returns calculationsId alongside annotationId when
the request carried calculations, so the addressing key used by getCalculations(),
CalculationsSpec, and ColumnProvenance is available without a further round trip.
The response may indicate rejection, an error handling the request, or a
SaveAnnotationResult with the id of the created or updated Annotation.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getAnnotation(self, request, context):
"""
getAnnotation()
Retrieve a single Annotation by id, with its Calculations content populated inline as a
one-hop convenience for the common "open this annotation" case. This is the only
method that returns calculations content within an Annotation; queryAnnotations()
returns calculationsId only.
Associated DataSets are returned as ids (dataSetIds), not content; use getDataSet() or
queryDataSets() with an IdCriterion to retrieve them.
The response may indicate rejection, an error handling the request, or a
GetAnnotationResult containing the matching record. If no Annotation exists with the
specified id, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def queryAnnotations(self, request, context):
"""
queryAnnotations(): Unary (non-streaming) Annotations query.
Query Annotation records using structured search criteria. Client sends a single
QueryAnnotationsRequest and receives a single QueryAnnotationsResponse.
Results carry references, not embedded content: each returned Annotation has
dataSetIds and calculationsId, and neither dataset content nor calculations content is
included. Retrieve dataset content with a single queryDataSets() call whose
IdCriterion lists the ids gathered across the returned annotations, and calculations
content with getCalculations() or getAnnotation().
Pagination: limit sets the maximum number of records in a page; an unset or zero limit
means a server-configured default page size, NOT an unbounded result. Clients must
follow nextPageToken to retrieve all matching records. pageToken is an opaque
continuation token obtained from a previous response; a malformed token is rejected
with an ExceptionalResult.
Ordering: results are ordered by id ascending. The id is unique, which makes paging
stable, and is approximately insertion order. Ordering is part of this method's
contract — paging is only well defined under a deterministic sort.
The response may indicate rejection, an error in handling, or otherwise contains the
Annotations matching the query criteria. A query matching no data returns an empty
result, not an ExceptionalResult.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteAnnotation(self, request, context):
"""
deleteAnnotation()
Delete the Annotation with the specified id. The Annotation's Calculations, if any,
are deleted with it — their lifecycle belongs to the owning Annotation.
Unlike deleteDataSet(), this delete is NOT blocked by incoming references. Other
Annotations listing this annotation's id in annotationIds, and
ColumnProvenance.derivedFrom links naming its calculations, are soft associations and
are permitted to dangle. A soft link that resolves to nothing means the referenced
record was deleted, and readers must tolerate it.
The response may indicate rejection, an error handling the request, or a
DeleteAnnotationResult confirming the id of the deleted record.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def patchAnnotation(self, request, context):
"""
patchAnnotation()
Partial update of an existing Annotation. Allows individual fields (dataSetIds, name,
annotationIds, description, tags, attributes, calculations, modifiedBy) to be updated
without replacing the entire record, unlike the full-replace semantics of
saveAnnotation().
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release. Field mask design is deferred.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getCalculations(self, request, context):
"""
------------------- Calculations Retrieval ---------------------------
getCalculations()
Retrieve a single Calculations object by id, without loading the owning Annotation's
descriptive payload. This is the click-through path: list annotations, pick one, then
fetch exactly its calculations using the calculationsId the listing returned.
Obtain calculationsId from SaveAnnotationResult, from Annotation.calculationsId in
query or get results, or from a ColumnProvenance.CalculationsColumn provenance link.
Calculations have no save, delete, or query method of their own, and the asymmetry is
deliberate: they are written and replaced through saveAnnotation(), their lifecycle
belongs to the owning Annotation (deleteAnnotation() removes them), and discovery goes
through queryAnnotations(). Only retrieval needs a standalone path, because a client
that already holds a calculationsId should not have to fetch an annotation to use it.
The response may indicate rejection, an error handling the request, or a
GetCalculationsResult containing the matching record. If no Calculations object
exists with the specified id, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def exportData(self, request, context):
"""
------------------- Export ---------------------------
exportData(): Export data to common file formats.
This RPC is used by clients to export archived PV data and/or Annotation Calculations
to file. Client sends a single ExportDataRequest specifying the data to be exported
and the desired output file format, and receives a single response. The response may
indicate a problem handling the request, or otherwise contains details about the
exported file including the path and optional (if configured) URL for accessing the
file.
Data to export is specified by any combination of a saved DataSet (dataSetId), inline
ad-hoc DataBlocks (dataBlocks), and Calculations (calculationsSpec). At least one must
be supplied; a request specifying none is rejected. See ExportDataRequest.
Output format restriction: the tabular formats (CSV, XLSX) can only represent scalar
columns. A DataSet or Calculations object containing array, image, or struct columns
can be exported to HDF5, but a request to export it as CSV or XLSX is rejected.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def savePvMetadata(self, request, context):
"""
savePvMetadata()
Create or replace the metadata record for the specified PV.
Full replace (upsert) semantics: if a record does not exist it is created;
if a record already exists, ALL fields (aliases, tags, attributes,
description, modifiedBy) are replaced with the request contents.
Callers must supply the complete desired state on every call — fields
omitted from the request are not preserved. Use patchPvMetadata()
(future) for partial updates.
The response may indicate rejection, an error handling the request, or
successful handling of the request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def queryPvMetadata(self, request, context):
"""
queryPvMetadata()
Query PV metadata records using structured search criteria.
Pagination: limit sets the maximum number of records in a page; an unset or zero limit
means a server-configured default page size, NOT an unbounded result. Clients must
follow nextPageToken to retrieve all matching records. pageToken is an opaque
continuation token obtained from a previous response; a malformed token is rejected
with an ExceptionalResult.
Ordering: results are ordered by pvName ascending. pvName is unique, which makes
paging stable. Ordering is part of this method's contract — paging is only well
defined under a deterministic sort.
The response may indicate rejection, an error handling the request, or
a PvMetadataResult containing the matching records and pagination token.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getPvMetadata(self, request, context):
"""
getPvMetadata()
Retrieve a single PV metadata record by canonical PV name or alias.
Provided as a convenience over queryPvMetadata() for the common
single-record lookup case.
The response may indicate rejection, an error handling the request, or
a GetPvMetadataResponse containing the matching record. If no record
is found for the specified name or alias, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def patchPvMetadata(self, request, context):
"""
patchPvMetadata()
Partial update of an existing PV metadata record. Allows individual
fields (aliases, tags, attributes, description, modifiedBy) to be updated
without replacing the entire record, unlike the full-replace semantics
of savePvMetadata().
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release. Field mask design is deferred.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deletePvMetadata(self, request, context):
"""
deletePvMetadata()
Delete the metadata record for the specified canonical PV name or alias.
The response may indicate rejection, an error handling the request, or
a DeletePvMetadataResult confirming the name of the deleted record.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def bulkSavePvMetadata(self, request, context):
"""
bulkSavePvMetadata()
Bulk create or replace multiple PV metadata records in a single request.
Each record uses the same full-replace upsert semantics as savePvMetadata().
Intended for large initial imports or bulk synchronization use cases.
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard bulk-write pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def saveConfiguration(self, request, context):
"""
------------------- Configuration Definition CRUD ---------------------------
saveConfiguration()
Create or replace the metadata record for the specified machine configuration.
Full replace (upsert) semantics: if a record does not exist it is created;
if a record already exists, ALL fields (category, description,
parentConfigurationName, tags, attributes, modifiedBy) are replaced with
the request contents. Callers must supply the complete desired state on
every call — fields omitted from the request are not preserved.
Use patchConfiguration() (future) for partial updates.
The response may indicate rejection, an error handling the request, or
successful handling of the request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getConfiguration(self, request, context):
"""
getConfiguration()
Retrieve a single Configuration record by configurationName.
Provided as a convenience over queryConfigurations() for the common
single-record lookup case.
The response may indicate rejection, an error handling the request, or
a GetConfigurationResult containing the matching record. If no record
is found, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def queryConfigurations(self, request, context):
"""
queryConfigurations()
Query Configuration records using structured search criteria.
Pagination: limit sets the maximum number of records in a page; an unset or zero limit
means a server-configured default page size, NOT an unbounded result. Clients must
follow nextPageToken to retrieve all matching records. pageToken is an opaque
continuation token obtained from a previous response; a malformed token is rejected
with an ExceptionalResult.
Ordering: results are ordered by configurationName ascending. configurationName is
unique, which makes paging stable. Ordering is part of this method's contract —
paging is only well defined under a deterministic sort.
The response may indicate rejection, an error handling the request, or
a QueryConfigurationsResult containing the matching records and pagination token.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteConfiguration(self, request, context):
"""
deleteConfiguration()
Delete the Configuration record for the specified configurationName.
The request is rejected if ConfigurationActivation records exist for the
configuration; delete associated activations first.
The response may indicate rejection, an error handling the request, or
a DeleteConfigurationResult confirming the name of the deleted record.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def patchConfiguration(self, request, context):
"""
patchConfiguration()
Partial update of an existing Configuration record. Allows individual
fields to be updated without replacing the entire record, unlike the
full-replace semantics of saveConfiguration().
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def bulkSaveConfiguration(self, request, context):
"""
bulkSaveConfiguration()
Bulk create or replace multiple Configuration records in a single request.
Each record uses the same full-replace upsert semantics as saveConfiguration().
Intended for large initial imports or bulk synchronization use cases.
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard bulk-write pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def saveConfigurationActivation(self, request, context):
"""
------------------- Configuration Activation CRUD ---------------------------
saveConfigurationActivation()
Create or replace an activation record indicating the time interval during
which a Configuration was active.
Full replace (upsert) semantics: if a record does not exist it is created;
if a record already exists (matched by clientActivationId, or by composite
key configurationName + startTime if clientActivationId is absent), ALL
fields are replaced with the request contents. Callers must supply the
complete desired state on every call — fields omitted from the request are
not preserved. Use patchConfigurationActivation() (future) for partial updates.
To close an open-ended activation, call saveConfigurationActivation() with
endTime set to the desired close time.
The response may indicate rejection, an error handling the request, or
successful handling of the request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getConfigurationActivation(self, request, context):
"""
getConfigurationActivation()
Retrieve a single ConfigurationActivation record by clientActivationId or
composite key (configurationName + startTime).
The response may indicate rejection, an error handling the request, or
a GetConfigurationActivationResult containing the matching record. If no
record is found, an ExceptionalResult is returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def queryConfigurationActivations(self, request, context):
"""
queryConfigurationActivations()
Query ConfigurationActivation records using structured search criteria.
Pagination: limit sets the maximum number of records in a page; an unset or zero limit
means a server-configured default page size, NOT an unbounded result. Clients must
follow nextPageToken to retrieve all matching records. pageToken is an opaque
continuation token obtained from a previous response; a malformed token is rejected
with an ExceptionalResult.
Ordering: results are ordered by startTime ascending, then configurationName
ascending, then record id ascending. startTime alone is not unique, and the
tiebreakers are what make paging stable across records sharing a start time.
Ordering is part of this method's contract — paging is only well defined under a
deterministic sort.
The response may indicate rejection, an error handling the request, or
a QueryConfigurationActivationsResult containing the matching records and
pagination token.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteConfigurationActivation(self, request, context):
"""
deleteConfigurationActivation()
Delete a ConfigurationActivation record by clientActivationId or composite
key (configurationName + startTime).
The response may indicate rejection, an error handling the request, or
a DeleteConfigurationActivationResult confirming the ID of the deleted record.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def patchConfigurationActivation(self, request, context):
"""
patchConfigurationActivation()
Partial update of an existing ConfigurationActivation record. Allows
individual fields to be updated without replacing the entire record, unlike
the full-replace semantics of saveConfigurationActivation().
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def bulkSaveConfigurationActivation(self, request, context):
"""
bulkSaveConfigurationActivation()
Bulk create or replace multiple ConfigurationActivation records in a single
request. Each record uses the same full-replace upsert semantics as
saveConfigurationActivation(). Intended for bulk loading of activation
records from operational calendars.
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard bulk-write pattern for metadata APIs in this service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getActiveConfigurations(self, request, context):
"""
------------------- Active Configuration Query ---------------------------
getActiveConfigurations()
Returns all ConfigurationActivation records in effect at the specified
timestamp, i.e., records where:
startTime <= timestamp AND (endTime is absent OR endTime > timestamp)
timestamp is required. Requests with an absent (zero-value) timestamp
are rejected with an ExceptionalResult.
An empty result (no active configurations at the specified time) is
returned as a GetActiveConfigurationsResult with an empty list, not
an ExceptionalResult.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def saveSampleStatuses(self, request, context):
"""
------------------- Sample Status ---------------------------
saveSampleStatuses()
Batch upsert of sample statuses, assigning status codes to individual PV samples at
specific timestamps. The request contains one or more SampleStatusFrames, each carrying a
(domain, layer), a DataTimestamps time axis, and one SampleStatusColumn per PV.
Upsert semantics are per individual sample status, keyed by (pvName, timestamp, domain,
layer): an entry REPLACES any existing status with the same key IN FULL — including the
optional confidence and reasons — and creates a new status otherwise. Statuses at other
timestamps are unaffected — to cleanly re-label a time range (e.g., after re-running an ML
model whose output timestamps changed), first call deleteSampleStatuses() for the range,
then save.
Frames are processed in request order. If the same identity key appears in more than one
frame of a request, the later frame's status wins (consistent with upsert across requests:
last writer wins), and savedCount counts each write.
The request is validated and rejected as a whole (no partial save on rejection). If an
error is encountered while writing a valid request, an ExceptionalResult with
RESULT_STATUS_ERROR is returned and some frames may have been persisted.
The response may indicate rejection, an error handling the request, or successful
handling of the request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def querySampleStatuses(self, request, context):
"""
querySampleStatuses(): Unary sample status query.
Query sample statuses over a time range, optionally filtered by PV name, domain, and
layer (an empty pvNames list matches all PVs — e.g., to enumerate which PVs a layer has
labeled). Returns one page of SampleStatusBucket objects; additional pages are retrieved
by resubmitting the request with the nextPageToken from the previous response as
pageToken. A malformed pageToken is rejected with an ExceptionalResult.
Ordering: results are ordered by pvName ascending, then domain, then layer, then
bucket start time. Ordering is part of this method's contract — paging is only well
defined under a deterministic sort.
Bucket selection follows the TimeRange overlap test, and boundary buckets are returned
WHOLE (not trimmed) — matching DpQueryService.queryBuckets() — so a returned bucket may
contain individual statuses outside [beginTime, endTime).
A query matching no data returns an empty result, not an ExceptionalResult.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def querySampleStatusesStream(self, request, context):
"""
querySampleStatusesStream(): Server-streaming sample status query.
Streams QuerySampleStatusesResponse messages until the result is exhausted, the client
cancels, or an error occurs. Paging semantics match DpQueryService.queryBucketsStream():
limit controls the chunk size of each streamed response; streaming is fire-and-consume —
the server streams to completion and does not emit continuation tokens (nextPageToken is
empty on every streamed message); pageToken must be empty (a non-empty token is rejected
with an ExceptionalResult). Use unary querySampleStatuses() when resumable paging is
required.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteSampleStatuses(self, request, context):
"""
deleteSampleStatuses()
Delete sample statuses within the half-open time range [beginTime, endTime), for a single
required (domain, layer). pvNames restricts the delete to the listed PVs; an empty
pvNames list is a deliberate wildcard deleting the (domain, layer)'s statuses for ALL PVs
in the range. Intended for cleanly re-labeling a range (delete then save) and for
retiring an obsolete producer's statuses (wide time range + empty pvNames).
Unlike query — which returns boundary buckets whole — deletion is EXACT at the sample
axis: only statuses whose timestamps fall within the range are removed; the server splits
or rewrites boundary storage buckets as needed.
domain and layer are required, scoping each delete to a single producer stream.
A delete matching no statuses is a successful result with deletedCount = 0, not an
ExceptionalResult.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def saveSampleStatusDomain(self, request, context):
"""
saveSampleStatusDomain()
Create or replace a sample status domain registry record, documenting the status code
mappings (code -> label / description) for a domain so that consumers can interpret status
codes without out-of-band knowledge.
NOT YET IMPLEMENTED — calling this method returns an error response.
Planned for a future release.
This method is defined now to reserve its name and message shapes as part
of the standard CRUD pattern for metadata APIs in this service.
"""