pyegeria 0.6.2__py3-none-any.whl → 0.6.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. examples/widgets/cli/__init__.py +12 -0
  2. examples/widgets/cli/egeria.py +45 -45
  3. examples/widgets/cli/egeria_cat.py +9 -9
  4. examples/widgets/cli/{egeria_per.py → egeria_my.py} +4 -4
  5. examples/widgets/cli/egeria_ops.py +13 -13
  6. examples/widgets/cli/egeria_tech.py +3 -3
  7. examples/widgets/cli/ops_config.py +2 -0
  8. pyegeria/feedback_manager_omvs.py +4813 -0
  9. {pyegeria-0.6.2.dist-info → pyegeria-0.6.3.dist-info}/METADATA +1 -1
  10. pyegeria-0.6.3.dist-info/RECORD +83 -0
  11. pyegeria-0.6.3.dist-info/entry_points.txt +42 -0
  12. pyegeria-0.6.2.dist-info/RECORD +0 -82
  13. pyegeria-0.6.2.dist-info/entry_points.txt +0 -42
  14. /examples/widgets/{catalog_user → cat}/README.md +0 -0
  15. /examples/widgets/{catalog_user → cat}/__init__.py +0 -0
  16. /examples/widgets/{catalog_user → cat}/get_asset_graph.py +0 -0
  17. /examples/widgets/{catalog_user → cat}/get_collection.py +0 -0
  18. /examples/widgets/{catalog_user → cat}/get_tech_type_elements.py +0 -0
  19. /examples/widgets/{catalog_user → cat}/get_tech_type_template.py +0 -0
  20. /examples/widgets/{catalog_user → cat}/list_assets.py +0 -0
  21. /examples/widgets/{catalog_user → cat}/list_glossary.py +0 -0
  22. /examples/widgets/{catalog_user → cat}/list_projects.py +0 -0
  23. /examples/widgets/{catalog_user → cat}/list_tech_types.py +0 -0
  24. /examples/widgets/{catalog_user → cat}/list_todos.py +0 -0
  25. /examples/widgets/{personal → my}/README.md +0 -0
  26. /examples/widgets/{personal → my}/__init__.py +0 -0
  27. /examples/widgets/{personal → my}/list_my_profile.py +0 -0
  28. /examples/widgets/{personal → my}/list_my_roles.py +0 -0
  29. /examples/widgets/{personal → my}/monitor_my_todos.py +0 -0
  30. /examples/widgets/{personal → my}/monitor_open_todos.py +0 -0
  31. /examples/widgets/{personal → my}/my_profile_actions.py +0 -0
  32. /examples/widgets/{operational → ops}/README.md +0 -0
  33. /examples/widgets/{operational → ops}/__init__.py +0 -0
  34. /examples/widgets/{operational → ops}/engine_actions.py +0 -0
  35. /examples/widgets/{operational → ops}/integration_daemon_actions.py +0 -0
  36. /examples/widgets/{operational → ops}/list_catalog_targets.py +0 -0
  37. /examples/widgets/{operational → ops}/load_archive.py +0 -0
  38. /examples/widgets/{operational → ops}/monitor_asset_events.py +0 -0
  39. /examples/widgets/{operational → ops}/monitor_coco_status.py +0 -0
  40. /examples/widgets/{operational → ops}/monitor_engine_activity.py +0 -0
  41. /examples/widgets/{operational → ops}/monitor_gov_eng_status.py +0 -0
  42. /examples/widgets/{operational → ops}/monitor_integ_daemon_status.py +0 -0
  43. /examples/widgets/{operational → ops}/monitor_platform_status.py +0 -0
  44. /examples/widgets/{operational → ops}/monitor_server_list.py +0 -0
  45. /examples/widgets/{operational → ops}/monitor_server_status.py +0 -0
  46. /examples/widgets/{operational → ops}/refresh_integration_daemon.py +0 -0
  47. /examples/widgets/{operational → ops}/restart_integration_daemon.py +0 -0
  48. {pyegeria-0.6.2.dist-info → pyegeria-0.6.3.dist-info}/LICENSE +0 -0
  49. {pyegeria-0.6.2.dist-info → pyegeria-0.6.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,4813 @@
1
+ """PDX-License-Identifier: Apache-2.0
2
+ Copyright Contributors to the ODPi Egeria project.
3
+
4
+ This module contains an initial version of the feedback_manager_omvs
5
+ module.
6
+
7
+ """
8
+
9
+ import json
10
+ from datetime import datetime
11
+ import asyncio
12
+
13
+ # import json
14
+ from pyegeria._client import Client, max_paging_size
15
+ from pyegeria._globals import enable_ssl_check
16
+ from pyegeria._validators import (
17
+ validate_name,
18
+ validate_guid,
19
+ validate_url,
20
+ validate_search_string,
21
+ )
22
+ from pyegeria.utils import body_slimmer
23
+
24
+
25
+ def jprint(info, comment=None):
26
+ if comment:
27
+ print(comment)
28
+ print(json.dumps(info, indent=2))
29
+
30
+
31
+ def query_seperator(current_string):
32
+ if current_string == "":
33
+ return "?"
34
+ else:
35
+ return "&"
36
+
37
+
38
+ "params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to the query string"
39
+
40
+
41
+ def query_string(params):
42
+ result = ""
43
+ for i in range(len(params)):
44
+ if params[i][1] is not None:
45
+ result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
46
+ return result
47
+
48
+
49
+ def base_path(fm_client, view_server: str):
50
+ return f"{fm_client.platform_url}/servers/{view_server}/api/open-metadata/feedback-manager"
51
+
52
+
53
+ def extract_relationships_plus(element):
54
+ type_name = element["relatedElement"]["type"]["typeName"]
55
+ guid = element["relationshipHeader"]["guid"]
56
+ properties = element["relationshipProperties"]["propertiesAsStrings"]
57
+ name = element["relatedElement"]["uniqueName"]
58
+ return {"name": name, "typeName": type_name, "guid": guid, "properties": properties}
59
+
60
+
61
+ def extract_related_elements_list(element_list):
62
+ return [extract_relationships_plus(element) for element in element_list]
63
+
64
+
65
+ def related_elements_response(response: dict, detailed_response: bool):
66
+ if detailed_response:
67
+ return response
68
+ else:
69
+ return extract_related_elements_list(response["elementList"])
70
+
71
+
72
+ def element_properties_plus(element):
73
+ props_plus = element["properties"]
74
+ props_plus.update({"guid": element["elementHeader"]["guid"]})
75
+ props_plus.update({"versions": element["elementHeader"]["versions"]})
76
+ return props_plus
77
+
78
+
79
+ def element_property_plus_list(element_list):
80
+ return [element_properties_plus(element) for element in element_list]
81
+
82
+
83
+ def element_response(response: dict, element_type: str, detailed_response: bool):
84
+ if detailed_response:
85
+ return response
86
+ else:
87
+ return element_properties_plus(response[element_type])
88
+
89
+
90
+ def elements_response(response: dict, element_type: str, detailed_response: bool):
91
+ if detailed_response:
92
+ return response
93
+ else:
94
+ return element_property_plus_list(response[element_type])
95
+
96
+
97
+ class FeedbackManager(Client):
98
+ """FeedbackManager is a class that extends the Client class. It
99
+ provides methods to CRUD tags, comments and likes for managed
100
+ elements.
101
+
102
+ Attributes:
103
+
104
+ server_name: str
105
+ The name of the View Server to connect to.
106
+ platform_url : str
107
+ URL of the server platform to connect to
108
+ user_id : str
109
+ The identity of the user calling the method - this sets a
110
+ default optionally used by the methods when the user
111
+ doesn't pass the user_id on a method call.
112
+ user_pwd: str
113
+ The password associated with the user_id. Defaults to None
114
+ verify_flag: bool
115
+ Flag to indicate if SSL Certificates should be verified in the HTTP
116
+ requests.
117
+ Defaults to False.
118
+
119
+ """
120
+
121
+ def __init__(
122
+ self,
123
+ server_name: str,
124
+ platform_url: str,
125
+ token: str = None,
126
+ user_id: str = None,
127
+ user_pwd: str = None,
128
+ verify_flag: bool = enable_ssl_check,
129
+ sync_mode: bool = True,
130
+ ):
131
+ self.admin_command_root: str
132
+ Client.__init__(
133
+ self,
134
+ server_name,
135
+ platform_url,
136
+ user_id=user_id,
137
+ token=token,
138
+ async_mode=sync_mode,
139
+ )
140
+
141
+ async def _async_add_comment_reply(
142
+ self,
143
+ element_guid: str,
144
+ comment_guid: str,
145
+ server_name: str = None,
146
+ is_public: bool = True,
147
+ body: dict = {},
148
+ view_service_url_marker: str = None,
149
+ access_service_url_marker: str = None,
150
+ ) -> dict | str:
151
+ """
152
+ Adds a reply to a comment.
153
+
154
+ Parameters
155
+ ----------
156
+ elementGUID
157
+ - String - unique id for the anchor element.
158
+ commentGUID
159
+ - String - unique id for an existing comment. Used to add a reply to a comment.
160
+ serverName
161
+ - name of the server instances for this request.
162
+ isPublic
163
+ - is this visible to other people
164
+ requestBody
165
+ - containing type of comment enum and the text of the comment.
166
+ viewServiceURLMarker
167
+ - optional view service URL marker (overrides accessServiceURLMarker)
168
+ accessServiceURLMarker
169
+ - optional access service URL marker used to identify which back end service to call
170
+
171
+ Returns
172
+ -------
173
+ ElementGUID
174
+
175
+ Raises
176
+ ------
177
+ InvalidParameterException
178
+ one of the parameters is null or invalid or
179
+ PropertyServerException
180
+ There is a problem adding the element properties to the metadata repository or
181
+ UserNotAuthorizedException
182
+ the requesting user is not authorized to issue this request.
183
+ """
184
+ if server_name is None:
185
+ server_name = self.server_name
186
+
187
+ possible_query_params = query_string(
188
+ [
189
+ ("isPublic", is_public),
190
+ ("viewServiceUrlMarker", view_service_url_marker),
191
+ ("accessServiceUrlMarker", access_service_url_marker),
192
+ ]
193
+ )
194
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/comments/{comment_guid}/replies{possible_query_params}"
195
+ response = await self._async_make_request("POST", url, body)
196
+ return response.json()
197
+
198
+ def add_comment_reply(
199
+ self,
200
+ element_guid: str,
201
+ comment_guid: str,
202
+ server_name: str = None,
203
+ is_public: bool = True,
204
+ body: dict = {},
205
+ view_service_url_marker: str = None,
206
+ access_service_url_marker: str = None,
207
+ ) -> dict | str:
208
+ """
209
+ Adds a reply to a comment.
210
+
211
+ Parameters
212
+ ----------
213
+ elementGUID
214
+ - String - unique id for the anchor element.
215
+ commentGUID
216
+ - String - unique id for an existing comment. Used to add a reply to a comment.
217
+ serverName
218
+ - name of the server instances for this request.
219
+ isPublic
220
+ - is this visible to other people
221
+ requestBody
222
+ - containing type of comment enum and the text of the comment.
223
+ viewServiceURLMarker
224
+ - optional view service URL marker (overrides accessServiceURLMarker)
225
+ accessServiceURLMarker
226
+ - optional access service URL marker used to identify which back end service to call
227
+
228
+ Returns
229
+ -------
230
+ ElementGUID
231
+
232
+ Raises
233
+ ------
234
+ InvalidParameterException
235
+ one of the parameters is null or invalid or
236
+ PropertyServerException
237
+ There is a problem adding the element properties to the metadata repository or
238
+ UserNotAuthorizedException
239
+ the requesting user is not authorized to issue this request.
240
+ """
241
+ loop = asyncio.get_event_loop()
242
+ response = loop.run_until_complete(
243
+ self._async_add_comment_reply(
244
+ element_guid,
245
+ comment_guid,
246
+ server_name,
247
+ is_public,
248
+ body,
249
+ view_service_url_marker,
250
+ access_service_url_marker,
251
+ )
252
+ )
253
+ return response
254
+
255
+ loop = asyncio.get_event_loop()
256
+ response = loop.run_until_complete(
257
+ self._async_add_comment_reply(server_name, body)
258
+ )
259
+ return response
260
+
261
+ #
262
+ ## add_comment_to_element implementation
263
+ #
264
+
265
+ async def _async_add_comment_to_element(
266
+ self,
267
+ element_guid: str,
268
+ server_name: str = None,
269
+ is_public: bool = True,
270
+ body: dict = {},
271
+ view_service_url_marker: str = None,
272
+ access_service_url_marker: str = None,
273
+ ) -> dict | str:
274
+ """
275
+ Creates a comment and attaches it to an element.
276
+
277
+ Parameters
278
+ ----------
279
+ serverName
280
+ - name of the server instances for this request.
281
+ elementGUID
282
+ - String - unique id for the element.
283
+ isPublic
284
+ - is this visible to other people
285
+ requestBody
286
+ - containing type of comment enum and the text of the comment.
287
+ viewServiceURLMarker
288
+ - optional view service URL marker (overrides accessServiceURLMarker)
289
+ accessServiceURLMarker
290
+ - optional access service URL marker used to identify which back end service to call
291
+
292
+ Returns
293
+ -------
294
+ ElementGUID
295
+
296
+ Raises
297
+ ------
298
+ InvalidParameterException
299
+ one of the parameters is null or invalid or
300
+ PropertyServerException
301
+ There is a problem adding the element properties to the metadata repository or
302
+ UserNotAuthorizedException
303
+ the requesting user is not authorized to issue this request.
304
+ """
305
+ if server_name is None:
306
+ server_name = self.server_name
307
+
308
+ possible_query_params = query_string(
309
+ [
310
+ ("isPublic", is_public),
311
+ ("viewServiceUrlMarker", view_service_url_marker),
312
+ ("accessServiceUrlMarker", access_service_url_marker),
313
+ ]
314
+ )
315
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/comments{possible_query_params}"
316
+
317
+ response = await self._async_make_request("POST", url, body)
318
+ return response.json()
319
+
320
+ def add_comment_to_element(
321
+ self,
322
+ element_guid: str,
323
+ server_name: str = None,
324
+ is_public: bool = True,
325
+ body: dict = {},
326
+ view_service_url_marker: str = None,
327
+ access_service_url_marker: str = None,
328
+ ) -> dict | str:
329
+ """
330
+ Creates a comment and attaches it to an element.
331
+
332
+ Parameters
333
+ ----------
334
+ serverName
335
+ - name of the server instances for this request.
336
+ elementGUID
337
+ - String - unique id for the element.
338
+ isPublic
339
+ - is this visible to other people
340
+ viewServiceURLMarker
341
+ - optional view service URL marker (overrides accessServiceURLMarker)
342
+ accessServiceURLMarker
343
+ - optional access service URL marker used to identify which back end service to call
344
+ requestBody
345
+ - containing type of comment enum and the text of the comment.
346
+
347
+ Returns
348
+ -------
349
+ ElementGUID
350
+
351
+ Raises
352
+ ------
353
+ InvalidParameterException
354
+ one of the parameters is null or invalid or
355
+ PropertyServerException
356
+ There is a problem adding the element properties to the metadata repository or
357
+ UserNotAuthorizedException
358
+ the requesting user is not authorized to issue this request.
359
+ """
360
+
361
+ loop = asyncio.get_event_loop()
362
+ response = loop.run_until_complete(
363
+ self._async_add_comment_to_element(
364
+ element_guid,
365
+ server_name,
366
+ is_public,
367
+ body,
368
+ view_service_url_marker,
369
+ access_service_url_marker,
370
+ )
371
+ )
372
+ return response
373
+
374
+ #
375
+ ## add_like_to_element implementation
376
+ #
377
+
378
+ async def _async_add_like_to_element(
379
+ self,
380
+ element_guid: str,
381
+ server_name: str = None,
382
+ is_public: bool = True,
383
+ body: dict = {},
384
+ view_service_url_marker: str = None,
385
+ access_service_url_marker: str = None,
386
+ ) -> dict | str:
387
+ """
388
+ Creates a "like" object and attaches it to an element.
389
+
390
+ Parameters
391
+ ----------
392
+ serverName
393
+ - name of the server instances for this request.
394
+ elementGUID
395
+ - String - unique id for the element.
396
+ isPublic
397
+ - is this visible to other people
398
+ viewServiceURLMarker
399
+ - optional view service URL marker (overrides accessServiceURLMarker)
400
+ accessServiceURLMarker
401
+ - optional access service URL marker used to identify which back end service to call
402
+ requestBody
403
+ - optional effective time
404
+
405
+ Returns
406
+ -------
407
+ Void
408
+
409
+ Raises
410
+ ------
411
+ InvalidParameterException
412
+ one of the parameters is null or invalid or
413
+ PropertyServerException
414
+ There is a problem adding the element properties to the metadata repository or
415
+ UserNotAuthorizedException
416
+ the requesting user is not authorized to issue this request.
417
+ """
418
+ if server_name is None:
419
+ server_name = self.server_name
420
+
421
+ possible_query_params = query_string(
422
+ [
423
+ ("isPublic", is_public),
424
+ ("viewServiceUrlMarker", view_service_url_marker),
425
+ ("accessServiceUrlMarker", access_service_url_marker),
426
+ ]
427
+ )
428
+
429
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/likes{possible_query_params}"
430
+
431
+ response = await self._async_make_request("POST", url, body)
432
+ return response.json()
433
+
434
+ def add_like_to_element(
435
+ self,
436
+ element_guid: str,
437
+ server_name: str = None,
438
+ is_public: bool = True,
439
+ body: dict = {},
440
+ view_service_url_marker: str = None,
441
+ access_service_url_marker: str = None,
442
+ ) -> dict | str:
443
+ """
444
+ Creates a "like" object and attaches it to an element.
445
+
446
+ Parameters
447
+ ----------
448
+ serverName
449
+ - name of the server instances for this request.
450
+ elementGUID
451
+ - String - unique id for the element.
452
+ isPublic
453
+ - is this visible to other people
454
+ viewServiceURLMarker
455
+ - optional view service URL marker (overrides accessServiceURLMarker)
456
+ accessServiceURLMarker
457
+ - optional access service URL marker used to identify which back end service to call
458
+ requestBody
459
+ - optional effective time
460
+
461
+ Returns
462
+ -------
463
+ Void
464
+
465
+ Raises
466
+ ------
467
+ InvalidParameterException
468
+ one of the parameters is null or invalid or
469
+ PropertyServerException
470
+ There is a problem adding the element properties to the metadata repository or
471
+ UserNotAuthorizedException
472
+ the requesting user is not authorized to issue this request.
473
+ """
474
+ loop = asyncio.get_event_loop()
475
+ response = loop.run_until_complete(
476
+ self._async_add_like_to_element(
477
+ element_guid,
478
+ server_name,
479
+ is_public,
480
+ body,
481
+ view_service_url_marker,
482
+ access_service_url_marker,
483
+ )
484
+ )
485
+ return response
486
+
487
+ #
488
+ ## add_rating_to_element implementation
489
+ #
490
+
491
+ async def _async_add_rating_to_element(
492
+ self,
493
+ element_guid: str,
494
+ server_name: str = None,
495
+ is_public: bool = True,
496
+ body: dict = {},
497
+ view_service_url_marker: str = None,
498
+ access_service_url_marker: str = None,
499
+ ) -> dict | str:
500
+ """
501
+ Adds a star rating and optional review text to the element.
502
+
503
+ Parameters
504
+ ----------
505
+ serverName
506
+ - name of the server instances for this request.
507
+ elementGUID
508
+ - String - unique id for the element.
509
+ isPublic
510
+ - is this visible to other people
511
+ viewServiceURLMarker
512
+ - optional view service URL marker (overrides accessServiceURLMarker)
513
+ accessServiceURLMarker
514
+ - optional access service URL marker used to identify which back end service to call
515
+ requestBody
516
+ - containing the StarRating and user review of element.
517
+
518
+ Returns
519
+ -------
520
+ ElementGUID
521
+
522
+ Raises
523
+ ------
524
+ InvalidParameterException
525
+ one of the parameters is null or invalid or
526
+ PropertyServerException
527
+ There is a problem adding the element properties to the metadata repository or
528
+ UserNotAuthorizedException
529
+ the requesting user is not authorized to issue this request.
530
+ """
531
+ if server_name is None:
532
+ server_name = self.server_name
533
+
534
+ possible_query_params = query_string(
535
+ [
536
+ ("isPublic", is_public),
537
+ ("viewServiceUrlMarker", view_service_url_marker),
538
+ ("accessServiceUrlMarker", access_service_url_marker),
539
+ ]
540
+ )
541
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/ratings{possible_query_params}"
542
+
543
+ response = await self._async_make_request("POST", url, body)
544
+ return response.json()
545
+
546
+ def add_rating_to_element(
547
+ self,
548
+ element_guid: str,
549
+ server_name: str = None,
550
+ is_public: bool = True,
551
+ body: dict = {},
552
+ view_service_url_marker: str = None,
553
+ access_service_url_marker: str = None,
554
+ ) -> dict | str:
555
+ """
556
+ Adds a star rating and optional review text to the element.
557
+
558
+ Parameters
559
+ ----------
560
+ serverName
561
+ - name of the server instances for this request.
562
+ elementGUID
563
+ - String - unique id for the element.
564
+ isPublic
565
+ - is this visible to other people
566
+ viewServiceURLMarker
567
+ - optional view service URL marker (overrides accessServiceURLMarker)
568
+ accessServiceURLMarker
569
+ - optional access service URL marker used to identify which back end service to call
570
+ requestBody
571
+ - containing the StarRating and user review of element.
572
+
573
+ Returns
574
+ -------
575
+ ElementGUID
576
+
577
+ Raises
578
+ ------
579
+ InvalidParameterException
580
+ one of the parameters is null or invalid or
581
+ PropertyServerException
582
+ There is a problem adding the element properties to the metadata repository or
583
+ UserNotAuthorizedException
584
+ the requesting user is not authorized to issue this request.
585
+ """
586
+ loop = asyncio.get_event_loop()
587
+ response = loop.run_until_complete(
588
+ self._async_add_rating_to_element(
589
+ element_guid,
590
+ server_name,
591
+ is_public,
592
+ body,
593
+ view_service_url_marker,
594
+ access_service_url_marker,
595
+ )
596
+ )
597
+ return response
598
+
599
+ #
600
+ ## add_tag_to_element implementation
601
+ #
602
+
603
+ async def _async_add_tag_to_element(
604
+ self,
605
+ element_guid: str,
606
+ tag_guid: str,
607
+ server_name: str = None,
608
+ is_public: bool = False,
609
+ body: dict = {},
610
+ view_service_url_marker: str = None,
611
+ access_service_url_marker: str = None,
612
+ ) -> dict | str:
613
+ """
614
+ Adds an informal tag (either private of public) to an element.
615
+
616
+ Parameters
617
+ ----------
618
+ serverName
619
+ - name of the server instances for this request.
620
+ elementGUID
621
+ - unique id for the element.
622
+ tagGUID
623
+ - unique id of the tag.
624
+ viewServiceURLMarker
625
+ - optional view service URL marker (overrides accessServiceURLMarker)
626
+ accessServiceURLMarker
627
+ - optional access service URL marker used to identify which back end service to call
628
+ requestBody
629
+ - optional effective time
630
+
631
+ Returns
632
+ -------
633
+ Void
634
+
635
+ Raises
636
+ ------
637
+ InvalidParameterException
638
+ one of the parameters is null or invalid or
639
+ PropertyServerException
640
+ There is a problem adding the element properties to the metadata repository or
641
+ UserNotAuthorizedException
642
+ the requesting user is not authorized to issue this request.
643
+ """
644
+ if server_name is None:
645
+ server_name = self.server_name
646
+
647
+ possible_query_params = query_string(
648
+ [
649
+ ("isPublic", is_public),
650
+ ("viewServiceUrlMarker", view_service_url_marker),
651
+ ("accessServiceUrlMarker", access_service_url_marker),
652
+ ]
653
+ )
654
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/tags/{tag_guid}{possible_query_params}"
655
+ response = await self._async_make_request("POST", url, body)
656
+ return response.json()
657
+
658
+ def add_tag_to_element(
659
+ self,
660
+ element_guid: str,
661
+ tag_guid: str,
662
+ server_name: str = None,
663
+ is_public: bool = False,
664
+ body: dict = {},
665
+ view_service_url_marker: str = None,
666
+ access_service_url_marker: str = None,
667
+ ) -> dict | str:
668
+ """
669
+ Adds an informal tag (either private of public) to an element.
670
+
671
+ Parameters
672
+ ----------
673
+ elementGUID
674
+ - unique id for the element.
675
+ tagGUID
676
+ - unique id of the tag.
677
+ serverName
678
+ - name of the server instances for this request.
679
+ isPublic
680
+ - is this visible to other people
681
+ requestBody
682
+ - optional effective time
683
+ viewServiceURLMarker
684
+ - optional view service URL marker (overrides accessServiceURLMarker)
685
+ accessServiceURLMarker
686
+ - optional access service URL marker used to identify which back end service to call
687
+
688
+ Returns
689
+ -------
690
+ Void
691
+
692
+ Raises
693
+ ------
694
+ InvalidParameterException
695
+ one of the parameters is null or invalid or
696
+ PropertyServerException
697
+ There is a problem adding the element properties to the metadata repository or
698
+ UserNotAuthorizedException
699
+ the requesting user is not authorized to issue this request.
700
+ """
701
+ loop = asyncio.get_event_loop()
702
+ response = loop.run_until_complete(
703
+ self._async_add_tag_to_element(
704
+ element_guid,
705
+ tag_guid,
706
+ server_name,
707
+ is_public,
708
+ body,
709
+ view_service_url_marker,
710
+ access_service_url_marker,
711
+ )
712
+ )
713
+ return response
714
+
715
+ #
716
+ ## clear_accepted_answer implementation
717
+ #
718
+
719
+ async def _async_clear_accepted_answer(
720
+ self,
721
+ question_comment_guid: str,
722
+ answer_comment_guid: str,
723
+ server_name: str = None,
724
+ body: dict = {},
725
+ view_service_url_marker: str = None,
726
+ access_service_url_marker: str = None,
727
+ ) -> dict | str:
728
+ """
729
+ Unlink a comment that contains an answer to a question posed in another comment.
730
+
731
+ Parameters
732
+ ----------
733
+ serverName
734
+ - name of the server to route the request to
735
+ questionCommentGUID
736
+ - unique identifier of the comment containing the question
737
+ answerCommentGUID
738
+ - unique identifier of the comment containing the accepted answer
739
+ viewServiceURLMarker
740
+ - optional view service URL marker (overrides accessServiceURLMarker)
741
+ accessServiceURLMarker
742
+ - optional access service URL marker used to identify which back end service to call
743
+ requestBody
744
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
745
+
746
+ Returns
747
+ -------
748
+ VoidResponse
749
+
750
+ Raises
751
+ ------
752
+ InvalidParameterException
753
+ one of the parameters is null or invalid or
754
+ PropertyServerException
755
+ There is a problem adding the element properties to the metadata repository or
756
+ UserNotAuthorizedException
757
+ the requesting user is not authorized to issue this request.
758
+ """
759
+ if server_name is None:
760
+ server_name = self.server_name
761
+
762
+ possible_query_params = query_string(
763
+ [
764
+ ("viewServiceUrlMarker", view_service_url_marker),
765
+ ("accessServiceUrlMarker", access_service_url_marker),
766
+ ]
767
+ )
768
+ url = f"{base_path(self,server_name)}/comments/questions/{question_comment_guid}/answers/{answer_comment_guid}/remove{possible_query_params}"
769
+ response = await self._async_make_request("POST", url, body)
770
+ return response.json()
771
+
772
+ def clear_accepted_answer(
773
+ self,
774
+ question_comment_guid: str,
775
+ answer_comment_guid: str,
776
+ server_name: str = None,
777
+ body: dict = {},
778
+ view_service_url_marker: str = None,
779
+ access_service_url_marker: str = None,
780
+ ) -> dict | str:
781
+ """
782
+ Unlink a comment that contains an answer to a question posed in another comment.
783
+
784
+ Parameters
785
+ ----------
786
+ serverName
787
+ - name of the server to route the request to
788
+ questionCommentGUID
789
+ - unique identifier of the comment containing the question
790
+ answerCommentGUID
791
+ - unique identifier of the comment containing the accepted answer
792
+ viewServiceURLMarker
793
+ - optional view service URL marker (overrides accessServiceURLMarker)
794
+ accessServiceURLMarker
795
+ - optional access service URL marker used to identify which back end service to call
796
+ requestBody
797
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
798
+
799
+ Returns
800
+ -------
801
+ VoidResponse
802
+
803
+ Raises
804
+ ------
805
+ InvalidParameterException
806
+ one of the parameters is null or invalid or
807
+ PropertyServerException
808
+ There is a problem adding the element properties to the metadata repository or
809
+ UserNotAuthorizedException
810
+ the requesting user is not authorized to issue this request.
811
+ """
812
+ loop = asyncio.get_event_loop()
813
+ response = loop.run_until_complete(
814
+ self._async_clear_accepted_answer(
815
+ question_comment_guid,
816
+ answer_comment_guid,
817
+ server_name,
818
+ body,
819
+ view_service_url_marker,
820
+ access_service_url_marker,
821
+ )
822
+ )
823
+ return response
824
+
825
+ #
826
+ ## create_informal_tag implementation
827
+ #
828
+
829
+ async def _async_create_informal_tag(
830
+ self,
831
+ body: dict,
832
+ server_name: str = None,
833
+ view_service_url_marker: str = None,
834
+ access_service_url_marker: str = None,
835
+ ) -> dict | str:
836
+ """
837
+ Creates a new informal tag and returns the unique identifier for it.
838
+
839
+ Parameters
840
+ ----------
841
+ serverName
842
+ - name of the server instances for this request.
843
+ viewServiceURLMarker
844
+ - optional view service URL marker (overrides accessServiceURLMarker)
845
+ accessServiceURLMarker
846
+ - optional access service URL marker used to identify which back end service to call
847
+ requestBody
848
+ - public/private flag, name of the tag and (optional) description of the tag.
849
+
850
+ Example
851
+ -------
852
+ my_new_tag_body = {
853
+ "isPrivateTag": False,
854
+ "name": "new-tag-from-python",
855
+ "description": "this tag was created using the python API"
856
+ }
857
+ response = fm_client.create_informal_tag(my_new_tag_body)
858
+ print(response)
859
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
860
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
861
+
862
+ Returns
863
+ -------
864
+ new elementGUID
865
+
866
+ Raises
867
+ ------
868
+ InvalidParameterException
869
+ one of the parameters is null or invalid or
870
+ PropertyServerException
871
+ There is a problem adding the element properties to the metadata repository or
872
+ UserNotAuthorizedException
873
+ the requesting user is not authorized to issue this request.
874
+ """
875
+ if server_name is None:
876
+ server_name = self.server_name
877
+
878
+ possible_query_params = query_string(
879
+ [
880
+ ("viewServiceUrlMarker", view_service_url_marker),
881
+ ("accessServiceUrlMarker", access_service_url_marker),
882
+ ]
883
+ )
884
+ url = f"{base_path(self,server_name)}/tags{possible_query_params}"
885
+
886
+ response = await self._async_make_request("POST", url, body)
887
+ return response.json()
888
+
889
+ def create_informal_tag(
890
+ self,
891
+ body: dict,
892
+ server_name: str = None,
893
+ view_service_url_marker: str = None,
894
+ access_service_url_marker: str = None,
895
+ ) -> dict | str:
896
+ """
897
+ Creates a new informal tag and returns the unique identifier for it.
898
+
899
+ Parameters
900
+ ----------
901
+ serverName
902
+ - name of the server instances for this request.
903
+ viewServiceURLMarker
904
+ - optional view service URL marker (overrides accessServiceURLMarker)
905
+ accessServiceURLMarker
906
+ - optional access service URL marker used to identify which back end service to call
907
+ requestBody
908
+ - public/private flag, name of the tag and (optional) description of the tag.
909
+
910
+ Example
911
+ -------
912
+ my_new_tag_body = {
913
+ "isPrivateTag": False,
914
+ "name": "new-tag-from-python",
915
+ "description": "this tag was created using the python API"
916
+ }
917
+ response = fm_client.create_informal_tag(my_new_tag_body)
918
+ print(response)
919
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
920
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
921
+
922
+ Returns
923
+ -------
924
+ new elementGUID
925
+
926
+ Raises
927
+ ------
928
+ InvalidParameterException
929
+ one of the parameters is null or invalid or
930
+ PropertyServerException
931
+ There is a problem adding the element properties to the metadata repository or
932
+ UserNotAuthorizedException
933
+ the requesting user is not authorized to issue this request.
934
+ """
935
+ loop = asyncio.get_event_loop()
936
+ response = loop.run_until_complete(
937
+ self._async_create_informal_tag(body, server_name)
938
+ )
939
+ return response
940
+
941
+ #
942
+ ## create_note implementation
943
+ #
944
+
945
+ async def _async_create_note(
946
+ self,
947
+ note_log_guid: str,
948
+ server_name: str = None,
949
+ body: dict = {},
950
+ view_service_url_marker: str = None,
951
+ access_service_url_marker: str = None,
952
+ ) -> dict | str:
953
+ """
954
+ Creates a new note for a note log and returns the unique identifier for it.
955
+
956
+ Parameters
957
+ ----------
958
+ noteLogGUID
959
+ - unique identifier of the note log
960
+ serverName
961
+ - name of the server instances for this request
962
+ requestBody
963
+ - contains the name of the tag and (optional) description of the tag
964
+ viewServiceURLMarker
965
+ - optional view service URL marker (overrides accessServiceURLMarker)
966
+ accessServiceURLMarker
967
+ - optional access service URL marker used to identify which back end service to call
968
+
969
+ Returns
970
+ -------
971
+ Guid for the note
972
+
973
+ Raises
974
+ ------
975
+ InvalidParameterException
976
+ one of the parameters is null or invalid or
977
+ PropertyServerException
978
+ There is a problem adding the element properties to the metadata repository or
979
+ UserNotAuthorizedException
980
+ the requesting user is not authorized to issue this request.
981
+ """
982
+ if server_name is None:
983
+ server_name = self.server_name
984
+
985
+ possible_query_params = query_string(
986
+ [
987
+ ("viewServiceUrlMarker", view_service_url_marker),
988
+ ("accessServiceUrlMarker", access_service_url_marker),
989
+ ]
990
+ )
991
+
992
+ url = f"{base_path(self,server_name)}/note-logs/{note_log_guid}/notes{possible_query_params}"
993
+ response = await self._async_make_request("POST", url, body)
994
+ return response.json()
995
+
996
+ def create_note(
997
+ self,
998
+ note_log_guid: str,
999
+ server_name: str = None,
1000
+ body: dict = {},
1001
+ view_service_url_marker: str = None,
1002
+ access_service_url_marker: str = None,
1003
+ ) -> dict | str:
1004
+ """
1005
+ Creates a new note for a note log and returns the unique identifier for it.
1006
+
1007
+ Parameters
1008
+ ----------
1009
+ noteLogGUID
1010
+ - unique identifier of the note log
1011
+ serverName
1012
+ - name of the server instances for this request
1013
+ requestBody
1014
+ - contains the name of the tag and (optional) description of the tag
1015
+ viewServiceURLMarker
1016
+ - optional view service URL marker (overrides accessServiceURLMarker)
1017
+ accessServiceURLMarker
1018
+ - optional access service URL marker used to identify which back end service to call
1019
+
1020
+ Returns
1021
+ -------
1022
+ Guid for the note
1023
+
1024
+ Raises
1025
+ ------
1026
+ InvalidParameterException
1027
+ one of the parameters is null or invalid or
1028
+ PropertyServerException
1029
+ There is a problem adding the element properties to the metadata repository or
1030
+ UserNotAuthorizedException
1031
+ the requesting user is not authorized to issue this request.
1032
+ """
1033
+ loop = asyncio.get_event_loop()
1034
+ response = loop.run_until_complete(
1035
+ self._async_create_note(
1036
+ note_log_guid,
1037
+ server_name,
1038
+ body,
1039
+ view_service_url_marker,
1040
+ access_service_url_marker,
1041
+ )
1042
+ )
1043
+ return response
1044
+
1045
+ #
1046
+ ## create_note_log implementation
1047
+ #
1048
+
1049
+ async def _async_create_note_log(
1050
+ self,
1051
+ element_guid: str,
1052
+ server_name: str = None,
1053
+ is_public: bool = True,
1054
+ body: dict = {},
1055
+ view_service_url_marker: str = None,
1056
+ access_service_url_marker: str = None,
1057
+ ) -> dict | str:
1058
+ """
1059
+ Creates a new noteLog and returns the unique identifier for it.
1060
+
1061
+ Parameters
1062
+ ----------
1063
+ elementGUID
1064
+ - unique identifier of the element where the note log is located
1065
+ serverName
1066
+ - name of the server instances for this request
1067
+ isPublic
1068
+ - is this element visible to other people.
1069
+ requestBody
1070
+ - contains the name of the tag and (optional) description of the tag
1071
+ viewServiceURLMarker
1072
+ - optional view service URL marker (overrides accessServiceURLMarker)
1073
+ accessServiceURLMarker
1074
+ - optional access service URL marker used to identify which back end service to call
1075
+
1076
+ Returns
1077
+ -------
1078
+ ElementGUID
1079
+
1080
+ Raises
1081
+ ------
1082
+ InvalidParameterException
1083
+ one of the parameters is null or invalid or
1084
+ PropertyServerException
1085
+ There is a problem adding the element properties to the metadata repository or
1086
+ UserNotAuthorizedException
1087
+ the requesting user is not authorized to issue this request.
1088
+ """
1089
+ if server_name is None:
1090
+ server_name = self.server_name
1091
+
1092
+ possible_query_params = query_string(
1093
+ [
1094
+ ("isPublic", is_public),
1095
+ ("viewServiceUrlMarker", view_service_url_marker),
1096
+ ("accessServiceUrlMarker", access_service_url_marker),
1097
+ ]
1098
+ )
1099
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/note-logs{possible_query_params}"
1100
+ response = await self._async_make_request("POST", url, body)
1101
+ return response.json()
1102
+
1103
+ def create_note_log(
1104
+ self,
1105
+ element_guid: str,
1106
+ server_name: str = None,
1107
+ is_public: bool = True,
1108
+ body: dict = {},
1109
+ view_service_url_marker: str = None,
1110
+ access_service_url_marker: str = None,
1111
+ ) -> dict | str:
1112
+ """
1113
+ Creates a new noteLog and returns the unique identifier for it.
1114
+
1115
+ Parameters
1116
+ ----------
1117
+ elementGUID
1118
+ - unique identifier of the element where the note log is located
1119
+ serverName
1120
+ - name of the server instances for this request
1121
+ isPublic
1122
+ - is this element visible to other people.
1123
+ requestBody
1124
+ - contains the name of the tag and (optional) description of the tag
1125
+ viewServiceURLMarker
1126
+ - optional view service URL marker (overrides accessServiceURLMarker)
1127
+ accessServiceURLMarker
1128
+ - optional access service URL marker used to identify which back end service to call
1129
+
1130
+ Returns
1131
+ -------
1132
+ ElementGUID
1133
+
1134
+ Raises
1135
+ ------
1136
+ InvalidParameterException
1137
+ one of the parameters is null or invalid or
1138
+ PropertyServerException
1139
+ There is a problem adding the element properties to the metadata repository or
1140
+ UserNotAuthorizedException
1141
+ the requesting user is not authorized to issue this request.
1142
+ """
1143
+ loop = asyncio.get_event_loop()
1144
+ response = loop.run_until_complete(
1145
+ self._async_create_note_log(
1146
+ element_guid,
1147
+ server_name,
1148
+ is_public,
1149
+ body,
1150
+ view_service_url_marker,
1151
+ access_service_url_marker,
1152
+ )
1153
+ )
1154
+ return response
1155
+
1156
+ #
1157
+ ## delete_tag implementation
1158
+ #
1159
+
1160
+ async def _async_delete_tag(
1161
+ self,
1162
+ tag_guid: str,
1163
+ server_name: str = None,
1164
+ body: dict = {},
1165
+ view_service_url_marker: str = None,
1166
+ access_service_url_marker: str = None,
1167
+ ) -> dict | str:
1168
+ """
1169
+ Removes an informal tag from the repository.
1170
+
1171
+ All the tagging relationships to this informal tag are lost. A
1172
+ private tag can be deleted by its creator and all the
1173
+ references are lost; a public tag can be deleted by anyone,
1174
+ but only if it is not attached to any referenceable.
1175
+
1176
+ Parameters
1177
+ ----------
1178
+ serverName
1179
+ - name of the server instances for this request
1180
+ tagGUID
1181
+ - String - unique id for the tag.
1182
+ viewServiceURLMarker
1183
+ - optional view service URL marker (overrides accessServiceURLMarker)
1184
+ accessServiceURLMarker
1185
+ - optional access service URL marker used to identify which back end service to call
1186
+ requestBody
1187
+ - null request body.
1188
+
1189
+ Returns
1190
+ -------
1191
+ VOIDResponse
1192
+
1193
+ Example
1194
+ -------
1195
+ my_new_tag_tag_guid = {
1196
+ "isPrivateTag": False,
1197
+ "name": "new-tag-from-python",
1198
+ "description": "this tag was created using the python API"
1199
+ }
1200
+ create_response = fm_client.delete_tag(my_new_tag_tag_guid)
1201
+ print(create_response)
1202
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
1203
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
1204
+ delete_response = fm_client.delete_tag("view-server", create_response["guid"])
1205
+ print(delete_response)
1206
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
1207
+
1208
+ Raises
1209
+ ------
1210
+ InvalidParameterException
1211
+ one of the parameters is null or invalid or
1212
+ PropertyServerException
1213
+ There is a problem adding the element properties to the metadata repository or
1214
+ UserNotAuthorizedException
1215
+ the requesting user is not authorized to issue this request.
1216
+ """
1217
+ if server_name is None:
1218
+ server_name = self.server_name
1219
+
1220
+ possible_query_params = query_string(
1221
+ [
1222
+ ("viewServiceUrlMarker", view_service_url_marker),
1223
+ ("accessServiceUrlMarker", access_service_url_marker),
1224
+ ]
1225
+ )
1226
+ url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/feedback-manager/tags/{tag_guid}/remove{possible_query_params}"
1227
+
1228
+ response = await self._async_make_request("POST", url, {})
1229
+ return response.json()
1230
+
1231
+ def delete_tag(
1232
+ self,
1233
+ tag_guid: str,
1234
+ server_name: str = None,
1235
+ body: dict = {},
1236
+ view_service_url_marker: str = None,
1237
+ access_service_url_marker: str = None,
1238
+ ) -> dict | str:
1239
+ """
1240
+ Removes an informal tag from the repository.
1241
+
1242
+ All the tagging relationships to this informal tag are lost. A
1243
+ private tag can be deleted by its creator and all the
1244
+ references are lost; a public tag can be deleted by anyone,
1245
+ but only if it is not attached to any referenceable.
1246
+
1247
+ Parameters
1248
+ ----------
1249
+ serverName
1250
+ - name of the server instances for this request
1251
+ tagGUID
1252
+ - String - unique id for the tag.
1253
+ viewServiceURLMarker
1254
+ - optional view service URL marker (overrides accessServiceURLMarker)
1255
+ accessServiceURLMarker
1256
+ - optional access service URL marker used to identify which back end service to call
1257
+ requestBody
1258
+ - null request body.
1259
+
1260
+ Returns
1261
+ -------
1262
+ VOIDResponse
1263
+
1264
+ Example
1265
+ -------
1266
+ my_new_tag_tag_guid = {
1267
+ "isPrivateTag": False,
1268
+ "name": "new-tag-from-python",
1269
+ "description": "this tag was created using the python API"
1270
+ }
1271
+ create_response = fm_client.delete_tag(my_new_tag_tag_guid)
1272
+ print(create_response)
1273
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
1274
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
1275
+ delete_response = fm_client.delete_tag("view-server", create_response["guid"])
1276
+ print(delete_response)
1277
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
1278
+
1279
+ Raises
1280
+ ------
1281
+ InvalidParameterException
1282
+ one of the parameters is null or invalid or
1283
+ PropertyServerException
1284
+ There is a problem adding the element properties to the metadata repository or
1285
+ UserNotAuthorizedException
1286
+ the requesting user is not authorized to issue this request.
1287
+ """
1288
+ loop = asyncio.get_event_loop()
1289
+ response = loop.run_until_complete(
1290
+ self._async_delete_tag(
1291
+ tag_guid,
1292
+ server_name,
1293
+ body,
1294
+ view_service_url_marker,
1295
+ access_service_url_marker,
1296
+ )
1297
+ )
1298
+ return response
1299
+
1300
+ #
1301
+ ## find_my_tags implementation
1302
+ #
1303
+
1304
+ async def _async_find_my_tags(
1305
+ self,
1306
+ body: str,
1307
+ server_name: str = None,
1308
+ starts_with: bool = None,
1309
+ ends_with: bool = None,
1310
+ ignore_case: bool = None,
1311
+ start_from: int = 0,
1312
+ page_size: int = max_paging_size,
1313
+ view_service_url_marker: str = None,
1314
+ access_service_url_marker: str = None,
1315
+ detailed_response: bool = False,
1316
+ ) -> dict | str:
1317
+ """
1318
+ Return the list of the calling user's private tags containing the supplied string in either the name or description. The search string is a regular expression (RegEx).
1319
+
1320
+
1321
+ Parameters
1322
+ ----------
1323
+ serverName
1324
+ - name of the server instances for this request.
1325
+ startsWith
1326
+ - does the value start with the supplied string?
1327
+ endsWith
1328
+ - does the value end with the supplied string?
1329
+ ignoreCase
1330
+ - should the search ignore case?
1331
+ startFrom
1332
+ - index of the list to start from (0 for start).
1333
+ pageSize
1334
+ - maximum number of elements to return.
1335
+ viewServiceURLMarker
1336
+ - optional view service URL marker (overrides accessServiceURLMarker)
1337
+ accessServiceURLMarker
1338
+ - optional access service URL marker used to identify which back end service to call
1339
+ requestBody
1340
+ - search string and effective time.
1341
+
1342
+ Returns
1343
+ -------
1344
+ list of tag objects
1345
+
1346
+ Raises
1347
+ ------
1348
+ InvalidParameterException
1349
+ one of the parameters is null or invalid or
1350
+ PropertyServerException
1351
+ There is a problem adding the element properties to the metadata repository or
1352
+ UserNotAuthorizedException
1353
+ the requesting user is not authorized to issue this request.
1354
+ """
1355
+ if server_name is None:
1356
+ server_name = self.server_name
1357
+
1358
+ possible_query_params = query_string(
1359
+ [
1360
+ ("startsWith", starts_with),
1361
+ ("endsWith", ends_with),
1362
+ ("ignoreCase", ignore_case),
1363
+ ("startFrom", start_from),
1364
+ ("pageSize", page_size),
1365
+ ("viewServiceUrlMarker", view_service_url_marker),
1366
+ ("accessServiceUrlMarker", access_service_url_marker),
1367
+ ]
1368
+ )
1369
+ url = f"{base_path(self,server_name)}/tags/by-search-string{possible_query_params}"
1370
+ response = await self._async_make_request("POST", url, body)
1371
+ return elements_response(response.json(), "tags", detailed_response)
1372
+
1373
+ def find_my_tags(
1374
+ self,
1375
+ body: str,
1376
+ server_name: str = None,
1377
+ starts_with: bool = None,
1378
+ ends_with: bool = None,
1379
+ ignore_case: bool = None,
1380
+ start_from: int = 0,
1381
+ page_size: int = max_paging_size,
1382
+ view_service_url_marker: str = None,
1383
+ access_service_url_marker: str = None,
1384
+ detailed_response: bool = False,
1385
+ ) -> dict | str:
1386
+ """
1387
+ Return the list of the calling user's private tags containing the supplied string in either the name or description. The search string is a regular expression (RegEx).
1388
+
1389
+
1390
+ Parameters
1391
+ ----------
1392
+ serverName
1393
+ - name of the server instances for this request.
1394
+ startsWith
1395
+ - does the value start with the supplied string?
1396
+ endsWith
1397
+ - does the value end with the supplied string?
1398
+ ignoreCase
1399
+ - should the search ignore case?
1400
+ startFrom
1401
+ - index of the list to start from (0 for start).
1402
+ pageSize
1403
+ - maximum number of elements to return.
1404
+ viewServiceURLMarker
1405
+ - optional view service URL marker (overrides accessServiceURLMarker)
1406
+ accessServiceURLMarker
1407
+ - optional access service URL marker used to identify which back end service to call
1408
+ requestBody
1409
+ - search string and effective time.
1410
+
1411
+ Returns
1412
+ -------
1413
+ list of tag objects
1414
+
1415
+ Raises
1416
+ ------
1417
+ InvalidParameterException
1418
+ one of the parameters is null or invalid or
1419
+ PropertyServerException
1420
+ There is a problem adding the element properties to the metadata repository or
1421
+ UserNotAuthorizedException
1422
+ the requesting user is not authorized to issue this request.
1423
+ """
1424
+ loop = asyncio.get_event_loop()
1425
+ response = loop.run_until_complete(
1426
+ self._async_find_my_tags(
1427
+ body,
1428
+ server_name=server_name,
1429
+ starts_with=starts_with,
1430
+ ends_with=ends_with,
1431
+ ignore_case=ignore_case,
1432
+ start_from=start_from,
1433
+ page_size=page_size,
1434
+ view_service_url_marker=view_service_url_marker,
1435
+ access_service_url_marker=access_service_url_marker,
1436
+ detailed_response=detailed_response,
1437
+ )
1438
+ )
1439
+ return response
1440
+
1441
+ #
1442
+ ## find_note_logs implementation
1443
+ #
1444
+
1445
+ async def _async_find_note_logs(
1446
+ self,
1447
+ body: dict,
1448
+ server_name: str = None,
1449
+ starts_with: bool = None,
1450
+ ends_with: bool = None,
1451
+ ignore_case: bool = None,
1452
+ start_from: int = 0,
1453
+ page_size: int = max_paging_size,
1454
+ view_service_url_marker: str = None,
1455
+ access_service_url_marker: str = None,
1456
+ detailed_response: bool = False,
1457
+ ) -> dict | str:
1458
+ """
1459
+ Retrieve the list of note log metadata elements that contain the search string.
1460
+
1461
+ Parameters
1462
+ ----------
1463
+ requestBody
1464
+ - search string and effective time.
1465
+ serverName
1466
+ - name of the server instances for this request.
1467
+ startsWith
1468
+ - does the value start with the supplied string?
1469
+ endsWith
1470
+ - does the value end with the supplied string?
1471
+ ignoreCase
1472
+ - should the search ignore case?
1473
+ startFrom
1474
+ - index of the list to start from (0 for start).
1475
+ pageSize
1476
+ - maximum number of elements to return.
1477
+ viewServiceURLMarker
1478
+ - optional view service URL marker (overrides accessServiceURLMarker)
1479
+ accessServiceURLMarker
1480
+ - optional access service URL marker used to identify which back end service to call
1481
+
1482
+ Returns
1483
+ -------
1484
+ list of matching metadata elements
1485
+
1486
+ Raises
1487
+ ------
1488
+ InvalidParameterException
1489
+ one of the parameters is null or invalid or
1490
+ PropertyServerException
1491
+ There is a problem adding the element properties to the metadata repository or
1492
+ UserNotAuthorizedException
1493
+ the requesting user is not authorized to issue this request.
1494
+ """
1495
+ if server_name is None:
1496
+ server_name = self.server_name
1497
+
1498
+ possible_query_params = query_string(
1499
+ [
1500
+ ("startsWith", starts_with),
1501
+ ("endsWith", ends_with),
1502
+ ("ignoreCase", ignore_case),
1503
+ ("startFrom", start_from),
1504
+ ("pageSize", page_size),
1505
+ ("viewServiceUrlMarker", view_service_url_marker),
1506
+ ("accessServiceUrlMarker", access_service_url_marker),
1507
+ ]
1508
+ )
1509
+ url = f"{base_path(self,server_name)}/note-logs/by-search-string{possible_query_params}"
1510
+ response = await self._async_make_request("POST", url, body)
1511
+ return elements_response(response.json(), "elementList", detailed_response)
1512
+
1513
+ def find_note_logs(
1514
+ self,
1515
+ body: dict,
1516
+ server_name: str = None,
1517
+ starts_with: bool = None,
1518
+ ends_with: bool = None,
1519
+ ignore_case: bool = None,
1520
+ start_from: int = 0,
1521
+ page_size: int = max_paging_size,
1522
+ view_service_url_marker: str = None,
1523
+ access_service_url_marker: str = None,
1524
+ detailed_response: bool = False,
1525
+ ) -> dict | str:
1526
+ """
1527
+ Retrieve the list of note log metadata elements that contain the search string.
1528
+
1529
+ Parameters
1530
+ ----------
1531
+ requestBody
1532
+ - search string and effective time.
1533
+ serverName
1534
+ - name of the server instances for this request.
1535
+ startsWith
1536
+ - does the value start with the supplied string?
1537
+ endsWith
1538
+ - does the value end with the supplied string?
1539
+ ignoreCase
1540
+ - should the search ignore case?
1541
+ startFrom
1542
+ - index of the list to start from (0 for start).
1543
+ pageSize
1544
+ - maximum number of elements to return.
1545
+ viewServiceURLMarker
1546
+ - optional view service URL marker (overrides accessServiceURLMarker)
1547
+ accessServiceURLMarker
1548
+ - optional access service URL marker used to identify which back end service to call
1549
+
1550
+ Returns
1551
+ -------
1552
+ list of matching metadata elements
1553
+
1554
+ Raises
1555
+ ------
1556
+ InvalidParameterException
1557
+ one of the parameters is null or invalid or
1558
+ PropertyServerException
1559
+ There is a problem adding the element properties to the metadata repository or
1560
+ UserNotAuthorizedException
1561
+ the requesting user is not authorized to issue this request.
1562
+ """
1563
+ loop = asyncio.get_event_loop()
1564
+ response = loop.run_until_complete(
1565
+ self._async_find_note_logs(
1566
+ body,
1567
+ server_name,
1568
+ starts_with,
1569
+ ends_with,
1570
+ ignore_case,
1571
+ start_from,
1572
+ page_size,
1573
+ view_service_url_marker,
1574
+ access_service_url_marker,
1575
+ detailed_response,
1576
+ )
1577
+ )
1578
+ return response
1579
+
1580
+ #
1581
+ ## find_notes implementation
1582
+ #
1583
+
1584
+ async def _async_find_notes(
1585
+ self,
1586
+ body: dict,
1587
+ server_name: str = None,
1588
+ starts_with: bool = None,
1589
+ ends_with: bool = None,
1590
+ ignore_case: bool = None,
1591
+ start_from: int = 0,
1592
+ page_size: int = max_paging_size,
1593
+ view_service_url_marker: str = None,
1594
+ access_service_url_marker: str = None,
1595
+ detailed_response: bool = False,
1596
+ ) -> dict | str:
1597
+ """
1598
+ Retrieve the list of note metadata elements that contain the search string.
1599
+
1600
+ Parameters
1601
+ ----------
1602
+ requestBody
1603
+ - search string and effective time.
1604
+ serverName
1605
+ - name of the server instances for this request.
1606
+ startsWith
1607
+ - does the value start with the supplied string?
1608
+ endsWith
1609
+ - does the value end with the supplied string?
1610
+ ignoreCase
1611
+ - should the search ignore case?
1612
+ startFrom
1613
+ - index of the list to start from (0 for start).
1614
+ pageSize
1615
+ - maximum number of elements to return.
1616
+ viewServiceURLMarker
1617
+ - optional view service URL marker (overrides accessServiceURLMarker)
1618
+ accessServiceURLMarker
1619
+ - optional access service URL marker used to identify which back end service to call
1620
+
1621
+ Returns
1622
+ -------
1623
+ list of matching metadata elements
1624
+
1625
+ Raises
1626
+ ------
1627
+ InvalidParameterException
1628
+ one of the parameters is null or invalid or
1629
+ PropertyServerException
1630
+ There is a problem adding the element properties to the metadata repository or
1631
+ UserNotAuthorizedException
1632
+ the requesting user is not authorized to issue this request.
1633
+ """
1634
+ if server_name is None:
1635
+ server_name = self.server_name
1636
+
1637
+ possible_query_params = query_string(
1638
+ [
1639
+ ("startsWith", starts_with),
1640
+ ("endsWith", ends_with),
1641
+ ("ignoreCase", ignore_case),
1642
+ ("startFrom", start_from),
1643
+ ("pageSize", page_size),
1644
+ ("viewServiceUrlMarker", view_service_url_marker),
1645
+ ("accessServiceUrlMarker", access_service_url_marker),
1646
+ ]
1647
+ )
1648
+ url = f"{base_path(self,server_name)}/note-logs/notes/by-search-string{possible_query_params}"
1649
+ response = await self._async_make_request("POST", url, body)
1650
+ return elements_response(response.json(), "elementList", detailed_response)
1651
+
1652
+ def find_notes(
1653
+ self,
1654
+ body: dict,
1655
+ server_name: str = None,
1656
+ starts_with: bool = None,
1657
+ ends_with: bool = None,
1658
+ ignore_case: bool = None,
1659
+ start_from: int = 0,
1660
+ page_size: int = max_paging_size,
1661
+ view_service_url_marker: str = None,
1662
+ access_service_url_marker: str = None,
1663
+ detailed_response: bool = False,
1664
+ ) -> dict | str:
1665
+ """
1666
+ Retrieve the list of note metadata elements that contain the search string.
1667
+
1668
+ Parameters
1669
+ ----------
1670
+ requestBody
1671
+ - search string and effective time.
1672
+ serverName
1673
+ - name of the server instances for this request.
1674
+ startsWith
1675
+ - does the value start with the supplied string?
1676
+ endsWith
1677
+ - does the value end with the supplied string?
1678
+ ignoreCase
1679
+ - should the search ignore case?
1680
+ startFrom
1681
+ - index of the list to start from (0 for start).
1682
+ pageSize
1683
+ - maximum number of elements to return.
1684
+ viewServiceURLMarker
1685
+ - optional view service URL marker (overrides accessServiceURLMarker)
1686
+ accessServiceURLMarker
1687
+ - optional access service URL marker used to identify which back end service to call
1688
+
1689
+ Returns
1690
+ -------
1691
+ list of matching metadata elements
1692
+
1693
+ Raises
1694
+ ------
1695
+ InvalidParameterException
1696
+ one of the parameters is null or invalid or
1697
+ PropertyServerException
1698
+ There is a problem adding the element properties to the metadata repository or
1699
+ UserNotAuthorizedException
1700
+ the requesting user is not authorized to issue this request.
1701
+ """
1702
+ loop = asyncio.get_event_loop()
1703
+ response = loop.run_until_complete(
1704
+ self._async_find_notes(
1705
+ body,
1706
+ server_name,
1707
+ starts_with,
1708
+ ends_with,
1709
+ ignore_case,
1710
+ start_from,
1711
+ page_size,
1712
+ view_service_url_marker,
1713
+ access_service_url_marker,
1714
+ detailed_response,
1715
+ )
1716
+ )
1717
+ return response
1718
+
1719
+ #
1720
+ ## find_tags implementation
1721
+ #
1722
+
1723
+ async def _async_find_tags(
1724
+ self,
1725
+ body: str,
1726
+ server_name: str = None,
1727
+ starts_with: bool = None,
1728
+ ends_with: bool = None,
1729
+ ignore_case: bool = None,
1730
+ start_from: int = 0,
1731
+ page_size: int = max_paging_size,
1732
+ detailed_response: bool = False,
1733
+ view_service_url_marker: str = None,
1734
+ access_service_url_marker: str = None,
1735
+ ) -> dict | str:
1736
+ """
1737
+ Return the list of tags containing the supplied string in the text. The search string is a regular expression (RegEx).
1738
+
1739
+ Parameters
1740
+ ----------
1741
+ serverName
1742
+ - name of the server instances for this request.
1743
+ startsWith
1744
+ - does the value start with the supplied string?
1745
+ endsWith
1746
+ - does the value end with the supplied string?
1747
+ ignoreCase
1748
+ - should the search ignore case?
1749
+ startFrom
1750
+ - index of the list to start from (0 for start).
1751
+ pageSize
1752
+ - maximum number of elements to return.
1753
+ viewServiceURLMarker
1754
+ - optional view service URL marker (overrides accessServiceURLMarker)
1755
+ accessServiceURLMarker
1756
+ - optional access service URL marker used to identify which back end service to call
1757
+ requestBody
1758
+ - search string and effective time.
1759
+
1760
+ Returns
1761
+ -------
1762
+ list of tag objects
1763
+
1764
+ Raises
1765
+ ------
1766
+ InvalidParameterException
1767
+ one of the parameters is null or invalid or
1768
+ PropertyServerException
1769
+ There is a problem adding the element properties to the metadata repository or
1770
+ UserNotAuthorizedException
1771
+ the requesting user is not authorized to issue this request.
1772
+ """
1773
+ if server_name is None:
1774
+ server_name = self.server_name
1775
+
1776
+ possible_query_params = query_string(
1777
+ [
1778
+ ("startsWith", starts_with),
1779
+ ("endsWith", ends_with),
1780
+ ("ignoreCase", ignore_case),
1781
+ ("startFrom", start_from),
1782
+ ("pageSize", page_size),
1783
+ ("viewServiceUrlMarker", view_service_url_marker),
1784
+ ("accessServiceUrlMarker", access_service_url_marker),
1785
+ ]
1786
+ )
1787
+ url = f"{base_path(self,server_name)}/tags/by-search-string{possible_query_params}"
1788
+ response = await self._async_make_request("POST", url, body)
1789
+ return elements_response(response.json(), "tags", detailed_response)
1790
+
1791
+ def find_tags(
1792
+ self,
1793
+ body: str,
1794
+ server_name: str = None,
1795
+ starts_with: bool = None,
1796
+ ends_with: bool = None,
1797
+ ignore_case: bool = None,
1798
+ start_from: int = 0,
1799
+ page_size: int = max_paging_size,
1800
+ view_service_url_marker: str = None,
1801
+ access_service_url_marker: str = None,
1802
+ detailed_response: bool = False,
1803
+ ) -> dict | str:
1804
+ """
1805
+ Return the list of tags containing the supplied string in the text. The search string is a regular expression (RegEx).
1806
+
1807
+ Parameters
1808
+ ----------
1809
+ serverName
1810
+ - name of the server instances for this request.
1811
+ startsWith
1812
+ - does the value start with the supplied string?
1813
+ endsWith
1814
+ - does the value end with the supplied string?
1815
+ ignoreCase
1816
+ - should the search ignore case?
1817
+ startFrom
1818
+ - index of the list to start from (0 for start).
1819
+ pageSize
1820
+ - maximum number of elements to return.
1821
+ viewServiceURLMarker
1822
+ - optional view service URL marker (overrides accessServiceURLMarker)
1823
+ accessServiceURLMarker
1824
+ - optional access service URL marker used to identify which back end service to call
1825
+ requestBody
1826
+ - search string and effective time.
1827
+
1828
+ Returns
1829
+ -------
1830
+ list of tag objects
1831
+
1832
+ Raises
1833
+ ------
1834
+ InvalidParameterException
1835
+ one of the parameters is null or invalid or
1836
+ PropertyServerException
1837
+ There is a problem adding the element properties to the metadata repository or
1838
+ UserNotAuthorizedException
1839
+ the requesting user is not authorized to issue this request.
1840
+ """
1841
+ loop = asyncio.get_event_loop()
1842
+ response = loop.run_until_complete(
1843
+ self._async_find_tags(
1844
+ body,
1845
+ server_name=server_name,
1846
+ starts_with=starts_with,
1847
+ ends_with=ends_with,
1848
+ ignore_case=ignore_case,
1849
+ start_from=start_from,
1850
+ page_size=page_size,
1851
+ view_service_url_marker=view_service_url_marker,
1852
+ access_service_url_marker=access_service_url_marker,
1853
+ detailed_response=detailed_response,
1854
+ )
1855
+ )
1856
+ return response
1857
+
1858
+ #
1859
+ ## find_comments implementation
1860
+ #
1861
+
1862
+ async def _async_find_comments(
1863
+ self,
1864
+ body: str,
1865
+ server_name: str = None,
1866
+ starts_with: bool = None,
1867
+ ends_with: bool = None,
1868
+ ignore_case: bool = None,
1869
+ start_from: int = 0,
1870
+ page_size: int = max_paging_size,
1871
+ view_service_url_marker: str = None,
1872
+ access_service_url_marker: str = None,
1873
+ detailed_response: bool = False,
1874
+ ) -> dict | str:
1875
+ """
1876
+ Return the list of comments containing the supplied string.
1877
+
1878
+ Parameters
1879
+ ----------
1880
+ body
1881
+ - search string and effective time.
1882
+ serverName
1883
+ - name of the server instances for this request.
1884
+ startsWith
1885
+ - does the value start with the supplied string?
1886
+ endsWith
1887
+ - does the value end with the supplied string?
1888
+ ignoreCase
1889
+ - should the search ignore case?
1890
+ startFrom
1891
+ - index of the list to start from (0 for start).
1892
+ pageSize
1893
+ - maximum number of elements to return.
1894
+ viewServiceURLMarker
1895
+ - optional view service URL marker (overrides accessServiceURLMarker)
1896
+ accessServiceURLMarker
1897
+ - optional access service URL marker used to identify which back end service to call
1898
+
1899
+ Returns
1900
+ -------
1901
+ list of comment objects
1902
+
1903
+ Raises
1904
+ ------
1905
+ InvalidParameterException
1906
+ one of the parameters is null or invalid or
1907
+ PropertyServerException
1908
+ There is a problem adding the element properties to the metadata repository or
1909
+ UserNotAuthorizedException
1910
+ the requesting user is not authorized to issue this request.
1911
+ """
1912
+ if server_name is None:
1913
+ server_name = self.server_name
1914
+
1915
+ possible_query_params = query_string(
1916
+ [
1917
+ ("startsWith", starts_with),
1918
+ ("endsWith", ends_with),
1919
+ ("ignoreCase", ignore_case),
1920
+ ("startFrom", start_from),
1921
+ ("pageSize", page_size),
1922
+ ("viewServiceUrlMarker", view_service_url_marker),
1923
+ ("accessServiceUrlMarker", access_service_url_marker),
1924
+ ]
1925
+ )
1926
+ url = f"{base_path(self,server_name)}/comments/by-search-string{possible_query_params}"
1927
+ response = await self._async_make_request("POST", url, body)
1928
+ return elements_response(response.json(), "elementList", detailed_response)
1929
+
1930
+ def find_comments(
1931
+ self,
1932
+ body: str,
1933
+ server_name: str = None,
1934
+ starts_with: bool = None,
1935
+ ends_with: bool = None,
1936
+ ignore_case: bool = None,
1937
+ start_from: int = 0,
1938
+ page_size: int = max_paging_size,
1939
+ view_service_url_marker: str = None,
1940
+ access_service_url_marker: str = None,
1941
+ detailed_response: bool = False,
1942
+ ) -> dict | str:
1943
+ """
1944
+ Return the list of comments containing the supplied string.
1945
+
1946
+ Parameters
1947
+ ----------
1948
+ requestBody
1949
+ - search string and effective time.
1950
+ serverName
1951
+ - name of the server instances for this request.
1952
+ startsWith
1953
+ - does the value start with the supplied string?
1954
+ endsWith
1955
+ - does the value end with the supplied string?
1956
+ ignoreCase
1957
+ - should the search ignore case?
1958
+ startFrom
1959
+ - index of the list to start from (0 for start).
1960
+ pageSize
1961
+ - maximum number of elements to return.
1962
+ viewServiceURLMarker
1963
+ - optional view service URL marker (overrides accessServiceURLMarker)
1964
+ accessServiceURLMarker
1965
+ - optional access service URL marker used to identify which back end service to call
1966
+
1967
+ Returns
1968
+ -------
1969
+ list of comment objects
1970
+
1971
+ Raises
1972
+ ------
1973
+ InvalidParameterException
1974
+ one of the parameters is null or invalid or
1975
+ PropertyServerException
1976
+ There is a problem adding the element properties to the metadata repository or
1977
+ UserNotAuthorizedException
1978
+ the requesting user is not authorized to issue this request.
1979
+ """
1980
+ loop = asyncio.get_event_loop()
1981
+ response = loop.run_until_complete(
1982
+ self._async_find_comments(
1983
+ body,
1984
+ server_name,
1985
+ starts_with,
1986
+ ends_with,
1987
+ ignore_case,
1988
+ start_from,
1989
+ page_size,
1990
+ view_service_url_marker,
1991
+ access_service_url_marker,
1992
+ detailed_response,
1993
+ )
1994
+ )
1995
+ return response
1996
+
1997
+ #
1998
+ ## get_attached_comments implementation
1999
+ #
2000
+
2001
+ async def _async_get_attached_comments(
2002
+ self,
2003
+ element_guid: str,
2004
+ server_name: str = None,
2005
+ body: dict = {},
2006
+ start_from: int = 0,
2007
+ page_size: int = max_paging_size,
2008
+ view_service_url_marker: str = None,
2009
+ access_service_url_marker: str = None,
2010
+ detailed_response: bool = False,
2011
+ ) -> dict | str:
2012
+ """
2013
+ Return the comments attached to an element.
2014
+
2015
+ Parameters
2016
+ ----------
2017
+ elementGUID
2018
+ - unique identifier for the element that the comments are connected to (maybe a comment too).
2019
+ serverName
2020
+ - name of the server instances for this request
2021
+ body
2022
+ - optional effective time
2023
+ startFrom
2024
+ - index of the list to start from (0 for start)
2025
+ pageSize
2026
+ - maximum number of elements to return.
2027
+ viewServiceURLMarker
2028
+ - optional view service URL marker (overrides accessServiceURLMarker)
2029
+ accessServiceURLMarker
2030
+ - optional access service URL marker used to identify which back end service to call
2031
+
2032
+ Returns
2033
+ -------
2034
+ list of comments
2035
+
2036
+ Raises
2037
+ ------
2038
+ InvalidParameterException
2039
+ one of the parameters is null or invalid or
2040
+ PropertyServerException
2041
+ There is a problem adding the element properties to the metadata repository or
2042
+ UserNotAuthorizedException
2043
+ the requesting user is not authorized to issue this request.
2044
+ """
2045
+ if server_name is None:
2046
+ server_name = self.server_name
2047
+
2048
+ possible_query_params = query_string(
2049
+ [
2050
+ ("startFrom", start_from),
2051
+ ("pageSize", page_size),
2052
+ ("viewServiceUrlMarker", view_service_url_marker),
2053
+ ("accessServiceUrlMarker", access_service_url_marker),
2054
+ ]
2055
+ )
2056
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/comments/retrieve{possible_query_params}"
2057
+ response = await self._async_make_request("POST", url, body)
2058
+ return elements_response(response.json(), "elementList", detailed_response)
2059
+
2060
+ def get_attached_comments(
2061
+ self,
2062
+ element_guid: str,
2063
+ server_name: str = None,
2064
+ body: dict = {},
2065
+ start_from: int = 0,
2066
+ page_size: int = max_paging_size,
2067
+ view_service_url_marker: str = None,
2068
+ access_service_url_marker: str = None,
2069
+ detailed_response: bool = False,
2070
+ ) -> dict | str:
2071
+ """
2072
+ Return the comments attached to an element.
2073
+
2074
+ Parameters
2075
+ ----------
2076
+ elementGUID
2077
+ - unique identifier for the element that the comments are connected to (maybe a comment too).
2078
+ serverName
2079
+ - name of the server instances for this request
2080
+ body
2081
+ - optional effective time
2082
+ startFrom
2083
+ - index of the list to start from (0 for start)
2084
+ pageSize
2085
+ - maximum number of elements to return.
2086
+ viewServiceURLMarker
2087
+ - optional view service URL marker (overrides accessServiceURLMarker)
2088
+ accessServiceURLMarker
2089
+ - optional access service URL marker used to identify which back end service to call
2090
+
2091
+ Returns
2092
+ -------
2093
+ list of comments
2094
+
2095
+ Raises
2096
+ ------
2097
+ InvalidParameterException
2098
+ one of the parameters is null or invalid or
2099
+ PropertyServerException
2100
+ There is a problem adding the element properties to the metadata repository or
2101
+ UserNotAuthorizedException
2102
+ the requesting user is not authorized to issue this request.
2103
+ """
2104
+ loop = asyncio.get_event_loop()
2105
+ response = loop.run_until_complete(
2106
+ self._async_get_attached_comments(
2107
+ element_guid,
2108
+ server_name,
2109
+ body,
2110
+ start_from,
2111
+ page_size,
2112
+ view_service_url_marker,
2113
+ access_service_url_marker,
2114
+ detailed_response,
2115
+ )
2116
+ )
2117
+ return response
2118
+
2119
+ #
2120
+ ## get_comment implementation
2121
+ #
2122
+
2123
+ async def _async_get_comment(
2124
+ self,
2125
+ comment_guid: str,
2126
+ server_name: str = None,
2127
+ body: dict = {},
2128
+ view_service_url_marker: str = None,
2129
+ access_service_url_marker: str = None,
2130
+ detailed_response: bool = False,
2131
+ ) -> dict | str:
2132
+ """
2133
+ Return the requested comment.
2134
+
2135
+ Parameters
2136
+ ----------
2137
+ serverName
2138
+ - name of the server instances for this request
2139
+ commentGUID
2140
+ - unique identifier for the comment object.
2141
+ viewServiceURLMarker
2142
+ - optional view service URL marker (overrides accessServiceURLMarker)
2143
+ accessServiceURLMarker
2144
+ - optional access service URL marker used to identify which back end service to call
2145
+ requestBody
2146
+ - optional effective time
2147
+
2148
+ Returns
2149
+ -------
2150
+ comment properties
2151
+
2152
+ Raises
2153
+ ------
2154
+ InvalidParameterException
2155
+ one of the parameters is null or invalid or
2156
+ PropertyServerException
2157
+ There is a problem adding the element properties to the metadata repository or
2158
+ UserNotAuthorizedException
2159
+ the requesting user is not authorized to issue this request.
2160
+ """
2161
+ if server_name is None:
2162
+ server_name = self.server_name
2163
+
2164
+ possible_query_params = query_string(
2165
+ [
2166
+ ("viewServiceUrlMarker", view_service_url_marker),
2167
+ ("accessServiceUrlMarker", access_service_url_marker),
2168
+ ]
2169
+ )
2170
+ url = f"{base_path(self,server_name)}/comments/{comment_guid}/retrieve{possible_query_params}"
2171
+ response = await self._async_make_request("POST", url, body)
2172
+ return element_response(response.json(), "element", detailed_response)
2173
+
2174
+ def get_comment(
2175
+ self,
2176
+ comment_guid: str,
2177
+ server_name: str = None,
2178
+ body: dict = {},
2179
+ view_service_url_marker: str = None,
2180
+ access_service_url_marker: str = None,
2181
+ detailed_response: bool = False,
2182
+ ) -> dict | str:
2183
+ """
2184
+ Return the requested comment.
2185
+
2186
+ Parameters
2187
+ ----------
2188
+ commentGUID
2189
+ - unique identifier for the comment object.
2190
+ serverName
2191
+ - name of the server instances for this request
2192
+ viewServiceURLMarker
2193
+ - optional view service URL marker (overrides accessServiceURLMarker)
2194
+ accessServiceURLMarker
2195
+ - optional access service URL marker used to identify which back end service to call
2196
+ requestBody
2197
+ - optional effective time
2198
+
2199
+ Returns
2200
+ -------
2201
+ comment properties
2202
+
2203
+ Raises
2204
+ ------
2205
+ InvalidParameterException
2206
+ one of the parameters is null or invalid or
2207
+ PropertyServerException
2208
+ There is a problem adding the element properties to the metadata repository or
2209
+ UserNotAuthorizedException
2210
+ the requesting user is not authorized to issue this request.
2211
+ """
2212
+ loop = asyncio.get_event_loop()
2213
+ response = loop.run_until_complete(
2214
+ self._async_get_comment(
2215
+ comment_guid,
2216
+ server_name,
2217
+ body,
2218
+ view_service_url_marker,
2219
+ access_service_url_marker,
2220
+ detailed_response,
2221
+ )
2222
+ )
2223
+ return response
2224
+
2225
+ #
2226
+ ## get_attached_likes implementation
2227
+ #
2228
+ async def _async_get_attached_likes(
2229
+ self,
2230
+ element_guid: str,
2231
+ server_name: str = None,
2232
+ body: dict = {},
2233
+ start_from: int = 0,
2234
+ page_size: int = max_paging_size,
2235
+ view_service_url_marker: str = None,
2236
+ access_service_url_marker: str = None,
2237
+ detailed_response: bool = False,
2238
+ ) -> dict | str:
2239
+ """
2240
+ Return the likes attached to an element
2241
+
2242
+ Parameters
2243
+ ----------
2244
+ elementGUID
2245
+ - unique identifier for the element that the likes are connected to
2246
+ serverName
2247
+ - name of the server instances for this request
2248
+ body
2249
+ - optional effective time
2250
+ startFrom
2251
+ - index of the list to start from (0 for start)
2252
+ pageSize
2253
+ - maximum number of elements to return.
2254
+ viewServiceURLMarker
2255
+ - optional view service URL marker (overrides accessServiceURLMarker)
2256
+ accessServiceURLMarker
2257
+ - optional access service URL marker used to identify which back end service to call
2258
+
2259
+
2260
+ Returns
2261
+ -------
2262
+ List of Likes (LikeElementsResponse)
2263
+
2264
+ Raises
2265
+ ------
2266
+ InvalidParameterException
2267
+ one of the parameters is null or invalid or
2268
+ PropertyServerException
2269
+ There is a problem adding the element properties to the metadata repository or
2270
+ UserNotAuthorizedException
2271
+ the requesting user is not authorized to issue this request.
2272
+ """
2273
+ if server_name is None:
2274
+ server_name = self.server_name
2275
+
2276
+ possible_query_params = query_string(
2277
+ [
2278
+ ("startFrom", start_from),
2279
+ ("pageSize", page_size),
2280
+ ("viewServiceUrlMarker", view_service_url_marker),
2281
+ ("accessServiceUrlMarker", access_service_url_marker),
2282
+ ]
2283
+ )
2284
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/likes/retrieve{possible_query_params}"
2285
+ response = await self._async_make_request("POST", url, body)
2286
+ return elements_response(response.json(), "elementList", detailed_response)
2287
+
2288
+ def get_attached_likes(
2289
+ self,
2290
+ element_guid: str,
2291
+ server_name: str = None,
2292
+ body: dict = {},
2293
+ start_from: int = 0,
2294
+ page_size: int = max_paging_size,
2295
+ view_service_url_marker: str = None,
2296
+ access_service_url_marker: str = None,
2297
+ detailed_response: bool = False,
2298
+ ) -> dict | str:
2299
+ """
2300
+ Return the likes attached to an element
2301
+
2302
+
2303
+ Parameters
2304
+ ----------
2305
+ elementGUID
2306
+ - unique identifier for the element that the likes are connected to
2307
+ serverName
2308
+ - name of the server instances for this request
2309
+ body
2310
+ - optional effective time
2311
+ startFrom
2312
+ - index of the list to start from (0 for start)
2313
+ pageSize
2314
+ - maximum number of elements to return.
2315
+ viewServiceURLMarker
2316
+ - optional view service URL marker (overrides accessServiceURLMarker)
2317
+ accessServiceURLMarker
2318
+ - optional access service URL marker used to identify which back end service to call
2319
+
2320
+
2321
+ Returns
2322
+ -------
2323
+ List of Likes (LikeElementsResponse)
2324
+
2325
+ Raises
2326
+ ------
2327
+ InvalidParameterException
2328
+ one of the parameters is null or invalid or
2329
+ PropertyServerException
2330
+ There is a problem adding the element properties to the metadata repository or
2331
+ UserNotAuthorizedException
2332
+ the requesting user is not authorized to issue this request.
2333
+ """
2334
+ loop = asyncio.get_event_loop()
2335
+ response = loop.run_until_complete(
2336
+ self._async_get_attached_likes(
2337
+ element_guid,
2338
+ server_name,
2339
+ body,
2340
+ start_from,
2341
+ page_size,
2342
+ view_service_url_marker,
2343
+ access_service_url_marker,
2344
+ detailed_response,
2345
+ )
2346
+ )
2347
+ return response
2348
+
2349
+ #
2350
+ ## get_attached_ratings implementation
2351
+ #
2352
+ async def _async_get_attached_ratings(
2353
+ self,
2354
+ element_guid: str,
2355
+ server_name: str = None,
2356
+ body: dict = {},
2357
+ start_from: int = 0,
2358
+ page_size: int = max_paging_size,
2359
+ view_service_url_marker: str = None,
2360
+ access_service_url_marker: str = None,
2361
+ detailed_response: bool = False,
2362
+ ) -> dict | str:
2363
+ """
2364
+ Return the ratings attached to an element.
2365
+
2366
+ Parameters
2367
+ ----------
2368
+ elementGUID
2369
+ - unique identifier for the element that the ratings are connected to
2370
+ serverName
2371
+ - name of the server instances for this request
2372
+ body
2373
+ - optional effective time
2374
+ startFrom
2375
+ - index of the list to start from (0 for start)
2376
+ pageSize
2377
+ - maximum number of elements to return.
2378
+ viewServiceURLMarker
2379
+ - optional view service URL marker (overrides accessServiceURLMarker)
2380
+ accessServiceURLMarker
2381
+ - optional access service URL marker used to identify which back end service to call
2382
+
2383
+ Returns
2384
+ -------
2385
+ List of ratings (RatingElementsResponse)
2386
+
2387
+ Raises
2388
+ ------
2389
+ InvalidParameterException
2390
+ one of the parameters is null or invalid or
2391
+ PropertyServerException
2392
+ There is a problem adding the element properties to the metadata repository or
2393
+ UserNotAuthorizedException
2394
+ the requesting user is not authorized to issue this request.
2395
+ """
2396
+ if server_name is None:
2397
+ server_name = self.server_name
2398
+
2399
+ possible_query_params = query_string(
2400
+ [
2401
+ ("startFrom", start_from),
2402
+ ("pageSize", page_size),
2403
+ ("viewServiceUrlMarker", view_service_url_marker),
2404
+ ("accessServiceUrlMarker", access_service_url_marker),
2405
+ ]
2406
+ )
2407
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/ratings/retrieve{possible_query_params}"
2408
+ response = await self._async_make_request("POST", url, body)
2409
+ return elements_response(response.json(), "elementList", detailed_response)
2410
+
2411
+ def get_attached_ratings(
2412
+ self,
2413
+ element_guid: str,
2414
+ server_name: str = None,
2415
+ body: dict = {},
2416
+ start_from: int = 0,
2417
+ page_size: int = max_paging_size,
2418
+ view_service_url_marker: str = None,
2419
+ access_service_url_marker: str = None,
2420
+ detailed_response: bool = False,
2421
+ ) -> dict | str:
2422
+ """
2423
+ Return the ratings attached to an element.
2424
+
2425
+ Parameters
2426
+ ----------
2427
+ elementGUID
2428
+ - unique identifier for the element that the ratings are connected to
2429
+ serverName
2430
+ - name of the server instances for this request
2431
+ body
2432
+ - optional effective time
2433
+ startFrom
2434
+ - index of the list to start from (0 for start)
2435
+ pageSize
2436
+ - maximum number of elements to return.
2437
+ viewServiceURLMarker
2438
+ - optional view service URL marker (overrides accessServiceURLMarker)
2439
+ accessServiceURLMarker
2440
+ - optional access service URL marker used to identify which back end service to call
2441
+
2442
+ Returns
2443
+ -------
2444
+ List of ratings (RatingElementsResponse)
2445
+
2446
+ Raises
2447
+ ------
2448
+ InvalidParameterException
2449
+ one of the parameters is null or invalid or
2450
+ PropertyServerException
2451
+ There is a problem adding the element properties to the metadata repository or
2452
+ UserNotAuthorizedException
2453
+ the requesting user is not authorized to issue this request.
2454
+ """
2455
+ loop = asyncio.get_event_loop()
2456
+ response = loop.run_until_complete(
2457
+ self._async_get_attached_ratings(
2458
+ element_guid,
2459
+ server_name,
2460
+ body,
2461
+ start_from,
2462
+ page_size,
2463
+ view_service_url_marker,
2464
+ access_service_url_marker,
2465
+ detailed_response,
2466
+ )
2467
+ )
2468
+ return response
2469
+
2470
+ #
2471
+ ## get_attached_tags implementation
2472
+ #
2473
+ async def _async_get_attached_tags(
2474
+ self,
2475
+ element_guid: str,
2476
+ server_name: str = None,
2477
+ body: dict = {},
2478
+ start_from: int = 0,
2479
+ page_size: int = max_paging_size,
2480
+ view_service_url_marker: str = None,
2481
+ access_service_url_marker: str = None,
2482
+ detailed_response: bool = False,
2483
+ ) -> dict | str:
2484
+ """
2485
+ Return the informal tags attached to an element.
2486
+
2487
+ Parameters
2488
+ ----------
2489
+ elementGUID
2490
+ - unique identifier for the element that the ratings are connected to
2491
+ serverName
2492
+ - name of the server instances for this request
2493
+ body
2494
+ - optional effective time
2495
+ startFrom
2496
+ - index of the list to start from (0 for start)
2497
+ pageSize
2498
+ - maximum number of elements to return.
2499
+ viewServiceURLMarker
2500
+ - optional view service URL marker (overrides accessServiceURLMarker)
2501
+ accessServiceURLMarker
2502
+ - optional access service URL marker used to identify which back end service to call
2503
+
2504
+ Returns
2505
+ -------
2506
+ List of InformalTags (InformalTagsResponse)
2507
+
2508
+ Raises
2509
+ ------
2510
+ InvalidParameterException
2511
+ one of the parameters is null or invalid or
2512
+ PropertyServerException
2513
+ There is a problem adding the element properties to the metadata repository or
2514
+ UserNotAuthorizedException
2515
+ the requesting user is not authorized to issue this request.
2516
+ """
2517
+ if server_name is None:
2518
+ server_name = self.server_name
2519
+
2520
+ possible_query_params = query_string(
2521
+ [
2522
+ ("startFrom", start_from),
2523
+ ("pageSize", page_size),
2524
+ ("viewServiceUrlMarker", view_service_url_marker),
2525
+ ("accessServiceUrlMarker", access_service_url_marker),
2526
+ ]
2527
+ )
2528
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/tags/retrieve{possible_query_params}"
2529
+ response = await self._async_make_request("POST", url, body)
2530
+ return elements_response(response.json(), "tags", detailed_response)
2531
+
2532
+ def get_attached_tags(
2533
+ self,
2534
+ element_guid: str,
2535
+ server_name: str = None,
2536
+ body: dict = {},
2537
+ start_from: int = 0,
2538
+ page_size: int = max_paging_size,
2539
+ view_service_url_marker: str = None,
2540
+ access_service_url_marker: str = None,
2541
+ detailed_response: bool = False,
2542
+ ) -> dict | str:
2543
+ """
2544
+ Return the informal tags attached to an element.
2545
+
2546
+ Parameters
2547
+ ----------
2548
+ elementGUID
2549
+ - unique identifier for the element that the ratings are connected to
2550
+ serverName
2551
+ - name of the server instances for this request
2552
+ body
2553
+ - optional effective time
2554
+ startFrom
2555
+ - index of the list to start from (0 for start)
2556
+ pageSize
2557
+ - maximum number of elements to return.
2558
+ viewServiceURLMarker
2559
+ - optional view service URL marker (overrides accessServiceURLMarker)
2560
+ accessServiceURLMarker
2561
+ - optional access service URL marker used to identify which back end service to call
2562
+
2563
+ Returns
2564
+ -------
2565
+ List of InformalTags (InformalTagsResponse)
2566
+
2567
+ Raises
2568
+ ------
2569
+ InvalidParameterException
2570
+ one of the parameters is null or invalid or
2571
+ PropertyServerException
2572
+ There is a problem adding the element properties to the metadata repository or
2573
+ UserNotAuthorizedException
2574
+ the requesting user is not authorized to issue this request.
2575
+ """
2576
+ loop = asyncio.get_event_loop()
2577
+ response = loop.run_until_complete(
2578
+ self._async_get_attached_tags(
2579
+ element_guid,
2580
+ server_name,
2581
+ body,
2582
+ start_from,
2583
+ page_size,
2584
+ view_service_url_marker,
2585
+ access_service_url_marker,
2586
+ detailed_response,
2587
+ )
2588
+ )
2589
+ return response
2590
+
2591
+ #
2592
+ ## get_elements_by_tag implementation
2593
+ #
2594
+
2595
+ async def _async_get_elements_by_tag(
2596
+ self,
2597
+ tag_guid: str,
2598
+ server_name: str = None,
2599
+ body: dict = {},
2600
+ start_from: int = 0,
2601
+ page_size: int = max_paging_size,
2602
+ view_service_url_marker: str = None,
2603
+ access_service_url_marker: str = None,
2604
+ detailed_response: bool = False,
2605
+ ) -> dict | str:
2606
+ """
2607
+ Return the list of unique identifiers for elements that are linked to a specific tag either directly, or via one of its schema elements.
2608
+
2609
+ Parameters
2610
+ ----------
2611
+ tagGUID
2612
+ - unique identifier of tag.
2613
+ serverName
2614
+ - name of the server instances for this request
2615
+ requestBody
2616
+ - optional effective time
2617
+ startFrom
2618
+ - index of the list to start from (0 for start)
2619
+ pageSize
2620
+ - maximum number of elements to return.
2621
+ viewServiceURLMarker
2622
+ - optional view service URL marker (overrides accessServiceURLMarker)
2623
+ accessServiceURLMarker
2624
+ - optional access service URL marker used to identify which back end service to call
2625
+
2626
+ Returns
2627
+ -------
2628
+ element stubs list
2629
+
2630
+ Raises
2631
+ ------
2632
+ InvalidParameterException
2633
+ one of the parameters is null or invalid or
2634
+ PropertyServerException
2635
+ There is a problem adding the element properties to the metadata repository or
2636
+ UserNotAuthorizedException
2637
+ the requesting user is not authorized to issue this request.
2638
+ """
2639
+ if server_name is None:
2640
+ server_name = self.server_name
2641
+
2642
+ possible_query_params = query_string(
2643
+ [
2644
+ ("startFrom", start_from),
2645
+ ("pageSize", page_size),
2646
+ ("viewServiceUrlMarker", view_service_url_marker),
2647
+ ("accessServiceUrlMarker", access_service_url_marker),
2648
+ ]
2649
+ )
2650
+ url = f"{base_path(self,server_name)}/elements/by-tag/{tag_guid}/retrieve{possible_query_params}"
2651
+ response = await self._async_make_request("POST", url, body)
2652
+ return related_elements_response(response.json(), detailed_response)
2653
+
2654
+ def get_elements_by_tag(
2655
+ self,
2656
+ tag_guid: str,
2657
+ server_name: str = None,
2658
+ body: dict = {},
2659
+ start_from: int = 0,
2660
+ page_size: int = max_paging_size,
2661
+ view_service_url_marker: str = None,
2662
+ access_service_url_marker: str = None,
2663
+ detailed_response: bool = False,
2664
+ ) -> dict | str:
2665
+ """
2666
+ Return the list of unique identifiers for elements that are linked to a specific tag either directly, or via one of its schema elements.
2667
+
2668
+ Parameters
2669
+ ----------
2670
+ tagGUID
2671
+ - unique identifier of tag.
2672
+ serverName
2673
+ - name of the server instances for this request
2674
+ requestBody
2675
+ - optional effective time
2676
+ startFrom
2677
+ - index of the list to start from (0 for start)
2678
+ pageSize
2679
+ - maximum number of elements to return.
2680
+ viewServiceURLMarker
2681
+ - optional view service URL marker (overrides accessServiceURLMarker)
2682
+ accessServiceURLMarker
2683
+ - optional access service URL marker used to identify which back end service to call
2684
+
2685
+ Returns
2686
+ -------
2687
+ element stubs list
2688
+
2689
+ Raises
2690
+ ------
2691
+ InvalidParameterException
2692
+ one of the parameters is null or invalid or
2693
+ PropertyServerException
2694
+ There is a problem adding the element properties to the metadata repository or
2695
+ UserNotAuthorizedException
2696
+ the requesting user is not authorized to issue this request.
2697
+ """
2698
+ loop = asyncio.get_event_loop()
2699
+ response = loop.run_until_complete(
2700
+ self._async_get_elements_by_tag(
2701
+ tag_guid,
2702
+ server_name,
2703
+ body,
2704
+ start_from,
2705
+ page_size,
2706
+ view_service_url_marker,
2707
+ access_service_url_marker,
2708
+ detailed_response,
2709
+ )
2710
+ )
2711
+ return response
2712
+
2713
+ #
2714
+ ## get_note_by_guid implementation
2715
+ #
2716
+
2717
+ async def _async_get_note_by_guid(
2718
+ self,
2719
+ note_guid: str,
2720
+ server_name: str = None,
2721
+ body: str = {},
2722
+ view_service_url_marker: str = None,
2723
+ access_service_url_marker: str = None,
2724
+ detailed_response: bool = False,
2725
+ ) -> dict | str:
2726
+ """
2727
+ Retrieve the note metadata element with the supplied unique identifier.
2728
+
2729
+ Parameters
2730
+ ----------
2731
+ noteGUID
2732
+ - unique identifier of the requested metadata element
2733
+ serverName
2734
+ - name of the server instances for this request
2735
+ viewServiceURLMarker
2736
+ - optional view service URL marker (overrides accessServiceURLMarker)
2737
+ accessServiceURLMarker
2738
+ - optional access service URL marker used to identify which back end service to call
2739
+
2740
+ Returns
2741
+ -------
2742
+ matching metadata element
2743
+
2744
+ Raises
2745
+ ------
2746
+ InvalidParameterException
2747
+ one of the parameters is null or invalid or
2748
+ PropertyServerException
2749
+ There is a problem adding the element properties to the metadata repository or
2750
+ UserNotAuthorizedException
2751
+ the requesting user is not authorized to issue this request.
2752
+ """
2753
+ if server_name is None:
2754
+ server_name = self.server_name
2755
+
2756
+ possible_query_params = query_string(
2757
+ [
2758
+ ("viewServiceUrlMarker", view_service_url_marker),
2759
+ ("accessServiceUrlMarker", access_service_url_marker),
2760
+ ]
2761
+ )
2762
+ url = f"{base_path(self,server_name)}/note-logs/notes/{note_guid}/retrieve{possible_query_params}"
2763
+ response = await self._async_make_request("POST", url, body)
2764
+ return element_response(response.json(), "element", detailed_response)
2765
+
2766
+ def get_note_by_guid(
2767
+ self,
2768
+ note_guid: str,
2769
+ server_name: str = None,
2770
+ body: str = {},
2771
+ view_service_url_marker: str = None,
2772
+ access_service_url_marker: str = None,
2773
+ detailed_response: bool = False,
2774
+ ) -> dict | str:
2775
+ """
2776
+ Retrieve the note metadata element with the supplied unique identifier.
2777
+
2778
+ Parameters
2779
+ ----------
2780
+ noteGUID
2781
+ - unique identifier of the requested metadata element
2782
+ serverName
2783
+ - name of the server instances for this request
2784
+ viewServiceURLMarker
2785
+ - optional view service URL marker (overrides accessServiceURLMarker)
2786
+ accessServiceURLMarker
2787
+ - optional access service URL marker used to identify which back end service to call
2788
+
2789
+ Returns
2790
+ -------
2791
+ matching metadata element
2792
+
2793
+ Raises
2794
+ ------
2795
+ InvalidParameterException
2796
+ one of the parameters is null or invalid or
2797
+ PropertyServerException
2798
+ There is a problem adding the element properties to the metadata repository or
2799
+ UserNotAuthorizedException
2800
+ the requesting user is not authorized to issue this request.
2801
+ """
2802
+ loop = asyncio.get_event_loop()
2803
+ response = loop.run_until_complete(
2804
+ self._async_get_note_by_guid(
2805
+ note_guid,
2806
+ server_name,
2807
+ body,
2808
+ view_service_url_marker,
2809
+ access_service_url_marker,
2810
+ detailed_response,
2811
+ )
2812
+ )
2813
+ return response
2814
+
2815
+ #
2816
+ ## get_note_log_by_guid implementation
2817
+ #
2818
+
2819
+ async def _async_get_note_log_by_guid(
2820
+ self,
2821
+ note_log_guid: str,
2822
+ server_name: str = None,
2823
+ body: str = {},
2824
+ view_service_url_marker: str = None,
2825
+ access_service_url_marker: str = None,
2826
+ detailed_response: bool = False,
2827
+ ) -> dict | str:
2828
+ """
2829
+ Retrieve the note log metadata element with the supplied unique identifier.
2830
+
2831
+ Parameters
2832
+ ----------
2833
+ serverName
2834
+ - name of the server instances for this request
2835
+ noteLogGUID
2836
+ - unique identifier of the requested metadata element
2837
+ viewServiceURLMarker
2838
+ - optional view service URL marker (overrides accessServiceURLMarker)
2839
+ accessServiceURLMarker
2840
+ - optional access service URL marker used to identify which back end service to call
2841
+ requestBody
2842
+ - optional effective time
2843
+
2844
+ Returns
2845
+ -------
2846
+ Note details
2847
+
2848
+ Raises
2849
+ ------
2850
+ InvalidParameterException
2851
+ one of the parameters is null or invalid or
2852
+ PropertyServerException
2853
+ There is a problem adding the element properties to the metadata repository or
2854
+ UserNotAuthorizedException
2855
+ the requesting user is not authorized to issue this request.
2856
+ """
2857
+ if server_name is None:
2858
+ server_name = self.server_name
2859
+
2860
+ possible_query_params = query_string(
2861
+ [
2862
+ ("viewServiceUrlMarker", view_service_url_marker),
2863
+ ("accessServiceUrlMarker", access_service_url_marker),
2864
+ ]
2865
+ )
2866
+ url = f"{base_path(self,server_name)}/note-logs/{note_log_guid}/retrieve{possible_query_params}"
2867
+ response = await self._async_make_request("POST", url, body)
2868
+ return element_response(response.json(), "element", detailed_response)
2869
+
2870
+ def get_note_log_by_guid(
2871
+ self,
2872
+ note_log_guid: str,
2873
+ server_name: str = None,
2874
+ body: str = {},
2875
+ view_service_url_marker: str = None,
2876
+ access_service_url_marker: str = None,
2877
+ detailed_response: bool = False,
2878
+ ) -> dict | str:
2879
+ """
2880
+ Retrieve the note log metadata element with the supplied unique identifier.
2881
+
2882
+ Parameters
2883
+ ----------
2884
+ serverName
2885
+ - name of the server instances for this request
2886
+ noteLogGUID
2887
+ - unique identifier of the requested metadata element
2888
+ viewServiceURLMarker
2889
+ - optional view service URL marker (overrides accessServiceURLMarker)
2890
+ accessServiceURLMarker
2891
+ - optional access service URL marker used to identify which back end service to call
2892
+ requestBody
2893
+ - optional effective time
2894
+
2895
+ Returns
2896
+ -------
2897
+ Note details
2898
+
2899
+ Raises
2900
+ ------
2901
+ InvalidParameterException
2902
+ one of the parameters is null or invalid or
2903
+ PropertyServerException
2904
+ There is a problem adding the element properties to the metadata repository or
2905
+ UserNotAuthorizedException
2906
+ the requesting user is not authorized to issue this request.
2907
+ """
2908
+ loop = asyncio.get_event_loop()
2909
+ response = loop.run_until_complete(
2910
+ self._async_get_note_log_by_guid(
2911
+ note_log_guid,
2912
+ server_name,
2913
+ body,
2914
+ view_service_url_marker,
2915
+ access_service_url_marker,
2916
+ detailed_response,
2917
+ )
2918
+ )
2919
+ return response
2920
+
2921
+ #
2922
+ ## get_note_logs_by_name implementation
2923
+ #
2924
+
2925
+ async def _async_get_note_logs_by_name(
2926
+ self,
2927
+ body: dict,
2928
+ server_name: str = None,
2929
+ start_from: int = 0,
2930
+ page_size: int = max_paging_size,
2931
+ view_service_url_marker: str = None,
2932
+ access_service_url_marker: str = None,
2933
+ detailed_response: bool = False,
2934
+ ) -> dict | str:
2935
+ """
2936
+ Retrieve the list of note log metadata elements with a matching qualified or display name.
2937
+
2938
+ There are no wildcards supported on this request.
2939
+
2940
+ Parameters
2941
+ ----------
2942
+ serverName
2943
+ - name of the server instances for this request
2944
+ startFrom
2945
+ - paging start point
2946
+ pageSize
2947
+ - maximum results that can be returned
2948
+ viewServiceURLMarker
2949
+ - optional view service URL marker (overrides accessServiceURLMarker)
2950
+ accessServiceURLMarker
2951
+ - optional access service URL marker used to identify which back end service to call
2952
+ requestBody
2953
+ - name to search for and correlators
2954
+
2955
+ Returns
2956
+ -------
2957
+ list of matching note logs
2958
+
2959
+ Raises
2960
+ ------
2961
+ InvalidParameterException
2962
+ one of the parameters is null or invalid or
2963
+ PropertyServerException
2964
+ There is a problem adding the element properties to the metadata repository or
2965
+ UserNotAuthorizedException
2966
+ the requesting user is not authorized to issue this request.
2967
+ """
2968
+ if server_name is None:
2969
+ server_name = self.server_name
2970
+
2971
+ possible_query_params = query_string(
2972
+ [
2973
+ ("startFrom", start_from),
2974
+ ("pageSize", page_size),
2975
+ ("viewServiceUrlMarker", view_service_url_marker),
2976
+ ("accessServiceUrlMarker", access_service_url_marker),
2977
+ ]
2978
+ )
2979
+ url = f"{base_path(self,server_name)}/note-logs/by-name{possible_query_params}"
2980
+ response = await self._async_make_request("POST", url, body)
2981
+ return elements_response(response.json(), "elementList", detailed_response)
2982
+
2983
+ def get_note_logs_by_name(
2984
+ self,
2985
+ body: dict,
2986
+ server_name: str = None,
2987
+ start_from: int = 0,
2988
+ page_size: int = max_paging_size,
2989
+ view_service_url_marker: str = None,
2990
+ access_service_url_marker: str = None,
2991
+ detailed_response: bool = False,
2992
+ ) -> dict | str:
2993
+ """
2994
+ Retrieve the list of note log metadata elements with a matching qualified or display name.
2995
+
2996
+ There are no wildcards supported on this request.
2997
+
2998
+ Parameters
2999
+ ----------
3000
+ body
3001
+ - name to search for and correlators
3002
+ serverName
3003
+ - name of the server instances for this request
3004
+ startFrom
3005
+ - paging start point
3006
+ pageSize
3007
+ - maximum results that can be returned
3008
+ viewServiceURLMarker
3009
+ - optional view service URL marker (overrides accessServiceURLMarker)
3010
+ accessServiceURLMarker
3011
+ - optional access service URL marker used to identify which back end service to call
3012
+
3013
+ Returns
3014
+ -------
3015
+ list of matching note logs
3016
+
3017
+ Raises
3018
+ ------
3019
+ InvalidParameterException
3020
+ one of the parameters is null or invalid or
3021
+ PropertyServerException
3022
+ There is a problem adding the element properties to the metadata repository or
3023
+ UserNotAuthorizedException
3024
+ the requesting user is not authorized to issue this request.
3025
+ """
3026
+ loop = asyncio.get_event_loop()
3027
+ response = loop.run_until_complete(
3028
+ self._async_get_note_logs_by_name(
3029
+ body,
3030
+ server_name,
3031
+ start_from,
3032
+ page_size,
3033
+ view_service_url_marker,
3034
+ access_service_url_marker,
3035
+ detailed_response,
3036
+ )
3037
+ )
3038
+ return response
3039
+
3040
+ #
3041
+ ## get_note_logs_for_element implementation
3042
+ #
3043
+
3044
+ async def _async_get_note_logs_for_element(
3045
+ self,
3046
+ element_guid: str,
3047
+ body: dict = {},
3048
+ server_name: str = None,
3049
+ start_from: int = 0,
3050
+ page_size: int = max_paging_size,
3051
+ view_service_url_marker: str = None,
3052
+ access_service_url_marker: str = None,
3053
+ detailed_response: bool = False,
3054
+ ) -> dict | str:
3055
+ """
3056
+ Retrieve the list of note log metadata elements attached to the element.
3057
+
3058
+ Parameters
3059
+ ----------
3060
+ elementGUID
3061
+ - element to start from
3062
+ body
3063
+ - optional effective time
3064
+ serverName
3065
+ - name of the server instances for this request
3066
+ startFrom
3067
+ - paging start point
3068
+ pageSize
3069
+ - maximum results that can be returned
3070
+ viewServiceURLMarker
3071
+ - optional view service URL marker (overrides accessServiceURLMarker)
3072
+ accessServiceURLMarker
3073
+ - optional access service URL marker used to identify which back end service to call
3074
+
3075
+ Returns
3076
+ -------
3077
+ list of note logs
3078
+
3079
+ Raises
3080
+ ------
3081
+ InvalidParameterException
3082
+ one of the parameters is null or invalid or
3083
+ PropertyServerException
3084
+ There is a problem adding the element properties to the metadata repository or
3085
+ UserNotAuthorizedException
3086
+ the requesting user is not authorized to issue this request.
3087
+ """
3088
+ if server_name is None:
3089
+ server_name = self.server_name
3090
+
3091
+ possible_query_params = query_string(
3092
+ [
3093
+ ("startFrom", start_from),
3094
+ ("pageSize", page_size),
3095
+ ("viewServiceUrlMarker", view_service_url_marker),
3096
+ ("accessServiceUrlMarker", access_service_url_marker),
3097
+ ]
3098
+ )
3099
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/note-logs/retrieve{possible_query_params}"
3100
+ response = await self._async_make_request("POST", url, body)
3101
+ return elements_response(response.json(), "elementList", detailed_response)
3102
+
3103
+ def get_note_logs_for_element(
3104
+ self,
3105
+ element_guid: str,
3106
+ body: dict = {},
3107
+ server_name: str = None,
3108
+ start_from: int = 0,
3109
+ page_size: int = max_paging_size,
3110
+ view_service_url_marker: str = None,
3111
+ access_service_url_marker: str = None,
3112
+ detailed_response: bool = False,
3113
+ ) -> dict | str:
3114
+ """
3115
+ Retrieve the list of note log metadata elements attached to the element.
3116
+
3117
+ Parameters
3118
+ ----------
3119
+ elementGUID
3120
+ - element to start from
3121
+ body
3122
+ - optional effective time
3123
+ serverName
3124
+ - name of the server instances for this request
3125
+ startFrom
3126
+ - paging start point
3127
+ pageSize
3128
+ - maximum results that can be returned
3129
+ viewServiceURLMarker
3130
+ - optional view service URL marker (overrides accessServiceURLMarker)
3131
+ accessServiceURLMarker
3132
+ - optional access service URL marker used to identify which back end service to call
3133
+
3134
+ Returns
3135
+ -------
3136
+ list of note logs
3137
+
3138
+ Raises
3139
+ ------
3140
+ InvalidParameterException
3141
+ one of the parameters is null or invalid or
3142
+ PropertyServerException
3143
+ There is a problem adding the element properties to the metadata repository or
3144
+ UserNotAuthorizedException
3145
+ the requesting user is not authorized to issue this request.
3146
+ """
3147
+ loop = asyncio.get_event_loop()
3148
+ response = loop.run_until_complete(
3149
+ self._async_get_note_logs_for_element(
3150
+ element_guid,
3151
+ body,
3152
+ server_name,
3153
+ start_from,
3154
+ page_size,
3155
+ view_service_url_marker,
3156
+ access_service_url_marker,
3157
+ detailed_response,
3158
+ )
3159
+ )
3160
+ return response
3161
+
3162
+ #
3163
+ ## get_notes_for_note_log implementation
3164
+ #
3165
+
3166
+ async def _async_get_notes_for_note_log(
3167
+ self,
3168
+ note_log_guid: str,
3169
+ body: dict = {},
3170
+ server_name: str = None,
3171
+ start_from: int = 0,
3172
+ page_size: int = max_paging_size,
3173
+ view_service_url_marker: str = None,
3174
+ access_service_url_marker: str = None,
3175
+ detailed_response: bool = False,
3176
+ ) -> dict | str:
3177
+ """
3178
+ Retrieve the list of notes associated with a note log.
3179
+
3180
+ Parameters
3181
+ ----------
3182
+ noteLogGUID
3183
+ - unique identifier of the note log of interest
3184
+ body
3185
+ - optional effective time
3186
+ serverName
3187
+ - name of the server instances for this request
3188
+ startFrom
3189
+ - paging start point
3190
+ pageSize
3191
+ - maximum results that can be returned
3192
+ viewServiceURLMarker
3193
+ - optional view service URL marker (overrides accessServiceURLMarker)
3194
+ accessServiceURLMarker
3195
+ - optional access service URL marker used to identify which back end service to call
3196
+
3197
+ Returns
3198
+ -------
3199
+ list of notes
3200
+
3201
+ Raises
3202
+ ------
3203
+ InvalidParameterException
3204
+ one of the parameters is null or invalid or
3205
+ PropertyServerException
3206
+ There is a problem adding the element properties to the metadata repository or
3207
+ UserNotAuthorizedException
3208
+ the requesting user is not authorized to issue this request.
3209
+ """
3210
+ if server_name is None:
3211
+ server_name = self.server_name
3212
+
3213
+ possible_query_params = query_string(
3214
+ [
3215
+ ("startFrom", start_from),
3216
+ ("pageSize", page_size),
3217
+ ("viewServiceUrlMarker", view_service_url_marker),
3218
+ ("accessServiceUrlMarker", access_service_url_marker),
3219
+ ]
3220
+ )
3221
+ url = f"{base_path(self,server_name)}/note-logs/{note_log_guid}/notes/retrieve{possible_query_params}"
3222
+ response = await self._async_make_request("POST", url, body)
3223
+ return elements_response(response.json(), "elementList", detailed_response)
3224
+
3225
+ def get_notes_for_note_log(
3226
+ self,
3227
+ note_log_guid: str,
3228
+ body: dict = {},
3229
+ server_name: str = None,
3230
+ start_from: int = 0,
3231
+ page_size: int = max_paging_size,
3232
+ view_service_url_marker: str = None,
3233
+ access_service_url_marker: str = None,
3234
+ detailed_response: bool = False,
3235
+ ) -> dict | str:
3236
+ """
3237
+ Retrieve the list of notes associated with a note log.
3238
+
3239
+ Parameters
3240
+ ----------
3241
+ noteLogGUID
3242
+ - unique identifier of the note log of interest
3243
+ body
3244
+ - optional effective time
3245
+ serverName
3246
+ - name of the server instances for this request
3247
+ startFrom
3248
+ - paging start point
3249
+ pageSize
3250
+ - maximum results that can be returned
3251
+ viewServiceURLMarker
3252
+ - optional view service URL marker (overrides accessServiceURLMarker)
3253
+ accessServiceURLMarker
3254
+ - optional access service URL marker used to identify which back end service to call
3255
+
3256
+ Returns
3257
+ -------
3258
+ list of notes
3259
+
3260
+ Raises
3261
+ ------
3262
+ InvalidParameterException
3263
+ one of the parameters is null or invalid or
3264
+ PropertyServerException
3265
+ There is a problem adding the element properties to the metadata repository or
3266
+ UserNotAuthorizedException
3267
+ the requesting user is not authorized to issue this request.
3268
+ """
3269
+ loop = asyncio.get_event_loop()
3270
+ response = loop.run_until_complete(
3271
+ self._async_get_notes_for_note_log(
3272
+ note_log_guid,
3273
+ body,
3274
+ server_name,
3275
+ start_from,
3276
+ page_size,
3277
+ view_service_url_marker,
3278
+ access_service_url_marker,
3279
+ detailed_response,
3280
+ )
3281
+ )
3282
+ return response
3283
+
3284
+ #
3285
+ ## get_tag implementation
3286
+ #
3287
+
3288
+ async def _async_get_tag(
3289
+ self,
3290
+ tag_guid: str,
3291
+ server_name: str = None,
3292
+ view_service_url_marker: str = None,
3293
+ access_service_url_marker: str = None,
3294
+ detailed_response: bool = False,
3295
+ ) -> dict | str:
3296
+ """
3297
+ Return the informal tag for the supplied unique identifier (tagGUID).
3298
+
3299
+ Parameters
3300
+ ----------
3301
+ serverName
3302
+ - name of the server instances for this request.
3303
+ tagGUID
3304
+ - unique identifier of the meaning.
3305
+ viewServiceURLMarker
3306
+ - optional view service URL marker (overrides accessServiceURLMarker)
3307
+ accessServiceURLMarker
3308
+ - optional access service URL marker used to identify which back end service to call
3309
+ requestBody
3310
+ - optional effective time
3311
+
3312
+ Returns
3313
+ -------
3314
+ list of tag objects
3315
+
3316
+ Raises
3317
+ ------
3318
+ InvalidParameterException
3319
+ one of the parameters is null or invalid or
3320
+ PropertyServerException
3321
+ There is a problem adding the element properties to the metadata repository or
3322
+ UserNotAuthorizedException
3323
+ the requesting user is not authorized to issue this request.
3324
+ """
3325
+
3326
+ if server_name is None:
3327
+ server_name = self.server_name
3328
+
3329
+ possible_query_params = query_string(
3330
+ [
3331
+ ("viewServiceUrlMarker", view_service_url_marker),
3332
+ ("accessServiceUrlMarker", access_service_url_marker),
3333
+ ]
3334
+ )
3335
+ url = f"{base_path(self,server_name)}/tags/{tag_guid}/retrieve{possible_query_params}"
3336
+
3337
+ response = await self._async_make_request("POST", url, {})
3338
+ return element_response(response.json(), "tag", detailed_response)
3339
+
3340
+ def get_tag(
3341
+ self,
3342
+ tag_guid: str,
3343
+ server_name: str = None,
3344
+ view_service_url_marker: str = None,
3345
+ access_service_url_marker: str = None,
3346
+ detailed_response: bool = False,
3347
+ ) -> dict | str:
3348
+ """
3349
+ Return the informal tag for the supplied unique identifier (tagGUID).
3350
+
3351
+ Parameters
3352
+ ----------
3353
+ serverName
3354
+ - name of the server instances for this request.
3355
+ tagGUID
3356
+ - unique identifier of the meaning.
3357
+ viewServiceURLMarker
3358
+ - optional view service URL marker (overrides accessServiceURLMarker)
3359
+ accessServiceURLMarker
3360
+ - optional access service URL marker used to identify which back end service to call
3361
+ requestBody
3362
+ - optional effective time
3363
+
3364
+ Returns
3365
+ -------
3366
+ tag object
3367
+
3368
+ Raises
3369
+ ------
3370
+ InvalidParameterException
3371
+ one of the parameters is null or invalid or
3372
+ PropertyServerException
3373
+ There is a problem adding the element properties to the metadata repository or
3374
+ UserNotAuthorizedException
3375
+ the requesting user is not authorized to issue this request.
3376
+ """
3377
+ loop = asyncio.get_event_loop()
3378
+ response = loop.run_until_complete(
3379
+ self._async_get_tag(
3380
+ tag_guid,
3381
+ server_name,
3382
+ view_service_url_marker,
3383
+ access_service_url_marker,
3384
+ detailed_response,
3385
+ )
3386
+ )
3387
+ return response
3388
+
3389
+ #
3390
+ ## get_tags_by_name implementation
3391
+ #
3392
+
3393
+ async def _async_get_tags_by_name(
3394
+ self,
3395
+ body: str,
3396
+ server_name: str = None,
3397
+ start_from: int = 0,
3398
+ page_size: int = max_paging_size,
3399
+ view_service_url_marker: str = None,
3400
+ access_service_url_marker: str = None,
3401
+ detailed_response: bool = False,
3402
+ ) -> dict | str:
3403
+ """
3404
+ Return the tags exactly matching the supplied name.
3405
+
3406
+ Parameters
3407
+ ----------
3408
+ serverName
3409
+ - name of the server instances for this request.
3410
+ requestBody
3411
+ - name of tag.
3412
+ startFrom
3413
+ - index of the list to start from (0 for start).
3414
+ pageSize
3415
+ - maximum number of elements to return.
3416
+ viewServiceURLMarker
3417
+ - optional view service URL marker (overrides accessServiceURLMarker)
3418
+ accessServiceURLMarker
3419
+ - optional access service URL marker used to identify which back end service to call
3420
+
3421
+ Returns
3422
+ -------
3423
+ list of tag objects
3424
+
3425
+ Raises
3426
+ ------
3427
+ InvalidParameterException
3428
+ one of the parameters is null or invalid or
3429
+ PropertyServerException
3430
+ There is a problem adding the element properties to the metadata repository or
3431
+ UserNotAuthorizedException
3432
+ the requesting user is not authorized to issue this request.
3433
+ """
3434
+ if server_name is None:
3435
+ server_name = self.server_name
3436
+
3437
+ possible_query_params = query_string(
3438
+ [
3439
+ ("startFrom", start_from),
3440
+ ("pageSize", page_size),
3441
+ ("viewServiceUrlMarker", view_service_url_marker),
3442
+ ("accessServiceUrlMarker", access_service_url_marker),
3443
+ ]
3444
+ )
3445
+ url = f"{base_path(self,server_name)}/tags/by-name{possible_query_params}"
3446
+
3447
+ response = await self._async_make_request("POST", url, body)
3448
+ return elements_response(response.json(), "tags", detailed_response)
3449
+
3450
+ def get_tags_by_name(
3451
+ self,
3452
+ body: str,
3453
+ server_name: str = None,
3454
+ start_from: int = 0,
3455
+ page_size: int = max_paging_size,
3456
+ view_service_url_marker: str = None,
3457
+ access_service_url_marker: str = None,
3458
+ detailed_response: bool = False,
3459
+ ) -> dict | str:
3460
+ """
3461
+ Return the tags exactly matching the supplied name.
3462
+
3463
+ Parameters
3464
+ ----------
3465
+ serverName
3466
+ - name of the server instances for this request.
3467
+ requestBody
3468
+ - name of tag.
3469
+ startFrom
3470
+ - index of the list to start from (0 for start).
3471
+ pageSize
3472
+ - maximum number of elements to return.
3473
+ viewServiceURLMarker
3474
+ - optional view service URL marker (overrides accessServiceURLMarker)
3475
+ accessServiceURLMarker
3476
+ - optional access service URL marker used to identify which back end service to call
3477
+
3478
+ Returns
3479
+ -------
3480
+ list of tag objects
3481
+
3482
+ Raises
3483
+ ------
3484
+ InvalidParameterException
3485
+ one of the parameters is null or invalid or
3486
+ PropertyServerException
3487
+ There is a problem adding the element properties to the metadata repository or
3488
+ UserNotAuthorizedException
3489
+ the requesting user is not authorized to issue this request.
3490
+ """
3491
+ loop = asyncio.get_event_loop()
3492
+ response = loop.run_until_complete(
3493
+ self._async_get_tags_by_name(
3494
+ body,
3495
+ server_name,
3496
+ start_from,
3497
+ page_size,
3498
+ view_service_url_marker,
3499
+ access_service_url_marker,
3500
+ detailed_response,
3501
+ )
3502
+ )
3503
+ return response
3504
+
3505
+ #
3506
+ ## remove_comment_from_element implementation
3507
+ #
3508
+
3509
+ async def _async_remove_comment_from_element(
3510
+ self,
3511
+ comment_guid: str,
3512
+ server_name: str = None,
3513
+ body: dict = {},
3514
+ view_service_url_marker: str = None,
3515
+ access_service_url_marker: str = None,
3516
+ ) -> dict | str:
3517
+ """
3518
+ Removes a comment added to the element by this user.
3519
+
3520
+ This deletes the link to the comment, the comment itself and any comment replies attached to it.
3521
+
3522
+ Parameters
3523
+ ----------
3524
+ commentGUID
3525
+ - String - unique id for the comment object
3526
+ serverName
3527
+ - name of the server instances for this request
3528
+ viewServiceURLMarker
3529
+ - optional view service URL marker (overrides accessServiceURLMarker)
3530
+ accessServiceURLMarker
3531
+ - optional access service URL marker used to identify which back end service to call
3532
+ requestBody
3533
+ - containing type of comment enum and the text of the comment.
3534
+
3535
+ Returns
3536
+ -------
3537
+ VoidResponse
3538
+
3539
+ Raises
3540
+ ------
3541
+ InvalidParameterException
3542
+ one of the parameters is null or invalid or
3543
+ PropertyServerException
3544
+ There is a problem adding the element properties to the metadata repository or
3545
+ UserNotAuthorizedException
3546
+ the requesting user is not authorized to issue this request.
3547
+ """
3548
+ if server_name is None:
3549
+ server_name = self.server_name
3550
+
3551
+ possible_query_params = query_string(
3552
+ [
3553
+ ("viewServiceUrlMarker", view_service_url_marker),
3554
+ ("accessServiceUrlMarker", access_service_url_marker),
3555
+ ]
3556
+ )
3557
+ url = f"{base_path(self,server_name)}/comments/{comment_guid}/remove{possible_query_params}"
3558
+ response = await self._async_make_request("POST", url, body)
3559
+ return response.json()
3560
+
3561
+ def remove_comment_from_element(
3562
+ self,
3563
+ comment_guid: str,
3564
+ server_name: str = None,
3565
+ body: dict = {},
3566
+ view_service_url_marker: str = None,
3567
+ access_service_url_marker: str = None,
3568
+ ) -> dict | str:
3569
+ """
3570
+ Removes a comment added to the element by this user.
3571
+
3572
+ This deletes the link to the comment, the comment itself and any comment replies attached to it.
3573
+
3574
+ Parameters
3575
+ ----------
3576
+ commentGUID
3577
+ - String - unique id for the comment object
3578
+ serverName
3579
+ - name of the server instances for this request
3580
+ viewServiceURLMarker
3581
+ - optional view service URL marker (overrides accessServiceURLMarker)
3582
+ accessServiceURLMarker
3583
+ - optional access service URL marker used to identify which back end service to call
3584
+ requestBody
3585
+ - containing type of comment enum and the text of the comment.
3586
+
3587
+ Returns
3588
+ -------
3589
+ VoidResponse
3590
+
3591
+ Raises
3592
+ ------
3593
+ InvalidParameterException
3594
+ one of the parameters is null or invalid or
3595
+ PropertyServerException
3596
+ There is a problem adding the element properties to the metadata repository or
3597
+ UserNotAuthorizedException
3598
+ the requesting user is not authorized to issue this request.
3599
+ """
3600
+ loop = asyncio.get_event_loop()
3601
+ response = loop.run_until_complete(
3602
+ self._async_remove_comment_from_element(
3603
+ comment_guid,
3604
+ server_name,
3605
+ body,
3606
+ view_service_url_marker,
3607
+ access_service_url_marker,
3608
+ )
3609
+ )
3610
+ return response
3611
+
3612
+ #
3613
+ ## remove_like_from_element implementation
3614
+ #
3615
+
3616
+ async def _async_remove_like_from_element(
3617
+ self,
3618
+ element_guid: str,
3619
+ server_name: str = None,
3620
+ body: dict = {},
3621
+ view_service_url_marker: str = None,
3622
+ access_service_url_marker: str = None,
3623
+ ) -> dict | str:
3624
+ """
3625
+ Removes a "Like" added to the element by this user.
3626
+
3627
+ Parameters
3628
+ ----------
3629
+ serverName
3630
+ - name of the server instances for this request.
3631
+ elementGUID
3632
+ - unique identifier for the element where the like is attached.
3633
+ viewServiceURLMarker
3634
+ - optional view service URL marker (overrides accessServiceURLMarker)
3635
+ accessServiceURLMarker
3636
+ - optional access service URL marker used to identify which back end service to call
3637
+ requestBody
3638
+ - containing type of comment enum and the text of the comment.
3639
+
3640
+ Returns
3641
+ -------
3642
+ VoidResponse
3643
+
3644
+ Raises
3645
+ ------
3646
+ InvalidParameterException
3647
+ one of the parameters is null or invalid or
3648
+ PropertyServerException
3649
+ There is a problem adding the element properties to the metadata repository or
3650
+ UserNotAuthorizedException
3651
+ the requesting user is not authorized to issue this request.
3652
+ """
3653
+ if server_name is None:
3654
+ server_name = self.server_name
3655
+
3656
+ possible_query_params = query_string(
3657
+ [
3658
+ ("viewServiceUrlMarker", view_service_url_marker),
3659
+ ("accessServiceUrlMarker", access_service_url_marker),
3660
+ ]
3661
+ )
3662
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/likes/remove{possible_query_params}"
3663
+ response = await self._async_make_request("POST", url, body)
3664
+ return response.json()
3665
+
3666
+ def remove_like_from_element(
3667
+ self,
3668
+ element_guid: str,
3669
+ server_name: str = None,
3670
+ body: dict = {},
3671
+ view_service_url_marker: str = None,
3672
+ access_service_url_marker: str = None,
3673
+ ) -> dict | str:
3674
+ """
3675
+ Removes a "Like" added to the element by this user.
3676
+
3677
+ Parameters
3678
+ ----------
3679
+ serverName
3680
+ - name of the server instances for this request.
3681
+ elementGUID
3682
+ - unique identifier for the element where the like is attached.
3683
+ viewServiceURLMarker
3684
+ - optional view service URL marker (overrides accessServiceURLMarker)
3685
+ accessServiceURLMarker
3686
+ - optional access service URL marker used to identify which back end service to call
3687
+ requestBody
3688
+ - containing type of comment enum and the text of the comment.
3689
+
3690
+ Returns
3691
+ -------
3692
+ VoidResponse
3693
+
3694
+ Raises
3695
+ ------
3696
+ InvalidParameterException
3697
+ one of the parameters is null or invalid or
3698
+ PropertyServerException
3699
+ There is a problem adding the element properties to the metadata repository or
3700
+ UserNotAuthorizedException
3701
+ the requesting user is not authorized to issue this request.
3702
+ """
3703
+ loop = asyncio.get_event_loop()
3704
+ response = loop.run_until_complete(
3705
+ self._async_remove_like_from_element(
3706
+ element_guid,
3707
+ server_name,
3708
+ body,
3709
+ view_service_url_marker,
3710
+ access_service_url_marker,
3711
+ )
3712
+ )
3713
+ return response
3714
+
3715
+ #
3716
+ ## remove_note implementation
3717
+ #
3718
+
3719
+ async def _async_remove_note(
3720
+ self,
3721
+ note_guid: str,
3722
+ server_name: str = None,
3723
+ body: dict = {},
3724
+ view_service_url_marker: str = None,
3725
+ access_service_url_marker: str = None,
3726
+ ) -> dict | str:
3727
+ """
3728
+ Removes a note from the repository.
3729
+
3730
+ All the relationships to referenceables are lost.
3731
+
3732
+ Parameters
3733
+ ----------
3734
+ serverName
3735
+ - name of the server instances for this request
3736
+ noteGUID
3737
+ - unique id for the note .
3738
+ viewServiceURLMarker
3739
+ - optional view service URL marker (overrides accessServiceURLMarker)
3740
+ accessServiceURLMarker
3741
+ - optional access service URL marker used to identify which back end service to call
3742
+ requestBody
3743
+ - null request body.
3744
+
3745
+
3746
+ Returns
3747
+ -------
3748
+ VoidResponse
3749
+
3750
+ Raises
3751
+ ------
3752
+ InvalidParameterException
3753
+ one of the parameters is null or invalid or
3754
+ PropertyServerException
3755
+ There is a problem adding the element properties to the metadata repository or
3756
+ UserNotAuthorizedException
3757
+ the requesting user is not authorized to issue this request.
3758
+ """
3759
+ if server_name is None:
3760
+ server_name = self.server_name
3761
+
3762
+ possible_query_params = query_string(
3763
+ [
3764
+ ("viewServiceUrlMarker", view_service_url_marker),
3765
+ ("accessServiceUrlMarker", access_service_url_marker),
3766
+ ]
3767
+ )
3768
+ url = f"{base_path(self,server_name)}/notes/{note_guid}/remove{possible_query_params}"
3769
+ response = await self._async_make_request("POST", url, body)
3770
+ return response.json()
3771
+
3772
+ def remove_note(
3773
+ self,
3774
+ note_guid: str,
3775
+ server_name: str = None,
3776
+ body: dict = {},
3777
+ view_service_url_marker: str = None,
3778
+ access_service_url_marker: str = None,
3779
+ ) -> dict | str:
3780
+ """
3781
+ Removes a note from the repository.
3782
+
3783
+ All the relationships to referenceables are lost.
3784
+
3785
+ Parameters
3786
+ ----------
3787
+ noteGUID
3788
+ - unique id for the note .
3789
+ serverName
3790
+ - name of the server instances for this request
3791
+ requestBody
3792
+ - null request body.
3793
+ viewServiceURLMarker
3794
+ - optional view service URL marker (overrides accessServiceURLMarker)
3795
+ accessServiceURLMarker
3796
+ - optional access service URL marker used to identify which back end service to call
3797
+
3798
+
3799
+ Returns
3800
+ -------
3801
+ VoidResponse
3802
+
3803
+ Raises
3804
+ ------
3805
+ InvalidParameterException
3806
+ one of the parameters is null or invalid or
3807
+ PropertyServerException
3808
+ There is a problem adding the element properties to the metadata repository or
3809
+ UserNotAuthorizedException
3810
+ the requesting user is not authorized to issue this request.
3811
+ """
3812
+ loop = asyncio.get_event_loop()
3813
+ response = loop.run_until_complete(
3814
+ self._async_remove_note(
3815
+ note_guid,
3816
+ server_name,
3817
+ body,
3818
+ view_service_url_marker,
3819
+ access_service_url_marker,
3820
+ )
3821
+ )
3822
+ return response
3823
+
3824
+ #
3825
+ ## remove_note_log implementation
3826
+ #
3827
+
3828
+ async def _async_remove_note_log(
3829
+ self,
3830
+ note_log_guid: str,
3831
+ server_name: str = None,
3832
+ body: dict = {},
3833
+ view_service_url_marker: str = None,
3834
+ access_service_url_marker: str = None,
3835
+ ) -> dict | str:
3836
+ """
3837
+ Removes a note log from the repository.
3838
+
3839
+ All the relationships to referenceables are lost.
3840
+
3841
+ Parameters
3842
+ ----------
3843
+ noteLogGUID
3844
+ - unique id for the note log.
3845
+ serverName
3846
+ - name of the server instances for this request
3847
+ requestBody
3848
+ - null request body.
3849
+ viewServiceURLMarker
3850
+ - optional view service URL marker (overrides accessServiceURLMarker)
3851
+ accessServiceURLMarker
3852
+ - optional access service URL marker used to identify which back end service to call
3853
+
3854
+ Returns
3855
+ -------
3856
+ VoidResponse
3857
+
3858
+ Raises
3859
+ ------
3860
+ InvalidParameterException
3861
+ one of the parameters is null or invalid or
3862
+ PropertyServerException
3863
+ There is a problem adding the element properties to the metadata repository or
3864
+ UserNotAuthorizedException
3865
+ the requesting user is not authorized to issue this request.
3866
+ """
3867
+ if server_name is None:
3868
+ server_name = self.server_name
3869
+
3870
+ possible_query_params = query_string(
3871
+ [
3872
+ ("viewServiceUrlMarker", view_service_url_marker),
3873
+ ("accessServiceUrlMarker", access_service_url_marker),
3874
+ ]
3875
+ )
3876
+ url = f"{base_path(self,server_name)}/note-logs/{note_log_guid}/remove{possible_query_params}"
3877
+ response = await self._async_make_request("POST", url, body)
3878
+ return response.json()
3879
+
3880
+ def remove_note_log(
3881
+ self,
3882
+ note_log_guid: str,
3883
+ server_name: str = None,
3884
+ body: dict = {},
3885
+ view_service_url_marker: str = None,
3886
+ access_service_url_marker: str = None,
3887
+ ) -> dict | str:
3888
+ """
3889
+ Removes a note log from the repository.
3890
+
3891
+ All the relationships to referenceables are lost.
3892
+
3893
+ Parameters
3894
+ ----------
3895
+ noteLogGUID
3896
+ - unique id for the note log.
3897
+ serverName
3898
+ - name of the server instances for this request
3899
+ requestBody
3900
+ - null request body.
3901
+ viewServiceURLMarker
3902
+ - optional view service URL marker (overrides accessServiceURLMarker)
3903
+ accessServiceURLMarker
3904
+ - optional access service URL marker used to identify which back end service to call
3905
+
3906
+ Returns
3907
+ -------
3908
+ VoidResponse
3909
+
3910
+ Raises
3911
+ ------
3912
+ InvalidParameterException
3913
+ one of the parameters is null or invalid or
3914
+ PropertyServerException
3915
+ There is a problem adding the element properties to the metadata repository or
3916
+ UserNotAuthorizedException
3917
+ the requesting user is not authorized to issue this request.
3918
+ """
3919
+ loop = asyncio.get_event_loop()
3920
+ response = loop.run_until_complete(
3921
+ self._async_remove_note_log(
3922
+ note_log_guid,
3923
+ server_name,
3924
+ body,
3925
+ view_service_url_marker,
3926
+ access_service_url_marker,
3927
+ )
3928
+ )
3929
+ return response
3930
+
3931
+ #
3932
+ ## remove_rating_from_element implementation
3933
+ #
3934
+
3935
+ async def _async_remove_rating_from_element(
3936
+ self,
3937
+ element_guid: str,
3938
+ server_name: str = None,
3939
+ body: dict = {},
3940
+ view_service_url_marker: str = None,
3941
+ access_service_url_marker: str = None,
3942
+ ) -> dict | str:
3943
+ """
3944
+ Removes of a star rating/review that was added to the element by this user.
3945
+
3946
+ Parameters
3947
+ ----------
3948
+ serverName
3949
+ - name of the server instances for this request.
3950
+ elementGUID
3951
+ - unique identifier for the element where the rating is attached.
3952
+ viewServiceURLMarker
3953
+ - optional view service URL marker (overrides accessServiceURLMarker)
3954
+ accessServiceURLMarker
3955
+ - optional access service URL marker used to identify which back end service to call
3956
+ requestBody
3957
+ - containing type of comment enum and the text of the comment.
3958
+
3959
+ Returns
3960
+ -------
3961
+ Void
3962
+
3963
+ Raises
3964
+ ------
3965
+ InvalidParameterException
3966
+ one of the parameters is null or invalid or
3967
+ PropertyServerException
3968
+ There is a problem adding the element properties to the metadata repository or
3969
+ UserNotAuthorizedException
3970
+ the requesting user is not authorized to issue this request.
3971
+ """
3972
+ if server_name is None:
3973
+ server_name = self.server_name
3974
+
3975
+ possible_query_params = query_string(
3976
+ [
3977
+ ("viewServiceUrlMarker", view_service_url_marker),
3978
+ ("accessServiceUrlMarker", access_service_url_marker),
3979
+ ]
3980
+ )
3981
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/ratings/remove{possible_query_params}"
3982
+ response = await self._async_make_request("POST", url, body)
3983
+ return response.json()
3984
+
3985
+ def remove_rating_from_element(
3986
+ self,
3987
+ element_guid: str,
3988
+ server_name: str = None,
3989
+ body: dict = {},
3990
+ view_service_url_marker: str = None,
3991
+ access_service_url_marker: str = None,
3992
+ ) -> dict | str:
3993
+ """
3994
+ Removes of a star rating/review that was added to the element by this user.
3995
+
3996
+ Parameters
3997
+ ----------
3998
+ serverName
3999
+ - name of the server instances for this request.
4000
+ elementGUID
4001
+ - unique identifier for the element where the rating is attached.
4002
+ viewServiceURLMarker
4003
+ - optional view service URL marker (overrides accessServiceURLMarker)
4004
+ accessServiceURLMarker
4005
+ - optional access service URL marker used to identify which back end service to call
4006
+ requestBody
4007
+ - containing type of comment enum and the text of the comment.
4008
+
4009
+ Returns
4010
+ -------
4011
+ Void
4012
+
4013
+ Raises
4014
+ ------
4015
+ InvalidParameterException
4016
+ one of the parameters is null or invalid or
4017
+ PropertyServerException
4018
+ There is a problem adding the element properties to the metadata repository or
4019
+ UserNotAuthorizedException
4020
+ the requesting user is not authorized to issue this request.
4021
+ """
4022
+ loop = asyncio.get_event_loop()
4023
+ response = loop.run_until_complete(
4024
+ self._async_remove_rating_from_element(
4025
+ element_guid,
4026
+ server_name,
4027
+ body,
4028
+ view_service_url_marker,
4029
+ access_service_url_marker,
4030
+ )
4031
+ )
4032
+ return response
4033
+
4034
+ #
4035
+ ## remove_tag_from_element implementation
4036
+ #
4037
+
4038
+ async def _async_remove_tag_from_element(
4039
+ self,
4040
+ element_guid: str,
4041
+ tag_guid: str,
4042
+ server_name: str = None,
4043
+ body: dict = {},
4044
+ view_service_url_marker: str = None,
4045
+ access_service_url_marker: str = None,
4046
+ ) -> dict | str:
4047
+ """
4048
+ Removes a link between a tag and an element that was added by this user.
4049
+
4050
+
4051
+ Parameters
4052
+ ----------
4053
+ serverName
4054
+ - name of the server instances for this request.
4055
+ elementGUID
4056
+ - unique id for the element.
4057
+ tagGUID
4058
+ - unique id of the tag.
4059
+ viewServiceURLMarker
4060
+ - optional view service URL marker (overrides accessServiceURLMarker)
4061
+ accessServiceURLMarker
4062
+ - optional access service URL marker used to identify which back end service to call
4063
+ requestBody
4064
+ - null request body needed for correct protocol exchange.
4065
+
4066
+ Returns
4067
+ -------
4068
+ Void
4069
+
4070
+ Raises
4071
+ ------
4072
+ InvalidParameterException
4073
+ one of the parameters is null or invalid or
4074
+ PropertyServerException
4075
+ There is a problem adding the element properties to the metadata repository or
4076
+ UserNotAuthorizedException
4077
+ the requesting user is not authorized to issue this request.
4078
+ """
4079
+ if server_name is None:
4080
+ server_name = self.server_name
4081
+
4082
+ possible_query_params = query_string(
4083
+ [
4084
+ ("viewServiceUrlMarker", view_service_url_marker),
4085
+ ("accessServiceUrlMarker", access_service_url_marker),
4086
+ ]
4087
+ )
4088
+ url = f"{base_path(self,server_name)}/elements/{element_guid}/tags/{tag_guid}/remove{possible_query_params}"
4089
+ response = await self._async_make_request("POST", url, body)
4090
+ return response.json()
4091
+
4092
+ def remove_tag_from_element(
4093
+ self,
4094
+ element_guid: str,
4095
+ tag_guid: str,
4096
+ server_name: str = None,
4097
+ body: dict = {},
4098
+ view_service_url_marker: str = None,
4099
+ access_service_url_marker: str = None,
4100
+ ) -> dict | str:
4101
+ """
4102
+ Removes a link between a tag and an element that was added by this user.
4103
+
4104
+
4105
+ Parameters
4106
+ ----------
4107
+ elementGUID
4108
+ - unique id for the element.
4109
+ tagGUID
4110
+ - unique id of the tag.
4111
+ serverName
4112
+ - name of the server instances for this request.
4113
+ viewServiceURLMarker
4114
+ - optional view service URL marker (overrides accessServiceURLMarker)
4115
+ accessServiceURLMarker
4116
+ - optional access service URL marker used to identify which back end service to call
4117
+ requestBody
4118
+ - null request body needed for correct protocol exchange.
4119
+
4120
+ Returns
4121
+ -------
4122
+ Void
4123
+
4124
+ Raises
4125
+ ------
4126
+ InvalidParameterException
4127
+ one of the parameters is null or invalid or
4128
+ PropertyServerException
4129
+ There is a problem adding the element properties to the metadata repository or
4130
+ UserNotAuthorizedException
4131
+ the requesting user is not authorized to issue this request.
4132
+ """
4133
+ loop = asyncio.get_event_loop()
4134
+ response = loop.run_until_complete(
4135
+ self._async_remove_tag_from_element(
4136
+ element_guid,
4137
+ tag_guid,
4138
+ server_name,
4139
+ body,
4140
+ view_service_url_marker,
4141
+ access_service_url_marker,
4142
+ )
4143
+ )
4144
+ return response
4145
+
4146
+ #
4147
+ ## setup_accepted_answer implementation
4148
+ #
4149
+
4150
+ async def _async_setup_accepted_answer(
4151
+ self,
4152
+ question_comment_guid: str,
4153
+ answer_comment_guid: str,
4154
+ server_name: str = None,
4155
+ is_public: bool = True,
4156
+ body: dict = {},
4157
+ view_service_url_marker: str = None,
4158
+ access_service_url_marker: str = None,
4159
+ ) -> dict | str:
4160
+ """
4161
+ Link a comment that contains the best answer to a question posed in another comment.
4162
+
4163
+ Parameters
4164
+ ----------
4165
+ serverName
4166
+ - name of the server to route the request to
4167
+ questionCommentGUID
4168
+ - unique identifier of the comment containing the question
4169
+ answerCommentGUID
4170
+ - unique identifier of the comment containing the accepted answer
4171
+ isPublic
4172
+ - is this visible to other people
4173
+ viewServiceURLMarker
4174
+ - optional view service URL marker (overrides accessServiceURLMarker)
4175
+ accessServiceURLMarker
4176
+ - optional access service URL marker used to identify which back end service to call
4177
+ requestBody
4178
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
4179
+
4180
+ Returns
4181
+ -------
4182
+ Void
4183
+
4184
+ Raises
4185
+ ------
4186
+ InvalidParameterException
4187
+ one of the parameters is null or invalid or
4188
+ PropertyServerException
4189
+ There is a problem adding the element properties to the metadata repository or
4190
+ UserNotAuthorizedException
4191
+ the requesting user is not authorized to issue this request.
4192
+ """
4193
+ if server_name is None:
4194
+ server_name = self.server_name
4195
+
4196
+ possible_query_params = query_string(
4197
+ [
4198
+ ("isPublic", is_public),
4199
+ ("viewServiceUrlMarker", view_service_url_marker),
4200
+ ("accessServiceUrlMarker", access_service_url_marker),
4201
+ ]
4202
+ )
4203
+ url = f"{base_path(self,server_name)}/comments/questions/{question_comment_guid}/answers/{answer_comment_guid}{possible_query_params}"
4204
+ response = await self._async_make_request("POST", url, body)
4205
+ return response.json()
4206
+
4207
+ def setup_accepted_answer(
4208
+ self,
4209
+ question_comment_guid: str,
4210
+ answer_comment_guid: str,
4211
+ server_name: str = None,
4212
+ is_public: bool = True,
4213
+ body: dict = {},
4214
+ view_service_url_marker: str = None,
4215
+ access_service_url_marker: str = None,
4216
+ ) -> dict | str:
4217
+ """
4218
+ Link a comment that contains the best answer to a question posed in another comment.
4219
+
4220
+ Parameters
4221
+ ----------
4222
+ serverName
4223
+ - name of the server to route the request to
4224
+ questionCommentGUID
4225
+ - unique identifier of the comment containing the question
4226
+ answerCommentGUID
4227
+ - unique identifier of the comment containing the accepted answer
4228
+ isPublic
4229
+ - is this visible to other people
4230
+ viewServiceURLMarker
4231
+ - optional view service URL marker (overrides accessServiceURLMarker)
4232
+ accessServiceURLMarker
4233
+ - optional access service URL marker used to identify which back end service to call
4234
+ requestBody
4235
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
4236
+
4237
+ Returns
4238
+ -------
4239
+ Void
4240
+
4241
+ Raises
4242
+ ------
4243
+ InvalidParameterException
4244
+ one of the parameters is null or invalid or
4245
+ PropertyServerException
4246
+ There is a problem adding the element properties to the metadata repository or
4247
+ UserNotAuthorizedException
4248
+ the requesting user is not authorized to issue this request.
4249
+ """
4250
+ loop = asyncio.get_event_loop()
4251
+ response = loop.run_until_complete(
4252
+ self._async_setup_accepted_answer(
4253
+ question_comment_guid,
4254
+ answer_comment_guid,
4255
+ server_name,
4256
+ is_public,
4257
+ body,
4258
+ view_service_url_marker,
4259
+ access_service_url_marker,
4260
+ )
4261
+ )
4262
+ return response
4263
+
4264
+ #
4265
+ ## update_comment implementation
4266
+ #
4267
+
4268
+ async def _async_update_comment(
4269
+ self,
4270
+ comment_guid: str,
4271
+ body: dict,
4272
+ server_name: str = None,
4273
+ is_merge_update: bool = None,
4274
+ view_service_url_marker: str = None,
4275
+ access_service_url_marker: str = None,
4276
+ ) -> dict | str:
4277
+ """
4278
+ Update an existing comment.
4279
+
4280
+ Parameters
4281
+ ----------
4282
+ commentGUID
4283
+ - unique identifier for the comment to change.
4284
+ body
4285
+ - containing type of comment enum and the text of the comment.
4286
+ serverName
4287
+ - name of the server instances for this request.
4288
+ isMergeUpdate
4289
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4290
+ viewServiceURLMarker
4291
+ - optional view service URL marker (overrides accessServiceURLMarker)
4292
+ accessServiceURLMarker
4293
+ - optional access service URL marker used to identify which back end service to call
4294
+
4295
+ Returns
4296
+ -------
4297
+ Void
4298
+
4299
+ Raises
4300
+ ------
4301
+ InvalidParameterException
4302
+ one of the parameters is null or invalid or
4303
+ PropertyServerException
4304
+ There is a problem adding the element properties to the metadata repository or
4305
+ UserNotAuthorizedException
4306
+ the requesting user is not authorized to issue this request.
4307
+ """
4308
+ if server_name is None:
4309
+ server_name = self.server_name
4310
+
4311
+ possible_query_params = query_string(
4312
+ [
4313
+ ("isMergeUpdate", is_merge_update),
4314
+ ("viewServiceUrlMarker", view_service_url_marker),
4315
+ ("accessServiceUrlMarker", access_service_url_marker),
4316
+ ]
4317
+ )
4318
+ url = f"{base_path(self,server_name)}/comments/{comment_guid}/update{possible_query_params}"
4319
+ response = await self._async_make_request("POST", url, body)
4320
+ return response.json()
4321
+
4322
+ def update_comment(
4323
+ self,
4324
+ comment_guid: str,
4325
+ body: dict,
4326
+ server_name: str = None,
4327
+ is_merge_update: bool = None,
4328
+ view_service_url_marker: str = None,
4329
+ access_service_url_marker: str = None,
4330
+ ) -> dict | str:
4331
+ """
4332
+ Update an existing comment.
4333
+
4334
+ Parameters
4335
+ ----------
4336
+ commentGUID
4337
+ - unique identifier for the comment to change.
4338
+ body
4339
+ - containing type of comment enum and the text of the comment.
4340
+ serverName
4341
+ - name of the server instances for this request.
4342
+ isMergeUpdate
4343
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4344
+ viewServiceURLMarker
4345
+ - optional view service URL marker (overrides accessServiceURLMarker)
4346
+ accessServiceURLMarker
4347
+ - optional access service URL marker used to identify which back end service to call
4348
+
4349
+ Returns
4350
+ -------
4351
+ Void
4352
+
4353
+ Raises
4354
+ ------
4355
+ InvalidParameterException
4356
+ one of the parameters is null or invalid or
4357
+ PropertyServerException
4358
+ There is a problem adding the element properties to the metadata repository or
4359
+ UserNotAuthorizedException
4360
+ the requesting user is not authorized to issue this request.
4361
+ """
4362
+ loop = asyncio.get_event_loop()
4363
+ response = loop.run_until_complete(
4364
+ self._async_update_comment(
4365
+ comment_guid,
4366
+ body,
4367
+ server_name,
4368
+ is_merge_update,
4369
+ view_service_url_marker,
4370
+ access_service_url_marker,
4371
+ )
4372
+ )
4373
+ return response
4374
+
4375
+ #
4376
+ ## update_comment_visibility implementation
4377
+ #
4378
+
4379
+ async def _async_update_comment_visibility(
4380
+ self,
4381
+ parent_guid: str,
4382
+ comment_guid: str,
4383
+ is_public: bool,
4384
+ body: dict = {},
4385
+ server_name: str = None,
4386
+ view_service_url_marker: str = None,
4387
+ access_service_url_marker: str = None,
4388
+ ) -> dict | str:
4389
+ """
4390
+ Update an existing comment's visibility.
4391
+
4392
+ Parameters
4393
+ ----------
4394
+ serverName
4395
+ - name of the server instances for this request.
4396
+ commentGUID
4397
+ - unique identifier for the comment to change.
4398
+ isPublic
4399
+ - is this visible to other people
4400
+ viewServiceURLMarker
4401
+ - optional view service URL marker (overrides accessServiceURLMarker)
4402
+ accessServiceURLMarker
4403
+ - optional access service URL marker used to identify which back end service to call
4404
+ requestBody
4405
+ - containing type of comment enum and the text of the comment.
4406
+
4407
+ Returns
4408
+ -------
4409
+ Void
4410
+
4411
+ Raises
4412
+ ------
4413
+ InvalidParameterException
4414
+ one of the parameters is null or invalid or
4415
+ PropertyServerException
4416
+ There is a problem adding the element properties to the metadata repository or
4417
+ UserNotAuthorizedException
4418
+ the requesting user is not authorized to issue this request.
4419
+ """
4420
+ if server_name is None:
4421
+ server_name = self.server_name
4422
+
4423
+ possible_query_params = query_string(
4424
+ [
4425
+ ("isPublic", is_public),
4426
+ ("viewServiceUrlMarker", view_service_url_marker),
4427
+ ("accessServiceUrlMarker", access_service_url_marker),
4428
+ ]
4429
+ )
4430
+ url = f"{base_path(self,server_name)}/parents/{parent_guid}/comments/{comment_guid}/update-visibility{possible_query_params}"
4431
+ response = await self._async_make_request("POST", url, body)
4432
+ return response.json()
4433
+
4434
+ def update_comment_visibility(
4435
+ self,
4436
+ parent_guid: str,
4437
+ comment_guid: str,
4438
+ is_public: bool,
4439
+ body: dict = {},
4440
+ server_name: str = None,
4441
+ view_service_url_marker: str = None,
4442
+ access_service_url_marker: str = None,
4443
+ ) -> dict | str:
4444
+ """
4445
+ Update an existing comment's visibility.
4446
+
4447
+ Parameters
4448
+ ----------
4449
+ serverName
4450
+ - name of the server instances for this request.
4451
+ commentGUID
4452
+ - unique identifier for the comment to change.
4453
+ isPublic
4454
+ - is this visible to other people
4455
+ viewServiceURLMarker
4456
+ - optional view service URL marker (overrides accessServiceURLMarker)
4457
+ accessServiceURLMarker
4458
+ - optional access service URL marker used to identify which back end service to call
4459
+ requestBody
4460
+ - containing type of comment enum and the text of the comment.
4461
+
4462
+ Returns
4463
+ -------
4464
+ Void
4465
+
4466
+ Raises
4467
+ ------
4468
+ InvalidParameterException
4469
+ one of the parameters is null or invalid or
4470
+ PropertyServerException
4471
+ There is a problem adding the element properties to the metadata repository or
4472
+ UserNotAuthorizedException
4473
+ the requesting user is not authorized to issue this request.
4474
+ """
4475
+ loop = asyncio.get_event_loop()
4476
+ response = loop.run_until_complete(
4477
+ self._async_update_comment_visibility(
4478
+ parent_guid,
4479
+ comment_guid,
4480
+ is_public,
4481
+ body,
4482
+ server_name,
4483
+ view_service_url_marker,
4484
+ access_service_url_marker,
4485
+ )
4486
+ )
4487
+ return response
4488
+
4489
+ #
4490
+ ## update_note implementation
4491
+ #
4492
+
4493
+ async def _async_update_note(
4494
+ self,
4495
+ note_guid: str,
4496
+ body: dict,
4497
+ server_name: str = None,
4498
+ is_merge_update: bool = None,
4499
+ view_service_url_marker: str = None,
4500
+ access_service_url_marker: str = None,
4501
+ ) -> dict | str:
4502
+ """
4503
+ Update an existing note.
4504
+
4505
+ Parameters
4506
+ ----------
4507
+ serverName
4508
+ - name of the server instances for this request.
4509
+ noteGUID
4510
+ - unique identifier for the note to change.
4511
+ isMergeUpdate
4512
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4513
+ viewServiceURLMarker
4514
+ - optional view service URL marker (overrides accessServiceURLMarker)
4515
+ accessServiceURLMarker
4516
+ - optional access service URL marker used to identify which back end service to call
4517
+ requestBody
4518
+ - containing type of comment enum and the text of the comment.
4519
+
4520
+ Returns
4521
+ -------
4522
+ Void
4523
+
4524
+ Raises
4525
+ ------
4526
+ InvalidParameterException
4527
+ one of the parameters is null or invalid or
4528
+ PropertyServerException
4529
+ There is a problem adding the element properties to the metadata repository or
4530
+ UserNotAuthorizedException
4531
+ the requesting user is not authorized to issue this request.
4532
+ """
4533
+ if server_name is None:
4534
+ server_name = self.server_name
4535
+
4536
+ possible_query_params = query_string(
4537
+ [
4538
+ ("isMergeUpdate", is_merge_update),
4539
+ ("viewServiceUrlMarker", view_service_url_marker),
4540
+ ("accessServiceUrlMarker", access_service_url_marker),
4541
+ ]
4542
+ )
4543
+ url = f"{base_path(self,server_name)}/notes/{note_guid}{possible_query_params}"
4544
+ response = await self._async_make_request("POST", url, body)
4545
+ return response.json()
4546
+
4547
+ def update_note(
4548
+ self,
4549
+ note_guid: str,
4550
+ body: dict,
4551
+ server_name: str = None,
4552
+ is_merge_update: bool = None,
4553
+ view_service_url_marker: str = None,
4554
+ access_service_url_marker: str = None,
4555
+ ) -> dict | str:
4556
+ """
4557
+ Update an existing note.
4558
+
4559
+ Parameters
4560
+ ----------
4561
+ serverName
4562
+ - name of the server instances for this request.
4563
+ noteGUID
4564
+ - unique identifier for the note to change.
4565
+ isMergeUpdate
4566
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4567
+ viewServiceURLMarker
4568
+ - optional view service URL marker (overrides accessServiceURLMarker)
4569
+ accessServiceURLMarker
4570
+ - optional access service URL marker used to identify which back end service to call
4571
+ requestBody
4572
+ - containing type of comment enum and the text of the comment.
4573
+
4574
+ Returns
4575
+ -------
4576
+ Void
4577
+
4578
+ Raises
4579
+ ------
4580
+ InvalidParameterException
4581
+ one of the parameters is null or invalid or
4582
+ PropertyServerException
4583
+ There is a problem adding the element properties to the metadata repository or
4584
+ UserNotAuthorizedException
4585
+ the requesting user is not authorized to issue this request.
4586
+ """
4587
+ loop = asyncio.get_event_loop()
4588
+ response = loop.run_until_complete(
4589
+ self._async_update_note(
4590
+ note_guid,
4591
+ body,
4592
+ server_name,
4593
+ is_merge_update,
4594
+ view_service_url_marker,
4595
+ access_service_url_marker,
4596
+ )
4597
+ )
4598
+ return response
4599
+
4600
+ #
4601
+ ## update_note_log implementation
4602
+ #
4603
+
4604
+ async def _async_update_note_log(
4605
+ self,
4606
+ note_log_guid: str,
4607
+ body: dict,
4608
+ server_name: str = None,
4609
+ is_merge_update: bool = None,
4610
+ view_service_url_marker: str = None,
4611
+ access_service_url_marker: str = None,
4612
+ ) -> dict | str:
4613
+ """
4614
+ Update an existing note log.
4615
+
4616
+ Parameters
4617
+ ----------
4618
+ noteLogGUID
4619
+ - unique identifier for the note log to change.
4620
+ body
4621
+ - containing type of comment enum and the text of the comment.
4622
+ serverName
4623
+ - name of the server instances for this request.
4624
+ isMergeUpdate
4625
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4626
+ viewServiceURLMarker
4627
+ - optional view service URL marker (overrides accessServiceURLMarker)
4628
+ accessServiceURLMarker
4629
+ - optional access service URL marker used to identify which back end service to call
4630
+
4631
+ Returns
4632
+ -------
4633
+ Void
4634
+
4635
+ Raises
4636
+ ------
4637
+ InvalidParameterException
4638
+ one of the parameters is null or invalid or
4639
+ PropertyServerException
4640
+ There is a problem adding the element properties to the metadata repository or
4641
+ UserNotAuthorizedException
4642
+ the requesting user is not authorized to issue this request.
4643
+ """
4644
+ if server_name is None:
4645
+ server_name = self.server_name
4646
+
4647
+ possible_query_params = query_string(
4648
+ [
4649
+ ("isMergeUpdate", is_merge_update),
4650
+ ("viewServiceUrlMarker", view_service_url_marker),
4651
+ ("accessServiceUrlMarker", access_service_url_marker),
4652
+ ]
4653
+ )
4654
+ url = f"{base_path(self,server_name)}/note-logs/{note_log_guid}{possible_query_params}"
4655
+ response = await self._async_make_request("POST", url, body)
4656
+ return response.json()
4657
+
4658
+ def update_note_log(
4659
+ self,
4660
+ note_log_guid: str,
4661
+ body: dict,
4662
+ server_name: str = None,
4663
+ is_merge_update: bool = None,
4664
+ view_service_url_marker: str = None,
4665
+ access_service_url_marker: str = None,
4666
+ ) -> dict | str:
4667
+ """
4668
+ Update an existing note log.
4669
+
4670
+ Parameters
4671
+ ----------
4672
+ noteLogGUID
4673
+ - unique identifier for the note log to change.
4674
+ body
4675
+ - containing type of comment enum and the text of the comment.
4676
+ serverName
4677
+ - name of the server instances for this request.
4678
+ isMergeUpdate
4679
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4680
+ viewServiceURLMarker
4681
+ - optional view service URL marker (overrides accessServiceURLMarker)
4682
+ accessServiceURLMarker
4683
+ - optional access service URL marker used to identify which back end service to call
4684
+
4685
+ Returns
4686
+ -------
4687
+ Void
4688
+
4689
+ Raises
4690
+ ------
4691
+ InvalidParameterException
4692
+ one of the parameters is null or invalid or
4693
+ PropertyServerException
4694
+ There is a problem adding the element properties to the metadata repository or
4695
+ UserNotAuthorizedException
4696
+ the requesting user is not authorized to issue this request.
4697
+ """
4698
+ loop = asyncio.get_event_loop()
4699
+ response = loop.run_until_complete(
4700
+ self._async_update_note_log(
4701
+ note_log_guid,
4702
+ body,
4703
+ server_name,
4704
+ is_merge_update,
4705
+ view_service_url_marker,
4706
+ access_service_url_marker,
4707
+ )
4708
+ )
4709
+ return response
4710
+
4711
+ #
4712
+ ## update_tag_description implementation
4713
+ #
4714
+
4715
+ async def _async_update_tag_description(
4716
+ self,
4717
+ tag_guid: str,
4718
+ body: str,
4719
+ server_name: str = None,
4720
+ view_service_url_marker: str = None,
4721
+ access_service_url_marker: str = None,
4722
+ ) -> dict | str:
4723
+ """
4724
+ Updates the description of an existing tag (either private or public).
4725
+
4726
+ Parameters
4727
+ ----------
4728
+ serverName
4729
+ - name of the server instances for this request
4730
+ tagGUID
4731
+ - unique id for the tag
4732
+ viewServiceURLMarker
4733
+ - optional view service URL marker (overrides accessServiceURLMarker)
4734
+ accessServiceURLMarker
4735
+ - optional access service URL marker used to identify which back end service to call
4736
+ requestBody - contains the name of the tag and (optional) description of the tag.
4737
+
4738
+ Returns
4739
+ -------
4740
+ VoidResponse :
4741
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
4742
+
4743
+ Raises
4744
+ ------
4745
+ InvalidParameterException
4746
+ one of the parameters is null or invalid or
4747
+ PropertyServerException
4748
+ There is a problem adding the element properties to the metadata repository or
4749
+ UserNotAuthorizedException
4750
+ the requesting user is not authorized to issue this request.
4751
+ """
4752
+ if server_name is None:
4753
+ server_name = self.server_name
4754
+
4755
+ possible_query_params = query_string(
4756
+ [
4757
+ ("viewServiceUrlMarker", view_service_url_marker),
4758
+ ("accessServiceUrlMarker", access_service_url_marker),
4759
+ ]
4760
+ )
4761
+ url = f"{base_path(self,server_name)}/tags/{tag_guid}/update{possible_query_params}"
4762
+
4763
+ response = await self._async_make_request("POST", url, body)
4764
+ return response.json()
4765
+
4766
+ def update_tag_description(
4767
+ self,
4768
+ tag_guid: str,
4769
+ body: str,
4770
+ server_name: str = None,
4771
+ view_service_url_marker: str = None,
4772
+ access_service_url_marker: str = None,
4773
+ ) -> dict | str:
4774
+ """
4775
+ Updates the description of an existing tag (either private or public).
4776
+
4777
+ Parameters
4778
+ ----------
4779
+ serverName
4780
+ - name of the server instances for this request
4781
+ tagGUID
4782
+ - unique id for the tag
4783
+ viewServiceURLMarker
4784
+ - optional view service URL marker (overrides accessServiceURLMarker)
4785
+ accessServiceURLMarker
4786
+ - optional access service URL marker used to identify which back end service to call
4787
+ requestBody - contains the name of the tag and (optional) description of the tag.
4788
+
4789
+ Returns
4790
+ -------
4791
+ VoidResponse :
4792
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
4793
+
4794
+ Raises
4795
+ ------
4796
+ InvalidParameterException
4797
+ one of the parameters is null or invalid or
4798
+ PropertyServerException
4799
+ There is a problem adding the element properties to the metadata repository or
4800
+ UserNotAuthorizedException
4801
+ the requesting user is not authorized to issue this request.
4802
+ """
4803
+ loop = asyncio.get_event_loop()
4804
+ response = loop.run_until_complete(
4805
+ self._async_update_tag_description(
4806
+ tag_guid,
4807
+ body,
4808
+ server_name,
4809
+ view_service_url_marker,
4810
+ access_service_url_marker,
4811
+ )
4812
+ )
4813
+ return response